Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,126 +57,40 @@ export class PacketStatusComponent implements OnInit {
search() {
this.data = null;
this.errorMessage = '';

console.log('========== PACKET STATUS SEARCH START ==========');
console.log('Registration ID:', this.id);

if (this.id.length == 0) {

this.error = true;

console.log('ERROR: Registration ID is empty');

} else {

this.error = false;

console.log('Calling getPacketStatus API...');

this.dataStorageService
.getPacketStatus(
this.id,
this.headerService.getUserPreferredLanguage()
)
.subscribe(response => {

console.log('========== PACKET STATUS API RESPONSE ==========');
console.log('Full API Response:', response);

if (response['errors']) {

console.log('API returned errors:', response['errors']);

this.error = true;
this.statusCheck = '';
this.errorMessage =
this.serverMessage[response['errors'][0].errorCode];

console.log('Error Message:', this.errorMessage);

} else {

this.data =
response['response']['packetStatusUpdateList'];

console.log('========== PACKET STATUS LIST ==========');
console.log('Total Records:', this.data.length);
console.log('Full packetStatusUpdateList:', this.data);

this.error = false;
this.showDetails = true;

if (this.data && this.data.length > 0) {

console.log('========== ALL STATUS RECORDS ==========');

this.data.forEach((item, index) => {

console.log(
'INDEX:',
index,
'| STATUS:',
item.statusCode,
'| SUB STATUS:',
item.subStatusCode,
'| TRANSACTION:',
item.transactionTypeCode,
'| DATE:',
item.createdDateTimes
);

});

console.log('========== FIRST RECORD ==========');
console.log('First Record:', this.data[0]);

console.log('========== LAST RECORD ==========');
console.log(
'Last Record:',
this.data[this.data.length - 1]
);

const latestStatus =
this.data[this.data.length - 1].statusCode;

console.log('========== LATEST STATUS ==========');
console.log('Latest Status:', latestStatus);

if (latestStatus.includes('FAILED')) {

const latestRecord =
this.data[this.data.length - 1];
if (
latestRecord.statusCode.includes('PROCESSED') &&
latestRecord.transactionTypeCode.includes('INTERNAL_WORKFLOW_ACTION')
) {
this.statusCheck =
this.messages.statuscheckFailed;

console.log(
'FINAL STATUS CHECK: FAILED'
);

this.messages.statuscheckCompleted;
} else {

this.statusCheck =
this.messages.statuscheckCompleted;

console.log(
'FINAL STATUS CHECK: COMPLETED'
);
this.messages.statuscheckFailed;
}

console.log(
'StatusCheck displayed in UI:',
this.statusCheck
);

} else {

console.log(
'WARNING: packetStatusUpdateList is empty'
);

}

console.log(
'========== PACKET STATUS SEARCH END =========='
);
}
});
}
Expand Down
6 changes: 4 additions & 2 deletions admin-ui/src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,10 @@
"RPR-SEN-SUCCESS-001": "Notification received to securezone",
"RPR-RGS-034" : "searching between date should be less then 30 days",
"KER-MSD-394" : "Your zone mapping missing. Please contact the administrator.",
"RPR-PKC-SUCCESS-001": "Packet Classification is Successful",
"RPR-PKCSUCCESS-001": "Packet Classification is Successful",
"RPR-CMD-SUCCESS-001": "CMD Validation is Successful",
"RPR-OVM-SUCCESS-001": "OPERATOR Validation is Successful"
"RPR-OVM-SUCCESS-001": "OPERATOR Validation is Successful",
"RPR-BEN-SUCCESS-001": "Biometric extraction was successful",
"RPR-FIN-SUCCESS-001": "Idrepo draft was published successfully"
}
}
Loading