@dcrackel/hematournamentui 1.0.525 → 1.0.527

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,59 @@ 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
+ safeYellowCards() {
40778
+ return this.isValidNumber(this.yellowCards) ? Number(this.yellowCards) : 0;
40779
+ },
40780
+ safeRedCards() {
40781
+ return this.isValidNumber(this.redCards) ? Number(this.redCards) : 0;
40782
+ },
40783
+ safeBlackCards() {
40784
+ return this.isValidNumber(this.blackCards) ? Number(this.blackCards) : 0;
40785
+ },
40786
+ safeMedicalCalls() {
40787
+ return this.isValidNumber(this.medicalCalls) ? Number(this.medicalCalls) : 0;
40788
+ }
40789
+ },
40790
+ methods: {
40791
+ isValidNumber(t) {
40792
+ return !isNaN(t) && t !== null && t !== void 0;
40772
40793
  }
40773
40794
  }
40774
40795
  }, 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
40796
  function q2(t, e, n, r, o, i) {
40797
+ var l;
40776
40798
  const A = y("BaseText"), a = y("EventStatusBox");
40777
40799
  return C(), I("div", F2, [
40778
40800
  h("section", N2, [
40779
40801
  p(A, {
40780
- text: n.event.EventName,
40802
+ text: ((l = n.event) == null ? void 0 : l.EventName) || "Unknown Event",
40781
40803
  size: "",
40782
40804
  color: "quaternary",
40783
40805
  weight: "bold",
@@ -40786,22 +40808,22 @@ function q2(t, e, n, r, o, i) {
40786
40808
  ]),
40787
40809
  h("section", H2, [
40788
40810
  p(a, {
40789
- "status-count": n.yellowCards,
40811
+ "status-count": i.safeYellowCards,
40790
40812
  "status-label": "Yellow",
40791
40813
  "box-color": "bg-eventBoxBlue"
40792
40814
  }, null, 8, ["status-count"]),
40793
40815
  p(a, {
40794
- "status-count": n.redCards,
40816
+ "status-count": i.safeRedCards,
40795
40817
  "status-label": "Red",
40796
40818
  "box-color": "bg-eventBoxBlue"
40797
40819
  }, null, 8, ["status-count"]),
40798
40820
  p(a, {
40799
- "status-count": n.blackCards,
40821
+ "status-count": i.safeBlackCards,
40800
40822
  "status-label": "Black",
40801
40823
  "box-color": "bg-eventBoxBlue"
40802
40824
  }, null, 8, ["status-count"]),
40803
40825
  p(a, {
40804
- "status-count": n.medicalCalls,
40826
+ "status-count": i.safeMedicalCalls,
40805
40827
  "status-label": "Medical",
40806
40828
  "box-color": "bg-eventBoxBlue"
40807
40829
  }, null, 8, ["status-count"])