feat(fleet): add internal sales capacity pool workflow
This commit is contained in:
@@ -7,6 +7,8 @@ import { overseasMasterDataRoutes } from './routes'
|
||||
describe('overseas master data routes', () => {
|
||||
it('uses the frozen stable paths and list permissions', () => {
|
||||
expect(overseasMasterDataRoutes.map((route) => [route.path, route.meta?.permission])).toEqual([
|
||||
['overseas-master-data/capacity-offers', overseasMasterDataPermissions.capacityOfferList],
|
||||
['overseas-master-data/capacity-offers/:offerNo', overseasMasterDataPermissions.capacityOfferList],
|
||||
['overseas-master-data/fleet-quotes', overseasMasterDataPermissions.fleetQuoteList],
|
||||
['overseas-master-data/trip-operations', overseasMasterDataPermissions.operationsList],
|
||||
['overseas-master-data/trips', overseasMasterDataPermissions.tripList],
|
||||
@@ -20,6 +22,15 @@ describe('overseas master data routes', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('allows dispatch management to read the pool without granting full trip access to sales', () => {
|
||||
const pool = overseasMasterDataRoutes.filter(route => route.path.includes('capacity-offers'))
|
||||
expect(pool).toHaveLength(2)
|
||||
for (const route of pool) {
|
||||
expect(route.meta?.permissionAnyOf).toEqual([overseasMasterDataPermissions.capacityOfferManage])
|
||||
expect(route.meta?.permission).not.toBe(overseasMasterDataPermissions.tripList)
|
||||
}
|
||||
})
|
||||
|
||||
it('keeps vehicle detail as a route page and does not add a duplicate partner warehouse route', () => {
|
||||
expect(overseasMasterDataRoutes.at(-1)?.meta?.showPageHeading).toBe(false)
|
||||
expect(overseasMasterDataRoutes.some((route) => route.path.includes('partner-warehouse'))).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user