@dcrackel/hematournamentui 1.0.321 → 1.0.323
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 +10 -2
- package/dist/HemaTournamentUI-lib.umd.js +2 -2
- package/package.json +1 -1
- package/src/mocks/clubGetAllMock.js +387 -247
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +1 -1
- package/src/stories/Organisms/Form/AddDisplay/AddDisplay.vue +9 -1
- package/src/stories/Templates/EventManagement/ClubDisplay/ClubDisplay.stories.js +12 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<i class="fa-solid fa-chevron-down text-xs text-quinary" />
|
|
7
7
|
</div>
|
|
8
8
|
<transition name="fade-in-down">
|
|
9
|
-
<div v-if="isDropDownOpen" class="flex flex-col shadow-lg mt-9 z-20 rounded-b-xl absolute bg-neutral border border-dropdownSelect overflow-y-auto max-h-44" :class="dropDownWidth">
|
|
9
|
+
<div v-if="isDropDownOpen" class="w-full flex flex-col shadow-lg mt-9 z-20 rounded-b-xl absolute bg-neutral border border-dropdownSelect overflow-y-auto max-h-44" :class="dropDownWidth">
|
|
10
10
|
<a v-for="item in items" :key="item.id" @click="handleClick(item)" class="hover:bg-dropdownSelect py-1 px-2 border-b border-l border-r border-dropdownSelect">
|
|
11
11
|
<BaseText :text="item.text" color="quinary" size="sm" weight="normal" class="py-0.5" />
|
|
12
12
|
</a>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<!-- Club Dropdown -->
|
|
27
27
|
<div class="mb-4" v-if="isAdmin">
|
|
28
28
|
<BaseText :color="'quinary'" :size="'sm'" :text="'Club'" :weight="'normal'" class="mb-1"/>
|
|
29
|
-
<DropDownMenu :label="selectedClub" :items="
|
|
29
|
+
<DropDownMenu :label="selectedClub" :items="formattedClubs" :selected-item="selectedClub" :alignEnd="false" :width="'w-full'" @update:selectedItem="handleClubChange" />
|
|
30
30
|
</div>
|
|
31
31
|
<div class="mb-4" v-else>
|
|
32
32
|
<TitledInput :inputValue="selectedClub.text" :disabled="isAdmin" title="Club" />
|
|
@@ -95,6 +95,14 @@ export default {
|
|
|
95
95
|
]
|
|
96
96
|
};
|
|
97
97
|
},
|
|
98
|
+
computed: {
|
|
99
|
+
formattedClubs() {
|
|
100
|
+
return this.clubs.map(club => ({
|
|
101
|
+
text: club.Name,
|
|
102
|
+
link: club.ClubId.toString()
|
|
103
|
+
}));
|
|
104
|
+
},
|
|
105
|
+
},
|
|
98
106
|
methods: {
|
|
99
107
|
handleDisplayNameChange(value) {
|
|
100
108
|
this.localDisplay.displayName = value;
|
|
@@ -2,6 +2,7 @@ import ClubDisplay from './ClubDisplay.vue';
|
|
|
2
2
|
import getCLubDisplayByClubId from "../../../../mocks/getClubDisplayByClubId.js";
|
|
3
3
|
import getAllStaffByTournamentId from "../../../../mocks/getAllStaffByTournamentId.js";
|
|
4
4
|
import getEventByTournamentId from "../../../../mocks/getEventByTournamentId.js"
|
|
5
|
+
import clubGetAllMock from "../../../../mocks/clubGetAllMock.js";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: 'Templates/EventManagement/ClubDisplay',
|
|
@@ -33,7 +34,17 @@ export const Default = {
|
|
|
33
34
|
eventDropDown: getEventByTournamentId,
|
|
34
35
|
isAdmin: false,
|
|
35
36
|
userClub: {text: 'Cats Club', link: '1'},
|
|
36
|
-
clubs:
|
|
37
|
+
clubs: clubGetAllMock
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
|
|
41
|
+
export const isAdmin = {
|
|
42
|
+
args: {
|
|
43
|
+
displays: getCLubDisplayByClubId,
|
|
44
|
+
staffDropDown: getAllStaffByTournamentId,
|
|
45
|
+
eventDropDown: getEventByTournamentId,
|
|
46
|
+
isAdmin: true,
|
|
47
|
+
userClub: {text: 'Cats Club', link: '1'},
|
|
48
|
+
clubs: clubGetAllMock
|
|
49
|
+
}
|
|
50
|
+
};
|