fix(admin): simplify booking documents and refine measurement review
This commit is contained in:
@@ -79,7 +79,6 @@ type ViewModel = {
|
||||
hasUnsavedActualChanges: boolean
|
||||
printDisabledReason: string
|
||||
save: () => Promise<void>
|
||||
canManageDocuments: boolean
|
||||
detail: OceanBookingDetail | null
|
||||
actionError: { code?: string; requestId?: string; traceId?: string; message: string } | null
|
||||
actionSaving: boolean
|
||||
@@ -346,13 +345,14 @@ describe('OceanBookingDetailView one-click release', () => {
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('allows documents and release for a saved booking with no single customer', async () => {
|
||||
it('allows release without documents for a saved booking with no single customer', async () => {
|
||||
const empty = booking()
|
||||
empty.customerId = null; empty.customerName = null; empty.oceanBooking.customerId = null; empty.oceanBooking.customerName = null
|
||||
empty.documents = []
|
||||
vi.mocked(getOceanBooking).mockResolvedValue(empty)
|
||||
vi.mocked(releaseOceanBooking).mockResolvedValue({ ...empty, status: 'RELEASED', version: 4 })
|
||||
const { vm, wrapper } = await mountView()
|
||||
expect(vm.canManageDocuments).toBe(true)
|
||||
expect(wrapper.text()).not.toContain('订舱资料')
|
||||
await vm.submitRelease()
|
||||
expect(releaseOceanBooking).toHaveBeenCalledWith('123', { expectedVersion: 3 })
|
||||
expect(updateOceanBookingDraft).not.toHaveBeenCalled()
|
||||
|
||||
Reference in New Issue
Block a user