feat(projects): 微调
This commit is contained in:
@@ -11,9 +11,11 @@ import { normalizeProductMember, normalizeProductSettings } from './product-shar
|
||||
|
||||
const PRODUCT_PREFIX = `${WEB_SERVICE_PREFIX}/project/product`;
|
||||
|
||||
type ProductResponse = Omit<Api.Product.Product, 'id' | 'managerUserId'> & {
|
||||
type ProductResponse = Omit<Api.Product.Product, 'id' | 'managerUserId' | 'currentUserRoles'> & {
|
||||
id: string | number;
|
||||
managerUserId?: string | number | null;
|
||||
/** 灰度/兼容期后端可能缺省,适配层兜底为 [] */
|
||||
currentUserRoles?: Api.Common.CurrentUserRole[] | null;
|
||||
};
|
||||
|
||||
type ProductPageResponse = Api.Product.PageResult<ProductResponse>;
|
||||
@@ -39,7 +41,8 @@ function normalizeProduct(product: ProductResponse): Api.Product.Product {
|
||||
return {
|
||||
...product,
|
||||
id: normalizeStringId(product.id),
|
||||
managerUserId: normalizeNullableStringId(product.managerUserId) ?? ''
|
||||
managerUserId: normalizeNullableStringId(product.managerUserId) ?? '',
|
||||
currentUserRoles: product.currentUserRoles ?? []
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user