updates on the delviereis page

This commit is contained in:
2026-08-29 16:00:46 +05:30
parent 70cfac8996
commit 1caa7b71a9
4 changed files with 720 additions and 9 deletions

View File

@@ -298,6 +298,22 @@ describe('ZoneContext', () => {
expect(result.current.matchesZone({ pickuplatitude: null, pickuplongitude: null })).toBe(false);
expect(result.current.matchesZone({ pickuplatitude: 'abc', pickuplongitude: 'abc' })).toBe(false);
});
it('should correctly match a delivery row that carries an assigned rider (milerprofileid) by address/city', () => {
const { result } = selectKoramangala();
// Even though milerprofileid and userid are present, this is a delivery row (has bookingid/pickupaddress)
// and should match Koramangala Hub's city (Bengaluru).
const deliveryRow = {
bookingid: 4021,
bookingno: 'DM-BK-7959CF19-97503',
pickupaddress: '12 MG Road, Bengaluru 560001',
deliveryaddress: '44 Indiranagar, Bengaluru 560038',
milerprofileid: 11,
userid: 91,
ridername: 'Vasanth'
};
expect(result.current.matchesZone(deliveryRow)).toBe(true);
});
});
describe('matchesZone — riders', () => {