feat(assets): refine inventory presentation and abnormal vehicle details
This commit is contained in:
@@ -316,17 +316,21 @@ export default function AssetsModule() {
|
||||
};
|
||||
|
||||
const toggleInventoryRegion = (region: string) => {
|
||||
const newSet = new Set(expandedInventoryRegions);
|
||||
if (newSet.has(region)) newSet.delete(region);
|
||||
else newSet.add(region);
|
||||
setExpandedInventoryRegions(newSet);
|
||||
setExpandedInventoryRegions(current => {
|
||||
const next = new Set(current);
|
||||
if (next.has(region)) next.delete(region);
|
||||
else next.add(region);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
|
||||
const toggleInventoryType = (type: string) => {
|
||||
const newSet = new Set(expandedInventoryTypes);
|
||||
if (newSet.has(type)) newSet.delete(type);
|
||||
else newSet.add(type);
|
||||
setExpandedInventoryTypes(newSet);
|
||||
setExpandedInventoryTypes(current => {
|
||||
const next = new Set(current);
|
||||
if (next.has(type)) next.delete(type);
|
||||
else next.add(type);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
|
||||
const inventoryTypeFilter = isInventoryFilterOpen
|
||||
|
||||
Reference in New Issue
Block a user