@dcrackel/hematournamentui 1.0.573 → 1.0.575
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/HemaTournamentUI-lib.es.js +30 -41
- package/dist/HemaTournamentUI-lib.umd.js +3 -3
- package/package.json +1 -1
- package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +11 -9
- package/src/stories/Templates/PersonManagement/PersonManagement.stories.js +2 -2
- package/src/stories/Templates/PersonManagement/PersonManagement.vue +1 -1
- package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +21 -33
- package/src/stories/Templates/TournamentManagement/TournamentMangement.stories.js +3 -0
- package/src/stories/Templates/TournamentManagement/TournamentPageOne/TournamentPageOne.vue +9 -6
|
@@ -13755,18 +13755,19 @@ const jy = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAClCAYAAADS6VbkAA
|
|
|
13755
13755
|
return {
|
|
13756
13756
|
loading: Ky,
|
|
13757
13757
|
showCropper: !1,
|
|
13758
|
-
uploading: !1
|
|
13758
|
+
uploading: !1,
|
|
13759
|
+
localImageUrl: this.urlToImage
|
|
13759
13760
|
};
|
|
13760
13761
|
},
|
|
13761
13762
|
computed: {
|
|
13762
|
-
|
|
13763
|
-
return this.
|
|
13763
|
+
displayedUrl() {
|
|
13764
|
+
return this.localImageUrl || (this.isProfile ? jy : Xc);
|
|
13764
13765
|
},
|
|
13765
13766
|
getClasses() {
|
|
13766
|
-
return this.customClass ? this.customClass : "h-
|
|
13767
|
+
return this.customClass ? this.customClass : "h-52 w-80 border-2 border-dashed rounded-lg bg-contain bg-contain bg-center bg-no-repeat";
|
|
13767
13768
|
},
|
|
13768
13769
|
getSkeletonClass() {
|
|
13769
|
-
return this.customSkeletonClass ? this.customSkeletonClass : "border-2 h-
|
|
13770
|
+
return this.customSkeletonClass ? this.customSkeletonClass : "border-2 h-52 w-80 border-dashed rounded-lg bg-quaternaryHighlight animate-pulse";
|
|
13770
13771
|
}
|
|
13771
13772
|
},
|
|
13772
13773
|
methods: {
|
|
@@ -13777,7 +13778,7 @@ const jy = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAClCAYAAADS6VbkAA
|
|
|
13777
13778
|
this.uploading = !0;
|
|
13778
13779
|
},
|
|
13779
13780
|
handleUploaded(n) {
|
|
13780
|
-
this.uploading = !1, n.response.status === 200 && (this.
|
|
13781
|
+
this.uploading = !1, n.response.status === 200 && (this.localImageUrl = `${this.imageServer}${this.uploadImageName}.png`, console.log("Image uploaded successfully"), console.log(this.localImageUrl), this.$emit("update:url", `${this.imageServer}${this.uploadImageName}.png`));
|
|
13781
13782
|
},
|
|
13782
13783
|
handleCompleted() {
|
|
13783
13784
|
this.message = "Upload completed.";
|
|
@@ -13795,10 +13796,10 @@ function Vy(n, e, t, r, o, i) {
|
|
|
13795
13796
|
return m(), I("section", Gy, [
|
|
13796
13797
|
o.uploading ? Q("", !0) : (m(), I("img", {
|
|
13797
13798
|
key: 0,
|
|
13798
|
-
src: i.
|
|
13799
|
+
src: i.displayedUrl,
|
|
13799
13800
|
class: te(i.getClasses),
|
|
13800
13801
|
style: Nt(t.customStyle),
|
|
13801
|
-
alt: i.
|
|
13802
|
+
alt: i.displayedUrl,
|
|
13802
13803
|
onError: e[0] || (e[0] = (...a) => i.onImageError && i.onImageError(...a)),
|
|
13803
13804
|
onClick: e[1] || (e[1] = (a) => i.setShowCropper())
|
|
13804
13805
|
}, null, 46, Jy)),
|
|
@@ -30062,13 +30063,9 @@ const sc = /* @__PURE__ */ oe(pO, [["render", vO]]), wO = {
|
|
|
30062
30063
|
type: Object,
|
|
30063
30064
|
required: !0
|
|
30064
30065
|
},
|
|
30065
|
-
urlToImage: {
|
|
30066
|
-
type: String,
|
|
30067
|
-
default: null
|
|
30068
|
-
},
|
|
30069
30066
|
uploadImageName: {
|
|
30070
30067
|
type: String,
|
|
30071
|
-
default: "default-image"
|
|
30068
|
+
default: "t-default-image"
|
|
30072
30069
|
},
|
|
30073
30070
|
uploadServer: {
|
|
30074
30071
|
type: String,
|
|
@@ -30092,6 +30089,9 @@ const sc = /* @__PURE__ */ oe(pO, [["render", vO]]), wO = {
|
|
|
30092
30089
|
TextBoxEditor: ic
|
|
30093
30090
|
},
|
|
30094
30091
|
computed: {
|
|
30092
|
+
tournamentImage() {
|
|
30093
|
+
return this.tournament.Images && this.tournament.Images.length > 0 ? this.tournament.Images[0].URL : "";
|
|
30094
|
+
},
|
|
30095
30095
|
tournamentName() {
|
|
30096
30096
|
var n;
|
|
30097
30097
|
return ((n = this.tournament) == null ? void 0 : n.Name) || "";
|
|
@@ -30163,7 +30163,7 @@ function RO(n, e, t, r, o, i) {
|
|
|
30163
30163
|
]),
|
|
30164
30164
|
f("div", DO, [
|
|
30165
30165
|
h(a, {
|
|
30166
|
-
urlToImage:
|
|
30166
|
+
urlToImage: i.tournamentImage,
|
|
30167
30167
|
uploadImageName: t.uploadImageName,
|
|
30168
30168
|
uploadServer: t.uploadServer,
|
|
30169
30169
|
imageServer: t.imageServer,
|
|
@@ -30641,10 +30641,6 @@ const AT = {
|
|
|
30641
30641
|
required: !0,
|
|
30642
30642
|
default: () => []
|
|
30643
30643
|
},
|
|
30644
|
-
urlToImage: {
|
|
30645
|
-
type: String,
|
|
30646
|
-
default: null
|
|
30647
|
-
},
|
|
30648
30644
|
uploadImageName: {
|
|
30649
30645
|
type: String,
|
|
30650
30646
|
default: "default-image"
|
|
@@ -30692,29 +30688,22 @@ const AT = {
|
|
|
30692
30688
|
this.currentTab = n, this.$emit("tab:menu-click", n);
|
|
30693
30689
|
},
|
|
30694
30690
|
checkIfNewTournament() {
|
|
30695
|
-
if (this.tournament
|
|
30696
|
-
this.isNewTournament = !
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
|
|
30701
|
-
|
|
30702
|
-
|
|
30703
|
-
|
|
30704
|
-
|
|
30705
|
-
|
|
30706
|
-
StartDate: "",
|
|
30707
|
-
RegistrationCutOff: "",
|
|
30708
|
-
Description: "",
|
|
30709
|
-
HostedOnM2: !1,
|
|
30710
|
-
Visibility: "Open"
|
|
30711
|
-
};
|
|
30712
|
-
if (n && Object.keys(n).length > 0) {
|
|
30713
|
-
const t = new Date(n.StartDate), r = new Date(n.EndDate), o = !isNaN(t.getTime()) && !isNaN(r.getTime()) ? Math.max(1, (r - t) / (1e3 * 60 * 60 * 24) + 1) : 1;
|
|
30714
|
-
this.localTournament = { ...n, TotalDays: o };
|
|
30691
|
+
if (!this.tournament || Object.keys(this.tournament).length === 0 || !this.tournament.Name) {
|
|
30692
|
+
this.isNewTournament = !0, this.localTournament = {
|
|
30693
|
+
Name: "",
|
|
30694
|
+
Address: "",
|
|
30695
|
+
TotalDays: 1,
|
|
30696
|
+
StartDate: "",
|
|
30697
|
+
RegistrationCutOff: "",
|
|
30698
|
+
Description: "",
|
|
30699
|
+
HostedOnM2: !1,
|
|
30700
|
+
Visibility: "Open"
|
|
30701
|
+
};
|
|
30715
30702
|
return;
|
|
30716
30703
|
}
|
|
30717
|
-
this.
|
|
30704
|
+
this.isNewTournament = !1;
|
|
30705
|
+
const n = new Date(this.tournament.StartDate), e = new Date(this.tournament.EndDate), t = !isNaN(n.getTime()) && !isNaN(e.getTime()) ? Math.max(1, (e - n) / (1e3 * 60 * 60 * 24) + 1) : 1;
|
|
30706
|
+
this.localTournament = { ...this.tournament, TotalDays: t };
|
|
30718
30707
|
},
|
|
30719
30708
|
handleAddNewAddress(n) {
|
|
30720
30709
|
this.localTournament.AddressId = 0, this.localTournament.Address = n, this.$emit("add:newAddress", n);
|
|
@@ -30728,7 +30717,7 @@ const AT = {
|
|
|
30728
30717
|
}), !Object.values(this.validation).some((e) => e.invalid);
|
|
30729
30718
|
},
|
|
30730
30719
|
handleNewImageUrl(n) {
|
|
30731
|
-
this.tournament.imageLink = n, this.$emit("update:image", n);
|
|
30720
|
+
this.tournament.imageLink = n, this.imageName = n, this.$emit("update:image", n);
|
|
30732
30721
|
},
|
|
30733
30722
|
updateTournament(n) {
|
|
30734
30723
|
this.localTournament = { ...this.localTournament, ...n }, Object.keys(n).forEach((e) => {
|
|
@@ -39867,7 +39856,7 @@ const l2 = /* @__PURE__ */ oe(o2, [["render", a2]]), c2 = {
|
|
|
39867
39856
|
methods: {
|
|
39868
39857
|
personProfileTabs: GO,
|
|
39869
39858
|
handleProfilePicUpdate(n) {
|
|
39870
|
-
this.person.ProfileImage = n, this.$emit("update:image", n);
|
|
39859
|
+
console.log(n), this.person.ProfileImage = n, this.$emit("update:image", n);
|
|
39871
39860
|
},
|
|
39872
39861
|
handleSubmit() {
|
|
39873
39862
|
this.$emit("submit:person", this.person);
|