Implement dynamic header and table color functionality
This commit is contained in:
parent
49b67a1ece
commit
4f9e42cba0
|
|
@ -544,11 +544,13 @@ const initialState = {
|
||||||
PrintTemplate: null,
|
PrintTemplate: null,
|
||||||
DCPrintTemplate: null,
|
DCPrintTemplate: null,
|
||||||
PrintFieldDetails: null,
|
PrintFieldDetails: null,
|
||||||
|
DCtoInvoicePrintFieldDetails: null,
|
||||||
PricingAppPricingName: null,
|
PricingAppPricingName: null,
|
||||||
FeatureAddonData: [],
|
FeatureAddonData: [],
|
||||||
SessionData: [],
|
SessionData: [],
|
||||||
ThemeCreation: {},
|
ThemeCreation: {},
|
||||||
printDatas: {},
|
printDatas: {},
|
||||||
|
DCtoInvoice: {},
|
||||||
DefaultTheme: [],
|
DefaultTheme: [],
|
||||||
OthersTheme: [],
|
OthersTheme: [],
|
||||||
SelectedTheme: {},
|
SelectedTheme: {},
|
||||||
|
|
@ -2407,12 +2409,16 @@ const ThemeSlice = createSlice({
|
||||||
item.SetasDefault == 'Y' &&
|
item.SetasDefault == 'Y' &&
|
||||||
item.PrintTypeName === 'Delivery Chalan'
|
item.PrintTypeName === 'Delivery Chalan'
|
||||||
)?.StyleName;
|
)?.StyleName;
|
||||||
|
|
||||||
state.printDatas =
|
state.printDatas =
|
||||||
action?.payload?.data?.data?.[0]?.ComponentDetails.find(
|
action?.payload?.data?.data?.[0]?.ComponentDetails.find(
|
||||||
(item) =>
|
(item) =>
|
||||||
item.SetasDefault == 'Y' && item.PrintTypeName === 'Sales'
|
item.SetasDefault == 'Y' && item.PrintTypeName === 'Sales'
|
||||||
);
|
);
|
||||||
|
state.DCtoInvoice =
|
||||||
|
action?.payload?.data?.data?.[0]?.ComponentDetails.find(
|
||||||
|
(item) =>
|
||||||
|
item.SetasDefault == 'Y' && item.PrintTypeName === 'DC to Invoice'
|
||||||
|
);
|
||||||
state.PrintFieldDetails =
|
state.PrintFieldDetails =
|
||||||
action?.payload?.data?.data?.[0]?.ComponentDetails?.find(
|
action?.payload?.data?.data?.[0]?.ComponentDetails?.find(
|
||||||
(item) =>
|
(item) =>
|
||||||
|
|
@ -2421,6 +2427,14 @@ const ThemeSlice = createSlice({
|
||||||
acc[item.ConfigName] = true;
|
acc[item.ConfigName] = true;
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
state.DCtoInvoicePrintFieldDetails =
|
||||||
|
action?.payload?.data?.data?.[0]?.ComponentDetails?.find(
|
||||||
|
(item) =>
|
||||||
|
item.SetasDefault == 'Y' && item.PrintTypeName === 'DC to Invoice'
|
||||||
|
)?.FieldDetails?.reduce((acc, item) => {
|
||||||
|
acc[item.ConfigName] = true;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
} else if (action?.payload?.data?.statusCode == 0) {
|
} else if (action?.payload?.data?.statusCode == 0) {
|
||||||
state.PrintTemplate = undefined;
|
state.PrintTemplate = undefined;
|
||||||
|
|
@ -2755,6 +2769,7 @@ export const GlobalPricingAppPricingName = (state) =>
|
||||||
state?.theme?.PricingAppPricingName;
|
state?.theme?.PricingAppPricingName;
|
||||||
export const SelectedPrintTemplate = (state) => state?.theme?.PrintTemplate;
|
export const SelectedPrintTemplate = (state) => state?.theme?.PrintTemplate;
|
||||||
export const GloabalFieldDetails = (state) => state?.theme?.PrintFieldDetails;
|
export const GloabalFieldDetails = (state) => state?.theme?.PrintFieldDetails;
|
||||||
|
export const GloabalDCtoInvoiceFieldDetails = (state) => state?.theme?.DCtoInvoicePrintFieldDetails;
|
||||||
export const GlobalReprintDataFound = (state) => state.theme?.ReprintDataFound;
|
export const GlobalReprintDataFound = (state) => state.theme?.ReprintDataFound;
|
||||||
export const GlobalPritdummyData = (state) => state.theme?.PrintdummyData;
|
export const GlobalPritdummyData = (state) => state.theme?.PrintdummyData;
|
||||||
export const GlobalprintSize = (state) => state.theme?.printSize;
|
export const GlobalprintSize = (state) => state.theme?.printSize;
|
||||||
|
|
@ -2865,6 +2880,7 @@ export const SelectedGlobalSubCatgFont = (state) =>
|
||||||
state.theme.SelectedSubCatgFont;
|
state.theme.SelectedSubCatgFont;
|
||||||
export const StoredSessionData = (state) => state.theme.SessionData;
|
export const StoredSessionData = (state) => state.theme.SessionData;
|
||||||
export const GlobalprintDatas = (state) => state.theme.printDatas;
|
export const GlobalprintDatas = (state) => state.theme.printDatas;
|
||||||
|
export const GlobalDCtoInvoicePrint = (state) => state.theme.DCtoInvoice;
|
||||||
export const GlobalDefaultTheme = (state) => state.theme.DefaultTheme;
|
export const GlobalDefaultTheme = (state) => state.theme.DefaultTheme;
|
||||||
export const GlobalOthersTheme = (state) => state.theme.OthersTheme;
|
export const GlobalOthersTheme = (state) => state.theme.OthersTheme;
|
||||||
export const GlobalSelectedTheme = (state) => state.theme.SelectedTheme;
|
export const GlobalSelectedTheme = (state) => state.theme.SelectedTheme;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue