feat(web-admin): open cert maintain dialog on reminder page

Keep users on the document reminder list by reusing vehicle/personnel
form dialogs instead of navigating away to base-info pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-12 19:29:37 +08:00
1 parent fba478dcca
commit 01d607d766
4 files changed
+156 -120

No files matched your search

@@ -6,17 +6,41 @@ export type ReminderJumpInput = {
personnelAffiliation?: string | null
}
export function resolveDocumentReminderEditPath(input: ReminderJumpInput): string | null {
export type ReminderFormMode =
| { kind: 'vehicle'; vehicleType: 'self' | 'carrier' }
| { kind: 'personnel'; affiliation: 'self' | 'carrier' }
/** 提醒页本页弹窗:解析车辆/人员表单锁定类型。 */
export function resolveDocumentReminderFormMode(
input: ReminderJumpInput
): ReminderFormMode | null {
const ownerType = String(input.ownerType || '').trim()
if (ownerType === 'vehicle') {
return String(input.vehicleType || '').trim() === 'self'
? '/vehicle-mgmt/base-info/self-vehicle'
: '/vehicle-mgmt/base-info/vehicle'
return {
kind: 'vehicle',
vehicleType: String(input.vehicleType || '').trim() === 'self' ? 'self' : 'carrier'
}
}
if (ownerType === 'personnel') {
return String(input.personnelAffiliation || '').trim() === 'carrier'
? '/vehicle-mgmt/base-info/personnel-carrier'
: '/vehicle-mgmt/base-info/personnel'
return {
kind: 'personnel',
affiliation:
String(input.personnelAffiliation || '').trim() === 'carrier' ? 'carrier' : 'self'
}
}
return null
}
/** 可选深链:档案页 path(提醒主流程已改为本页弹窗)。 */
export function resolveDocumentReminderEditPath(input: ReminderJumpInput): string | null {
const mode = resolveDocumentReminderFormMode(input)
if (!mode) return null
if (mode.kind === 'vehicle') {
return mode.vehicleType === 'self'
? '/vehicle-mgmt/base-info/self-vehicle'
: '/vehicle-mgmt/base-info/vehicle'
}
return mode.affiliation === 'carrier'
? '/vehicle-mgmt/base-info/personnel-carrier'
: '/vehicle-mgmt/base-info/personnel'
}