@appcorp/fusion-storybook 0.1.40 → 0.1.42
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.
- package/base-modules/expense/context.js +2 -2
- package/base-modules/expense/page.d.ts +8 -0
- package/base-modules/expense/page.js +27 -10
- package/base-modules/student-fee/page.d.ts +10 -0
- package/base-modules/student-fee/page.js +31 -11
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -446,7 +446,7 @@ export const useExpenseModule = () => {
|
|
|
446
446
|
const { count, items } = await getCachedExpenses({
|
|
447
447
|
params: listParams,
|
|
448
448
|
});
|
|
449
|
-
|
|
449
|
+
dispatch({
|
|
450
450
|
type: EXPENSE_ACTION_TYPES.SET_ITEMS,
|
|
451
451
|
payload: { items: items || [], count: count || 0 },
|
|
452
452
|
});
|
|
@@ -455,7 +455,7 @@ export const useExpenseModule = () => {
|
|
|
455
455
|
showToast(t("messagesFetchFailed"), TOAST_VARIANT.ERROR);
|
|
456
456
|
}
|
|
457
457
|
})();
|
|
458
|
-
}, [listParams]);
|
|
458
|
+
}, [listParams, dispatch, t, showToast]);
|
|
459
459
|
// ============================================================================
|
|
460
460
|
// RETURN
|
|
461
461
|
// ============================================================================
|
|
@@ -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
|
+
labelCategory: string;
|
|
20
|
+
labelExpenseDate: string;
|
|
21
|
+
labelId: string;
|
|
22
|
+
labelStatus: string;
|
|
23
|
+
labelTitle: string;
|
|
24
|
+
labelVendorName: string;
|
|
17
25
|
saveLabel: string;
|
|
18
26
|
searchPlaceholder: string;
|
|
19
27
|
tableDescription: string;
|
|
@@ -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, } from "./context";
|
|
18
|
+
import { useExpenseModule, ExpenseProvider, EXPENSE_ACTION_TYPES, EXPENSE_DRAWER, } from "./context";
|
|
19
19
|
import { ExpenseFilter } from "./filter";
|
|
20
20
|
import { ExpenseForm } from "./form";
|
|
21
21
|
import { ExpenseMoreActions } from "./more-actions";
|
|
@@ -61,19 +61,19 @@ const createComponentInstances = () => ({
|
|
|
61
61
|
moreActions: _jsx(ExpenseMoreActions, {}),
|
|
62
62
|
view: _jsx(ExpenseView, {}),
|
|
63
63
|
});
|
|
64
|
-
const createExpenseConfig = ({ cancelLabel, dispatch, drawerTitle, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
64
|
+
const createExpenseConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, labelActions, labelAmount, labelCategory, labelExpenseDate, labelId, labelStatus, labelTitle, labelVendorName, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
65
65
|
const components = createComponentInstances();
|
|
66
66
|
return {
|
|
67
67
|
moduleName: "expense",
|
|
68
68
|
tableColumns: [
|
|
69
|
-
{ label:
|
|
70
|
-
{ label:
|
|
71
|
-
{ label:
|
|
72
|
-
{ label:
|
|
73
|
-
{ label:
|
|
74
|
-
{ label:
|
|
75
|
-
{ label:
|
|
76
|
-
{ label:
|
|
69
|
+
{ label: labelId, width: "5%" },
|
|
70
|
+
{ label: labelTitle, width: "20%" },
|
|
71
|
+
{ label: labelCategory, width: "15%" },
|
|
72
|
+
{ label: labelAmount, width: "10%" },
|
|
73
|
+
{ label: labelExpenseDate, width: "10%" },
|
|
74
|
+
{ label: labelStatus, width: "10%" },
|
|
75
|
+
{ label: labelVendorName, width: "15%" },
|
|
76
|
+
{ label: labelActions, width: "15%" },
|
|
77
77
|
],
|
|
78
78
|
cancelLabel,
|
|
79
79
|
drawerTitle,
|
|
@@ -85,6 +85,7 @@ const createExpenseConfig = ({ cancelLabel, dispatch, drawerTitle, saveLabel, se
|
|
|
85
85
|
tableDescription,
|
|
86
86
|
tableTitle,
|
|
87
87
|
viewContent: components.view,
|
|
88
|
+
size: drawer === EXPENSE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
88
89
|
onClearFilters: () => {
|
|
89
90
|
dispatch({ type: EXPENSE_ACTION_TYPES.RESET_FORM });
|
|
90
91
|
},
|
|
@@ -102,6 +103,14 @@ const ExpensePageInner = (props) => {
|
|
|
102
103
|
drawer: context.state.drawer,
|
|
103
104
|
cancelLabel: props.cancelLabel,
|
|
104
105
|
drawerTitle: props.drawerTitle,
|
|
106
|
+
labelActions: props.labelActions,
|
|
107
|
+
labelAmount: props.labelAmount,
|
|
108
|
+
labelCategory: props.labelCategory,
|
|
109
|
+
labelExpenseDate: props.labelExpenseDate,
|
|
110
|
+
labelId: props.labelId,
|
|
111
|
+
labelStatus: props.labelStatus,
|
|
112
|
+
labelTitle: props.labelTitle,
|
|
113
|
+
labelVendorName: props.labelVendorName,
|
|
105
114
|
saveLabel: props.saveLabel,
|
|
106
115
|
searchPlaceholder: props.searchPlaceholder,
|
|
107
116
|
tableDescription: props.tableDescription,
|
|
@@ -111,6 +120,14 @@ const ExpensePageInner = (props) => {
|
|
|
111
120
|
context.state.drawer,
|
|
112
121
|
props.cancelLabel,
|
|
113
122
|
props.drawerTitle,
|
|
123
|
+
props.labelActions,
|
|
124
|
+
props.labelAmount,
|
|
125
|
+
props.labelCategory,
|
|
126
|
+
props.labelExpenseDate,
|
|
127
|
+
props.labelId,
|
|
128
|
+
props.labelStatus,
|
|
129
|
+
props.labelTitle,
|
|
130
|
+
props.labelVendorName,
|
|
114
131
|
props.saveLabel,
|
|
115
132
|
props.searchPlaceholder,
|
|
116
133
|
props.tableDescription,
|
|
@@ -14,6 +14,16 @@ import { USER_ROLE } from "../../type";
|
|
|
14
14
|
interface Props {
|
|
15
15
|
cancelLabel: string;
|
|
16
16
|
drawerTitle: string;
|
|
17
|
+
labelActions: string;
|
|
18
|
+
labelAmount: string;
|
|
19
|
+
labelAmountDue: string;
|
|
20
|
+
labelAmountPaid: string;
|
|
21
|
+
labelDueDate: string;
|
|
22
|
+
labelFeeStructure: string;
|
|
23
|
+
labelId: string;
|
|
24
|
+
labelRemarks: string;
|
|
25
|
+
labelStatus: string;
|
|
26
|
+
labelStudent: string;
|
|
17
27
|
saveLabel: string;
|
|
18
28
|
searchPlaceholder: string;
|
|
19
29
|
tableDescription: string;
|
|
@@ -71,21 +71,21 @@ const createComponentInstances = () => ({
|
|
|
71
71
|
moreActions: _jsx(StudentFeeMoreActions, {}),
|
|
72
72
|
view: _jsx(StudentFeeView, {}),
|
|
73
73
|
});
|
|
74
|
-
const createStudentFeeConfig = ({ cancelLabel, dispatch, drawerTitle, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
74
|
+
const createStudentFeeConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelAmount, labelAmountDue, labelAmountPaid, labelDueDate, labelFeeStructure, labelId, labelRemarks, labelStatus, labelStudent, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
75
75
|
const components = createComponentInstances();
|
|
76
76
|
return {
|
|
77
77
|
moduleName: "studentFee",
|
|
78
78
|
tableColumns: [
|
|
79
|
-
{ label:
|
|
80
|
-
{ label:
|
|
81
|
-
{ label:
|
|
82
|
-
{ label:
|
|
83
|
-
{ label:
|
|
84
|
-
{ label:
|
|
85
|
-
{ label:
|
|
86
|
-
{ label:
|
|
87
|
-
{ label:
|
|
88
|
-
{ label:
|
|
79
|
+
{ label: labelId, width: "5%" },
|
|
80
|
+
{ label: labelStudent, width: "12%" },
|
|
81
|
+
{ label: labelFeeStructure, width: "12%" },
|
|
82
|
+
{ label: labelAmount, width: "10%" },
|
|
83
|
+
{ label: labelAmountPaid, width: "10%" },
|
|
84
|
+
{ label: labelAmountDue, width: "10%" },
|
|
85
|
+
{ label: labelDueDate, width: "10%" },
|
|
86
|
+
{ label: labelStatus, width: "10%" },
|
|
87
|
+
{ label: labelRemarks, width: "11%" },
|
|
88
|
+
{ label: labelActions, width: "5%" },
|
|
89
89
|
],
|
|
90
90
|
cancelLabel,
|
|
91
91
|
drawerTitle,
|
|
@@ -114,6 +114,16 @@ const StudentFeePageInner = (props) => {
|
|
|
114
114
|
drawer: context.state.drawer,
|
|
115
115
|
cancelLabel: props.cancelLabel,
|
|
116
116
|
drawerTitle: props.drawerTitle,
|
|
117
|
+
labelActions: props.labelActions,
|
|
118
|
+
labelAmount: props.labelAmount,
|
|
119
|
+
labelAmountDue: props.labelAmountDue,
|
|
120
|
+
labelAmountPaid: props.labelAmountPaid,
|
|
121
|
+
labelDueDate: props.labelDueDate,
|
|
122
|
+
labelFeeStructure: props.labelFeeStructure,
|
|
123
|
+
labelId: props.labelId,
|
|
124
|
+
labelRemarks: props.labelRemarks,
|
|
125
|
+
labelStatus: props.labelStatus,
|
|
126
|
+
labelStudent: props.labelStudent,
|
|
117
127
|
saveLabel: props.saveLabel,
|
|
118
128
|
searchPlaceholder: props.searchPlaceholder,
|
|
119
129
|
tableDescription: props.tableDescription,
|
|
@@ -123,6 +133,16 @@ const StudentFeePageInner = (props) => {
|
|
|
123
133
|
context.state.drawer,
|
|
124
134
|
props.cancelLabel,
|
|
125
135
|
props.drawerTitle,
|
|
136
|
+
props.labelActions,
|
|
137
|
+
props.labelAmount,
|
|
138
|
+
props.labelAmountDue,
|
|
139
|
+
props.labelAmountPaid,
|
|
140
|
+
props.labelDueDate,
|
|
141
|
+
props.labelFeeStructure,
|
|
142
|
+
props.labelId,
|
|
143
|
+
props.labelRemarks,
|
|
144
|
+
props.labelStatus,
|
|
145
|
+
props.labelStudent,
|
|
126
146
|
props.saveLabel,
|
|
127
147
|
props.searchPlaceholder,
|
|
128
148
|
props.tableDescription,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/fusion-storybook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build-storybook": "storybook build",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@appcorp/app-corp-vista": "^1.0.0",
|
|
40
|
-
"@appcorp/shadcn": "^1.1.
|
|
40
|
+
"@appcorp/shadcn": "^1.1.60",
|
|
41
41
|
"@chromatic-com/storybook": "^5.1.1",
|
|
42
42
|
"@commitlint/cli": "^20.5.0",
|
|
43
43
|
"@commitlint/config-conventional": "^20.5.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@radix-ui/react-separator": "^1.1.8",
|
|
57
57
|
"@radix-ui/react-slot": "^1.2.4",
|
|
58
58
|
"@radix-ui/react-toast": "^1.2.15",
|
|
59
|
-
"@react-pakistan/util-functions": "^1.25.
|
|
59
|
+
"@react-pakistan/util-functions": "^1.25.67",
|
|
60
60
|
"@storybook/addon-a11y": "^10.3.4",
|
|
61
61
|
"@storybook/addon-docs": "^10.3.4",
|
|
62
62
|
"@storybook/addon-onboarding": "^10.3.4",
|