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 12b7dba3..f8c50b31 100644 --- a/admin-ui/src/app/core/services/data-storage.service.ts +++ b/admin-ui/src/app/core/services/data-storage.service.ts @@ -192,7 +192,7 @@ export class DataStorageService { getlostridDetails(request: RequestModel): Observable { delete request['request']['languageCode']; - delete request['request']['pagination']; + // delete request['request']['pagination']; //request['request']['filters'].push({"columnName": "registrationDate", "fromValue": "2021-11-01", "toValue": "2021-11-17", "type": "between", "value": ""}); //request['request']['filters'].push({"columnName": "name", "type": "equals", "value": "MOSIP-17076"}); return this.http.post(this.BASE_URL + appConstants.URL["lost-rid-status"], request); 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 bf6d8e7c..adc08c27 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,148 +1,83 @@ -

{{ "lostRID.titleTxt" | translate }}

+ +

{{ "lostRID.titleTxt" | translate }}

+
-
+
-

+ +

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

-
- + - + " style="padding: 10px; width: 255px"> + - - + - + " required="{{ field.ismandatory }}" [value]="fieldNameList[field.filtername]" /> +
-

+ +

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

-
- + - + - + + " [value]="data.fieldValue"> {{ data.fieldValue }} - - + - + + " [value]="data.fieldCode"> {{ data.fieldValue }} ({{ data.fieldCode }})
-      -      +

@@ -151,7 +86,7 @@
- + - +
@@ -187,12 +117,7 @@ @@ -201,6 +126,21 @@
AIDAction -
+ + + +
+ + Items per page + + +
- + \ 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 3dfd3a25..03b4bbeb 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 @@ -141,3 +141,77 @@ h3 { .padding{ padding-left: 16px !important; } + +.paginator-wrapper { + display: flex; + align-items: center; + flex-wrap: wrap; + background: white; + height: 4.5em; + border: 1px solid rgba(0,0,0,0.12); + border-top: none; + padding: 0 8px; +} + +.paginator-custom-label { + margin: 0 10px; + font-size: 9.5px; + color: #3b4141; + white-space: nowrap; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-container { + min-height: 50px; + padding: 0 8px; + justify-content: flex-start; + flex-wrap: nowrap; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-page-size-label { + display: none; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-range-label { + margin: 0 20px; + font-size: 10px !important; + color: #3b4141; + white-space: nowrap; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-page-size { + align-items: center; +} + +:host ::ng-deep .paginator-wrapper .mat-form-field-appearance-legacy .mat-form-field-infix { + border: 0.9px solid #b5b7b7; + height: 25px; + padding: 0.3em 0; +} + +:host ::ng-deep .paginator-wrapper .mat-form-field-appearance-legacy .mat-form-field-underline { + background-color: transparent; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-page-size-select { + width: 50px !important; +} + +:host ::ng-deep .paginator-wrapper .mat-select-value { + font-size: 9.5px !important; + color: #3b4141; + padding-left: 10px; +} + +:host ::ng-deep .paginator-wrapper .mat-icon-button { + height: 25px !important; + width: 28px !important; + border-radius: 0 !important; + line-height: 25px; + border: 0.9px solid #b5b7b7 !important; + padding: 0 !important; +} + +:host ::ng-deep .paginator-wrapper .mat-paginator-icon { + width: 18px; + fill: #3b4141; +} \ 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 2e4f1f72..37f5f839 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 @@ -67,8 +67,13 @@ export class LostRidStatusComponent implements OnInit { locCode = 0; displayedColumns1: string[] = ["id", "registrationDate", "action"]; isTableMain = true; - lostRidRoles=[]; - actionButton =true; + lostRidRoles = []; + actionButton = true; + + pageSize = 10; + pageIndex = 0; + totalRecords = 0; + paginatedData = []; constructor( @@ -265,18 +270,18 @@ export class LostRidStatusComponent implements OnInit { } submit() { - let count=0; - this.lostRidRoles =this.headerService.getRoles().split(',') - for(let i=0;i 0) this.dataStroageService @@ -381,13 +386,12 @@ export class LostRidStatusComponent implements OnInit { this.paginatorOptions.pageIndex = 0; this.paginatorOptions.pageSize = 0; if (response.data.length) { - this.dataSource = [...response.data]; - console.log("dataSource",this.dataSource); - - this.datas = [...response.data]; - this.datas.forEach((element, index) => { - this.datas[index]["name"] = element.additionalInfo.name; - }); + this.totalRecords = response.totalRecord; + this.paginatedData = response.data.map((element) => ({ + ...element, + registrationDate: element.registartionDate, + name: element.additionalInfo && element.additionalInfo.name ? element.additionalInfo.name : '', + })); this.showTable = true; } else { this.noData = true; @@ -433,7 +437,7 @@ export class LostRidStatusComponent implements OnInit { .subscribe( (response: any) => { const lostData = response.response.lostRidDataMap; - this.openDialog(lostData, this.dataSource, index); + this.openDialog(lostData, this.paginatedData, index); }, (error: any) => { console.error("Error fetching details", error); @@ -450,7 +454,11 @@ export class LostRidStatusComponent implements OnInit { }); } - + handlePageEvent(event: PageEvent) { + this.pageSize = event.pageSize; + this.pageIndex = event.pageIndex; + this.getlostridDetails(); + } ngOnDestroy() { this.subscribed.unsubscribe();