兼容第三种房表名单格式

This commit is contained in:
andy
2026-08-04 09:41:16 +08:00
parent 99fb919158
commit d56587a078
18 changed files with 427 additions and 98 deletions

View File

@@ -402,7 +402,7 @@ export default {
eyebrow: 'Reservation tool',
title: 'Generate Rooming List Excel',
subtitle:
'Upload the travel group list, enter people per room, room type, payment type and nationality. Lists with travel dates derive stay dates automatically; English-name lists require manual dates.',
'Upload the travel group list, enter people per room, room type, payment type and nationality. Lists with travel dates derive stay dates automatically; lists without travel dates require manual dates.',
currentHotel: 'Current hotel',
sourceSection: 'Source list and required fields',
targetSection: 'Target Excel defaults',

View File

@@ -402,7 +402,7 @@ export default {
eyebrow: 'เครื่องมือ Reservation',
title: 'สร้าง Rooming List Excel',
subtitle:
'อัปโหลดรายชื่อกรุ๊ป กรอกจำนวนคนต่อห้อง Room Type, Payment Type และ Nationality ไฟล์ที่มี Travel Date จะสร้างวันที่ให้อัตโนมัติ ส่วนไฟล์ English name ต้องกรอกวันที่เอง',
'อัปโหลดรายชื่อกรุ๊ป กรอกจำนวนคนต่อห้อง Room Type, Payment Type และ Nationality ไฟล์ที่มี Travel Date จะสร้างวันที่ให้อัตโนมัติ ส่วนไฟล์ที่ไม่มี Travel Date ต้องกรอกวันที่เอง',
currentHotel: 'โรงแรมปัจจุบัน',
sourceSection: 'ไฟล์รายชื่อและข้อมูลจำเป็น',
targetSection: 'ค่าเริ่มต้นของ Excel ปลายทาง',

View File

@@ -401,7 +401,7 @@ export default {
roomingList: {
eyebrow: '预订工具',
title: '生成 Rooming List Excel',
subtitle: '上传旅行团名单 Excel填写每房人数、房型、付款方式和国籍有旅游日期的名单自动生成入住/离店日期,英文姓/英文名名单需手填日期。',
subtitle: '上传旅行团名单 Excel填写每房人数、房型、付款方式和国籍有旅游日期的名单自动生成入住/离店日期,没有旅游日期的名单需手填日期。',
currentHotel: '当前酒店',
sourceSection: '来源名单与必填信息',
targetSection: '目标 Excel 默认值',

View File

@@ -325,8 +325,8 @@ describe('ReservationRoomingListGenerationView', () => {
it('maps backend manual stay date validation details to the active locale', async () => {
vi.mocked(generateReservationRoomingListExcel).mockRejectedValue(
new RoomingListGenerationError('Rooming List 字段校验失败。', 400, 'ROOMING_LIST_VALIDATION_FAILED', [
'arrival: 第二种来源名单样式必须填写入住日期(前端提交为空)。',
'departure: 第二种来源名单样式必须填写离店日期',
'arrival: 无旅游日期来源名单样式必须填写入住日期(前端提交为空)。',
'departure: 无旅游日期来源名单样式必须填写离店日期',
]),
)
const wrapper = mountView({ locale: 'en-US' })
@@ -339,7 +339,7 @@ describe('ReservationRoomingListGenerationView', () => {
expect(wrapper.text()).toContain('Rooming List field validation failed. Please check the form.')
expect(wrapper.text()).toContain('Enter arrival date.')
expect(wrapper.text()).toContain('Enter departure date.')
expect(wrapper.text()).not.toContain('第二种来源名单样式必须填写')
expect(wrapper.text()).not.toContain('无旅游日期来源名单样式必须填写')
expect(wrapper.find('[data-testid="rooming-list-arrival"]').classes()).toContain('is-invalid')
expect(wrapper.find('[data-testid="rooming-list-departure"]').classes()).toContain('is-invalid')
})
@@ -347,8 +347,8 @@ describe('ReservationRoomingListGenerationView', () => {
it('clears mapped backend stay date field errors when the user edits those fields', async () => {
vi.mocked(generateReservationRoomingListExcel).mockRejectedValue(
new RoomingListGenerationError('Rooming List 字段校验失败。', 400, 'ROOMING_LIST_VALIDATION_FAILED', [
'arrival: 第二种来源名单样式必须填写入住日期。',
'departure: 第二种来源名单样式必须填写离店日期。',
'arrival: 无旅游日期来源名单样式必须填写入住日期。',
'departure: 无旅游日期来源名单样式必须填写离店日期。',
]),
)
const wrapper = mountView({ locale: 'en-US' })