@local-civics/mgmt-ui 0.1.194 → 0.1.195

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
@@ -3547,8 +3547,10 @@ var __spreadValues$1 = (a, b) => {
3547
3547
  var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3548
3548
  function Table$2(props) {
3549
3549
  const preparedItems = React.useMemo(() => {
3550
+ var _a, _b;
3550
3551
  console.group("Pathway Table Data Check");
3551
- console.log("Raw items from props:", props.items);
3552
+ console.log("Raw items from props:", props);
3553
+ console.log("Raw items from prop.itemss:", props.items);
3552
3554
  console.log("Categories available:", props.categories);
3553
3555
  const mapped = props.items.map((item) => {
3554
3556
  const flatItem = __spreadProps$1(__spreadValues$1({}, item), {
@@ -3562,17 +3564,13 @@ function Table$2(props) {
3562
3564
  return flatItem;
3563
3565
  });
3564
3566
  console.log("Transformed items (Flat):", mapped);
3565
- if (mapped.length > 0 && props.categories.length > 0) {
3566
- const firstStudent = mapped[0];
3567
- const firstCatId = props.categories[0].categoryId;
3568
- console.log(
3569
- `Matching Check: Does student have key [${firstCatId}]?`,
3570
- firstStudent.hasOwnProperty(firstCatId) ? "YES \u2705" : "NO \u274C",
3571
- "Value:",
3572
- firstStudent[firstCatId]
3573
- );
3574
- }
3575
- console.groupEnd();
3567
+ const firstCatId = (_b = (_a = props.categories) == null ? void 0 : _a[0]) == null ? void 0 : _b.categoryId;
3568
+ if (mapped.length > 0 && firstCatId) {
3569
+ console.log(`Matching Check for ID [${firstCatId}]:`, mapped[0][firstCatId] !== void 0 ? "\u2705 FOUND" : "\u274C MISSING");
3570
+ console.groupEnd();
3571
+ } else if (props.categories) {
3572
+ console.groupEnd();
3573
+ }
3576
3574
  return mapped;
3577
3575
  }, [props.items, props.categories]);
3578
3576
  const { items: sortedItems, requestSort, sortConfig } = useSortableData(preparedItems);