@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.js
CHANGED
|
@@ -1155,21 +1155,13 @@ 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
|
-
}
|
|
1164
1158
|
const preparedItems = React__namespace.useMemo(() => {
|
|
1165
1159
|
return props.items.map((item) => __spreadProps$8(__spreadValues$c({}, item), {
|
|
1166
1160
|
fullName: item.givenName && item.familyName ? `${item.givenName} ${item.familyName}`.toLowerCase() : item.email.toLowerCase()
|
|
1167
1161
|
}));
|
|
1168
1162
|
}, [props.items]);
|
|
1169
|
-
console.log("4. Prepared items (before sort hook):", preparedItems);
|
|
1170
1163
|
console.groupEnd();
|
|
1171
1164
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
1172
|
-
console.log("5. Final sorted items:", sortedItems);
|
|
1173
1165
|
if (props.items.length === 0) {
|
|
1174
1166
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
1175
1167
|
PlaceholderBanner,
|
|
@@ -1245,12 +1237,6 @@ function Table$c(props) {
|
|
|
1245
1237
|
sortable: true,
|
|
1246
1238
|
render: (row) => row.hasAccount ? /* @__PURE__ */ React__namespace.createElement(icons.IconCheck, { color: "green" }) : null
|
|
1247
1239
|
},
|
|
1248
|
-
{
|
|
1249
|
-
accessor: "lastActivity",
|
|
1250
|
-
title: "Last Active",
|
|
1251
|
-
sortable: true,
|
|
1252
|
-
render: (row) => row.lastActivity ? relativeTimeFromDates(row.lastActivity) : ""
|
|
1253
|
-
},
|
|
1254
1240
|
{
|
|
1255
1241
|
accessor: "actions",
|
|
1256
1242
|
title: "",
|
|
@@ -2592,7 +2578,7 @@ function Table$4(props) {
|
|
|
2592
2578
|
onChange: (value) => props.onRoleChange && props.onRoleChange(row, value),
|
|
2593
2579
|
data: [{ value: "student", label: "Student" }, { value: "educator", label: "Educator" }, { value: "admin", label: "Admin" }]
|
|
2594
2580
|
}
|
|
2595
|
-
))), /* @__PURE__ */ React__namespace.createElement("td", null, row.hasAccount && /* @__PURE__ */ React__namespace.createElement(icons.IconCheck, { color: "green" })), /* @__PURE__ */ React__namespace.createElement("td", null, row.numberOfClasses), /* @__PURE__ */ React__namespace.createElement("td", null,
|
|
2581
|
+
))), /* @__PURE__ */ React__namespace.createElement("td", null, row.hasAccount && /* @__PURE__ */ React__namespace.createElement(icons.IconCheck, { color: "green" })), /* @__PURE__ */ React__namespace.createElement("td", null, row.numberOfClasses), /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Group, { noWrap: true, spacing: 0, position: "right" }, !row.readonly && !!props.onDelete && /* @__PURE__ */ React__namespace.createElement(core.ActionIcon, { color: "red" }, /* @__PURE__ */ React__namespace.createElement(icons.IconTrash, { onClick: () => openDeleteModal(row), size: 16, stroke: 1.5 }))))));
|
|
2596
2582
|
return /* @__PURE__ */ React__namespace.createElement(core.ScrollArea, null, /* @__PURE__ */ React__namespace.createElement(core.Table, { verticalSpacing: 20, sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React__namespace.createElement("thead", null, /* @__PURE__ */ React__namespace.createElement("tr", null, /* @__PURE__ */ React__namespace.createElement("th", null, "Name"), /* @__PURE__ */ React__namespace.createElement("th", null, "Role"), /* @__PURE__ */ React__namespace.createElement("th", null, "Account Created?"), /* @__PURE__ */ React__namespace.createElement("th", null, "# of Classes"), /* @__PURE__ */ React__namespace.createElement("th", null, "Last Active"), /* @__PURE__ */ React__namespace.createElement("th", null))), /* @__PURE__ */ React__namespace.createElement("tbody", null, rows)));
|
|
2597
2583
|
}
|
|
2598
2584
|
|