@local-civics/mgmt-ui 0.1.188 → 0.1.189
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 +14 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1112,7 +1112,7 @@ function Table$b(props) {
|
|
|
1112
1112
|
confirmProps: { color: "red" },
|
|
1113
1113
|
onConfirm: () => props.onDelete && props.onDelete(student)
|
|
1114
1114
|
});
|
|
1115
|
-
const rows =
|
|
1115
|
+
const rows = sortedItems.map((row) => /* @__PURE__ */ React__namespace.createElement("tr", { key: row.email }, /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { component: reactRouterDom.Link, to: row.href }, /* @__PURE__ */ React__namespace.createElement(core.Group, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", weight: 500 }, row.givenName && row.familyName ? `${row.givenName} ${row.familyName}` : row.email), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "xs", color: "dimmed" }, row.email))))), /* @__PURE__ */ React__namespace.createElement("td", null, /* @__PURE__ */ React__namespace.createElement(core.Box, { maw: 150 }, /* @__PURE__ */ React__namespace.createElement(
|
|
1116
1116
|
core.Select,
|
|
1117
1117
|
{
|
|
1118
1118
|
size: "sm",
|
|
@@ -3427,9 +3427,17 @@ var __spreadValues = (a, b) => {
|
|
|
3427
3427
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3428
3428
|
function Table$1(props) {
|
|
3429
3429
|
const preparedItems = React__namespace.useMemo(() => {
|
|
3430
|
-
return props.items.map((item) =>
|
|
3431
|
-
|
|
3432
|
-
|
|
3430
|
+
return props.items.map((item) => {
|
|
3431
|
+
const flatItem = __spreadProps(__spreadValues({}, item), {
|
|
3432
|
+
status: item.isComplete ? 1 : 0
|
|
3433
|
+
});
|
|
3434
|
+
if (item.categoryPoints) {
|
|
3435
|
+
Object.keys(item.categoryPoints).forEach((catId) => {
|
|
3436
|
+
flatItem[catId] = item.categoryPoints[catId];
|
|
3437
|
+
});
|
|
3438
|
+
}
|
|
3439
|
+
return flatItem;
|
|
3440
|
+
});
|
|
3433
3441
|
}, [props.items]);
|
|
3434
3442
|
const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);
|
|
3435
3443
|
if (props.items.length === 0) {
|
|
@@ -3482,8 +3490,8 @@ function Table$1(props) {
|
|
|
3482
3490
|
sortable: true,
|
|
3483
3491
|
titleStyle: { whiteSpace: "nowrap" },
|
|
3484
3492
|
render: (row) => {
|
|
3485
|
-
var _a
|
|
3486
|
-
return /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "blue", variant: "filled" }, (
|
|
3493
|
+
var _a;
|
|
3494
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "blue", variant: "filled" }, (_a = row[category.categoryId]) != null ? _a : 0, " pts");
|
|
3487
3495
|
}
|
|
3488
3496
|
}))
|
|
3489
3497
|
],
|