@appcorp/fusion-storybook 0.2.73 → 0.2.75

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.
@@ -32,7 +32,7 @@ interface Props {
32
32
  labelFirstName: string;
33
33
  labelId: string;
34
34
  labelLastName: string;
35
- labelStatus: string;
35
+ labelClassSection: string;
36
36
  labelStudentCode: string;
37
37
  saveLabel: string;
38
38
  searchPlaceholder: string;
@@ -37,7 +37,15 @@ const tableBodyCols = [
37
37
  { componentType: COMPONENT_TYPE.TEXT, key: "studentCode" },
38
38
  {
39
39
  componentType: COMPONENT_TYPE.OBJECT,
40
- key: ["enrollments[0]:class:name", "enrollments[0]:section:name"],
40
+ key: ["enrollments"],
41
+ textFormatter: (val, row) => {
42
+ var _a, _b, _c, _d, _e, _f;
43
+ console.log("Row data for class/section formatting:", row, val);
44
+ const rowItem = row;
45
+ const className = ((_c = (_b = (_a = rowItem.enrollments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.class) === null || _c === void 0 ? void 0 : _c.name) || "";
46
+ const sectionName = ((_f = (_e = (_d = rowItem.enrollments) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.section) === null || _f === void 0 ? void 0 : _f.name) || "";
47
+ return `${className}${sectionName ? ` - ${sectionName}` : ""}`;
48
+ },
41
49
  },
42
50
  { componentType: COMPONENT_TYPE.BOOLEAN, key: "enabled" },
43
51
  { componentType: COMPONENT_TYPE.ACTIONS },
@@ -51,7 +59,7 @@ const createComponentInstances = () => ({
51
59
  moreActions: _jsx(StudentProfileMoreActions, {}),
52
60
  view: _jsx(StudentProfileView, {}),
53
61
  });
54
- const createStudentProfileConfig = ({ cancelLabel, dispatch, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, labelActions, labelEnabled, labelFirstName, labelId, labelLastName, labelStatus, labelStudentCode, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
62
+ const createStudentProfileConfig = ({ cancelLabel, dispatch, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, labelActions, labelEnabled, labelFirstName, labelId, labelLastName, labelClassSection, labelStudentCode, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
55
63
  const components = createComponentInstances();
56
64
  return {
57
65
  moduleName: "studentProfile",
@@ -60,7 +68,7 @@ const createStudentProfileConfig = ({ cancelLabel, dispatch, drawerFilterDescrip
60
68
  { label: labelFirstName, width: "15%" },
61
69
  { label: labelLastName, width: "15%" },
62
70
  { label: labelStudentCode, width: "15%" },
63
- { label: labelStatus, width: "20%" },
71
+ { label: labelClassSection, width: "20%" },
64
72
  { label: labelEnabled, width: "10%" },
65
73
  { label: labelActions, width: "5%" },
66
74
  ],
@@ -108,7 +116,7 @@ const StudentProfilePageInner = (props) => {
108
116
  labelFirstName: props.labelFirstName,
109
117
  labelId: props.labelId,
110
118
  labelLastName: props.labelLastName,
111
- labelStatus: props.labelStatus,
119
+ labelClassSection: props.labelClassSection,
112
120
  labelStudentCode: props.labelStudentCode,
113
121
  saveLabel: props.saveLabel,
114
122
  searchPlaceholder: props.searchPlaceholder,
@@ -130,7 +138,7 @@ const StudentProfilePageInner = (props) => {
130
138
  props.labelFirstName,
131
139
  props.labelId,
132
140
  props.labelLastName,
133
- props.labelStatus,
141
+ props.labelClassSection,
134
142
  props.labelStudentCode,
135
143
  props.saveLabel,
136
144
  props.searchPlaceholder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.2.73",
3
+ "version": "0.2.75",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",