@appcorp/fusion-storybook 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ import { useMemo } from "react";
|
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
17
|
import { DATE_FORMATS, formatDate } from "@react-pakistan/util-functions";
|
|
18
|
-
import { useExpenseModule, ExpenseProvider, EXPENSE_ACTION_TYPES,
|
|
18
|
+
import { useExpenseModule, ExpenseProvider, EXPENSE_ACTION_TYPES, } from "./context";
|
|
19
19
|
import { ExpenseFilter } from "./filter";
|
|
20
20
|
import { ExpenseForm } from "./form";
|
|
21
21
|
import { ExpenseMoreActions } from "./more-actions";
|
|
@@ -61,7 +61,7 @@ const createComponentInstances = () => ({
|
|
|
61
61
|
moreActions: _jsx(ExpenseMoreActions, {}),
|
|
62
62
|
view: _jsx(ExpenseView, {}),
|
|
63
63
|
});
|
|
64
|
-
const createExpenseConfig = ({ cancelLabel, dispatch,
|
|
64
|
+
const createExpenseConfig = ({ cancelLabel, dispatch, drawerTitle, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
65
65
|
const components = createComponentInstances();
|
|
66
66
|
return {
|
|
67
67
|
moduleName: "expense",
|
|
@@ -85,7 +85,6 @@ const createExpenseConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, saveL
|
|
|
85
85
|
tableDescription,
|
|
86
86
|
tableTitle,
|
|
87
87
|
viewContent: components.view,
|
|
88
|
-
size: drawer === EXPENSE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
89
88
|
onClearFilters: () => {
|
|
90
89
|
dispatch({ type: EXPENSE_ACTION_TYPES.RESET_FORM });
|
|
91
90
|
},
|
|
@@ -14,6 +14,14 @@ import { USER_ROLE } from "../../type";
|
|
|
14
14
|
interface Props {
|
|
15
15
|
cancelLabel: string;
|
|
16
16
|
drawerTitle: string;
|
|
17
|
+
labelActions: string;
|
|
18
|
+
labelAmount: string;
|
|
19
|
+
labelDescription: string;
|
|
20
|
+
labelEnabled: string;
|
|
21
|
+
labelFeeType: string;
|
|
22
|
+
labelFrequency: string;
|
|
23
|
+
labelId: string;
|
|
24
|
+
labelName: string;
|
|
17
25
|
saveLabel: string;
|
|
18
26
|
searchPlaceholder: string;
|
|
19
27
|
tableDescription: string;
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useFeeStructureModule, FeeStructureProvider, FEE_STRUCTURE_ACTION_TYPES,
|
|
17
|
+
import { useFeeStructureModule, FeeStructureProvider, FEE_STRUCTURE_ACTION_TYPES, } from "./context";
|
|
18
18
|
import { FeeStructureFilter } from "./filter";
|
|
19
19
|
import { FeeStructureForm } from "./form";
|
|
20
20
|
import { FeeStructureMoreActions } from "./more-actions";
|
|
@@ -60,19 +60,19 @@ const createComponentInstances = () => ({
|
|
|
60
60
|
moreActions: _jsx(FeeStructureMoreActions, {}),
|
|
61
61
|
view: _jsx(FeeStructureView, {}),
|
|
62
62
|
});
|
|
63
|
-
const createFeeStructureConfig = ({ cancelLabel, dispatch,
|
|
63
|
+
const createFeeStructureConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelAmount, labelDescription, labelEnabled, labelFeeType, labelFrequency, labelId, labelName, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
64
64
|
const components = createComponentInstances();
|
|
65
65
|
return {
|
|
66
66
|
moduleName: "feeStructure",
|
|
67
67
|
tableColumns: [
|
|
68
|
-
{ label:
|
|
69
|
-
{ label:
|
|
70
|
-
{ label:
|
|
71
|
-
{ label:
|
|
72
|
-
{ label:
|
|
73
|
-
{ label:
|
|
74
|
-
{ label:
|
|
75
|
-
{ label:
|
|
68
|
+
{ label: labelId, width: "5%" },
|
|
69
|
+
{ label: labelName, width: "20%" },
|
|
70
|
+
{ label: labelFeeType, width: "15%" },
|
|
71
|
+
{ label: labelAmount, width: "15%" },
|
|
72
|
+
{ label: labelFrequency, width: "10%" },
|
|
73
|
+
{ label: labelDescription, width: "20%" },
|
|
74
|
+
{ label: labelEnabled, width: "10%" },
|
|
75
|
+
{ label: labelActions, width: "5%" },
|
|
76
76
|
],
|
|
77
77
|
cancelLabel,
|
|
78
78
|
drawerTitle,
|
|
@@ -84,7 +84,6 @@ const createFeeStructureConfig = ({ cancelLabel, dispatch, drawer, drawerTitle,
|
|
|
84
84
|
tableDescription,
|
|
85
85
|
tableTitle,
|
|
86
86
|
viewContent: components.view,
|
|
87
|
-
size: drawer === FEE_STRUCTURE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
88
87
|
onClearFilters: () => {
|
|
89
88
|
dispatch({ type: FEE_STRUCTURE_ACTION_TYPES.RESET_FORM });
|
|
90
89
|
},
|
|
@@ -102,6 +101,14 @@ const FeeStructurePageInner = (props) => {
|
|
|
102
101
|
drawer: context.state.drawer,
|
|
103
102
|
cancelLabel: props.cancelLabel,
|
|
104
103
|
drawerTitle: props.drawerTitle,
|
|
104
|
+
labelActions: props.labelActions,
|
|
105
|
+
labelAmount: props.labelAmount,
|
|
106
|
+
labelDescription: props.labelDescription,
|
|
107
|
+
labelEnabled: props.labelEnabled,
|
|
108
|
+
labelFeeType: props.labelFeeType,
|
|
109
|
+
labelFrequency: props.labelFrequency,
|
|
110
|
+
labelId: props.labelId,
|
|
111
|
+
labelName: props.labelName,
|
|
105
112
|
saveLabel: props.saveLabel,
|
|
106
113
|
searchPlaceholder: props.searchPlaceholder,
|
|
107
114
|
tableDescription: props.tableDescription,
|
|
@@ -111,6 +118,14 @@ const FeeStructurePageInner = (props) => {
|
|
|
111
118
|
context.state.drawer,
|
|
112
119
|
props.cancelLabel,
|
|
113
120
|
props.drawerTitle,
|
|
121
|
+
props.labelActions,
|
|
122
|
+
props.labelAmount,
|
|
123
|
+
props.labelDescription,
|
|
124
|
+
props.labelEnabled,
|
|
125
|
+
props.labelFeeType,
|
|
126
|
+
props.labelFrequency,
|
|
127
|
+
props.labelId,
|
|
128
|
+
props.labelName,
|
|
114
129
|
props.saveLabel,
|
|
115
130
|
props.searchPlaceholder,
|
|
116
131
|
props.tableDescription,
|
|
@@ -15,7 +15,7 @@ import { useMemo } from "react";
|
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
17
|
import { DATE_FORMATS, formatDate } from "@react-pakistan/util-functions";
|
|
18
|
-
import { useStudentFeeModule, StudentFeeProvider, STUDENT_FEE_ACTION_TYPES,
|
|
18
|
+
import { useStudentFeeModule, StudentFeeProvider, STUDENT_FEE_ACTION_TYPES, } from "./context";
|
|
19
19
|
import { StudentFeeFilter } from "./filter";
|
|
20
20
|
import { StudentFeeForm } from "./form";
|
|
21
21
|
import { StudentFeeMoreActions } from "./more-actions";
|
|
@@ -71,7 +71,7 @@ const createComponentInstances = () => ({
|
|
|
71
71
|
moreActions: _jsx(StudentFeeMoreActions, {}),
|
|
72
72
|
view: _jsx(StudentFeeView, {}),
|
|
73
73
|
});
|
|
74
|
-
const createStudentFeeConfig = ({ cancelLabel, dispatch,
|
|
74
|
+
const createStudentFeeConfig = ({ cancelLabel, dispatch, drawerTitle, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
75
75
|
const components = createComponentInstances();
|
|
76
76
|
return {
|
|
77
77
|
moduleName: "studentFee",
|
|
@@ -97,7 +97,6 @@ const createStudentFeeConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, sa
|
|
|
97
97
|
tableDescription,
|
|
98
98
|
tableTitle,
|
|
99
99
|
viewContent: components.view,
|
|
100
|
-
size: drawer === STUDENT_FEE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
101
100
|
onClearFilters: () => {
|
|
102
101
|
dispatch({ type: STUDENT_FEE_ACTION_TYPES.RESET_FORM });
|
|
103
102
|
},
|