Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abdm facility and version 3 changes #52

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common-UI
Submodule Common-UI updated 70 files
+0 βˆ’0 src/registrar/abha-components/abha-enter-mobile-otp-component/abha-enter-mobile-otp-component.component.css
+35 βˆ’0 src/registrar/abha-components/abha-enter-mobile-otp-component/abha-enter-mobile-otp-component.component.html
+21 βˆ’0 ...registrar/abha-components/abha-enter-mobile-otp-component/abha-enter-mobile-otp-component.component.spec.ts
+111 βˆ’0 src/registrar/abha-components/abha-enter-mobile-otp-component/abha-enter-mobile-otp-component.component.ts
+15 βˆ’33 src/registrar/abha-components/abha-enter-otp-component/abha-enter-otp-component.component.css
+85 βˆ’0 src/registrar/abha-components/abha-enter-otp-component/abha-enter-otp-component.component.html
+21 βˆ’0 src/registrar/abha-components/abha-enter-otp-component/abha-enter-otp-component.component.spec.ts
+252 βˆ’0 src/registrar/abha-components/abha-enter-otp-component/abha-enter-otp-component.component.ts
+107 βˆ’0 ...registrar/abha-components/abha-generation-success-component/abha-generation-success-component.component.css
+102 βˆ’0 ...egistrar/abha-components/abha-generation-success-component/abha-generation-success-component.component.html
+21 βˆ’0 ...strar/abha-components/abha-generation-success-component/abha-generation-success-component.component.spec.ts
+125 βˆ’0 src/registrar/abha-components/abha-generation-success-component/abha-generation-success-component.component.ts
+0 βˆ’0 src/registrar/abha-components/abha-mobile-component/abha-mobile-component.component.css
+48 βˆ’0 src/registrar/abha-components/abha-mobile-component/abha-mobile-component.component.html
+21 βˆ’0 src/registrar/abha-components/abha-mobile-component/abha-mobile-component.component.spec.ts
+123 βˆ’0 src/registrar/abha-components/abha-mobile-component/abha-mobile-component.component.ts
+107 βˆ’0 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.css
+59 βˆ’0 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.html
+21 βˆ’0 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.spec.ts
+80 βˆ’0 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.ts
+0 βˆ’0 src/registrar/abha-components/biometric-authentication/biometric-authentication.component.css
+0 βˆ’10 src/registrar/abha-components/biometric-authentication/biometric-authentication.component.html
+0 βˆ’0 src/registrar/abha-components/biometric-authentication/biometric-authentication.component.spec.ts
+82 βˆ’0 src/registrar/abha-components/biometric-authentication/biometric-authentication.component.ts
+96 βˆ’0 src/registrar/abha-components/display-abha-card/display-abha-card.component.css
+21 βˆ’0 src/registrar/abha-components/display-abha-card/display-abha-card.component.html
+21 βˆ’0 src/registrar/abha-components/display-abha-card/display-abha-card.component.spec.ts
+89 βˆ’0 src/registrar/abha-components/display-abha-card/display-abha-card.component.ts
+7 βˆ’3 src/registrar/abha-components/download-search-abha/download-search-abha.component.css
+76 βˆ’0 src/registrar/abha-components/download-search-abha/download-search-abha.component.html
+21 βˆ’0 src/registrar/abha-components/download-search-abha/download-search-abha.component.spec.ts
+208 βˆ’0 src/registrar/abha-components/download-search-abha/download-search-abha.component.ts
+0 βˆ’5 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.css
+61 βˆ’0 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.html
+4 βˆ’7 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.spec.ts
+138 βˆ’0 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.ts
+0 βˆ’0 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.css
+0 βˆ’0 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.html
+0 βˆ’0 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.spec.ts
+13 βˆ’106 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.ts
+0 βˆ’236 src/registrar/biometric-authentication/biometric-authentication.component.ts
+0 βˆ’34 src/registrar/generate-abha-component/auth-method.html
+0 βˆ’61 src/registrar/generate-abha-component/generate-abha-component.component.html
+0 βˆ’166 src/registrar/generate-abha-component/generate-abha-component.component.ts
+0 βˆ’99 src/registrar/generate-mobile-otp-generation/generate-mobile-otp-generation.component.html
+0 βˆ’45 src/registrar/generate-mobile-otp-generation/generate-mobile-otp-generation.component.spec.ts
+0 βˆ’228 src/registrar/generate-mobile-otp-generation/generate-mobile-otp-generation.component.ts
+0 βˆ’141 src/registrar/health-id-otp-generation/health-id-otp-generation.component.html
+0 βˆ’45 src/registrar/health-id-otp-generation/health-id-otp-generation.component.spec.ts
+0 βˆ’637 src/registrar/health-id-otp-generation/health-id-otp-generation.component.ts
+0 βˆ’75 src/registrar/health-id-otp-generation/health-id-otp-succespopup.html
+0 βˆ’153 src/registrar/health-id-validatepopup/health-id-validatepopup.component.html
+0 βˆ’21 src/registrar/health-id-validatepopup/health-id-validatepopup.component.spec.ts
+0 βˆ’534 src/registrar/health-id-validatepopup/health-id-validatepopup.component.ts
+17 βˆ’20 src/registrar/registration.module.ts
+1 βˆ’2 src/registrar/registration/abha-information/abha-information.component.html
+15 βˆ’13 src/registrar/registration/abha-information/abha-information.component.ts
+37 βˆ’1 src/registrar/registration/location-information/location-information.component.ts
+1 βˆ’1 src/registrar/registration/registration.component.html
+108 βˆ’49 src/registrar/registration/registration.component.ts
+1 βˆ’1 src/registrar/search/search.component.ts
+2 βˆ’1 src/registrar/services/rddevice.service.ts
+42 βˆ’0 src/registrar/services/registrar.service.ts
+0 βˆ’103 src/registrar/set-password-for-abha/set-password-for-abha.component.html
+0 βˆ’45 src/registrar/set-password-for-abha/set-password-for-abha.component.spec.ts
+0 βˆ’143 src/registrar/set-password-for-abha/set-password-for-abha.component.ts
+0 βˆ’45 src/registrar/view-health-id-card/view-health-id-card.component.css
+0 βˆ’35 src/registrar/view-health-id-card/view-health-id-card.component.html
+0 βˆ’45 src/registrar/view-health-id-card/view-health-id-card.component.spec.ts
+0 βˆ’144 src/registrar/view-health-id-card/view-health-id-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ <h3 [ngClass]="['title', status]">
</h3>
<div class="message">{{ message }}</div>
<div class="action">
<button class="full-width-login button-ok" mat-dialog-close cdkFocusInitial>
<button
class="full-width-login button-ok"
(click)="dialogRef.close(true)"
mat-dialog-close
cdkFocusInitial
>
{{ btnOkText }}
</button>
</div>
Expand Down
60 changes: 59 additions & 1 deletion src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import {
import { CanComponentDeactivate } from '../../core/services/can-deactivate-guard.service';
import { SpecialistLoginComponent } from '../../core/components/specialist-login/specialist-login.component';
import { IdrsscoreService } from '../shared/services/idrsscore.service';
import { RegistrarService } from '../../registrar/shared/services/registrar.service';
import { Observable, Subscription, of } from 'rxjs';
import { HttpServiceService } from '../../core/services/http-service.service';
import { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
Expand All @@ -59,6 +58,7 @@ import { environment } from 'src/environments/environment';
import { HealthIdDisplayModalComponent } from '../../core/components/health-id-display-modal/health-id-display-modal.component';
import { OpenPreviousVisitDetailsComponent } from '../../core/components/open-previous-visit-details/open-previous-visit-details.component';
import { SchedulerComponent } from '../scheduler/scheduler.component';
import { RegistrarService } from 'Common-UI/src/registrar/services/registrar.service';

@Component({
selector: 'app-workarea',
Expand Down Expand Up @@ -178,6 +178,8 @@ export class WorkareaComponent
isDoctorUpdate = false;
isDoctorSave = false;
serviceType: any;
abdmFacilityId = null;
abdmFacilityName = null;
Comment on lines +181 to +182
Copy link

@coderabbitai coderabbitai bot Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ› οΈ Refactor suggestion

Add type annotations to class properties.

Please specify the types for abdmFacilityId and abdmFacilityName to enhance type safety and code readability.

Apply this diff to add type annotations:

-  abdmFacilityId = null;
-  abdmFacilityName = null;
+  abdmFacilityId: string | null = null;
+  abdmFacilityName: string | null = null;
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
abdmFacilityId = null;
abdmFacilityName = null;
abdmFacilityId: string | null = null;
abdmFacilityName: string | null = null;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its maintained like that all over the project. hence following the same

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helenKaryamsetty, understood. Maintaining consistency with the existing codebase is important. Thank you for the clarification.


✏️ Learnings added
Learnt from: helenKaryamsetty
PR: PSMRI/TM-UI#52
File: src/app/app-modules/nurse-doctor/workarea/workarea.component.ts:181-182
Timestamp: 2024-12-16T11:12:21.288Z
Learning: In the `src/app/app-modules/nurse-doctor/workarea/workarea.component.ts` file, and throughout the Angular project, class properties are declared without explicit type annotations to maintain consistency.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

ngOnInit() {
this.enableUpdateButtonInVitals = false;
this.enableCovidVaccinationSaveButton = false;
Expand Down Expand Up @@ -3221,6 +3223,7 @@ export class WorkareaComponent
}
/* Fetch health ID detaiuls to link the visit */
getHealthIDDetails(successResponseFromAPI: any) {
this.getMappedAbdmFacility();
this.confirmationService
.confirm(
'info',
Expand All @@ -3237,6 +3240,61 @@ export class WorkareaComponent
}
});
}

getMappedAbdmFacility() {
const locationData: any = localStorage.getItem('loginDataResponse');
const jsonLoccationData = JSON.parse(locationData);
let workLocationId: any;
if (jsonLoccationData?.previlegeObj[0]?.roles) {
const roles = jsonLoccationData?.previlegeObj[0]?.roles;
roles.find((item: any) => {
item.RoleName.toLowerCase() === 'doctor';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comparison?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drtechie Yes, we are fetching the role mapped to userName and only giving carecontext facility details if the role is doctor.

workLocationId = item.workingLocationID;
});
}
console.log('workLocationId', workLocationId);
Comment on lines +3244 to +3255
Copy link

@coderabbitai coderabbitai bot Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix logical error in roles.find() callback function.

The callback function in roles.find() does not return a boolean value, which means the find method will not work as expected. Additionally, there are typos in variable names.

Apply this diff to correct the issue:

-    const jsonLoccationData = JSON.parse(locationData);
+    const jsonLocationData = JSON.parse(locationData);

-    if (jsonLoccationData?.previlegeObj[0]?.roles) {
-      const roles = jsonLoccationData?.previlegeObj[0]?.roles;
+    if (jsonLocationData?.privilegeObj[0]?.roles) {
+      const roles = jsonLocationData?.privilegeObj[0]?.roles;

-      roles.find((item: any) => {
-        item.RoleName.toLowerCase() === 'doctor';
-        workLocationId = item.workingLocationID;
-      });
+      const doctorRole = roles.find((item: any) => item.RoleName.toLowerCase() === 'doctor');
+      if (doctorRole) {
+        workLocationId = doctorRole.workingLocationID;
+      }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
getMappedAbdmFacility() {
const locationData: any = localStorage.getItem('loginDataResponse');
const jsonLoccationData = JSON.parse(locationData);
let workLocationId: any;
if (jsonLoccationData?.previlegeObj[0]?.roles) {
const roles = jsonLoccationData?.previlegeObj[0]?.roles;
roles.find((item: any) => {
item.RoleName.toLowerCase() === 'doctor';
workLocationId = item.workingLocationID;
});
}
console.log('workLocationId', workLocationId);
getMappedAbdmFacility() {
const locationData: any = localStorage.getItem('loginDataResponse');
const jsonLocationData = JSON.parse(locationData);
let workLocationId: any;
if (jsonLocationData?.privilegeObj[0]?.roles) {
const roles = jsonLocationData?.privilegeObj[0]?.roles;
const doctorRole = roles.find((item: any) => item.RoleName.toLowerCase() === 'doctor');
if (doctorRole) {
workLocationId = doctorRole.workingLocationID;
}
}
console.log('workLocationId', workLocationId);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont need a booelan keyword but data is needed and i want to use find() method only for my code purpose

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helenKaryamsetty, understood. If you prefer using the find() method in this way for your code, that's perfectly fine. Let me know if there's anything else I can assist with.


✏️ Learnings added
Learnt from: helenKaryamsetty
PR: PSMRI/TM-UI#52
File: src/app/app-modules/nurse-doctor/workarea/workarea.component.ts:3244-3255
Timestamp: 2024-12-16T11:11:54.647Z
Learning: In `src/app/app-modules/nurse-doctor/workarea/workarea.component.ts`, the developer prefers to use the `find()` method without explicitly returning a boolean in the callback function.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Comment on lines +3244 to +3255
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ› οΈ Refactor suggestion

Fix typos and add error handling for JSON parsing.

The code has the following issues:

  1. Variable name typo: jsonLoccationData should be jsonLocationData
  2. Property path typo: previlegeObj should be privilegeObj
  3. Missing error handling for JSON.parse

Apply this diff to fix the issues:

-    const jsonLoccationData = JSON.parse(locationData);
+    try {
+      const jsonLocationData = JSON.parse(locationData);
+
+      if (jsonLocationData?.privilegeObj[0]?.roles) {
+        const roles = jsonLocationData?.privilegeObj[0]?.roles;
+        roles.find((item: any) => {
+          item.RoleName.toLowerCase() === 'doctor';
+          workLocationId = item.workingLocationID;
+        });
+      }
+    } catch (error) {
+      console.error('Error parsing location data:', error);
+      return;
+    }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
getMappedAbdmFacility() {
const locationData: any = localStorage.getItem('loginDataResponse');
const jsonLoccationData = JSON.parse(locationData);
let workLocationId: any;
if (jsonLoccationData?.previlegeObj[0]?.roles) {
const roles = jsonLoccationData?.previlegeObj[0]?.roles;
roles.find((item: any) => {
item.RoleName.toLowerCase() === 'doctor';
workLocationId = item.workingLocationID;
});
}
console.log('workLocationId', workLocationId);
getMappedAbdmFacility() {
const locationData: any = localStorage.getItem('loginDataResponse');
try {
const jsonLocationData = JSON.parse(locationData);
if (jsonLocationData?.privilegeObj[0]?.roles) {
const roles = jsonLocationData?.privilegeObj[0]?.roles;
roles.find((item: any) => {
item.RoleName.toLowerCase() === 'doctor';
workLocationId = item.workingLocationID;
});
}
} catch (error) {
console.error('Error parsing location data:', error);
return;
}
console.log('workLocationId', workLocationId);

this.registrarService.getMappedFacility(workLocationId).subscribe(
(res: any) => {
if (res.statusCode === 200 && res.data !== null) {
const data = res.data;
if (data.abdmFacilityID && data.abdmFacilityName) {
this.abdmFacilityId = data.abdmFacilityID;
this.abdmFacilityName = data.abdmFacilityName;
this.saveAbdmFacilityForVisit();
}
} else {
this.confirmationService.confirm(res.errorMessage, 'info');
this.abdmFacilityId = null;
this.abdmFacilityName = null;
this.saveAbdmFacilityForVisit();
}
},
(err: any) => {
this.confirmationService.alert(err.errorMessage, 'error');
this.saveAbdmFacilityForVisit();
},
);
}

saveAbdmFacilityForVisit() {
const reqObj = {
visitCode: localStorage.getItem('visitCode'),
abdmFacilityId: this.abdmFacilityId,
};
this.registrarService.saveAbdmFacilityForVisit(reqObj).subscribe(
(res: any) => {
if (res.statusCode === 200) {
console.log('Abdm saved successfully');
} else {
this.confirmationService.alert(res.errorMessage, 'error');
}
},
(err: any) => {
this.confirmationService.alert(err.errorMessage, 'error');
},
);
}

fetchHealthIDDetailsOnConfirmation() {
const data = {
beneficiaryID: this.beneficiary.beneficiaryID,
Expand Down
5 changes: 4 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { RegistrarModule } from './app-modules/registrar/registrar.module';
import { NgFor } from '@angular/common';
import { AudioRecordingService } from './app-modules/nurse-doctor/shared/services/audio-recording.service';
import { SharedModule } from './app-modules/core/components/shared/shared.module';
import { RegistrarService } from 'Common-UI/src/registrar/services/registrar.service';
import { RegistrationModule } from 'Common-UI/src/registrar/registration.module';

@NgModule({
declarations: [
Expand Down Expand Up @@ -58,10 +60,10 @@ import { SharedModule } from './app-modules/core/components/shared/shared.module
MatTooltipModule,
MatFormFieldModule,
NgFor,
RegistrarModule,
CoreModule.forRoot(),
BrowserAnimationsModule,
SharedModule,
RegistrationModule,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
Expand All @@ -74,6 +76,7 @@ import { SharedModule } from './app-modules/core/components/shared/shared.module
useClass: HttpInterceptorService,
multi: true,
},
RegistrarService,
],
bootstrap: [AppComponent],
})
Expand Down
17 changes: 16 additions & 1 deletion src/assets/Assamese.json
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,21 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
"noRecordsFound":"No Records Found"
"noRecordsFound":"No Records Found",
"enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
"doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
"abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
"enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
"enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
"enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
"abhaAddressFound" : "ABHA Address Found:",
"searchAndDownloadAbha": "Search and Download ABHA",
"abhaSearchMode": "ABHA Search Mode*",
"verifyAbha": "Verify ABHA",
"issueInAbhaCard": "Issue in printing ABHA Card",
"fileUploadedSuccessfully": "File Uploaded successfully",
"verifyMobileOtp": "Verify Mobile OTP",
"enterMobileOtp": "Enter Mobile OTP",
"verify": "Verify"
}
}
18 changes: 16 additions & 2 deletions src/assets/English.json
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,22 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
"noRecordsFound":"No Records Found"

"noRecordsFound":"No Records Found",
"enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
"doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
"abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
"enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
"enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
"enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
"abhaAddressFound" : "ABHA Address Found:",
"searchAndDownloadAbha": "Search and Download ABHA",
"abhaSearchMode": "ABHA Search Mode*",
"verifyAbha": "Verify ABHA",
"issueInAbhaCard": "Issue in printing ABHA Card",
"fileUploadedSuccessfully": "File Uploaded successfully",
"verifyMobileOtp": "Verify Mobile OTP",
"enterMobileOtp": "Enter Mobile OTP",
"verify": "Verify"
}

}
18 changes: 16 additions & 2 deletions src/assets/Hindi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,21 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
"noRecordsFound":"No Records Found"

"noRecordsFound":"No Records Found",
"enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
"doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
"abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
"enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
"enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
"enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
"abhaAddressFound" : "ABHA Address Found:",
"searchAndDownloadAbha": "Search and Download ABHA",
"abhaSearchMode": "ABHA Search Mode*",
"verifyAbha": "Verify ABHA",
"issueInAbhaCard": "Issue in printing ABHA Card",
"fileUploadedSuccessfully": "File Uploaded successfully",
"verifyMobileOtp": "Verify Mobile OTP",
"enterMobileOtp": "Enter Mobile OTP",
"verify": "Verify"
helenKaryamsetty marked this conversation as resolved.
Show resolved Hide resolved
}
}
2 changes: 1 addition & 1 deletion src/environments/environment.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Haemoglobin Test`,
abhaExtension: `@abdm`,
abhaExtension: `@sbx`,
Copy link

@coderabbitai coderabbitai bot Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codebase verification

Inconsistent ABHA extension configuration detected across environments

The ABHA extension configuration shows a mix of values:

  • Development environments (dev, development, base) use @sbx
  • Production, test, and CI environments use @abdm

This inconsistency might be intentional as it separates sandbox (@sbx) for development from production (@abdm), but the test environment using @abdm instead of @sbx seems unusual for a testing setup.

  • src/environments/environment.test.ts: Consider changing @abdm to @sbx to maintain consistency with other non-production environments
  • src/environments/environment.ci.ts.template: Consider changing @abdm to @sbx if CI environment is used for testing
πŸ”— Analysis chain

Verify the ABHA extension configuration change

The ABHA extension has been changed from @abdm to @sbx. This appears to be switching from production to sandbox environment.

Let's verify if this change is consistent across all environment files and check for any related configuration:


Let's check the actual values of abhaExtension across these environment files to ensure consistency.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check ABHA extension configuration across environment files
# Expected: Consistent @sbx configuration in all environment files

echo "Checking ABHA extension configuration across environment files..."
rg -l "abhaExtension.*@(abdm|sbx)" src/environments/

Length of output: 425


Script:

#!/bin/bash
# Check the actual values of abhaExtension across environment files
echo "Content of abhaExtension in environment files:"
rg "abhaExtension.*@(abdm|sbx)" src/environments/

Length of output: 537

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai i have added those values based on environments... in dev environment it is sbx and prod environment it is abdm

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helenKaryamsetty, thank you for the clarification. I'll note that you've intentionally set abhaExtension to @sbx in development environments and @abdm in production environments to differentiate between them.


✏️ Learnings added
Learnt from: helenKaryamsetty
PR: PSMRI/TM-UI#52
File: src/environments/environment.dev.ts:69-69
Timestamp: 2024-12-16T11:10:14.588Z
Learning: In the `environment` files of the project, the `abhaExtension` configuration is intentionally set to `@sbx` in development environments (e.g., `src/environments/environment.dev.ts`, `src/environments/environment.development.ts`) and to `@abdm` in production environments (e.g., `src/environments/environment.prod.ts`). This setup differentiates between sandbox and production environments.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

parentAPI: `${TM_API}`,

INVENTORY_URL: `${inventoryUI_IP}/inventory/#/redirin?`,
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Haemoglobin Test`,
abhaExtension: `@abdm`,
abhaExtension: `@sbx`,
parentAPI: `${TM_API}`,

INVENTORY_URL: `${inventoryUI_IP}/inventory/#/redirin?`,
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Hemoglobin Test`,
abhaExtension: `@abdm`,
abhaExtension: `@sbx`,

parentAPI: `${TM_API}`,

Expand Down
Loading