功能:支持待分配预约与首次排班引导
This commit is contained in:
@@ -60,10 +60,21 @@ async function run() {
|
||||
page.data.monthDisplayMode = 'count'
|
||||
const monthDays = definition.buildMonthDays.call(page, {
|
||||
artists: [{ id: 1, name: '员工', shortName: '员', color: '#000' }],
|
||||
daySummaries: []
|
||||
daySummaries: [{ date: dateUtil.formatDate(dateUtil.startOfMonth(page.data.currentDateText)), totalCount: 2, unassignedCount: 1, artistCounts: [] }]
|
||||
})
|
||||
assert.strictEqual(monthDays.length, 42)
|
||||
assert.strictEqual(monthDays.every(item => item.expandedBlocks.length === 0 && item.rowBlocks.length === 0), true)
|
||||
assert.strictEqual(monthDays.some(item => item.artistCounts.some(count => count.artistId === '__unassigned__' && count.count === 1)), true)
|
||||
|
||||
const dayPage = createPage({ currentDateText: '2026-10-12', selectedArtistId: '' })
|
||||
const dayState = dayPage.buildDayView({
|
||||
businessStartTime: '10:00',
|
||||
businessEndTime: '22:00',
|
||||
artists: [{ id: 1, name: '员工', color: '#000' }],
|
||||
appointments: [{ orderItemId: 8, date: '2026-10-12', startTime: '2026-10-12 14:00:00', durationMinutes: 60, artistId: null }]
|
||||
})
|
||||
assert.strictEqual(dayState.dayLanes[0].artistId, '__unassigned__')
|
||||
assert.strictEqual(dayState.dayLanes[0].blocks.length, 1)
|
||||
assert.strictEqual(dayState.unassignedCount, 1)
|
||||
|
||||
const requestPage = createPage({ viewMode: 'day', currentDateText: '2026-10-11' })
|
||||
let calendarRequests = 0
|
||||
|
||||
Reference in New Issue
Block a user