@dcrackel/hematournamentui 1.0.249 → 1.0.250

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/hematournamentui",
3
3
  "private": false,
4
- "version": "1.0.249",
4
+ "version": "1.0.250",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTournamentUI-lib.umd.js",
7
7
  "module": "dist/HemaTournamentUI-lib.es.js",
@@ -1,5 +1,3 @@
1
- import getAllStaffByTournamentId from "./getAllStaffByTournamentId.js";
2
-
3
1
  const getAllWeapons =
4
2
  [
5
3
  {
@@ -235,11 +235,7 @@ export default {
235
235
  return this.eventConfig.ThirdPlaceBout ? '3rd Place Fence Off' : 'Tie for 3rd Place'
236
236
  },
237
237
  selectedWeapon() {
238
- console.log(this.weapons);
239
- console.log(this.localEvent.WeaponId)
240
238
  const weapon = this.weapons.find(w => w.Id === this.localEvent.WeaponId);
241
- console.log(weapon);
242
- console.log("----------------------")
243
239
  return weapon ? weapon.Name : 'Select Weapon';
244
240
  },
245
241
  updatedEvent() {
@@ -1,8 +1,9 @@
1
1
  import BasicEventInfo from './BasicEventInfo.vue';
2
2
  import singleEventMock from "../../../../../mocks/singleEventMock.js";
3
+ import getAllWeapons from "../../../../../mocks/getAllWeapons.js";
3
4
 
4
5
  export default {
5
- title: 'Organisms/Forms/EditEvenForm/BasicEventInfo/BasicEventInfo',
6
+ title: 'Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo',
6
7
  component: BasicEventInfo,
7
8
  args: {
8
9
  event: singleEventMock,
@@ -12,11 +13,7 @@ export default {
12
13
  { name: "Pool Setup", icon: "fa-table-columns" },
13
14
  { name: "Direct Elimination", icon: "fa-diagram-sankey" }
14
15
  ],
15
- weapons: [
16
- {text: 'Longsword', link: 1},
17
- {text: 'Saber', link: 2},
18
- {text: 'Rapier', link: 3}
19
- ],
16
+ weapons: getAllWeapons,
20
17
  },
21
18
  argTypes: {
22
19
  event: { control: 'object' },
@@ -29,11 +26,7 @@ export default {
29
26
  export const Default = {
30
27
  args: {
31
28
  event: singleEventMock,
32
- weapons: [
33
- {text: 'Longsword', link: 1},
34
- {text: 'Saber', link: 2},
35
- {text: 'Rapier', link: 3}
36
- ],
29
+ weapons: getAllWeapons,
37
30
  currentStep: 2,
38
31
  steps: [
39
32
  { name: "Basic Info", icon: "fa-circle-info" },
@@ -35,7 +35,7 @@
35
35
  <div class="mb-4 grow">
36
36
  <BaseText :color="'quinary'" :invalid="validation.WeaponId" :size="'sm'" :text="'Weapon Form'"
37
37
  :weight="'normal'" class="mb-1" data-testid="text-start-date"/>
38
- <DropDownMenu :label="selectedWeapon" :items="weapons" :selected-item="selectedWeapon" :alignEnd="false" :width="'w-full'" @update:selectedItem="handleWeaponChange" />
38
+ <DropDownMenu :label="selectedWeapon" :items="getWeapons" :selected-item="selectedWeapon" :alignEnd="false" :width="'w-full'" @update:selectedItem="handleWeaponChange" />
39
39
  </div>
40
40
 
41
41
  <div class="flex flex-row justify-center h-12">
@@ -90,8 +90,13 @@ export default {
90
90
  },
91
91
  computed: {
92
92
  selectedWeapon() {
93
- const weapon = this.weapons.find((e) => e.link === this.localEvent.WeaponId);
94
- return weapon ? weapon.text : "";
93
+ const weapon = this.weapons.find(w => w.Id === this.localEvent.WeaponId);
94
+ return weapon ? weapon.Name : 'Select Weapon';
95
+ },
96
+ getWeapons(){
97
+ return this.weapons.map(weapon => {
98
+ return { text: weapon.Name, link: weapon.Id };
99
+ });
95
100
  }
96
101
  },
97
102
  methods: {
@@ -2,7 +2,7 @@ import directElimination from './DirectElimination.vue';
2
2
  import singleEventMock from "../../../../../mocks/singleEventMock.js";
3
3
 
4
4
  export default {
5
- title: 'Organisms/Forms/EditEvenForm/DirectElimination/DirectElimination',
5
+ title: 'Organisms/Wizards/EditEventWizard/DirectElimination/DirectElimination',
6
6
  component: directElimination,
7
7
  args: {
8
8
  eventConfig: {
@@ -2,7 +2,7 @@ import directEliminationPromotion from './DirectEliminationPromotion.vue';
2
2
  import singleEventMock from "../../../../../mocks/singleEventMock.js";
3
3
 
4
4
  export default {
5
- title: 'Organisms/Forms/EditEvenForm/Promotion/DirectEliminationPromotion',
5
+ title: 'Organisms/Wizards/EditEventWizard/Promotion/DirectEliminationPromotion',
6
6
  component: directEliminationPromotion,
7
7
  args: {
8
8
  eventConfig: {
@@ -1,7 +1,7 @@
1
1
  import EditEvent from './PoolConfiguration.vue';
2
2
 
3
3
  export default {
4
- title: 'Organisms/Forms/EditEvenForm/PoolConfiguration/PoolConfiguration',
4
+ title: 'Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration',
5
5
  component: EditEvent,
6
6
  args: {
7
7
  eventConfig: {
@@ -2,7 +2,7 @@ import editConfig from './EditEventInfo.vue';
2
2
  import getAllStaffByTournamentId from "../../../../mocks/getAllStaffByTournamentId.js";
3
3
  import singleEventMock from "../../../../mocks/singleEventMock.js";
4
4
  import eventRules from "../../../../mocks/eventRules.js";
5
-
5
+ import getAllWeapons from "../../../../mocks/getAllWeapons.js";
6
6
 
7
7
  export default {
8
8
  title: 'Templates/EventManagement/EditEventInfo',
@@ -10,11 +10,7 @@ export default {
10
10
  tags: ['autodocs'],
11
11
  args: {
12
12
  event: singleEventMock,
13
- weapons: [
14
- {text: 'Longsword', link: 1},
15
- {text: 'Saber', link: 2},
16
- {text: 'Rapier', link: 3}
17
- ],
13
+ weapons: getAllWeapons,
18
14
  rules: eventRules
19
15
  },
20
16
  argTypes: {
@@ -26,5 +22,7 @@ export default {
26
22
  };
27
23
 
28
24
  export const Default = {
29
-
25
+ event: singleEventMock,
26
+ weapons: getAllWeapons,
27
+ rules: eventRules
30
28
  };