@appcorp/fusion-storybook 0.1.40 → 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;
@@ -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: "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,
@@ -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: "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,
@@ -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.40",
3
+ "version": "0.1.41",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",