@dcrackel/hematournamentui 1.0.104 → 1.0.106

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.
@@ -29490,14 +29490,12 @@ const ND = /* @__PURE__ */ ke(XT, [["render", sR]]), lR = {
29490
29490
  ].filter((r) => !(r in n));
29491
29491
  return t.length ? (console.warn(`Invalid event object: Missing fields: ${t.join(", ")}`), !1) : !0;
29492
29492
  }
29493
- },
29494
- mode: {
29495
- type: String,
29496
- required: !0,
29497
- validator: (n) => ["Planning", "Preparation", "Live", "Complete"].includes(n)
29498
29493
  }
29499
29494
  },
29500
29495
  computed: {
29496
+ mode() {
29497
+ return this.event.Status;
29498
+ },
29501
29499
  poolSize() {
29502
29500
  return this.event.PoolSize || 0;
29503
29501
  },
@@ -29545,7 +29543,7 @@ function wR(n, e, t, r, i, o) {
29545
29543
  }, null, 8, ["text"]),
29546
29544
  uR
29547
29545
  ]),
29548
- t.mode === "planning" ? (Q(), x("section", dR, [
29546
+ o.mode === "planning" ? (Q(), x("section", dR, [
29549
29547
  M("div", gR, [
29550
29548
  k(s, {
29551
29549
  "icon-name": "fa-lightbulb-on",
@@ -29569,7 +29567,7 @@ function wR(n, e, t, r, i, o) {
29569
29567
  })
29570
29568
  ])
29571
29569
  ])) : Y("", !0),
29572
- t.mode === "preparation" ? (Q(), x("section", pR, [
29570
+ o.mode === "preparation" ? (Q(), x("section", pR, [
29573
29571
  M("div", hR, [
29574
29572
  k(s, {
29575
29573
  "icon-name": "fa-ballot-check",
@@ -29593,7 +29591,7 @@ function wR(n, e, t, r, i, o) {
29593
29591
  })
29594
29592
  ])
29595
29593
  ])) : Y("", !0),
29596
- t.mode === "live" ? (Q(), x("section", CR, [
29594
+ o.mode === "live" ? (Q(), x("section", CR, [
29597
29595
  M("div", ER, [
29598
29596
  k(s, {
29599
29597
  "icon-name": "fa-play",
@@ -29647,7 +29645,7 @@ function wR(n, e, t, r, i, o) {
29647
29645
  ])
29648
29646
  ])
29649
29647
  ])) : Y("", !0),
29650
- t.mode === "planning" || t.mode === "preparation" ? (Q(), x("section", yR, [
29648
+ o.mode === "planning" || o.mode === "preparation" ? (Q(), x("section", yR, [
29651
29649
  k(l, {
29652
29650
  recommended: 7,
29653
29651
  count: o.poolSize,
@@ -29958,11 +29956,6 @@ const qR = /* @__PURE__ */ ke(UR, [["render", jR]]), YR = {
29958
29956
  type: Array,
29959
29957
  default: () => []
29960
29958
  },
29961
- mode: {
29962
- type: String,
29963
- required: !0,
29964
- validator: (n) => ["planning", "preparation", "live", "results", "de", "completed"].includes(n)
29965
- },
29966
29959
  staff: {
29967
29960
  type: Array,
29968
29961
  default: () => []
@@ -29982,7 +29975,25 @@ const qR = /* @__PURE__ */ ke(UR, [["render", jR]]), YR = {
29982
29975
  selectedFlight: "Flight1"
29983
29976
  };
29984
29977
  },
29978
+ created() {
29979
+ console.log(`mode: ${this.mode}`);
29980
+ },
29985
29981
  computed: {
29982
+ mode() {
29983
+ return this.event.Status;
29984
+ },
29985
+ shouldShowButtons() {
29986
+ return this.filteredPools.length > 1 && this.mode !== "completed";
29987
+ },
29988
+ shouldShowResetButton() {
29989
+ return this.mode === "planning" || this.mode === "preparation";
29990
+ },
29991
+ shouldShowStartCheckinButton() {
29992
+ return this.mode === "planning";
29993
+ },
29994
+ shouldShowGoLiveButton() {
29995
+ return this.mode === "preparation";
29996
+ },
29986
29997
  flights() {
29987
29998
  const n = this.event.Flights || 0, e = Array.from({ length: n }, (t, r) => ({
29988
29999
  id: `Flight${r + 1}`,
@@ -30058,12 +30069,11 @@ function _R(n, e, t, r, i, o) {
30058
30069
  onTabMenuClick: o.handleTabMenuClick
30059
30070
  }, null, 8, ["tabs", "onTabMenuClick"]),
30060
30071
  k(s, {
30061
- mode: t.mode,
30062
30072
  event: t.event,
30063
30073
  "onUpdate:poolSize": o.handlePoolSizeChange,
30064
30074
  "onUpdate:numberOfRings": o.handleNumberOfRings,
30065
30075
  "onReset:pool": o.handlePoolReset
30066
- }, null, 8, ["mode", "event", "onUpdate:poolSize", "onUpdate:numberOfRings", "onReset:pool"]),
30076
+ }, null, 8, ["event", "onUpdate:poolSize", "onUpdate:numberOfRings", "onReset:pool"]),
30067
30077
  this.event.Flights > 1 ? (Q(), ve(a, {
30068
30078
  key: 0,
30069
30079
  currentTab: i.selectedFlight,
@@ -30085,7 +30095,7 @@ function _R(n, e, t, r, i, o) {
30085
30095
  directorName: o.getDirectorName(u.Staff),
30086
30096
  pool: u.participants,
30087
30097
  staff: t.staff,
30088
- mode: t.mode,
30098
+ mode: o.mode,
30089
30099
  onSwapFencers: o.swapFencers,
30090
30100
  "onUpdate:setDirector": o.setDirector,
30091
30101
  "onRemove:fencer": o.handleRemoveFencer,
@@ -30115,8 +30125,8 @@ function _R(n, e, t, r, i, o) {
30115
30125
  ])
30116
30126
  ])) : Y("", !0)
30117
30127
  ], 2),
30118
- o.filteredPools.length > 1 && t.mode !== "complete" ? (Q(), x("div", XR, [
30119
- t.mode === "planning" || t.mode === "preparation" ? (Q(), ve(c, {
30128
+ o.shouldShowButtons ? (Q(), x("div", XR, [
30129
+ o.shouldShowResetButton ? (Q(), ve(c, {
30120
30130
  key: 0,
30121
30131
  label: "Reset Pools",
30122
30132
  size: "md",
@@ -30127,7 +30137,7 @@ function _R(n, e, t, r, i, o) {
30127
30137
  class: "max-w-96 justify-self-end",
30128
30138
  onClick: o.handleReset
30129
30139
  }, null, 8, ["onClick"])) : Y("", !0),
30130
- t.mode === "planning" ? (Q(), ve(c, {
30140
+ o.shouldShowStartCheckinButton ? (Q(), ve(c, {
30131
30141
  key: 1,
30132
30142
  label: "Start Checkin",
30133
30143
  size: "md",
@@ -30138,7 +30148,7 @@ function _R(n, e, t, r, i, o) {
30138
30148
  class: "max-w-96 justify-self-start",
30139
30149
  onClick: o.handleStart
30140
30150
  }, null, 8, ["onClick"])) : Y("", !0),
30141
- t.mode === "preparation" ? (Q(), ve(c, {
30151
+ o.shouldShowGoLiveButton ? (Q(), ve(c, {
30142
30152
  key: 2,
30143
30153
  label: "Make Pools Live",
30144
30154
  size: "md",