优化V4预订事项用户化展示
This commit is contained in:
1 parent
c521eb6dc0
commit
fb980c6814
10 files changed
+163
-55
No files matched your search
@@ -8,8 +8,8 @@
|
||||
</div>
|
||||
<template v-else>
|
||||
<div class="room-information__chips">
|
||||
<span>{{ eventType || '-' }}</span>
|
||||
<span>{{ bookingType || '-' }}</span>
|
||||
<span>{{ eventTypeLabel }}</span>
|
||||
<span>{{ bookingTypeLabel }}</span>
|
||||
</div>
|
||||
|
||||
<section
|
||||
@@ -257,6 +257,29 @@ const roomInformation = computed<ReservationV4RoomInformationDisplayModel | null
|
||||
})
|
||||
const eventType = computed(() => roomInformation.value?.event_type ?? props.card.event_type ?? '')
|
||||
const bookingType = computed(() => roomInformation.value?.booking_type ?? '')
|
||||
const eventTypeLabel = computed(() => {
|
||||
const normalizedEventType = eventType.value.trim().toUpperCase()
|
||||
if (normalizedEventType === 'NEW_BOOKING') {
|
||||
return t('taskV4.roomInformation.eventType.NEW_BOOKING')
|
||||
}
|
||||
if (normalizedEventType === 'UPDATE_BOOKING') {
|
||||
return t('taskV4.roomInformation.eventType.UPDATE_BOOKING')
|
||||
}
|
||||
if (normalizedEventType === 'CANCEL_BOOKING') {
|
||||
return t('taskV4.roomInformation.eventType.CANCEL_BOOKING')
|
||||
}
|
||||
return t('taskV4.roomInformation.eventType.unknown')
|
||||
})
|
||||
const bookingTypeLabel = computed(() => {
|
||||
const normalizedBookingType = bookingType.value.trim().toUpperCase()
|
||||
if (normalizedBookingType === 'GROUP') {
|
||||
return t('taskV4.bookingTypeGroup')
|
||||
}
|
||||
if (normalizedBookingType === 'FIT') {
|
||||
return t('taskV4.bookingTypeFit')
|
||||
}
|
||||
return t('taskV4.bookingTypeUnknown')
|
||||
})
|
||||
const currentValues = computed(() => normalizeValues(roomInformation.value?.current_values))
|
||||
const proposedValues = computed(() => normalizeValues(roomInformation.value?.proposed_values))
|
||||
const finalValues = computed(() => normalizeValues(roomInformation.value?.final_values))
|
||||
|
||||
@@ -369,20 +369,6 @@ function lookupHints(field: ReservationV4TaskCardFieldResult): LookupHint[] {
|
||||
tone: 'normal',
|
||||
})
|
||||
}
|
||||
if (result.stale) {
|
||||
hints.push({
|
||||
key: `${kind}-stale`,
|
||||
message: t('taskV4.lookup.stale'),
|
||||
tone: 'warning',
|
||||
})
|
||||
}
|
||||
result.warnings.forEach((warning, index) => {
|
||||
hints.push({
|
||||
key: `${kind}-warning-${index}`,
|
||||
message: t('taskV4.lookup.warning', { warning }),
|
||||
tone: 'warning',
|
||||
})
|
||||
})
|
||||
if (!result.items.length) {
|
||||
hints.push({
|
||||
key: `${kind}-empty`,
|
||||
|
||||
@@ -425,7 +425,8 @@ function handlePrimaryAction(): void {
|
||||
}
|
||||
|
||||
.task-card-section__status-actions {
|
||||
justify-content: flex-start;
|
||||
align-self: stretch;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user