@dcrackel/hematournamentui 1.0.51 → 1.0.53

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.51",
4
+ "version": "1.0.53",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTouranmentUI-lib.umd.js",
7
7
  "module": "dist/HemaTouranmentUI-lib.es.js",
@@ -12,7 +12,7 @@
12
12
  "preview": "vite preview",
13
13
  "build-storybook": "npm run build:tailwind && storybook build",
14
14
  "build:tailwind": "tailwindcss build ./tailwind/tailwind.css -o ./tailwind/output.css",
15
- "storybook": "concurrently \"npm run watch:tailwind\" \"npm run watch:storybook\"",
15
+ "storybook": "npm \"npm run watch:tailwind\" \"npm run watch:storybook\"",
16
16
  "watch:storybook": "storybook dev -p 6006",
17
17
  "watch:tailwind": "tailwindcss build ./tailwind/tailwind.css -o ./tailwind/output.css --watch",
18
18
  "test": "vitest",
Binary file
@@ -44,7 +44,7 @@ const mockTournaments = [
44
44
  "Name": "Test Tournament",
45
45
  "StartDate": "2023-12-30",
46
46
  "EndDate": "2023-12-31",
47
- "Description": "<p>asdfasdfa</p>",
47
+ "Description": "<p>asdfasdfa ajhasd;likjfh;jkh asdlkjha;fdslkh ;asd;lkjfha;lksdhf ;alksh;lkjha;sdolfkjh;'asdklj f'as'lkj as'ldkj' asdkjlasd'fklja'dkljf sad'</p>",
48
48
  "ClubId": 1,
49
49
  "AddressId": 2,
50
50
  "Club.Name": "Test Club",
@@ -62,7 +62,7 @@ export default {
62
62
  admin: 'px-2.5 py-2 items-center rounded-md gap-2.5 text-center my-1 text-neutral hover:bg-primaryHighlight ' +
63
63
  (props.selected ? 'bg-primary' : 'bg-primary'),
64
64
 
65
- adminSecondary: 'px-2.5 py-0.5 items-center gap-2.5 text-center my-1 pb-0.5 border-b border-secondary hover:border-b hover:border-neutral w-11/12 text-neutral ' +
65
+ adminSecondary: 'px-2.5 py-2 rounded-xl items-center gap-2.5 text-center my-1 pb-2 border-b border-secondary hover:bg-bright w-11/12 text-neutral ' +
66
66
  (props.selected ? 'bg-primary' : 'bg-primary'),
67
67
 
68
68
  iconOnly: 'px-0.5 items-center rounded-full text-center text-tertiary shadow border border-dropdownSelect justify-center bg-primaryHighlight',
@@ -3,7 +3,12 @@
3
3
  <BaseText :text="detail.Name" color="primary" size="xl" weight="semi-bold" />
4
4
  <BaseText :text="detail.Address && detail.Address[0].Name" color="primary" size="sm" weight="normal" />
5
5
  <div class="mt-4 flex flex-col">
6
- <div class="mt-4 flex flex-col" v-html="detail.Description"></div>
6
+ <div class="mt-4 flex flex-col min-h-20" >
7
+ <span v-html="formattedDescription"></span>
8
+ <span v-if="isTruncated" @click="toggleDescription" class="text-blue-500 cursor-pointer text-right mr-2">
9
+ {{ showMoreDescription ? ' << less ' : 'more >>' }}
10
+ </span>
11
+ </div>
7
12
  </div>
8
13
  <div class="mt-4 flex flex-col">
9
14
  <BaseText :text="`${detail.StartDate}`" color="primaryHighlight" size="sm" weight="light" />
@@ -49,9 +54,28 @@ export default {
49
54
  })
50
55
  }
51
56
  },
57
+ data() {
58
+ return {
59
+ showMoreDescription: false,
60
+ };
61
+ },
62
+ computed: {
63
+ formattedDescription() {
64
+ if (!this.showMoreDescription && this.detail.Description.length > 64) {
65
+ return this.detail.Description.substring(0, 64) + '...';
66
+ }
67
+ return this.detail.Description;
68
+ },
69
+ isTruncated() {
70
+ return this.detail.Description.length > 64;
71
+ }
72
+ },
52
73
  methods: {
53
74
  onClick() {
54
75
  this.$emit('edit', this.detail);
76
+ },
77
+ toggleDescription() {
78
+ this.showMoreDescription = !this.showMoreDescription;
55
79
  }
56
80
  }
57
81
  };
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="rounded-xl w-72 shadow">
2
+ <div class="rounded-xl w-72 shadow border border-dropdownSelect hover:border-bright" @click="listEvents">
3
3
  <TournamentHeader :artwork="detail.images && detail.images.length > 0 ? detail.images[0].URL : ''" :tags="detail.tags" />
4
- <TournamentDetail :detail="detail" @click="onClick" />
4
+ <TournamentDetail :detail="detail" @click="onClick"/>
5
5
  </div>
6
6
  </template>
7
7
 
@@ -45,6 +45,9 @@ export default {
45
45
  methods: {
46
46
  onClick() {
47
47
  this.$emit('edit', this.detail.TournamentId);
48
+ },
49
+ listEvents() {
50
+ this.$emit('listEvents', this.detail.TournamentId);
48
51
  }
49
52
  }
50
53
  };
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 3xl:grid-cols-4 gap-6 w-full">
10
10
  <div v-for="item in filteredItems" :key="item.id" class="w-full">
11
- <component :is="component" :detail="item" @click="onClick(item)" />
11
+ <component :is="component" :detail="item" @click="handleClick(item)" @listEvents="handleListEvents(item)" />
12
12
  </div>
13
13
  </div>
14
14
  </div>
@@ -103,8 +103,11 @@ export default {
103
103
  handleTimeFrameChange(timeFrame) {
104
104
  this.selectedTimeFrame = timeFrame;
105
105
  },
106
- onClick(item){
106
+ handleClick(item){
107
107
  this.$emit('edit', item.TournamentId);
108
+ },
109
+ handleListEvents(item){
110
+ this.$emit('listEvents', item.TournamentId);
108
111
  }
109
112
  }
110
113
  };
@@ -2,8 +2,8 @@
2
2
  <div class="bg-secondary w-64 h-screen flex flex-col justify-between">
3
3
  <section class="h-28 border-b border-neutral">
4
4
  <div class="flex flex-col justify-center h-28">
5
- <div class="ml-8">
6
- <img class="w-32" src="https://ferrotas.com/assets/ferrotas-white-small-720502db.png" alt="logo"/>
5
+ <div class="flex justify-center">
6
+ <img alt="Logo" class="w-24" :src="logoImage" />
7
7
  </div>
8
8
  </div>
9
9
  </section>
@@ -38,6 +38,7 @@
38
38
 
39
39
  <script>
40
40
  import BaseButton from "../../../Molecules/Buttons/BaseButton/BaseButton.vue";
41
+ import logoImage from '../../../../assets/M2b.png';
41
42
 
42
43
  export default {
43
44
  name: 'AdminLeftMenu',
@@ -48,6 +49,11 @@ export default {
48
49
  default: () => []
49
50
  }
50
51
  },
52
+ data() {
53
+ return {
54
+ logoImage,
55
+ };
56
+ },
51
57
  methods: {
52
58
  handleButtonClick(button) {
53
59
  this.$emit('button-click', button);
@@ -4,7 +4,7 @@
4
4
  <section class="w-full">
5
5
  <div class="w-full flex flex-col justify-center items-center mb-6" style="text-align: center">
6
6
  <div v-if="events.length === 0">
7
- <img alt="Small desert scene with wind blowing." class="w-96 " src="/src/assets/empty_desert_icon.png">
7
+ <img alt="Small desert scene with wind blowing." class="w-96" :src="emptyDesertIcon" />
8
8
  <BaseText :color="'primaryHighlight'" :size="'lf'" :text="'0 events added yet.'"
9
9
  :weight="'normal'" data-testid="text-num-events"/>
10
10
  <BaseText :color="'primaryHighlight'" :size="'lf'" :text="'Click below to add first event.'"
@@ -30,6 +30,7 @@ import EditTournamentMenu from "../../../Menus/EditTournamentMenu/EditTournament
30
30
  import BaseText from "../../../../Atoms/Text/BaseText.vue";
31
31
  import BaseButton from "../../../../Molecules/Buttons/BaseButton/BaseButton.vue";
32
32
  import EventCard from "../../../../Organisms/Cards/EventCard/EventCard.vue";
33
+ import emptyDesertIcon from '../../../../../assets/empty_desert_icon.png';
33
34
 
34
35
  export default {
35
36
  components: {
@@ -42,6 +43,11 @@ export default {
42
43
  tournamentId: Number,
43
44
  events: Array,
44
45
  },
46
+ data() {
47
+ return {
48
+ emptyDesertIcon,
49
+ };
50
+ },
45
51
  methods: {
46
52
  handleAddEvent() {
47
53
  this.$emit('addEvent', this.tournamentId);
@@ -38,8 +38,10 @@ export default {
38
38
  eventBoxBlue: '#eff4f7',
39
39
  eventBoxGreen: '#f2f7ef',
40
40
  eventBoxRed: '#f7efef',
41
-
42
- }
41
+ },
42
+ boxShadow: {
43
+ custom: 'var(--tw-shadow)',
44
+ },
43
45
  },
44
46
  },
45
47
  plugins: [