fix event record
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div v-can="permissionCodes.eventRecord.read" class="registration-record-detail">
|
||||
<customer-profile-card v-if="record?.customer" class="customer-profile" :customer="record.customer" />
|
||||
<customer-profile-card
|
||||
v-if="record?.customer"
|
||||
class="customer-profile"
|
||||
:customer="record.customer"
|
||||
@click="toCustomerDetail"
|
||||
/>
|
||||
<t-cell-group v-if="record" title="登记信息" theme="card">
|
||||
<t-cell title="登记事件" :note="record.event?.name || '未知事件'" />
|
||||
<t-cell title="登记时间" :note="record.registeredAt ? Time.toPassedDateTime(record.registeredAt) : '-'" />
|
||||
@@ -80,6 +85,15 @@ async function toEdit(): Promise<void> {
|
||||
await router.push(`/management/registration-event-records/${recordId}/edit`);
|
||||
}
|
||||
|
||||
async function toCustomerDetail(): Promise<void> {
|
||||
const customerId = record.value?.customer?.id;
|
||||
if (!customerId) {
|
||||
return;
|
||||
}
|
||||
|
||||
await router.push(`/management/customers/${customerId}`);
|
||||
}
|
||||
|
||||
watch(() => route.params.id, async () => {
|
||||
await loadRecord();
|
||||
}, { immediate: true });
|
||||
|
||||
Reference in New Issue
Block a user