fix(admin): 修正接口 schema 与路由不匹配
- classroomSchema 允许 building/status 为 null,教室查看页恢复数据 - 排期 matrix 单元格为对象而非数组,教室排期页恢复渲染 - 押金批量收取改用 /deposits/eligible-students 路由 - 学生下拉 schema 按 /deposits/student-lookups 实际结构校验 - 水电费录入改走 /expenses/student-utility,批量恢复改为 PUT
This commit is contained in:
@@ -132,7 +132,7 @@ const ExpensesPage: React.FC = () => {
|
||||
{ invalidate: [['expenses']] },
|
||||
),
|
||||
utility: useApiMutation(
|
||||
async (payload: Record<string, unknown>) => api.post('/expenses/utility', payload),
|
||||
async (payload: Record<string, unknown>) => api.post('/expenses/student-utility', payload),
|
||||
{ invalidate: [['expenses'], ['bills']] },
|
||||
),
|
||||
importUtility: useApiMutation(
|
||||
@@ -166,11 +166,11 @@ const ExpensesPage: React.FC = () => {
|
||||
{ invalidate: [['expenses']] },
|
||||
),
|
||||
batchRestoreRoom: useApiMutation(
|
||||
async (ids: number[]) => api.post('/expenses/room/batch-restore', { ids }),
|
||||
async (ids: number[]) => api.put('/expenses/room/batch-restore', { ids }),
|
||||
{ invalidate: [['expenses']] },
|
||||
),
|
||||
batchRestorePersonal: useApiMutation(
|
||||
async (ids: number[]) => api.post('/expenses/personal/batch-restore', { ids }),
|
||||
async (ids: number[]) => api.put('/expenses/personal/batch-restore', { ids }),
|
||||
{ invalidate: [['expenses']] },
|
||||
),
|
||||
purgeRoom: useApiMutation(
|
||||
|
||||
Reference in New Issue
Block a user