@dcrackel/hematournamentui 1.0.255 → 1.0.256
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 +422 -390
- package/dist/HemaTournamentUI-lib.umd.js +17 -17
- package/package.json +1 -1
- package/src/stories/Organisms/Cards/EventCard/EventCard.vue +34 -5
- package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +1 -1
- package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +4 -4
- package/src/stories/Templates/TournamentManagement/ListEvents/ListEvents.vue +10 -2
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
</section>
|
|
14
14
|
<div class="flex flex-col pl-4">
|
|
15
15
|
<div class="flex flex-row pb-2">
|
|
16
|
-
<BaseButton label="
|
|
17
|
-
<BaseButton label="
|
|
16
|
+
<BaseButton label="Manage" size="sm" type="primary" @click="onManage" :class="event.Status !== 'completed' ? 'w-1/2' : 'w-full'" />
|
|
17
|
+
<BaseButton v-if="event.Status !== 'completed'" label="Delete" size="sm" type="primary" @click="onDelete" class="w-1/2" />
|
|
18
18
|
</div>
|
|
19
19
|
<div class="flex flex-row">
|
|
20
20
|
<EventStatusBox :status-count="event.Present" status-label="PRESENT" box-color="bg-eventBoxBlue" />
|
|
@@ -23,31 +23,60 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
|
+
<section>
|
|
27
|
+
<BaseModal
|
|
28
|
+
headerText="Remove This Event?"
|
|
29
|
+
bodyText="Pressing Delete will permanently remove this event. This action cannot be undone."
|
|
30
|
+
buttonText="Delete This Event"
|
|
31
|
+
iconColor="alarm"
|
|
32
|
+
iconBackgroundColor="alarmHighlight"
|
|
33
|
+
iconName="fa-circle-xmark"
|
|
34
|
+
:show="showModal"
|
|
35
|
+
@update:show="close"
|
|
36
|
+
@submitModal="handleSubmit"
|
|
37
|
+
/>
|
|
38
|
+
</section>
|
|
26
39
|
</template>
|
|
27
40
|
|
|
28
41
|
<script>
|
|
29
42
|
import BaseText from "../../../Atoms/Text/BaseText.vue";
|
|
30
43
|
import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
|
|
31
44
|
import EventStatusBox from "../../../Molecules/Boxes/EventStatusBox/EventStatusBox.vue";
|
|
45
|
+
import BaseIcon from "../../../Atoms/Icon/BaseIcon.vue";
|
|
46
|
+
import BaseModal from "../../../Molecules/Modals/BaseModal/BaseModal.vue";
|
|
32
47
|
|
|
33
48
|
export default {
|
|
34
49
|
name: 'EventCard',
|
|
35
|
-
components: { EventStatusBox, BaseButton, BaseText },
|
|
50
|
+
components: {BaseModal, BaseIcon, EventStatusBox, BaseButton, BaseText },
|
|
51
|
+
emits: ['manage', 'edit', 'delete'],
|
|
36
52
|
props: {
|
|
37
53
|
event: {
|
|
38
54
|
type: Object,
|
|
39
55
|
required: true
|
|
40
56
|
}
|
|
41
57
|
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
showModal: false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
42
63
|
methods: {
|
|
43
|
-
|
|
64
|
+
onDelete(event) {
|
|
44
65
|
event.stopPropagation();
|
|
45
|
-
this
|
|
66
|
+
this.showModal= true
|
|
67
|
+
//this.$emit('delete', this.event);
|
|
46
68
|
},
|
|
47
69
|
onManage(event) {
|
|
48
70
|
event.stopPropagation();
|
|
49
71
|
this.$emit('manage', this.event);
|
|
72
|
+
},
|
|
73
|
+
close(){
|
|
74
|
+
this.showModal = false
|
|
75
|
+
},
|
|
76
|
+
handleSubmit(){
|
|
77
|
+
this.$emit('delete', this.event);
|
|
50
78
|
}
|
|
79
|
+
|
|
51
80
|
}
|
|
52
81
|
}
|
|
53
82
|
</script>
|
|
@@ -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" :class="dropDownWidth">
|
|
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">
|
|
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>
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
:weight="'normal'" class="mb-1" data-testid="text-start-date"/>
|
|
29
29
|
<DatePicker :invalid="validation.StartTime" :setDate="localEvent.StartTime" pickerMode="time" @update:selectedDate="handleTimeUpdate"/>
|
|
30
30
|
</div>
|
|
31
|
-
<div class="mb-4 grow">
|
|
32
|
-
<TitledInput :inputValue="localEvent.NumberOfRings" :invalid="validation.NumberOfRings" placeholder="Enter Number of Rings"
|
|
33
|
-
title="Number of Rings" @update:value="handleNumberOfRingsChange" />
|
|
34
|
-
</div>
|
|
35
31
|
<div class="mb-4 grow">
|
|
36
32
|
<BaseText :color="'quinary'" :invalid="validation.WeaponId" :size="'sm'" :text="'Weapon Form'"
|
|
37
33
|
:weight="'normal'" class="mb-1" data-testid="text-start-date"/>
|
|
38
34
|
<DropDownMenu :label="selectedWeapon" :items="getWeapons" :selected-item="selectedWeapon" :alignEnd="false" :width="'w-full'" @update:selectedItem="handleWeaponChange" />
|
|
39
35
|
</div>
|
|
36
|
+
<div class="mb-4 grow">
|
|
37
|
+
<TitledInput :inputValue="localEvent.NumberOfRings" :invalid="validation.NumberOfRings" placeholder="Enter Number of Rings"
|
|
38
|
+
title="Number of Rings" @update:value="handleNumberOfRingsChange" />
|
|
39
|
+
</div>
|
|
40
40
|
|
|
41
41
|
<div class="flex flex-row justify-center h-12">
|
|
42
42
|
<BaseButton class="w-1/2 ml-1" color="neutral" label="Cancel" size="sm" type="primary" @click="handleBack" />
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<section v-for="event in events" class="w-full">
|
|
16
|
-
<EventCard :event="event"
|
|
16
|
+
<EventCard :event="event"
|
|
17
|
+
@edit="handleEdit(event.EventId)"
|
|
18
|
+
@manage="handleManageEvent(event.EventId)"
|
|
19
|
+
@delete="handleDeleteEvent"
|
|
20
|
+
/>
|
|
17
21
|
</section>
|
|
18
22
|
</div>
|
|
19
23
|
<div class="flex justify-center w-full">
|
|
@@ -23,6 +27,7 @@
|
|
|
23
27
|
</div>
|
|
24
28
|
</div>
|
|
25
29
|
</section>
|
|
30
|
+
|
|
26
31
|
</div>
|
|
27
32
|
</section>
|
|
28
33
|
</template>
|
|
@@ -45,7 +50,7 @@ export default {
|
|
|
45
50
|
tournamentId: Number,
|
|
46
51
|
events: Array,
|
|
47
52
|
},
|
|
48
|
-
emits: ['tab:menu-click', 'manageEvent', 'editEvent', 'addEvent'],
|
|
53
|
+
emits: ['tab:menu-click', 'manageEvent', 'editEvent', 'addEvent', 'delete:Event'],
|
|
49
54
|
data() {
|
|
50
55
|
return {
|
|
51
56
|
emptyDesertIcon,
|
|
@@ -69,6 +74,9 @@ export default {
|
|
|
69
74
|
},
|
|
70
75
|
handleTabMenuClick(value) {
|
|
71
76
|
this.$emit('tab:menu-click', value);
|
|
77
|
+
},
|
|
78
|
+
handleDeleteEvent(event) {
|
|
79
|
+
this.$emit('delete:Event', event);
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
82
|
}
|