fix(appointment): restore overlay panel and compact calendar controls

This commit is contained in:
2026-10-15 19:23:16 +08:00
parent 8dc0d2d3b8
commit 9f51392754
6 changed files with 248 additions and 58 deletions
+21
View File
@@ -171,6 +171,27 @@ const cssRoot = (css: string) => {
}
describe('approved Admin density ownership', () => {
it('keeps appointment details over the calendar without clipping days or scrolling away panel controls', () => {
const declarations = (file: string, selector: string) => {
const values: Record<string, string> = {}
const css = parse(read(`modules/appointment-calendar/${file}`)).descriptor.styles.map(style => style.content).join('\n')
cssRoot(css).walkRules(selector, rule => { rule.walkDecls(decl => { values[decl.prop] = decl.value }) })
return values
}
const panel = declarations('AppointmentCalendarView.vue', '.work-panel')
expect(panel.position).toBe('absolute')
expect(panel.height).toContain('100dvh')
expect(declarations('AppointmentCalendarView.vue', '.work-layout')['grid-template-columns']).toBeUndefined()
expect(declarations('AppointmentCalendarView.vue', '.panel-body')).toMatchObject({ 'overflow-y': 'auto', 'min-height': '0' })
expect(declarations('AppointmentCalendarView.vue', '.panel-header').flex).toBe('none')
expect(declarations('AppointmentCalendarView.vue', '.panel-footer').flex).toBe('none')
expect(declarations('WorkCalendarPanel.vue', '.calendar-toolbar')['justify-content']).toBe('flex-start')
expect(declarations('AppointmentCalendarView.vue', '.work-inbox').border).toBeUndefined()
const day = declarations('WorkCalendarPanel.vue', '.work-day')
expect(parseInt(day['min-height']!)).toBeLessThan(140)
expect(day['max-height']).toBeUndefined()
expect(day.overflow).not.toBe('hidden')
})
it('shares list status and category tab styles across registered list consumers', () => {
for (const file of [
'unified-orders/pages/UnifiedOrdersView.vue', 'overseas-warehouse/pages/LastMileOrdersView.vue',