This commit is contained in:
2026-08-13 17:14:51 +08:00
parent 8831218c2e
commit b21fd625e4
3 changed files with 116 additions and 67 deletions
@@ -0,0 +1,12 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
describe('InboundTaskList measurement scope', () => {
it('uses the inbound tenant isolation key for measurement and review requests', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
expect(source.match(/:tenant-id="selectedInbound\.tenantId"/g)).toHaveLength(2)
expect(source).not.toContain('selectedInbound.customerId || selectedInbound.tenantId')
})
})
@@ -260,7 +260,7 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1 })
<el-dialog
v-model="taskDialogOpen"
:title="selectedInbound ? `${taskLabel} · ${selectedInbound.inboundCode || selectedInbound.id}` : taskLabel"
width="min(1500px, calc(100vw - 32px))"
width="min(1180px, calc(100vw - 32px))"
top="4vh"
destroy-on-close
append-to-body
@@ -268,13 +268,13 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1 })
>
<MeasurementReviewPanel
v-if="isReview && selectedInbound"
:customer-id="selectedInbound.customerId || selectedInbound.tenantId"
:tenant-id="selectedInbound.tenantId"
:inbound-id="selectedInbound.id"
@changed="handleTaskChanged"
/>
<InboundMeasurementPanel
v-else-if="selectedInbound"
:customer-id="selectedInbound.customerId || selectedInbound.tenantId"
:tenant-id="selectedInbound.tenantId"
:inbound-id="selectedInbound.id"
@changed="handleTaskChanged"
/>