@local-civics/mgmt-ui 0.1.141 → 0.1.142
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.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3229,7 +3229,7 @@ function Stack(props) {
|
|
|
3229
3229
|
if (props.items.length === 0) {
|
|
3230
3230
|
return null;
|
|
3231
3231
|
}
|
|
3232
|
-
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Grid.Col, { span: 6 }, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.
|
|
3232
|
+
const rows = props.items.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Grid.Col, { span: 6 }, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href, color: "dark.4", weight: "bold", size: "md" }, row.badgeName)), /* @__PURE__ */ React.createElement(Grid.Col, { span: 6 }, row.completion >= 1 && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), row.completion === 0 && !row.isStarted && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Not started"), row.completion > 0 && row.completion < 1 && /* @__PURE__ */ React.createElement(Badge$1, { color: "violet", variant: "filled" }, Math.round((row.completion + Number.EPSILON) * 100), "% Complete"))));
|
|
3233
3233
|
return /* @__PURE__ */ React.createElement(Grid, { grow: true, gutter: "lg", sx: { padding: 20, minWidth: 700 } }, rows);
|
|
3234
3234
|
}
|
|
3235
3235
|
|
|
@@ -3266,7 +3266,7 @@ function Table$1(props) {
|
|
|
3266
3266
|
render: (row) => /* @__PURE__ */ React.createElement(React.Fragment, null, !!row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React.createElement(Badge$1, { color: "red", variant: "filled" }, "Incomplete"))
|
|
3267
3267
|
}],
|
|
3268
3268
|
rowExpansion: {
|
|
3269
|
-
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack, { items: record.
|
|
3269
|
+
content: ({ record }) => /* @__PURE__ */ React.createElement(Stack, { items: record.badges })
|
|
3270
3270
|
}
|
|
3271
3271
|
}
|
|
3272
3272
|
));
|
|
@@ -3286,7 +3286,7 @@ function Table(props) {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
const rows = props.items.map((row) => {
|
|
3288
3288
|
const percentageCompletion = Math.round((row.percentageCompletion + Number.EPSILON) * 100);
|
|
3289
|
-
return /* @__PURE__ */ React.createElement("tr", { key: row.
|
|
3289
|
+
return /* @__PURE__ */ React.createElement("tr", { key: row.badgeName }, /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Text, { component: Link, to: row.href }, row.badgeName)), /* @__PURE__ */ React.createElement("td", null, percentageCompletion, "%"));
|
|
3290
3290
|
});
|
|
3291
3291
|
return /* @__PURE__ */ React.createElement(ScrollArea.Autosize, { maxHeight: 600 }, /* @__PURE__ */ React.createElement(Table$k, { verticalSpacing: "sm", sx: { minWidth: 700 }, highlightOnHover: true, striped: true }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Badge Name"), /* @__PURE__ */ React.createElement("th", null, "Badge Completion"))), /* @__PURE__ */ React.createElement("tbody", null, rows)));
|
|
3292
3292
|
}
|
|
@@ -3350,16 +3350,16 @@ const Pathway = (props) => {
|
|
|
3350
3350
|
{
|
|
3351
3351
|
value: tab,
|
|
3352
3352
|
data: [
|
|
3353
|
-
{ label: "By Badge", value: "
|
|
3353
|
+
{ label: "By Badge", value: "badges" },
|
|
3354
3354
|
{ label: "By student", value: "students" }
|
|
3355
3355
|
],
|
|
3356
3356
|
onChange: setTab
|
|
3357
3357
|
}
|
|
3358
|
-
), (!!props.trial || tab === "
|
|
3358
|
+
), (!!props.trial || tab === "badges") && /* @__PURE__ */ React.createElement(
|
|
3359
3359
|
Table,
|
|
3360
3360
|
{
|
|
3361
3361
|
loading: props.loading,
|
|
3362
|
-
items: props.
|
|
3362
|
+
items: props.badges
|
|
3363
3363
|
}
|
|
3364
3364
|
), !props.trial && tab === "students" && /* @__PURE__ */ React.createElement(
|
|
3365
3365
|
Table$1,
|