feat(web-admin): add document reminder jump path resolver
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ed5784d1f7
commit
c0fa3ccfd9
2 files changed
+75
No files matched your search
@@ -0,0 +1,22 @@
|
||||
export const DOCUMENT_REMINDER_JUMP_UNSUPPORTED = '暂不支持该主体类型的证件维护跳转'
|
||||
|
||||
export type ReminderJumpInput = {
|
||||
ownerType?: string | null
|
||||
vehicleType?: string | null
|
||||
personnelAffiliation?: string | null
|
||||
}
|
||||
|
||||
export function resolveDocumentReminderEditPath(input: ReminderJumpInput): string | 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'
|
||||
}
|
||||
if (ownerType === 'personnel') {
|
||||
return String(input.personnelAffiliation || '').trim() === 'carrier'
|
||||
? '/vehicle-mgmt/base-info/personnel-carrier'
|
||||
: '/vehicle-mgmt/base-info/personnel'
|
||||
}
|
||||
return null
|
||||
}
|
||||
Reference in new issue
Block a user