-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.fieldValue }}
+
+
+
+
+
+
+ {{ data.fieldValue }} ({{ data.fieldCode }})
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+ 0">
+
+
+ 0" [dataSource]="dataSource" class="tableMain">
+
+
+ | {{ "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",