fix(assets): expose full inventory for scoped users and stabilize previews
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -285,8 +285,8 @@ const BUSINESS_DIMENSIONS: Record<AnalysisView, readonly AssetAnalysisDimension[
|
||||
|
||||
/** Dimensions are choices, not a required drill sequence. */
|
||||
export function getAvailableDimensions(view: AnalysisView): AssetAnalysisDimension[] {
|
||||
const common = view === 'inventory'
|
||||
? COMMON_DIMENSIONS.filter(dimension => dimension !== 'manager' && dimension !== 'customer')
|
||||
const common = ['inventory', 'pending', 'abnormal'].includes(view)
|
||||
? COMMON_DIMENSIONS.filter(dimension => dimension !== 'department' && dimension !== 'manager' && dimension !== 'customer')
|
||||
: COMMON_DIMENSIONS;
|
||||
return [...common, ...BUSINESS_DIMENSIONS[view]];
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export function InventoryStatisticsSection({
|
||||
<div className="w-1.5 h-6 bg-blue-600 rounded-full"></div>
|
||||
<div className="flex flex-col">
|
||||
<h2 className="text-lg font-bold text-gray-800 leading-tight">库存统计</h2>
|
||||
<span className="text-[10px] text-gray-400 font-medium">{preview ? '公共库存汇总 · 明细按当前用户权限查看' : '实时更新库存数据'}</span>
|
||||
<span className="text-[10px] text-gray-400 font-medium">{preview ? '全量库存 · 汇总与明细口径一致' : '实时更新库存数据'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user