|
|
|
@ -100,18 +100,19 @@ export const useProductsAuditStatesMapVal = (value) => {
|
|
|
|
|
*/
|
|
|
|
|
export const useProductsTypesFieldsets = (type) => {
|
|
|
|
|
const [isPermitted] = useAuthStore((state) => [state.isPermitted]);
|
|
|
|
|
const infoDefault = [['code'], ['title']];
|
|
|
|
|
const infoAdmin = ['remarks', 'dept']; // 'display_to_c'
|
|
|
|
|
const infoDefault = [['city'], ['title']];
|
|
|
|
|
const infoAdmin = ['code', 'remarks', 'dept']; // 'display_to_c'
|
|
|
|
|
const infoDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['display_to_c'] : [];
|
|
|
|
|
const infoRecDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['recommends_rate'] : [];
|
|
|
|
|
const infoTypesMap = {
|
|
|
|
|
'6': [['city'], []],
|
|
|
|
|
'B': [['city', 'km'], []],
|
|
|
|
|
'J': [['city', 'recommends_rate', 'duration', ...infoDisplay], ['description']],
|
|
|
|
|
'Q': [['city', 'recommends_rate', 'duration', ...infoDisplay], ['description']],
|
|
|
|
|
'D': [['city', 'recommends_rate', 'duration', ...infoDisplay], ['description']],
|
|
|
|
|
'7': [['city', 'recommends_rate', 'duration', ...infoDisplay, 'open_weekdays'], ['description']],
|
|
|
|
|
'R': [['city'], ['description']],
|
|
|
|
|
'8': [[...infoDisplay], []],
|
|
|
|
|
'6': [[], []],
|
|
|
|
|
'B': [['km'], []],
|
|
|
|
|
'J': [[...infoRecDisplay, 'duration', ], ['description']],
|
|
|
|
|
'Q': [[...infoRecDisplay, 'duration', ], ['description']],
|
|
|
|
|
'D': [[...infoRecDisplay, 'duration', ...infoDisplay], ['description']],
|
|
|
|
|
'7': [[...infoRecDisplay, 'duration', 'open_weekdays'], ['description']],
|
|
|
|
|
'R': [[], ['description']],
|
|
|
|
|
'8': [[], []],
|
|
|
|
|
};
|
|
|
|
|
const thisTypeFieldset = (_type) => {
|
|
|
|
|
if (isEmpty(_type)) {
|
|
|
|
|