From 68f5bb93a4ff5a34280c6716d89c41e3243454e3 Mon Sep 17 00:00:00 2001 From: Vishal05-dev Date: Tue, 19 May 2026 15:47:09 +0530 Subject: [PATCH 1/3] Updated LOST RID feature in UI --- .../app/core/services/data-storage.service.ts | 6 + .../confirm-dialog.component.html | 20 ++ .../confirm-dialog.component.scss | 48 ++++ .../confirm-dialog.component.spec.ts | 25 ++ .../confirm-dialog.component.ts | 19 ++ .../profile-dialog.component.html | 34 +++ .../profile-dialog.component.scss | 49 ++++ .../profile-dialog.component.spec.ts | 25 ++ .../profile-dialog.component.ts | 30 +++ .../lost-rid-status/lost-rid-status.module.ts | 8 +- .../lost-rid-status.component.html | 235 ++++++++++-------- .../lost-rid-status.component.scss | 149 +++++------ .../lost-rid-status.component.ts | 216 +++++++++------- admin-ui/src/assets/i18n/eng.json | 10 +- 14 files changed, 607 insertions(+), 267 deletions(-) create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.html create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.scss create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.spec.ts create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.ts create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.html create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.scss create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.spec.ts create mode 100644 admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.ts diff --git a/admin-ui/src/app/core/services/data-storage.service.ts b/admin-ui/src/app/core/services/data-storage.service.ts index deded5da..6e330ae5 100644 --- a/admin-ui/src/app/core/services/data-storage.service.ts +++ b/admin-ui/src/app/core/services/data-storage.service.ts @@ -198,6 +198,12 @@ export class DataStorageService { return this.http.post(this.BASE_URL + appConstants.URL["lost-rid-status"], request); } + getLostRidDetailsPhoto(rid:any): Observable { + return this.http.get( + this.BASE_URL+'admin/lostRid/details/'+rid + ); + } + deleteUser(userId: any, actualData: any): Observable { let url = this.router.url.split('/')[3]; let urlmapping = {"users":"usercentermapping", "zoneuser":"zoneuser"}; diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.html b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.html new file mode 100644 index 00000000..c0eeaf66 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.html @@ -0,0 +1,20 @@ + + + + +
+
+ {{ data.title }} +
+

{{ data.message }}

+
+
+ +
\ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.scss b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.scss new file mode 100644 index 00000000..62a63ea4 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.scss @@ -0,0 +1,48 @@ +/* This is where you would add your custom CSS styles */ +mat-dialog-container { + width: 400px; /* Example width */ + } + + mat-dialog-title { + font-weight: bold; + } + + .mat-div{ + padding: 0px !important; + } + + mat-dialog-actions { + display: flex; + justify-content: space-between; + padding: 8px 16px; + } + .pop-up { + .pop-up-header { + padding: 16px !important; + } + .mat-dialog-content { + margin: 0 !important; + padding: 0 !important; + font-family:"Roboto", sans-serif; + font-size: small; + } + .pop-up-footer { + background: #e6e7e7; + margin-bottom: 0px; + padding: 0 16px; + .mat-button { + outline: 1px solid #FF4081 !important; + margin: 0 10px; + border-radius: 0; + color: #FF4081; + } + } + .pop-up-footer { + .mat-button:focus { + background: #FF4081 !important; + color: #ffffff; + outline: 0 !important; + } + } + } + \ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.spec.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.spec.ts new file mode 100644 index 00000000..ccea4333 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmDialogComponent } from './confirm-dialog.component'; + +describe('ConfirmDialogComponent', () => { + let component: ConfirmDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ConfirmDialogComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.ts new file mode 100644 index 00000000..da6ca534 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/confirm-dialog/confirm-dialog.component.ts @@ -0,0 +1,19 @@ +import { Component, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; + +@Component({ + selector: 'app-confirm-dialog', + templateUrl: './confirm-dialog.component.html', + styleUrls: ['./confirm-dialog.component.scss'] +}) +export class ConfirmDialogComponent { + constructor( + public dialogRef: MatDialogRef, // Inject MatDialogRef + @Inject(MAT_DIALOG_DATA) public data: any // Keep the data injection + ) {} + + onNoClick(): void { + // Close the dialog + this.dialogRef.close(); + } +} \ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.html b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.html new file mode 100644 index 00000000..f19b173f --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.html @@ -0,0 +1,34 @@ + +

+ {{ "lostRID.applicationId" | translate }} :{{ data.dataSource[data.i].registrationId }} +

+
+
+ Profile Photo +
+

+ {{ "lostRID.name" | translate }}: {{ name }} +

+

+ {{ "lostRID.enrolmentDate" | translate }}: + {{ data.dataSource[data.i].registartionDate }} +

+

+ {{ "lostRID.dateOfBirth" | translate }}: {{ data.lostData.dateOfBirth }} +

+
+
+
+
+ +
+ +
+
diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.scss b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.scss new file mode 100644 index 00000000..fd0d09c0 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.scss @@ -0,0 +1,49 @@ +.dialog-content { + display: flex; + align-items: center; + overflow: hidden !important; +} + +.profile-photo { + width: 7rem; + height: 9rem; + object-fit: cover; + margin-right: 20px; + border-radius: 4px; +} + +.dialog-info { + flex-grow: 1; +} + +.actions-container { + display: flex; + flex-direction: column; + align-items: flex-start; /* Align items to the start */ +} + +.button-row { + display: flex; + justify-content: space-between; /* Space the buttons evenly */ + width: 100%; + margin-bottom: 10px; /* Add spacing between button rows */ +} + +.close-button-row { + display: flex; + justify-content: flex-end; /* Align the close button to the end */ + width: 100%; + background-color: #f0f0f0; /* Gray background color */ +} + +/* Optionally adjust the color of the close button */ +.mat-button.mat-primary { + background-color: #4f4f4f; /* Deep gray color */ + color: white; +} +.dobPadding { + padding-top: 3rem; +} +.mat-con { + overflow: hidden !important; +} diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.spec.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.spec.ts new file mode 100644 index 00000000..4c235c97 --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProfileDialogComponent } from './profile-dialog.component'; + +describe('ProfileDialogComponent', () => { + let component: ProfileDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ProfileDialogComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProfileDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.ts new file mode 100644 index 00000000..1a3e06ac --- /dev/null +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-profile/profile-dialog/profile-dialog.component.ts @@ -0,0 +1,30 @@ +import { Component, Inject, OnInit } from "@angular/core"; +import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; + +@Component({ + selector: "app-profile-dialog", + templateUrl: "./profile-dialog.component.html", + styleUrls: ["./profile-dialog.component.scss"], +}) +export class ProfileDialogComponent { + public name: string = ""; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any + ) { + console.log("dataSource ---------->>> ", data); + if (data.lostData.name) { + this.name += data.lostData.name; + } + console.log("name ------->>> ", this.name); + } + + onPrint(): void { + // Implement print functionality + } + + onResend(): void { + // Implement resend functionality + } +} diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-status.module.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-status.module.ts index b8fbfa78..b76f046a 100644 --- a/admin-ui/src/app/features/lost-rid-status/lost-rid-status.module.ts +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-status.module.ts @@ -5,6 +5,8 @@ import { LostRidStatusRoutingModule } from './lost-rid-status-routing.module'; import { SharedModule } from 'src/app/shared/shared.module'; import { FormsModule } from '@angular/forms'; import { MaterialModule } from 'src/app/shared/material.module'; +import { ProfileDialogComponent } from './lost-rid-profile/profile-dialog/profile-dialog.component'; +import { ConfirmDialogComponent } from './lost-rid-profile/confirm-dialog/confirm-dialog.component'; @NgModule({ imports: [ @@ -14,6 +16,8 @@ import { MaterialModule } from 'src/app/shared/material.module'; FormsModule, MaterialModule ], - declarations: [LostRidStatusComponent] + declarations: [LostRidStatusComponent, ProfileDialogComponent, ConfirmDialogComponent], + entryComponents: [ProfileDialogComponent,ConfirmDialogComponent] }) -export class LostRidStatusModule { } + +export class LostRidStatusModule { } \ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.html b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.html index 838d6337..19391e87 100644 --- a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.html +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.html @@ -1,108 +1,137 @@ -

{{'lostRID.titleTxt' | translate}}

-
-
-
- -
-

{{'lostRID.subtitleenrollment' | translate}}

-
- - - + +

{{ "lostRID.titleTxt" | translate }}

+
+
+
+
+ +
+ +

+ {{ "lostRID.subtitleenrollment" | translate }} +

+
+
+ + + - - - - - -
-

{{'lostRID.subtitlelocation' | translate}}

-
- - - - {{ data.fieldValue }} - - - - - - - {{ data.fieldValue }} ({{data.fieldCode}}) - - - -
+ + + + + +
+ +

+ {{ "lostRID.subtitlelocation" | translate }} +

+
+
+ + + + {{ data.fieldValue }} + + + + + + + {{ data.fieldValue }} ({{ data.fieldCode }}) + + + +
-      - +      + +
+ +
- -
-
-
- - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{{ "lostRID.applicationId" | translate }} + {{ element.registrationId }} + {{ "lostRID.registrationDate" | translate }} + {{ element.registartionDate|date: 'dd/MM/yyyy'}} + {{ "lostRID.action" | translate }} + +
+ +
+
\ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.scss b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.scss index fcce248d..fbf614a6 100644 --- a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.scss +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.scss @@ -1,128 +1,126 @@ .packet-status__container { - margin: 40px; + margin: 40px; } .packet-status__header-text { - font-size: 14px; - font-weight: bold; - font-family: "Roboto", sans-serif; + font-size: 14px; + font-weight: bold; + font-family: "Roboto", sans-serif; } .packet-status__input-placer { - margin-left: 30px; - width: 300px; - font-size: smaller; + margin-left: 30px; + width: 300px; + font-size: smaller; } .packet-status__image-placer { - margin-bottom: -8px !important; - cursor: pointer; + margin-bottom: -8px !important; + cursor: pointer; } .packet-status__details-container { - display: flex; - flex-wrap: wrap; - margin: 2.5% 5% !important; - font-size: 12px; - + display: flex; + flex-wrap: wrap; + margin: 2.5% 5% !important; + font-size: 12px; } .packet-status__details-container div { - margin-right: 70px; - font-size: 10px !important; - font-family: "Roboto", sans-serif; - font-weight: 500; + margin-right: 70px; + font-size: 10px !important; + font-family: "Roboto", sans-serif; + font-weight: 500; } .packet-status__details-container div table tr td { - font-size: 11px !important; - padding: 15px; - font-family: "Roboto", sans-serif; - font-weight: 500; + font-size: 11px !important; + padding: 15px; + font-family: "Roboto", sans-serif; + font-weight: 500; } .packet-status__details-container div:nth-child(3) table tr td { - padding: 0; - cursor: pointer; + padding: 0; + cursor: pointer; } .packet-status__details-container div:nth-child(3) ul li { - height: 100px; - border-left: 2px solid grey; - margin-bottom: -15px; - padding-left: 20px; + height: 100px; + border-left: 2px solid grey; + margin-bottom: -15px; + padding-left: 20px; } -.packet-status__details-container div:nth-child(3) ul li h3{ - margin-top: -20px; +.packet-status__details-container div:nth-child(3) ul li h3 { + margin-top: -20px; } .complete { - border-left-color: #FF4081 !important; + border-left-color: #ff4081 !important; } .milestone-complete { - background-color: #FF4081 !important; + background-color: #ff4081 !important; } - .dot { - margin-left: -26px !important; - margin-top: -10px; - height: 10px; - width: 10px; - background-color: grey; - border-radius: 50%; - display: inline-block; - } + margin-left: -26px !important; + margin-top: -10px; + height: 10px; + width: 10px; + background-color: grey; + border-radius: 50%; + display: inline-block; +} .hollow-dot { - margin-left: -32px !important; - height: 10px !important; - width: 10px !important; - background-color: white !important; - border: 2px solid #FF4081 !important; + margin-left: -32px !important; + height: 10px !important; + width: 10px !important; + background-color: white !important; + border: 2px solid #ff4081 !important; } .incomplete-hollow { - background-color: white !important; - border: 2px solid grey !important; + background-color: white !important; + border: 2px solid grey !important; } .packet-status__details-container div:nth-child(3) ul li:last-child { - border-left-color: white; + border-left-color: white; } .packet-status__details-container div:nth-child(3) ul li:first-child { - margin-top: 30px; + margin-top: 30px; } -@media(max-width: 1040px) { - .packet-status__details-container div:nth-child(3) { - margin-top: 50px; - } +@media (max-width: 1040px) { + .packet-status__details-container div:nth-child(3) { + margin-top: 50px; + } } h3 { - font-size: 10.5px; + font-size: 10.5px; } -.mat-card{ - border-radius: 0; - padding: 50px; - margin:0; - width: 100%; - margin-top:1rem; +.mat-card { + border-radius: 0; + padding: 50px; + margin: 0; + width: 100%; + margin-top: 1rem; } .header { - display: block; - font-size: 13.5px !important; - font-weight: bold; - margin-top: 12px !important; - padding-bottom: 0px; + display: block; + font-size: 13.5px !important; + font-weight: bold; + margin-top: 12px !important; + padding-bottom: 0px; } -.example-container{ +.example-container { margin-left: 50px; } @@ -130,13 +128,16 @@ h3 { margin-right: 15px; margin-left: 15px; } -#createButton{ - background-color: #ff4081!important; - color: #ffffff!important; +#createButton { + background-color: #ff4081 !important; + color: #ffffff !important; } -:dir(rtl) .lost-rid-status-card { - padding-left: 50px !important; - padding-right: 50px !important; +.tableMain { + width: 100% !important; + border: 1px solid !important; + overflow: none !important; } - +.padding{ + padding-left: 16px !important; +} \ No newline at end of file diff --git a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.ts b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.ts index ab04e0c8..ec7b8f16 100644 --- a/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.ts +++ b/admin-ui/src/app/features/lost-rid-status/lost-rid-status/lost-rid-status.component.ts @@ -15,6 +15,7 @@ import { TranslateService } from '@ngx-translate/core'; import { DialogComponent } from 'src/app/shared/dialog/dialog.component'; import { AuditService } from 'src/app/core/services/audit.service'; import { HeaderService } from 'src/app/core/services/header.service'; +import { ProfileDialogComponent } from '../lost-rid-profile/profile-dialog/profile-dialog.component'; @Component({ selector: 'app-lost-rid-status', @@ -28,7 +29,7 @@ export class LostRidStatusComponent implements OnInit { actionEllipsis = []; paginatorOptions: any; sortFilter = []; - primaryLang: string; + primaryLang: string; pagination = new PaginationModel(); centerRequest = {} as CenterRequest; requestModel: RequestModel; @@ -44,9 +45,9 @@ export class LostRidStatusComponent implements OnInit { filterOptions: any = {}; fieldNameList: any = {}; showTable = false; - + dataSource = []; initialLocationCode: ""; - locationFieldNameList: string[] = []; + locationFieldNameList: string[] = []; dynamicDropDown = {}; dynamicFieldValue = {}; locCode = 0; @@ -63,19 +64,20 @@ export class LostRidStatusComponent implements OnInit { ) { this.getlostridConfigs(); this.primaryLang = this.headerService.getUserPreferredLanguage(); - + this.translateService.use(this.primaryLang); translateService.getTranslation(this.primaryLang).subscribe(response => { this.errorMessages = response.errorPopup; }); this.subscribed = router.events.subscribe(event => { if (event instanceof NavigationEnd) { - if(this.displayedColumns) + if (this.displayedColumns) this.getlostridConfigs(); } }); } + ngOnInit() { this.auditService.audit(5, 'ADM-045'); this.initialLocationCode = this.appService.getConfig()['countryCode']; @@ -95,14 +97,14 @@ export class LostRidStatusComponent implements OnInit { .getSpecFileForMasterDataEntity("lost-rid-status") .subscribe(response => { this.displayedColumns = response.columnsToDisplay; - this.filterColumns = response.filterColumns; + this.filterColumns = response.filterColumns; this.actionButtons = response.actionButtons.filter( value => value.showIn.toLowerCase() === 'ellipsis' ); this.actionEllipsis = response.actionButtons.filter( value => value.showIn.toLowerCase() === 'button' ); - for(let value of this.filterColumns) { + for (let value of this.filterColumns) { this.fieldNameList[value.filtername] = ""; } this.paginatorOptions = response.paginator; @@ -116,73 +118,73 @@ export class LostRidStatusComponent implements OnInit { let fieldNameData = {}; this.dataStroageService.getLocationHierarchyLevels(this.primaryLang).subscribe(response => { response.response.locationHierarchyLevels.forEach(function (value) { - if(value.hierarchyLevel != 0) - if(value.hierarchyLevel <= self.locCode) - self.locationFieldNameList.push(value.hierarchyLevelName); - }); - for(let value of this.locationFieldNameList) { - self.dynamicDropDown[value] = []; + if (value.hierarchyLevel != 0) + if (value.hierarchyLevel <= self.locCode) + self.locationFieldNameList.push(value.hierarchyLevelName); + }); + for (let value of this.locationFieldNameList) { + self.dynamicDropDown[value] = []; self.dynamicFieldValue[value] = ""; } self.loadLocationDataDynamically("", 0); - }); + }); } - loadLocationDataDynamically(event:any, index: any) { - let locationCode = ""; - let fieldName = ""; - let self = this; - if(event === "") { + loadLocationDataDynamically(event: any, index: any) { + let locationCode = ""; + let fieldName = ""; + let self = this; + if (event === "") { fieldName = this.locationFieldNameList[parseInt(index)]; - locationCode = this.initialLocationCode; - }else{ - fieldName = this.locationFieldNameList[parseInt(index)+1]; - locationCode = event.value; + locationCode = this.initialLocationCode; + } else { + fieldName = this.locationFieldNameList[parseInt(index) + 1]; + locationCode = event.value; this.dynamicFieldValue[this.locationFieldNameList[parseInt(index)]] = event.value; - if((parseInt(index)+1) === this.locationFieldNameList.length){ - this.getCenterDetails(event.value); - }else{ + if ((parseInt(index) + 1) === this.locationFieldNameList.length) { + this.getCenterDetails(event.value); + } else { this.dynamicDropDown["centerId"] = ""; } } this.dataStroageService - .getImmediateChildren(locationCode, this.primaryLang) - .subscribe(response => { - if(response['response']) - self.dynamicDropDown[fieldName] = response['response']['locations']; - }); + .getImmediateChildren(locationCode, this.primaryLang) + .subscribe(response => { + if (response['response']) + self.dynamicDropDown[fieldName] = response['response']['locations']; + }); } - getlocationDetails() { + getlocationDetails() { const filterObject = new FilterValuesModel('code', 'unique', ''); - let optinalFilterObject = [{"columnName":"hierarchyLevel","type":"equals","value":this.locCode.toString()}]; + let optinalFilterObject = [{ "columnName": "hierarchyLevel", "type": "equals", "value": this.locCode.toString() }]; let filterRequest = new FilterRequest([filterObject], this.primaryLang, optinalFilterObject); let request = new RequestModel('', null, filterRequest); this.dataStroageService .getFiltersForAllMaterDataTypes('locations', request) .subscribe(response => { - if(!response.errors){ + if (!response.errors) { this.dynamicDropDown["locationCode"] = response.response.filters; - }else{ + } else { this.dynamicDropDown["locationCode"] = []; } - }); + }); } - getCenterDetails(locCode) { + getCenterDetails(locCode) { const filterObject = new FilterValuesModel('name', 'unique', ''); - let optinalFilterObject = [{"columnName":"locationCode","type":"equals","value":locCode}]; + let optinalFilterObject = [{ "columnName": "locationCode", "type": "equals", "value": locCode }]; let filterRequest = new FilterRequest([filterObject], this.primaryLang, optinalFilterObject); let request = new RequestModel('', null, filterRequest); this.dataStroageService .getFiltersForAllMaterDataTypes('registrationcenters', request) .subscribe(response => { - if(!response.errors){ + if (!response.errors) { this.dynamicDropDown["centerId"] = response.response.filters; - }else{ + } else { this.dynamicDropDown["centerId"] = []; } - }); + }); } captureValue(event: any, formControlName: string) { @@ -191,23 +193,23 @@ export class LostRidStatusComponent implements OnInit { captureDatePickerValue(event: any, formControlName: string) { let dateFormat = new Date(event.target.value); - let formattedDate = dateFormat.getFullYear() + "-" + ("0"+(dateFormat.getMonth()+1)).slice(-2) + "-" + ("0" + dateFormat.getDate()).slice(-2); + let formattedDate = dateFormat.getFullYear() + "-" + ("0" + (dateFormat.getMonth() + 1)).slice(-2) + "-" + ("0" + dateFormat.getDate()).slice(-2); this.fieldNameList[formControlName] = formattedDate; } - captureDropDownValue(event: any, formControlName: string) { - if (event.source.selected) { - if(formControlName === "locationCode"){ + captureDropDownValue(event: any, formControlName: string) { + if (event.source.selected) { + if (formControlName === "locationCode") { this.fieldNameList[formControlName] = event.source.value; this.dynamicDropDown["centerId"] = []; this.getCenterDetails(event.source.viewValue); - }else{ + } else { this.fieldNameList[formControlName] = event.source.value; - } + } } } - resetForm(){ + resetForm() { let self = this; for (let property in self.fieldNameList) { self.fieldNameList[property] = ""; @@ -219,81 +221,96 @@ export class LostRidStatusComponent implements OnInit { let mandatoryFieldName = []; let mandatoryFieldLabel = []; for (let i = 0; i < self.filterColumns.length; i++) { - if(self.filterColumns[i].ismandatory === "true"){ - mandatoryFieldName.push(self.filterColumns[i].filtername); - mandatoryFieldLabel.push(self.filterColumns[i].filterlabel[this.primaryLang]); + if (self.filterColumns[i].ismandatory === "true") { + mandatoryFieldName.push(self.filterColumns[i].filtername); + mandatoryFieldLabel.push(self.filterColumns[i].filterlabel[this.primaryLang]); } } let len = mandatoryFieldName.length; for (let i = 0; i < len; i++) { - if(!self.fieldNameList[mandatoryFieldName[i]]){ - this.showErrorPopup(mandatoryFieldLabel[i]+this.popupMessages.genericerror.fieldNameValidation); + if (!self.fieldNameList[mandatoryFieldName[i]]) { + this.showErrorPopup(mandatoryFieldLabel[i] + this.popupMessages.genericerror.fieldNameValidation); break; - }else if(len === (i+1)){ + } else if (len === (i + 1)) { self.getlostridDetails(); } } } + displayedColumns1: string[] = ['id', 'registrationDate', 'action']; + getlostridDetails() { let filter = []; - for(let value of this.filterColumns) { - if(this.fieldNameList[value.filtername]){ - if(value.dropdown !== 'true' && value.datePicker !== 'true'){ - filter.push({"columnName": value.fieldName,"type": "contains","value": this.fieldNameList[value.filtername]}); - }else if(value.datePicker === 'true' && value.filterType === 'between'){ - if(filter.length > 0) - filter.splice(0,1); - filter.push({"columnName": value.fieldName,"type": "between","value": "", "fromValue": this.fieldNameList["registrationDateFrom"], "toValue":this.fieldNameList["registrationDateTo"]}); - }else if(value.dropdown === 'true'){ - filter.push({"columnName": value.fieldName,"type": "equals","value": this.fieldNameList[value.filtername]}); + for (let value of this.filterColumns) { + if (this.fieldNameList[value.filtername]) { + if (value.dropdown !== 'true' && value.datePicker !== 'true') { + filter.push({ "columnName": value.fieldName, "type": "contains", "value": this.fieldNameList[value.filtername] }); + } else if (value.datePicker === 'true' && value.filterType === 'between') { + if (filter.length > 0) + filter.splice(0, 1); + filter.push({ "columnName": value.fieldName, "type": "between", "value": "", "fromValue": this.fieldNameList["registrationDateFrom"], "toValue": this.fieldNameList["registrationDateTo"] }); + } else if (value.dropdown === 'true') { + filter.push({ "columnName": value.fieldName, "type": "equals", "value": this.fieldNameList[value.filtername] }); } - } - } + } + } this.datas = []; + this.dataSource = []; this.noData = false; this.filtersApplied = false; + const filters = Utils.convertFilter(this.activatedRoute.snapshot.queryParams, this.primaryLang); filters.filters = filter; if (filters.filters.length > 0) { this.filtersApplied = true; } this.sortFilter = filters.sort; - if(this.sortFilter.length == 0){ - this.sortFilter.push({"sortType":"desc","sortField":"registrationDate"}); + if (this.sortFilter.length == 0) { + this.sortFilter.push({ "sortType": "desc", "sortField": "registrationDate" }); } this.requestModel = new RequestModel(null, null, filters); if (filters.filters.length > 0) this.dataStroageService .getlostridDetails(this.requestModel) - .subscribe(({ response, errors }) => { + .subscribe(({ response, errors }) => { if (errors.length === 0) { - this.paginatorOptions.totalEntries = 0; - this.paginatorOptions.pageIndex = 0; - this.paginatorOptions.pageSize = 0; - if (response.data.length) { - this.datas = [...response.data]; - this.datas.forEach((element, index) => { - this.datas[index]["name"] = element.additionalInfo.name; - }); - this.showTable = true; - } else { - this.noData = true; - } + this.paginatorOptions.totalEntries = 0; + this.paginatorOptions.pageIndex = 0; + this.paginatorOptions.pageSize = 0; + if (response.data.length) { + this.datas = [...response.data]; + + this.datas.forEach((element, index) => { + this.datas[index]["name"] = + element.additionalInfo ? element.additionalInfo.name : ""; + + this.datas[index]["registrationDate"] = + element.registartionDate; + }); + + this.dataSource = [...this.datas]; + this.showTable = true; + this.noData = false; + } else { + this.noData = true; + this.showTable = false; + this.dataSource = []; + } } else { this.noData = true; + this.showTable = false; let message = ""; - if(errors[0].errorCode === "KER-MSD-999"){ + if (errors[0].errorCode === "KER-MSD-999") { errors.forEach((element) => { - message = message + element.message.toString() +"\n\n"; + message = message + element.message.toString() + "\n\n"; }); - message = this.serverError[errors[0].errorCode] +"\n\n"+ message; - }else{ + message = this.serverError[errors[0].errorCode] + "\n\n" + message; + } else { message = this.serverError[errors[0].errorCode]; } this.showErrorPopup(message); } - }); + }); else this.noData = true; } @@ -311,7 +328,32 @@ export class LostRidStatusComponent implements OnInit { }); } -ngOnDestroy() { + fetchLostRidDetails( + element: { registrationId: string }, + index: number + ): void { + this.dataStroageService + .getLostRidDetailsPhoto(element.registrationId) + .subscribe( + (response: any) => { + const lostData = response.response.lostRidDataMap; + this.openDialog(lostData, this.dataSource, index); + }, + (error: any) => { + console.error("Error fetching details", error); + } + ); + } + openDialog(data: any, dataSource: any, i: number): void { + const dialogRef = this.dialog.open(ProfileDialogComponent, { + data: { lostData: data, dataSource: dataSource, i: i }, + }); + + dialogRef.afterClosed().subscribe((result) => { + }); + } + + ngOnDestroy() { this.subscribed.unsubscribe(); } } diff --git a/admin-ui/src/assets/i18n/eng.json b/admin-ui/src/assets/i18n/eng.json index 17cf9808..9606f6f3 100644 --- a/admin-ui/src/assets/i18n/eng.json +++ b/admin-ui/src/assets/i18n/eng.json @@ -698,7 +698,15 @@ "subtitleenrollment":"Enrollment Details", "subtitlelocation":"Location", "searchbtn":"Search", - "clearbtn":"Clear" + "clearbtn":"Clear", + "applicationId":"Registration Id", + "name":"Full Name", + "enrolmentDate":"Enrollment Date", + "dateOfBirth":"Date of Birth", + "applicantPhoto":"Applicant Photo", + "registrationDate":"Registration Date", + "action":"Action" + }, "generatecsr": { "title": "Generate CSR", From 82f02c6d4eff5412b66794dcf7135c44a54197c4 Mon Sep 17 00:00:00 2001 From: Vishal05-dev Date: Mon, 25 May 2026 10:47:02 +0530 Subject: [PATCH 2/3] updated workflow file --- .github/workflows/admin-ui-push-trigger.yml | 148 ++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/admin-ui-push-trigger.yml diff --git a/.github/workflows/admin-ui-push-trigger.yml b/.github/workflows/admin-ui-push-trigger.yml new file mode 100644 index 00000000..2fa76ab9 --- /dev/null +++ b/.github/workflows/admin-ui-push-trigger.yml @@ -0,0 +1,148 @@ +name: admin-ui push trigger build upon a push + +on: + release: + types: [published] + pull_request: + types: [opened, reopened, synchronize] + workflow_dispatch: + inputs: + message: + description: 'Message for manually triggering' + required: false + default: 'Triggered for Updates' + type: string + push: + branches: + - '!release-branch' + - develop + - release-* + - '!master' + - 1.* + - MOSIP* + - dst-* + - mec-* + +jobs: + build-admin-ui: + uses: iiitb-pilot/kattu/.github/workflows/npm-build.yml@develop + with: + SERVICE_LOCATION: ./admin-ui + BUILD_ARTIFACT: admin-ui + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-docker-admin-ui: + needs: build-admin-ui + strategy: + matrix: + include: + - SERVICE_LOCATION: './admin-ui' + SERVICE_NAME: 'admin-ui' + NPM_BUILD: true + BUILD_ARTIFACT: 'admin-ui' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + NPM_BUILD: ${{ matrix.NPM_BUILD }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + + build-maven-uitest-admin: + uses: iiitb-pilot/kattu/.github/workflows/maven-build.yml@master-java21 + with: + SERVICE_LOCATION: ./uitest-admin + BUILD_ARTIFACT: uitest-admin + secrets: + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-uitest-admin-local: + needs: build-maven-uitest-admin + runs-on: ubuntu-latest + env: + NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} + SERVICE_NAME: uitest-admin + SERVICE_LOCATION: uitest-admin + BUILD_ARTIFACT: uitest-admin-local + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 21 + server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Cache local Maven repository + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Setup the settings file for ossrh server + run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml + + - name: Build residentuitests with Maven + run: | + cd ${{ env.SERVICE_LOCATION}} + mvn -U -B package -Dmaven.wagon.http.retryHandler.count=2 --file pom.xml -s $GITHUB_WORKSPACE/settings.xml + + + - name: Ready the springboot artifacts + if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + run: | + ## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY + find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -name '*.jar' -type f -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} + + + - name: Upload the springboot jars + if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + uses: actions/upload-artifact@v4 + with: + name: ${{ env.BUILD_ARTIFACT }} + path: ${{ env.BUILD_ARTIFACT }}.zip + + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required + if: failure() # Pick up events even if the job fails or is canceled. + + + build-docker-uitest-admin: + needs: build-uitest-admin-local + strategy: + matrix: + include: + - SERVICE_LOCATION: 'uitest-admin' + SERVICE_NAME: 'uitest-admin' + BUILD_ARTIFACT: 'uitest-admin-local' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master-java21 + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + From cf0f915e7121d4c907ff1e366271808db2dafeb4 Mon Sep 17 00:00:00 2001 From: Vishal05-dev Date: Mon, 25 May 2026 10:53:39 +0530 Subject: [PATCH 3/3] Made changes in workflow file for failing issue --- .github/workflows/admin-ui-push-trigger.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/admin-ui-push-trigger.yml b/.github/workflows/admin-ui-push-trigger.yml index 2fa76ab9..d84e2832 100644 --- a/.github/workflows/admin-ui-push-trigger.yml +++ b/.github/workflows/admin-ui-push-trigger.yml @@ -25,7 +25,7 @@ on: jobs: build-admin-ui: - uses: iiitb-pilot/kattu/.github/workflows/npm-build.yml@develop + uses: iiitb-pilot/kattu/.github/workflows/npm-build.yml@master-java21 with: SERVICE_LOCATION: ./admin-ui BUILD_ARTIFACT: admin-ui @@ -43,7 +43,7 @@ jobs: BUILD_ARTIFACT: 'admin-ui' fail-fast: false name: ${{ matrix.SERVICE_NAME }} - uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master + uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master-java21 with: SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} SERVICE_NAME: ${{ matrix.SERVICE_NAME }}