@local-civics/mgmt-ui 0.1.172 → 0.1.174

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.mjs CHANGED
@@ -3274,14 +3274,25 @@ function Table$1(props) {
3274
3274
  highlightOnHover: true,
3275
3275
  records: props.items,
3276
3276
  idAccessor: "userId",
3277
- columns: [{
3278
- accessor: "name",
3279
- title: "Student Name",
3280
- render: (row) => /* @__PURE__ */ React.createElement(Group, { spacing: "sm" }, /* @__PURE__ */ React.createElement(Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.email)))
3281
- }, {
3282
- accessor: "status",
3283
- 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"))
3284
- }],
3277
+ columns: [
3278
+ {
3279
+ accessor: "name",
3280
+ title: "Student Name",
3281
+ render: (row) => /* @__PURE__ */ React.createElement(Group, { spacing: "sm" }, /* @__PURE__ */ React.createElement(Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React.createElement(Text, { size: "xs", color: "dimmed" }, row.email)))
3282
+ },
3283
+ {
3284
+ accessor: "status",
3285
+ 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"))
3286
+ },
3287
+ ...props.categories.map((category) => ({
3288
+ accessor: category.categoryId,
3289
+ title: category.name,
3290
+ render: (row) => {
3291
+ var _a, _b;
3292
+ return /* @__PURE__ */ React.createElement(Badge$1, { color: "blue", variant: "filled" }, (_b = (_a = row.categoryPoints) == null ? void 0 : _a[category.categoryId]) != null ? _b : 0);
3293
+ }
3294
+ }))
3295
+ ],
3285
3296
  rowExpansion: {
3286
3297
  content: ({ record }) => /* @__PURE__ */ React.createElement(Stack, { items: record.badges })
3287
3298
  }
@@ -3382,7 +3393,8 @@ const Pathway = (props) => {
3382
3393
  Table$1,
3383
3394
  {
3384
3395
  loading: props.loading,
3385
- items: props.students
3396
+ items: props.students,
3397
+ categories: props.categories
3386
3398
  }
3387
3399
  )))))));
3388
3400
  };