@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.mjs
CHANGED
|
@@ -1135,12 +1135,21 @@ var __spreadValues$c = (a, b) => {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1137
1137
|
function Table$c(props) {
|
|
1138
|
+
console.group("Class Table Data Check");
|
|
1139
|
+
console.log("1. Raw props:", props);
|
|
1140
|
+
console.log("2. Raw items from prop.items:", props.items);
|
|
1141
|
+
if (props.items.length > 0) {
|
|
1142
|
+
console.log("3. Type of lastActivity (first item):", typeof props.items[0].lastActivity, props.items[0].lastActivity);
|
|
1143
|
+
}
|
|
1138
1144
|
const preparedItems = React.useMemo(() => {
|
|
1139
1145
|
return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
|
|
1140
1146
|
fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
|
|
1141
1147
|
}));
|
|
1142
1148
|
}, [props.items]);
|
|
1149
|
+
console.log("4. Prepared items (before sort hook):", preparedItems);
|
|
1150
|
+
console.groupEnd();
|
|
1143
1151
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
1152
|
+
console.log("5. Final sorted items:", sortedItems);
|
|
1144
1153
|
if (props.items.length === 0) {
|
|
1145
1154
|
return /* @__PURE__ */ React.createElement(
|
|
1146
1155
|
PlaceholderBanner,
|
|
@@ -3811,7 +3820,14 @@ function Stack(props) {
|
|
|
3811
3820
|
const { items, hideBadge, hideLesson } = props;
|
|
3812
3821
|
if (!items.length)
|
|
3813
3822
|
return null;
|
|
3814
|
-
|
|
3823
|
+
const visibleColumns = [
|
|
3824
|
+
true,
|
|
3825
|
+
!hideBadge,
|
|
3826
|
+
!hideLesson,
|
|
3827
|
+
true
|
|
3828
|
+
].filter(Boolean).length;
|
|
3829
|
+
const span = 12 / visibleColumns;
|
|
3830
|
+
return /* @__PURE__ */ React.createElement(Grid, { gutter: "md", sx: { padding: 20, minWidth: 700 } }, /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Link")), !hideBadge && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Badge")), !hideLesson && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Lesson")), /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, { weight: "bold" }, "Question")), items.map((row, i) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(
|
|
3815
3831
|
Button,
|
|
3816
3832
|
{
|
|
3817
3833
|
component: "a",
|
|
@@ -3822,7 +3838,7 @@ function Stack(props) {
|
|
|
3822
3838
|
variant: "light"
|
|
3823
3839
|
},
|
|
3824
3840
|
"View File"
|
|
3825
|
-
)), !hideBadge && /* @__PURE__ */ React.createElement(Grid.Col, { span
|
|
3841
|
+
)), !hideBadge && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.badgeName)), !hideLesson && /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.lessonName)), /* @__PURE__ */ React.createElement(Grid.Col, { span }, /* @__PURE__ */ React.createElement(Text, null, row.question)))));
|
|
3826
3842
|
}
|
|
3827
3843
|
|
|
3828
3844
|
var __defProp$1 = Object.defineProperty;
|