@appcorp/fusion-storybook 0.1.39 → 0.1.41

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.
@@ -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;
@@ -61,19 +61,19 @@ const createComponentInstances = () => ({
61
61
  moreActions: _jsx(ExpenseMoreActions, {}),
62
62
  view: _jsx(ExpenseView, {}),
63
63
  });
64
- const createExpenseConfig = ({ cancelLabel, dispatch, drawer, 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: "ID", width: "5%" },
70
- { label: "Title", width: "20%" },
71
- { label: "Category", width: "15%" },
72
- { label: "Amount", width: "10%" },
73
- { label: "Expense Date", width: "10%" },
74
- { label: "Status", width: "10%" },
75
- { label: "Vendor Name", width: "15%" },
76
- { label: "Actions", width: "15%" },
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,
@@ -103,6 +103,14 @@ const ExpensePageInner = (props) => {
103
103
  drawer: context.state.drawer,
104
104
  cancelLabel: props.cancelLabel,
105
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,
106
114
  saveLabel: props.saveLabel,
107
115
  searchPlaceholder: props.searchPlaceholder,
108
116
  tableDescription: props.tableDescription,
@@ -112,6 +120,14 @@ const ExpensePageInner = (props) => {
112
120
  context.state.drawer,
113
121
  props.cancelLabel,
114
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,
115
131
  props.saveLabel,
116
132
  props.searchPlaceholder,
117
133
  props.tableDescription,
@@ -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, FEE_STRUCTURE_DRAWER, } from "./context";
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, drawer, drawerTitle, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
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: "ID", width: "5%" },
69
- { label: "Name", width: "20%" },
70
- { label: "Fee Type", width: "15%" },
71
- { label: "Amount", width: "15%" },
72
- { label: "Frequency", width: "10%" },
73
- { label: "Description", width: "20%" },
74
- { label: "Enabled", width: "10%" },
75
- { label: "Actions", width: "5%" },
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,
@@ -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;
@@ -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, STUDENT_FEE_DRAWER, } from "./context";
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,21 +71,21 @@ const createComponentInstances = () => ({
71
71
  moreActions: _jsx(StudentFeeMoreActions, {}),
72
72
  view: _jsx(StudentFeeView, {}),
73
73
  });
74
- const createStudentFeeConfig = ({ cancelLabel, dispatch, drawer, 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: "ID", width: "5%" },
80
- { label: "Student", width: "12%" },
81
- { label: "Fee Structure", width: "12%" },
82
- { label: "Amount", width: "10%" },
83
- { label: "Amount Paid", width: "10%" },
84
- { label: "Amount Due", width: "10%" },
85
- { label: "Due Date", width: "10%" },
86
- { label: "Status", width: "10%" },
87
- { label: "Remarks", width: "11%" },
88
- { label: "Actions", width: "5%" },
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,
@@ -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
  },
@@ -115,6 +114,16 @@ const StudentFeePageInner = (props) => {
115
114
  drawer: context.state.drawer,
116
115
  cancelLabel: props.cancelLabel,
117
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,
118
127
  saveLabel: props.saveLabel,
119
128
  searchPlaceholder: props.searchPlaceholder,
120
129
  tableDescription: props.tableDescription,
@@ -124,6 +133,16 @@ const StudentFeePageInner = (props) => {
124
133
  context.state.drawer,
125
134
  props.cancelLabel,
126
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,
127
146
  props.saveLabel,
128
147
  props.searchPlaceholder,
129
148
  props.tableDescription,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",