@local-civics/mgmt-ui 0.1.198 → 0.1.200
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/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1155,12 +1155,21 @@ var __spreadValues$c = (a, b) => {
|
|
|
1155
1155
|
};
|
|
1156
1156
|
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1157
1157
|
function Table$c(props) {
|
|
1158
|
+
console.group("Class Table Data Check");
|
|
1159
|
+
console.log("1. Raw props:", props);
|
|
1160
|
+
console.log("2. Raw items from prop.items:", props.items);
|
|
1161
|
+
if (props.items.length > 0) {
|
|
1162
|
+
console.log("3. Type of lastActivity (first item):", typeof props.items[0].lastActivity, props.items[0].lastActivity);
|
|
1163
|
+
}
|
|
1158
1164
|
const preparedItems = React__namespace.useMemo(() => {
|
|
1159
1165
|
return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
|
|
1160
1166
|
fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
|
|
1161
1167
|
}));
|
|
1162
1168
|
}, [props.items]);
|
|
1169
|
+
console.log("4. Prepared items (before sort hook):", preparedItems);
|
|
1170
|
+
console.groupEnd();
|
|
1163
1171
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
1172
|
+
console.log("5. Final sorted items:", sortedItems);
|
|
1164
1173
|
if (props.items.length === 0) {
|
|
1165
1174
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1166
1175
|
PlaceholderBanner,
|
|
@@ -3831,7 +3840,14 @@ function Stack(props) {
|
|
|
3831
3840
|
const { items, hideBadge, hideLesson } = props;
|
|
3832
3841
|
if (!items.length)
|
|
3833
3842
|
return null;
|
|
3834
|
-
|
|
3843
|
+
const visibleColumns = [
|
|
3844
|
+
true,
|
|
3845
|
+
!hideBadge,
|
|
3846
|
+
!hideLesson,
|
|
3847
|
+
true
|
|
3848
|
+
].filter(Boolean).length;
|
|
3849
|
+
const span = 12 / visibleColumns;
|
|
3850
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold" }, "Link")), !hideBadge && /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold" }, "Badge")), !hideLesson && /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold" }, "Lesson")), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, { weight: "bold" }, "Question")), items.map((row, i) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, { key: i }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(
|
|
3835
3851
|
core.Button,
|
|
3836
3852
|
{
|
|
3837
3853
|
component: "a",
|
|
@@ -3842,7 +3858,7 @@ function Stack(props) {
|
|
|
3842
3858
|
variant: "light"
|
|
3843
3859
|
},
|
|
3844
3860
|
"View File"
|
|
3845
|
-
)), !hideBadge && /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span
|
|
3861
|
+
)), !hideBadge && /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.badgeName)), !hideLesson && /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.lessonName)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { span }, /* @__PURE__ */ React__namespace.createElement(core.Text, null, row.question)))));
|
|
3846
3862
|
}
|
|
3847
3863
|
|
|
3848
3864
|
var __defProp$1 = Object.defineProperty;
|