feat(orders): show actual pooled freight fulfillment

This commit is contained in:
2026-10-07 16:46:58 +08:00
parent b7fcc14e59
commit a853b1e0c2
4 changed files with 67 additions and 4 deletions
@@ -6,6 +6,15 @@ const api = readFileSync(new URL('./api/businessOrders.ts', import.meta.url), 'u
const routes = readFileSync(new URL('./routes.ts', import.meta.url), 'utf8')
const view = readFileSync(new URL('./components/BusinessOrdersView.vue', import.meta.url), 'utf8')
test('shows merchant-owned arrangement facts without a pool request or editable status control', () => {
assert.match(api, /fleetArrangement: import\('\.\.\/fleetArrangement'\)\.FleetArrangement \| null/)
assert.match(view, /aria-label="承运安排"/)
for (const field of ['signedPackages', 'unsignedPackages', 'returnedPackages', 'readOnlyReason']) assert.ok(view.includes(`fleetArrangement.${field}`))
assert.doesNotMatch(api, /capacity-offers|fleet\/trips/)
assert.match(view, /if \(query\.page !== 1\) query\.page = 1\s+else void load\(\)/)
assert.match(view, /if \(reloadDirectly\) void load\(\)/)
})
test('activates all three customer cross-border pages with frozen permissions', () => {
for (const [path, permission] of [
['cross-border/procurement', 'merchant:cross-border:procurement:list'],