@appcorp/fusion-storybook 0.3.43 → 0.3.44

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.
@@ -35,6 +35,7 @@ interface Props {
35
35
  tableColumnHeaderComputerCode: string;
36
36
  tableColumnHeaderClassSection: string;
37
37
  tableColumnHeaderStudentCode: string;
38
+ tableColumnHeaderEmergencyPhone: string;
38
39
  tableDescription: string;
39
40
  tableSearchPlaceholder: string;
40
41
  tableTitle: string;
@@ -28,6 +28,7 @@ import { StudentProfileView } from "./view";
28
28
  import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
29
29
  import { RbacNoAccess } from "../../components/rbac-no-access";
30
30
  import { VALUE_DELIMITER } from "@react-pakistan/util-functions";
31
+ import { formatPhoneDisplay } from "@react-pakistan/util-functions/general/format-phone-display";
31
32
  // ============================================================================
32
33
  // TABLE COLUMN CONFIGURATION (static — no runtime deps)
33
34
  // ============================================================================
@@ -64,6 +65,15 @@ const tableBodyCols = [
64
65
  return `${className} - ${sectionName}`;
65
66
  },
66
67
  },
68
+ {
69
+ componentType: COMPONENT_TYPE.TEXT,
70
+ key: "familyMember",
71
+ textFormatter: (val, row) => {
72
+ var _a;
73
+ const rowItem = row;
74
+ return formatPhoneDisplay((_a = rowItem.familyMember) === null || _a === void 0 ? void 0 : _a.emergencyPhone);
75
+ },
76
+ },
67
77
  { componentType: COMPONENT_TYPE.BOOLEAN, key: "enabled" },
68
78
  { componentType: COMPONENT_TYPE.ACTIONS },
69
79
  ];
@@ -76,17 +86,18 @@ const createComponentInstances = () => ({
76
86
  moreActions: _jsx(StudentProfileMoreActions, {}),
77
87
  view: _jsx(StudentProfileView, {}),
78
88
  });
79
- const createStudentProfileConfig = ({ dispatch, drawerButtonCancel, drawerButtonSave, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, tableColumnHeaderActions, tableColumnHeaderEnabled, tableColumnHeaderName, tableColumnHeaderId, tableColumnHeaderComputerCode, tableColumnHeaderClassSection, tableColumnHeaderStudentCode, tableDescription, tableSearchPlaceholder, tableTitle, }) => {
89
+ const createStudentProfileConfig = ({ dispatch, drawerButtonCancel, drawerButtonSave, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, tableColumnHeaderActions, tableColumnHeaderClassSection, tableColumnHeaderComputerCode, tableColumnHeaderEmergencyPhone, tableColumnHeaderEnabled, tableColumnHeaderId, tableColumnHeaderName, tableColumnHeaderStudentCode, tableDescription, tableSearchPlaceholder, tableTitle, }) => {
80
90
  const components = createComponentInstances();
81
91
  return {
82
92
  moduleName: "studentProfile",
83
93
  tableColumns: [
84
94
  { label: tableColumnHeaderId, width: "5%" },
85
- { label: tableColumnHeaderName, width: "15%" },
95
+ { label: tableColumnHeaderName, width: "20%" },
86
96
  { label: tableColumnHeaderComputerCode, width: "15%" },
87
- { label: tableColumnHeaderStudentCode, width: "15%" },
88
- { label: tableColumnHeaderClassSection, width: "20%" },
89
- { label: tableColumnHeaderEnabled, width: "10%" },
97
+ { label: tableColumnHeaderStudentCode, width: "20%" },
98
+ { label: tableColumnHeaderClassSection, width: "15%" },
99
+ { label: tableColumnHeaderEmergencyPhone, width: "15%" },
100
+ { label: tableColumnHeaderEnabled, width: "5%" },
90
101
  { label: tableColumnHeaderActions, width: "5%" },
91
102
  ],
92
103
  cancelLabel: drawerButtonCancel,
@@ -121,20 +132,21 @@ const StudentProfilePageInner = (props) => {
121
132
  dispatch: context.dispatch,
122
133
  drawerButtonCancel: props.drawerButtonCancel,
123
134
  drawerButtonSave: props.drawerButtonSave,
124
- drawerFormTitle: props.drawerFormTitle,
125
- drawerFormDescription: props.drawerFormDescription,
126
- drawerViewTitle: props.drawerViewTitle,
127
- drawerViewDescription: props.drawerViewDescription,
128
- drawerFilterTitle: props.drawerFilterTitle,
129
135
  drawerFilterDescription: props.drawerFilterDescription,
130
- drawerMoreActionsTitle: props.drawerMoreActionsTitle,
136
+ drawerFilterTitle: props.drawerFilterTitle,
137
+ drawerFormDescription: props.drawerFormDescription,
138
+ drawerFormTitle: props.drawerFormTitle,
131
139
  drawerMoreActionsDescription: props.drawerMoreActionsDescription,
140
+ drawerMoreActionsTitle: props.drawerMoreActionsTitle,
141
+ drawerViewDescription: props.drawerViewDescription,
142
+ drawerViewTitle: props.drawerViewTitle,
132
143
  tableColumnHeaderActions: props.tableColumnHeaderActions,
144
+ tableColumnHeaderClassSection: props.tableColumnHeaderClassSection,
145
+ tableColumnHeaderComputerCode: props.tableColumnHeaderComputerCode,
146
+ tableColumnHeaderEmergencyPhone: props.tableColumnHeaderEmergencyPhone,
133
147
  tableColumnHeaderEnabled: props.tableColumnHeaderEnabled,
134
- tableColumnHeaderName: props.tableColumnHeaderName,
135
148
  tableColumnHeaderId: props.tableColumnHeaderId,
136
- tableColumnHeaderComputerCode: props.tableColumnHeaderComputerCode,
137
- tableColumnHeaderClassSection: props.tableColumnHeaderClassSection,
149
+ tableColumnHeaderName: props.tableColumnHeaderName,
138
150
  tableColumnHeaderStudentCode: props.tableColumnHeaderStudentCode,
139
151
  tableDescription: props.tableDescription,
140
152
  tableSearchPlaceholder: props.tableSearchPlaceholder,
@@ -143,20 +155,21 @@ const StudentProfilePageInner = (props) => {
143
155
  context.dispatch,
144
156
  props.drawerButtonCancel,
145
157
  props.drawerButtonSave,
146
- props.drawerFormTitle,
147
- props.drawerFormDescription,
148
- props.drawerViewTitle,
149
- props.drawerViewDescription,
150
- props.drawerFilterTitle,
151
158
  props.drawerFilterDescription,
152
- props.drawerMoreActionsTitle,
159
+ props.drawerFilterTitle,
160
+ props.drawerFormDescription,
161
+ props.drawerFormTitle,
153
162
  props.drawerMoreActionsDescription,
163
+ props.drawerMoreActionsTitle,
164
+ props.drawerViewDescription,
165
+ props.drawerViewTitle,
154
166
  props.tableColumnHeaderActions,
167
+ props.tableColumnHeaderClassSection,
168
+ props.tableColumnHeaderComputerCode,
169
+ props.tableColumnHeaderEmergencyPhone,
155
170
  props.tableColumnHeaderEnabled,
156
- props.tableColumnHeaderName,
157
171
  props.tableColumnHeaderId,
158
- props.tableColumnHeaderComputerCode,
159
- props.tableColumnHeaderClassSection,
172
+ props.tableColumnHeaderName,
160
173
  props.tableColumnHeaderStudentCode,
161
174
  props.tableDescription,
162
175
  props.tableSearchPlaceholder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.3.43",
3
+ "version": "0.3.44",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",