updates on auth for the login creds and data linkage and updates on the deliveries page and queries section and updates on the test files

This commit is contained in:
2026-08-28 11:38:53 +05:30
parent f48e061138
commit 5d5a748352
5 changed files with 93 additions and 7 deletions

View File

@@ -193,6 +193,16 @@ describe('deriveDeliveryStatus', () => {
it('should still return picked for a Collected_By_Miler booking with no consignment', () => {
expect(deriveDeliveryStatus({ status: 'Collected_By_Miler' })).toBe('picked');
});
it('should keep Converted_To_Consignment as picked when joined consignment only has generic status: Active', () => {
const map = new Map([['40', { status: 'Active' }]]);
expect(deriveDeliveryStatus({ status: 'Converted_To_Consignment', consignmentid: 40 }, map)).toBe('picked');
});
it('should bump Converted_To_Consignment to active when joined consignment has consignmentstatus: Out_for_Delivery', () => {
const map = new Map([['40', { status: 'Active', consignmentstatus: 'Out_for_Delivery' }]]);
expect(deriveDeliveryStatus({ status: 'Converted_To_Consignment', consignmentid: 40 }, map)).toBe('active');
});
});
describe('mapBookingStatusToDeliveryStatus', () => {