@dcrackel/hematournamentui 1.0.613 → 1.0.615

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.
@@ -9262,15 +9262,21 @@ const SE = {
9262
9262
  default: "date",
9263
9263
  // or 'time' or 'datetime'
9264
9264
  validator: (n) => ["date", "time", "datetime"].includes(n)
9265
+ },
9266
+ userLevel: {
9267
+ type: String,
9268
+ default: "Club"
9265
9269
  }
9266
9270
  },
9267
9271
  data() {
9268
9272
  return {
9269
- selectedDate: this.parseDate(this.setDate),
9270
- minDate: this.getOneYearAgo()
9273
+ selectedDate: this.parseDate(this.setDate)
9271
9274
  };
9272
9275
  },
9273
9276
  computed: {
9277
+ minDate() {
9278
+ return this.userLevel === "Admin" ? /* @__PURE__ */ new Date("2018-01-01") : this.getThreeMonthsAgo();
9279
+ },
9274
9280
  datePickerAttrs() {
9275
9281
  return this.pickerMode === "time" ? { "time-picker": !0 } : {};
9276
9282
  },
@@ -9284,8 +9290,8 @@ const SE = {
9284
9290
  }
9285
9291
  },
9286
9292
  methods: {
9287
- getOneYearAgo() {
9288
- return new Date((/* @__PURE__ */ new Date()).setFullYear((/* @__PURE__ */ new Date()).getFullYear() - 1));
9293
+ getThreeMonthsAgo() {
9294
+ return new Date((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 3));
9289
9295
  },
9290
9296
  parseDate(n) {
9291
9297
  if (typeof n == "string") {
@@ -9307,14 +9313,14 @@ function ME(n, e, t, r, o, i) {
9307
9313
  modelValue: o.selectedDate,
9308
9314
  "onUpdate:modelValue": e[0] || (e[0] = (A) => o.selectedDate = A),
9309
9315
  format: i.dateFormat,
9310
- "min-date": o.minDate,
9316
+ "min-date": i.minDate,
9311
9317
  mode: t.pickerMode,
9312
9318
  placeholder: "Select Date or Time",
9313
9319
  class: { dp__input_invalid: t.invalid }
9314
9320
  }, i.datePickerAttrs), null, 16, ["modelValue", "format", "min-date", "mode", "class"])
9315
9321
  ]);
9316
9322
  }
9317
- const Bg = /* @__PURE__ */ oe(SE, [["render", ME], ["__scopeId", "data-v-364ebbdb"]]), OE = {
9323
+ const Bg = /* @__PURE__ */ oe(SE, [["render", ME], ["__scopeId", "data-v-4b72ffb3"]]), OE = {
9318
9324
  name: "StepIndicator",
9319
9325
  components: { BaseText: Be, BaseIcon: qe },
9320
9326
  props: {
@@ -9392,6 +9398,10 @@ const di = /* @__PURE__ */ oe(OE, [["render", NE]]), FE = {
9392
9398
  currentStep: {
9393
9399
  type: Number,
9394
9400
  required: !0
9401
+ },
9402
+ userLevel: {
9403
+ type: String,
9404
+ default: "Club"
9395
9405
  }
9396
9406
  },
9397
9407
  data() {
@@ -9488,8 +9498,9 @@ function ZE(n, e, t, r, o, i) {
9488
9498
  h(c, {
9489
9499
  invalid: t.validation.Date,
9490
9500
  setDate: t.eventConfig.Date,
9501
+ userLevel: t.userLevel,
9491
9502
  "onUpdate:selectedDate": i.handleDateUpdate
9492
- }, null, 8, ["invalid", "setDate", "onUpdate:selectedDate"])
9503
+ }, null, 8, ["invalid", "setDate", "userLevel", "onUpdate:selectedDate"])
9493
9504
  ])
9494
9505
  ]),
9495
9506
  m("div", GE, [
@@ -10508,6 +10519,10 @@ const Ev = /* @__PURE__ */ oe(uv, [["render", Bv]]), Qv = {
10508
10519
  { link: 1, text: "Single Elimination" },
10509
10520
  { link: 2, text: "Double Elimination" }
10510
10521
  ]
10522
+ },
10523
+ userLevel: {
10524
+ type: String,
10525
+ default: "Club"
10511
10526
  }
10512
10527
  },
10513
10528
  data() {
@@ -10683,7 +10698,7 @@ const Ev = /* @__PURE__ */ oe(uv, [["render", Bv]]), Qv = {
10683
10698
  }));
10684
10699
  },
10685
10700
  handleSubmit() {
10686
- this.localEvent.rules = this.convertEventConfigToRules(this.eventConfig), this.$emit("update:submit", this.localEvent);
10701
+ this.localEvent.rules = this.convertEventConfigToRules(this.eventConfig), console.log("localEvent", this.localEvent), this.$emit("update:submit", this.localEvent);
10687
10702
  },
10688
10703
  handleCancel() {
10689
10704
  this.$emit("update:cancel");
@@ -10700,10 +10715,11 @@ function wv(n, e, t, r, o, i) {
10700
10715
  validation: o.validation,
10701
10716
  steps: o.steps,
10702
10717
  currentStep: o.currentStep - 1,
10718
+ userLevel: t.userLevel,
10703
10719
  onUpdate: i.handleValueChange,
10704
10720
  "onUpdate:back": i.handleCancel,
10705
10721
  "onUpdate:next": i.handleUpdate
10706
- }, null, 8, ["eventConfig", "weapons", "validation", "steps", "currentStep", "onUpdate", "onUpdate:back", "onUpdate:next"])) : Q("", !0),
10722
+ }, null, 8, ["eventConfig", "weapons", "validation", "steps", "currentStep", "userLevel", "onUpdate", "onUpdate:back", "onUpdate:next"])) : Q("", !0),
10707
10723
  o.currentStep === 2 ? (f(), $(A, {
10708
10724
  key: 1,
10709
10725
  eventConfig: o.eventConfig,
@@ -37362,7 +37378,7 @@ const ef = /* @__PURE__ */ oe(oL, [["render", CL]]), pL = {
37362
37378
  },
37363
37379
  hasDoubleCount() {
37364
37380
  const n = this.event.EventRules.find((e) => e.Rules.RuleName === "CountDoubles");
37365
- return n ? n.RuleValue : !1;
37381
+ return n ? n.RuleValue === "true" : !1;
37366
37382
  }
37367
37383
  },
37368
37384
  mounted() {