feat(08-05-business-detail-routing): 完成采购与资产独立路由
这个提交包含在:
@@ -1,3 +1,5 @@
|
||||
import { buildAssetDetailPath, buildPurchaseRequestDetailPath } from "./businessDetailRoutes";
|
||||
|
||||
type NotificationTarget = {
|
||||
targetType: string | null;
|
||||
targetId: string | null;
|
||||
@@ -31,7 +33,7 @@ export function resolveNotificationTargetLink(item: NotificationTarget) {
|
||||
}
|
||||
|
||||
if (item.targetType === "purchase_request") {
|
||||
return `/purchase-requests?highlight=${item.targetId}`;
|
||||
return buildPurchaseRequestDetailPath(item.targetId);
|
||||
}
|
||||
|
||||
if (item.targetType === "travel_request") {
|
||||
@@ -39,7 +41,7 @@ export function resolveNotificationTargetLink(item: NotificationTarget) {
|
||||
}
|
||||
|
||||
if (item.targetType === "asset" || item.targetType === "asset_card") {
|
||||
return `/assets?highlight=${item.targetId}`;
|
||||
return buildAssetDetailPath(item.targetId);
|
||||
}
|
||||
|
||||
if (item.targetType === "inventory_check") {
|
||||
|
||||
在新工单中引用
屏蔽一个用户