@local-civics/mgmt-ui 0.1.201 → 0.1.202
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 +1 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1135,21 +1135,13 @@ 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
|
-
}
|
|
1144
1138
|
const preparedItems = React.useMemo(() => {
|
|
1145
1139
|
return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
|
|
1146
1140
|
fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
|
|
1147
1141
|
}));
|
|
1148
1142
|
}, [props.items]);
|
|
1149
|
-
console.log("4. Prepared items (before sort hook):", preparedItems);
|
|
1150
1143
|
console.groupEnd();
|
|
1151
1144
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
1152
|
-
console.log("5. Final sorted items:", sortedItems);
|
|
1153
1145
|
if (props.items.length === 0) {
|
|
1154
1146
|
return /* @__PURE__ */ React.createElement(
|
|
1155
1147
|
PlaceholderBanner,
|
|
@@ -1225,12 +1217,6 @@ function Table$c(props) {
|
|
|
1225
1217
|
sortable: true,
|
|
1226
1218
|
render: (row) => row.hasAccount ? /* @__PURE__ */ React.createElement(IconCheck, { color: "green" }) : null
|
|
1227
1219
|
},
|
|
1228
|
-
{
|
|
1229
|
-
accessor: "lastActivity",
|
|
1230
|
-
title: "Last Active",
|
|
1231
|
-
sortable: true,
|
|
1232
|
-
render: (row) => row.lastActivity ? relativeTimeFromDates(row.lastActivity) : ""
|
|
1233
|
-
},
|
|
1234
1220
|
{
|
|
1235
1221
|
accessor: "actions",
|
|
1236
1222
|
title: "",
|
|
@@ -2572,7 +2558,7 @@ function Table$4(props) {
|
|
|
2572
2558
|
onChange: (value) => props.onRoleChange && props.onRoleChange(row, value),
|
|
2573
2559
|
data: [{ value: "student", label: "Student" }, { value: "educator", label: "Educator" }, { value: "admin", label: "Admin" }]
|
|
2574
2560
|
}
|
|
2575
|
-
))), /* @__PURE__ */ React.createElement("td", null, row.hasAccount && /* @__PURE__ */ React.createElement(IconCheck, { color: "green" })), /* @__PURE__ */ React.createElement("td", null, row.numberOfClasses), /* @__PURE__ */ React.createElement("td", null,
|
|
2561
|
+
))), /* @__PURE__ */ React.createElement("td", null, row.hasAccount && /* @__PURE__ */ React.createElement(IconCheck, { color: "green" })), /* @__PURE__ */ React.createElement("td", null, row.numberOfClasses), /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Group, { noWrap: true, spacing: 0, position: "right" }, !row.readonly && !!props.onDelete && /* @__PURE__ */ React.createElement(ActionIcon, { color: "red" }, /* @__PURE__ */ React.createElement(IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
2576
2562
|
return /* @__PURE__ */ React.createElement(ScrollArea, null, /* @__PURE__ */ React.createElement(Table$l, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Name"), /* @__PURE__ */ React.createElement("th", null, "Role"), /* @__PURE__ */ React.createElement("th", null, "Account Created?"), /* @__PURE__ */ React.createElement("th", null, "# of Classes"), /* @__PURE__ */ React.createElement("th", null, "Last Active"), /* @__PURE__ */ React.createElement("th", null))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
2577
2563
|
}
|
|
2578
2564
|
|