@dcrackel/hematournamentui 1.0.525 → 1.0.526

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.
@@ -40747,37 +40747,60 @@ const z2 = /* @__PURE__ */ se(C2, [["render", P2], ["__scopeId", "data-v-39212ce
40747
40747
  props: {
40748
40748
  event: {
40749
40749
  type: Object,
40750
- required: !0,
40750
+ required: !1,
40751
+ // Allow it to be optional
40751
40752
  default: () => ({})
40752
40753
  },
40753
40754
  yellowCards: {
40754
40755
  type: [Number, String],
40755
- default: "0",
40756
- required: !0
40756
+ required: !1,
40757
+ // Allow it to be optional
40758
+ default: null
40757
40759
  },
40758
40760
  redCards: {
40759
40761
  type: [Number, String],
40760
- default: "0",
40761
- required: !0
40762
+ required: !1,
40763
+ default: null
40762
40764
  },
40763
40765
  blackCards: {
40764
40766
  type: [Number, String],
40765
- default: "0",
40766
- required: !0
40767
+ required: !1,
40768
+ default: null
40767
40769
  },
40768
40770
  medicalCalls: {
40769
40771
  type: [Number, String],
40770
- default: "0",
40771
- required: !0
40772
+ required: !1,
40773
+ default: null
40774
+ }
40775
+ },
40776
+ computed: {
40777
+ // Ensure all card counts are safe numbers (default to 0)
40778
+ safeYellowCards() {
40779
+ return this.isValidNumber(this.yellowCards) ? Number(this.yellowCards) : 0;
40780
+ },
40781
+ safeRedCards() {
40782
+ return this.isValidNumber(this.redCards) ? Number(this.redCards) : 0;
40783
+ },
40784
+ safeBlackCards() {
40785
+ return this.isValidNumber(this.blackCards) ? Number(this.blackCards) : 0;
40786
+ },
40787
+ safeMedicalCalls() {
40788
+ return this.isValidNumber(this.medicalCalls) ? Number(this.medicalCalls) : 0;
40789
+ }
40790
+ },
40791
+ methods: {
40792
+ isValidNumber(t) {
40793
+ return !isNaN(t) && t !== null && t !== void 0;
40772
40794
  }
40773
40795
  }
40774
40796
  }, F2 = { class: "flex flex-col md:flex-row md:bg-poolSetup py-1 px-2 md:px-4 md:rounded-xl justify-between md:shadow md:border border-dropdownSelect" }, N2 = { class: "hidden md:flex flex-col pt-2" }, H2 = { class: "flex flex-row space-x-4 items-center" };
40775
40797
  function q2(t, e, n, r, o, i) {
40798
+ var l;
40776
40799
  const A = y("BaseText"), a = y("EventStatusBox");
40777
40800
  return C(), I("div", F2, [
40778
40801
  h("section", N2, [
40779
40802
  p(A, {
40780
- text: n.event.EventName,
40803
+ text: ((l = n.event) == null ? void 0 : l.EventName) || "Unknown Event",
40781
40804
  size: "",
40782
40805
  color: "quaternary",
40783
40806
  weight: "bold",
@@ -40786,22 +40809,22 @@ function q2(t, e, n, r, o, i) {
40786
40809
  ]),
40787
40810
  h("section", H2, [
40788
40811
  p(a, {
40789
- "status-count": n.yellowCards,
40812
+ "status-count": i.safeYellowCards,
40790
40813
  "status-label": "Yellow",
40791
40814
  "box-color": "bg-eventBoxBlue"
40792
40815
  }, null, 8, ["status-count"]),
40793
40816
  p(a, {
40794
- "status-count": n.redCards,
40817
+ "status-count": i.safeRedCards,
40795
40818
  "status-label": "Red",
40796
40819
  "box-color": "bg-eventBoxBlue"
40797
40820
  }, null, 8, ["status-count"]),
40798
40821
  p(a, {
40799
- "status-count": n.blackCards,
40822
+ "status-count": i.safeBlackCards,
40800
40823
  "status-label": "Black",
40801
40824
  "box-color": "bg-eventBoxBlue"
40802
40825
  }, null, 8, ["status-count"]),
40803
40826
  p(a, {
40804
- "status-count": n.medicalCalls,
40827
+ "status-count": i.safeMedicalCalls,
40805
40828
  "status-label": "Medical",
40806
40829
  "box-color": "bg-eventBoxBlue"
40807
40830
  }, null, 8, ["status-count"])