新增房表生成前端页面
This commit is contained in:
1 parent
d3a52e7605
commit
0715e8334f
16 files changed
+1694
-5
No files matched your search
@@ -91,6 +91,18 @@ function createManualInvoiceMenu(): AuthMenuResult {
|
||||
}
|
||||
}
|
||||
|
||||
function createRoomingListMenu(): AuthMenuResult {
|
||||
return {
|
||||
menu_code: 'RESERVATION_ROOMING_LIST',
|
||||
menu_name: 'Rooming List',
|
||||
route_path: '/reservation/rooming-lists/new',
|
||||
component_key: 'ReservationRoomingList',
|
||||
icon_key: 'pi pi-file-excel',
|
||||
permission_code: 'RESERVATION_ROOMING_LIST_GENERATE',
|
||||
sort_order: 26,
|
||||
}
|
||||
}
|
||||
|
||||
function createSystemMenu(): AuthMenuResult {
|
||||
return {
|
||||
menu_code: 'SYSTEM_SETTINGS',
|
||||
@@ -137,6 +149,11 @@ async function mountShell(menus = [createReservationOrdersMenu(), createReservat
|
||||
component: { template: '<div />' },
|
||||
meta: { titleKey: 'nav.manualInvoice' },
|
||||
},
|
||||
{
|
||||
path: '/reservation/rooming-lists/new',
|
||||
component: { template: '<div />' },
|
||||
meta: { titleKey: 'nav.roomingList' },
|
||||
},
|
||||
{
|
||||
path: '/system',
|
||||
component: { template: '<div />' },
|
||||
@@ -199,6 +216,13 @@ describe('ReservationAppShell', () => {
|
||||
expect(wrapper.text()).toContain('手工开票')
|
||||
})
|
||||
|
||||
it('shows Rooming List only when backend menus include it', async () => {
|
||||
const wrapper = await mountShell([createReservationOrdersMenu(), createRoomingListMenu()])
|
||||
|
||||
expect(wrapper.find('a[href="/reservation/rooming-lists/new"]').exists()).toBe(true)
|
||||
expect(wrapper.text()).toContain('房表生成')
|
||||
})
|
||||
|
||||
it('shows System Settings only when backend menus include it', async () => {
|
||||
const wrapper = await mountShell([createReservationOrdersMenu(), createSystemMenu()])
|
||||
|
||||
|
||||
Reference in new issue
Block a user