mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1996: fix(crm): consolidate customer feature selection logic
fix(crm): consolidate customer feature selection logic Introduce centralized `getEnabledCustomerFeature` helper to standardize feature selection across components. Replaces inconsistent filtering approaches with unified logic that prioritizes 'd-account' and 'd-no-account' features. Changes: - Add `getEnabledCustomerFeature` helper with unit tests - Add `CustomerFeatureKey` and `CustomerFeatureGroup` enums - Update customer-order-details-header component - Update pickup-shelf-details-header component - Update customer-result-list components - Update order-details-main-view component Ref: #5432
This commit is contained in:
committed by
Lorenz Hilpert
parent
7a04b828c3
commit
f175b5d2af
@@ -14,7 +14,10 @@ export const KeyValueSchema = <
|
||||
group: z.string().describe('Group').optional(),
|
||||
key: keySchema.describe('Key').optional(),
|
||||
label: z.string().describe('Label').optional(),
|
||||
selected: z.boolean().describe('Whether this option is currently selected').optional(),
|
||||
selected: z
|
||||
.boolean()
|
||||
.describe('Whether this option is currently selected')
|
||||
.optional(),
|
||||
sort: z.number().describe('Sort criteria').optional(),
|
||||
value: valueSchema.describe('Value').optional(),
|
||||
});
|
||||
@@ -23,3 +26,7 @@ export const KeyValueOfStringAndStringSchema = KeyValueSchema(
|
||||
z.string(),
|
||||
z.string(),
|
||||
);
|
||||
|
||||
export type KeyValueOfStringAndString = z.infer<
|
||||
typeof KeyValueOfStringAndStringSchema
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user