diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml
index 345cfca0..9ffba709 100644
--- a/.github/workflows/push-trigger.yml
+++ b/.github/workflows/push-trigger.yml
@@ -21,6 +21,7 @@ on:
- 1.*
- MOSIP*
- tf_nira_dev
+ - digital_card
jobs:
build-admin-ui:
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 8c94a7b0..a5423e05 100644
--- a/admin-ui/src/app/core/services/data-storage.service.ts
+++ b/admin-ui/src/app/core/services/data-storage.service.ts
@@ -356,6 +356,13 @@ export class DataStorageService {
);
}
+ sentPacketToPerso(data: FormData) {
+ return this.http.post(
+ this.BASE_URL + 'admin' + '/packetstatusupdate/sentToPerso',
+ data
+ );
+ }
+
getCreateUpdateSteps(entity: string) {
return this.http.get(`./assets/create-update-steps/${entity}-steps.json`);
}
diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html
index dee76bf0..9f39379a 100644
--- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html
+++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html
@@ -10,6 +10,9 @@
+
{{errorMessage | translate}}
diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.ts b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.ts
index b070c2eb..d178483c 100644
--- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.ts
+++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.ts
@@ -21,6 +21,7 @@ export class PacketStatusComponent implements OnInit {
// status: 'Completed'
// }
];
+ showSendToPerso: boolean = false;
roles: string[] = [];
showDetails = false;
showTimeline = false;
@@ -97,6 +98,9 @@ export class PacketStatusComponent implements OnInit {
this.error = false;
this.showDetails = true;
console.log("Final status is ", this.statusCheck)
+
+ this.showSendToPerso = this.data.some(item =>item.transactionTypeCode === 'PRINT_SERVICE' &&
+ item.statusCode === 'PROCESSED' || item.statusCode === 'COMPLETED');
}
});
}
@@ -131,6 +135,34 @@ export class PacketStatusComponent implements OnInit {
});
}
+ sentToPerso(){
+ if (!this.id) {
+ this.error = true;
+ this.errorMessage = 'Invalid packet id';
+ return;
+ }
+
+ const formData = new FormData();
+ formData.append('rid', this.id);
+ formData.append('langCode', this.headerService.getUserPreferredLanguage());
+
+ this.dataStorageService.sentPacketToPerso(formData).subscribe({
+ next: (response) => {
+ console.log('Sent Packet to Perso API Response:', response);
+ this.error = false;
+ const res: any = response;
+ if (res && res.response && res.response.message) {
+ const message = res.response.message;
+ if(message.startsWith('Card details sent')){
+ this.showPopup('Success', res.response.message, 'Close', 'success');
+ } else {
+ this.showPopup('Error', res.response.message, 'Close', 'error');
+ }
+ }
+ }
+ });
+ }
+
showPopup(title: string, message: string, buttonText: string, type: 'success' | 'error') {
this.popupTitle = title;
this.popupMessage = message;
diff --git a/admin-ui/src/assets/i18n/eng.json b/admin-ui/src/assets/i18n/eng.json
index c7af17b5..6da89448 100644
--- a/admin-ui/src/assets/i18n/eng.json
+++ b/admin-ui/src/assets/i18n/eng.json
@@ -509,6 +509,7 @@
"viewMore": "View More",
"viewLess": "View Less",
"resume": "Resume",
+ "sentToPerso": "Send to Perso",
"errorMessages": {
"title": "Error",
"message": "RID Not Found",