@icvdeveloper/common-module 0.0.29 → 0.0.32

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.
Files changed (35) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/affiliates/AffiliatePage.vue +1 -0
  3. package/dist/runtime/components/agenda/AgendaTabbed.vue +2 -1
  4. package/dist/runtime/components/agenda/components/InfoLink.vue +1 -0
  5. package/dist/runtime/components/agenda/components/PlayIcon.vue +1 -0
  6. package/dist/runtime/components/agenda/components/PresentationLink.vue +67 -77
  7. package/dist/runtime/components/agenda/components/Sponsor.vue +1 -0
  8. package/dist/runtime/components/core/CountdownTimer.vue +37 -5
  9. package/dist/runtime/components/core/Modal.vue +2 -0
  10. package/dist/runtime/components/core/Navbar.vue +154 -0
  11. package/dist/runtime/components/core/SvgIcon.vue +1 -1
  12. package/dist/runtime/components/events/EventHeader.vue +1 -1
  13. package/dist/runtime/components/events/PastEvents.vue +1 -1
  14. package/dist/runtime/components/events/UpcomingEvents.vue +1 -1
  15. package/dist/runtime/components/forms/ErrorField.vue +1 -3
  16. package/dist/runtime/components/forms/Message.vue +8 -2
  17. package/dist/runtime/components/forms/SearchInput.vue +12 -4
  18. package/dist/runtime/components/forms/SupportForm.vue +8 -5
  19. package/dist/runtime/components/forms/SwitchInput.vue +1 -0
  20. package/dist/runtime/components/forms/TextInput.vue +1 -0
  21. package/dist/runtime/components/layouts/Accordion.vue +2 -0
  22. package/dist/runtime/components/presenters/PresenterListing.vue +1 -0
  23. package/dist/runtime/components/presenters/PresenterModal.vue +1 -0
  24. package/dist/runtime/composables/useAgenda.mjs +3 -0
  25. package/dist/runtime/composables/useConferenceHelpers.d.ts +16 -16
  26. package/dist/runtime/composables/useConferenceHelpers.mjs +77 -118
  27. package/dist/runtime/composables/useDateFormat.mjs +3 -3
  28. package/dist/runtime/composables/useNavigation.mjs +3 -0
  29. package/dist/runtime/composables/usePresentation.mjs +9 -3
  30. package/dist/runtime/composables/usePresenter.mjs +2 -0
  31. package/dist/runtime/composables/usePresenters.mjs +1 -0
  32. package/dist/runtime/store/conferences.d.ts +1 -1
  33. package/dist/runtime/store/conferences.mjs +13 -8
  34. package/dist/runtime/store/templateConfigs.mjs +20 -1
  35. package/package.json +2 -1
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "v3plus-common-module",
3
3
  "configKey": "v3plusCommonModule",
4
- "version": "0.0.29"
4
+ "version": "0.0.32"
5
5
  }
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { toRefs } from "vue";
2
3
  import { Affiliate } from "../../models/affiliate";
3
4
  import { Sponsor } from "../../models/conference";
4
5
 
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { toRefs, computed } from "vue";
2
3
  import { storeToRefs } from "pinia";
3
4
  import { useAgenda } from "../../composables/useAgenda";
4
5
  import { Conference, Sponsor as SponsorType } from "../../models/conference";
@@ -215,7 +216,7 @@ const presentersContainer = computed(() => {
215
216
  {{
216
217
  formatTimezoneToLocal(
217
218
  presentation.date,
218
- "h:m a",
219
+ "h:mm a",
219
220
  conference.timezone
220
221
  )
221
222
  }}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
2
3
  import { Presentation } from "../../../models/conference";
3
4
 
4
5
  type Props = {
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { toRefs } from "vue";
2
3
  import { usePresentation } from "../../../composables/usePresentation";
3
4
  import { Conference, Presentation } from "../../../models/conference";
4
5
  import { Icons } from "../../../models/icons";
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { toRefs, computed } from "vue";
2
3
  import { useAgenda } from "../../../composables/useAgenda";
3
4
  import { useConferenceHelpers } from "../../../composables/useConferenceHelpers";
4
5
  import { usePresentation } from "../../../composables/usePresentation";
@@ -16,16 +17,18 @@ type Props = {
16
17
  presentation: Presentation;
17
18
  track: Track | TrackGroup;
18
19
  showInfoLink?: boolean;
20
+ simpleLayout?: boolean;
19
21
  };
20
22
 
21
23
  const props = withDefaults(defineProps<Props>(), {
22
24
  showInfoLink: true,
25
+ simpleLayout: false,
23
26
  });
24
27
 
25
28
  const { conference, track, presentation } = toRefs(props);
26
29
 
27
30
  // Methods
28
- const { conferenceIsLive, conferenceIsArchived } =
31
+ const { conferenceIsLiveOrMixed, conferenceIsArchived } =
29
32
  useConferenceHelpers(conference);
30
33
  const { isSmallGroupedTrack } = useAgenda(conference);
31
34
  const {
@@ -45,103 +48,90 @@ const presentationNameClass = computed(() => {
45
48
 
46
49
  <template>
47
50
  <div>
48
- <!-- LIVE AGENDA GO TO WEBCAST PAGE -->
49
- <div v-if="conferenceIsLive()">
50
- <div class="flex flex-col flex-wrap py-1">
51
- <h2 class="flex-initial" :class="presentationNameClass">
52
- <!-- zoom text link -->
51
+ <div v-if="!simpleLayout">
52
+ <!-- LIVE AGENDA GO TO WEBCAST PAGE -->
53
+ <div>
54
+ <h2 class="flex flex-initial flex-row" :class="presentationNameClass">
55
+ <!-- zoom text & icon link -->
53
56
  <CommonZoomModal
54
- v-if="presentation.type == 'zoom'"
57
+ v-if="
58
+ isAgenda &&
59
+ conferenceIsLiveOrMixed(conference) &&
60
+ presentation.type == 'zoom'
61
+ "
55
62
  :presentation-id="presentation.id"
56
63
  modal-size="full"
57
64
  >
58
65
  <template #modal-link>
59
- <span class="font-semibold no-underline heading-link">{{
60
- presentation.name
61
- }}</span>
66
+ <span class="font-semibold no-underline heading-link"
67
+ >{{ presentation.name }}
68
+ <PlayIcon
69
+ :presentation="presentation"
70
+ :conference="conference"
71
+ :class="'justify-center md:justify-start'"
72
+ icon="zoom"
73
+ ></PlayIcon>
74
+ </span>
62
75
  </template>
63
76
  </CommonZoomModal>
64
77
 
65
- <!-- stream text link -->
78
+ <!-- live/archive stream text & icon link -->
66
79
  <a
67
- v-else
80
+ v-else-if="
81
+ (isAgenda && conferenceIsLiveOrMixed(conference)) ||
82
+ (conferenceIsArchived(conference) && presentation.type != 'zoom')
83
+ "
68
84
  class="font-semibold no-underline heading-link"
69
- :target="getPresentationLinkTarget(presentation)"
70
85
  :href="getLivePresentationLinkDestination(presentation, track)"
71
- >{{ presentation.name }}</a
86
+ :target="getPresentationLinkTarget(presentation)"
87
+ @click="playPresentation(track, presentation, conference)"
88
+ >
89
+ {{ presentation.name
90
+ }}<transition name="fade">
91
+ <PlayIcon
92
+ v-if="presentationIsLiveOrMixed(presentation)"
93
+ :presentation="presentation"
94
+ :conference="conference"
95
+ :class="'justify-center md:justify-start'"
96
+ icon="playarrow"
97
+ ></PlayIcon>
98
+ </transition>
99
+ </a>
100
+
101
+ <!-- text only catchall -->
102
+ <span v-else class="font-semibold" :class="presentationNameClass"
103
+ >{{ presentation.name }}</span
72
104
  >
73
105
 
74
106
  <!-- session details -->
75
107
  <InfoLink
76
108
  v-if="showInfoLink && presentation.description"
77
109
  :presentation="presentation"
78
- :use-icon="showPresentationLinkIcon()"
79
- :link-text="getPresentationLinkText()"
80
- :new-line="isSmallGroupedTrack(track)"
81
- class="ml-1"
82
- ></InfoLink>
83
- </h2>
110
+ :use-icon="useIcon"
111
+ :link-text="infoLinkText"
112
+ :new-line="isSmallGroupedTrack"
113
+ class="ml-2"
114
+ />
84
115
 
85
- <!-- zoom icon link -->
86
- <CommonZoomModal
87
- v-if="presentation.type == 'zoom'"
88
- :presentation-id="presentation.id"
89
- modal-size="full"
90
- >
91
- <template #modal-link>
92
- <PlayIcon
93
- :presentation="presentation"
94
- :conference="conference"
95
- :class="'justify-center md:justify-start'"
96
- icon="zoom"
97
- ></PlayIcon>
98
- </template>
99
- </CommonZoomModal>
100
- <!-- stream icon link -->
101
- <a
102
- v-else
103
- class="no-underline"
104
- :target="getPresentationLinkTarget(presentation)"
105
- :href="getLivePresentationLinkDestination(presentation, track)"
106
- >
107
- <PlayIcon
108
- v-if="presentationIsLiveOrMixed(presentation)"
116
+ <!-- favorites -->
117
+ <favorite
118
+ v-if="allowFavorites && currentUser.token"
119
+ class="ml-1"
109
120
  :presentation="presentation"
110
- :conference="conference"
111
- :class="'justify-center md:justify-start'"
112
- icon="playarrow"
113
- ></PlayIcon>
114
- </a>
121
+ @click="handleFavoriteClick"
122
+ />
123
+ </h2>
115
124
  </div>
116
125
  </div>
117
- <!-- ARCHIVE AGENDA GO TO MEDIA PAGE -->
118
- <div v-if="conferenceIsArchived()">
119
- <h2 class="font-semibold" :class="presentationNameClass">
120
- <a
121
- class="no-underline heading-link"
122
- :target="getPresentationLinkTarget(presentation)"
123
- :href="getArchivePresentationLinkDestination(presentation)"
124
- >{{ presentation.name }}</a
125
- >
126
- <a
127
- :target="getPresentationLinkTarget(presentation)"
128
- :href="getArchivePresentationLinkDestination(presentation)"
129
- ><CommonSvgIcon
130
- icon="playarrow"
131
- class="ml-1 align-middle"
132
- style="display: inline-block; margin-bottom: 2px"
133
- :icon-width="'20px'"
134
- ></CommonSvgIcon
135
- ></a>
136
- <InfoLink
137
- v-if="showInfoLink && presentation.description"
138
- :presentation="presentation"
139
- :use-icon="showPresentationLinkIcon()"
140
- :link-text="getPresentationLinkText()"
141
- :new-line="isSmallGroupedTrack(track)"
142
- class="ml-1"
143
- ></InfoLink>
144
- </h2>
126
+
127
+ <!-- SIMPLE LAYOUT -->
128
+ <div v-else>
129
+ <a
130
+ class="underline cursor-pointer"
131
+ @click="playPresentation(track, presentation, conference)"
132
+ >
133
+ {{ presentation.name }}
134
+ </a>
145
135
  </div>
146
136
  </div>
147
137
  </template>
@@ -1,5 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { find } from "lodash-es";
3
+ import { ref, toRefs } from "vue";
3
4
  import { Sponsor as SponsorModel } from "../../../models/conference";
4
5
 
5
6
  type Props = {
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" setup>
2
+ import { ref, computed, onMounted } from "vue";
2
3
  import { storeToRefs } from "pinia";
3
4
  import {
4
5
  isBefore,
@@ -10,6 +11,7 @@ import {
10
11
  addHours,
11
12
  addMinutes,
12
13
  } from "date-fns";
14
+ import { useTemplateConfigsStore } from "../../store";
13
15
 
14
16
  interface Props {
15
17
  date: string;
@@ -53,7 +55,7 @@ const clockStyle = computed(() => {
53
55
  });
54
56
 
55
57
  const fontClass = computed(() => {
56
- const fontBase = "text-countdown-int font-bold";
58
+ const fontBase = "font-bold";
57
59
  return props.isCompact === true
58
60
  ? fontBase + " text-xl lg:text-2xl"
59
61
  : fontBase + " text-2xl lg:text-4xl";
@@ -135,6 +137,40 @@ onMounted(() => {
135
137
  </transition>
136
138
  </div>
137
139
  </div>
140
+
141
+ <!-- Minutes -->
142
+ <div
143
+ v-if="showMinutes"
144
+ class="item-container"
145
+ :class="{ dropshade: clockStyle == 'dials' }"
146
+ >
147
+ <div class="unit-label-container" :class="clockStyle">min</div>
148
+ <div class="unit-container contrast-border" :class="clockStyle">
149
+ <div v-if="clockStyle == 'windows'" :class="fontClass">
150
+ {{ minutes }}
151
+ </div>
152
+ <transition v-if="clockStyle == 'dials'" name="slide" mode="out-in">
153
+ <div :key="minutes" :class="fontClass">{{ minutes }}</div>
154
+ </transition>
155
+ </div>
156
+ </div>
157
+
158
+ <!-- Seconds -->
159
+ <div
160
+ v-if="showSeconds"
161
+ class="item-container last"
162
+ :class="{ dropshade: clockStyle == 'dials' }"
163
+ >
164
+ <div class="unit-label-container last" :class="clockStyle">sec</div>
165
+ <div class="unit-container contrast-border" :class="clockStyle">
166
+ <div v-if="clockStyle == 'windows'" :class="fontClass">
167
+ {{ seconds }}
168
+ </div>
169
+ <transition v-if="clockStyle == 'dials'" name="slide" mode="out-in">
170
+ <div :key="seconds" :class="fontClass">{{ seconds }}</div>
171
+ </transition>
172
+ </div>
173
+ </div>
138
174
  </div>
139
175
  </div>
140
176
  </div>
@@ -195,10 +231,6 @@ onMounted(() => {
195
231
  height: 36px;
196
232
  }
197
233
 
198
- /* numbers */
199
- .text-countdown-int {
200
- //color: $heading-color-6;
201
- }
202
234
  .countdown-timer.compact .text-countdown-unit {
203
235
  @apply pb-1;
204
236
  }
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { toRefs, computed } from "vue";
3
+
2
4
  interface Props {
3
5
  visible?: boolean;
4
6
  modalSize?: string;
@@ -0,0 +1,154 @@
1
+ <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+ import { cloneDeep } from "lodash-es";
4
+ import { useNavigationConfigStore } from "../../store/navigationConfig";
5
+ import { useTemplateConfigsStore } from "../../store/templateConfigs";
6
+ import { useNavigation } from "../../composables/useNavigation";
7
+
8
+ type AdditionalItems = {
9
+ [index: number]: Array<{
10
+ name: string;
11
+ url: string;
12
+ }>;
13
+ };
14
+
15
+ // props
16
+ type Props = {
17
+ additionalItems?: AdditionalItems;
18
+ };
19
+
20
+ const props = withDefaults(defineProps<Props>(), {
21
+ additionalItems: () => {
22
+ return {};
23
+ },
24
+ });
25
+
26
+ const { getEnabled } = useNavigationConfigStore();
27
+ const { globalConfigValue } = useTemplateConfigsStore();
28
+
29
+ // data
30
+ const { additionalItems } = toRefs(props);
31
+ const navItems = getEnabled();
32
+ const htmlHeader = globalConfigValue("html_header");
33
+ const open = ref<boolean>(false);
34
+
35
+ // methods
36
+ const { isExternalLink, formatLink } = useNavigation();
37
+ const toggle = () => {
38
+ open.value = !open.value;
39
+ };
40
+
41
+ // computed
42
+ const combinedNavItems = computed(() => {
43
+ const items = cloneDeep(navItems);
44
+
45
+ if (Object.keys(additionalItems.value).length > 0) {
46
+ // get index to insert items at.
47
+ Object.keys(additionalItems.value).forEach((index) => {
48
+ if (items[index] !== "undefined") {
49
+ for (let i = 0; i < additionalItems.value[index].length; i++) {
50
+ items.splice(index + i, 0, additionalItems.value[index][i]);
51
+ }
52
+ }
53
+ });
54
+ }
55
+
56
+ return items;
57
+ });
58
+ </script>
59
+
60
+ <template>
61
+ <div>
62
+ <div class="flex flex-col">
63
+ <header class="min-w-full flex sticky pin-t z-50">
64
+ <!-- Standard Screen Nav -->
65
+ <div
66
+ class="hidden flex-1 flex-col mx-auto min-w-full"
67
+ :class="combinedNavItems.length < 7 ? 'md:flex' : 'lg:flex'"
68
+ >
69
+ <CommonDynamicHtml
70
+ v-if="htmlHeader.length"
71
+ class="flex-initial mb-0"
72
+ :template="htmlHeader"
73
+ ></CommonDynamicHtml>
74
+
75
+ <nav class="flex flex-1 min-h-8 content-center">
76
+ <ul class="list-reset h-full">
77
+ <li v-for="(item, index) in combinedNavItems" :key="index">
78
+ <nuxt-link
79
+ v-if="!isExternalLink(item)"
80
+ :to="formatLink(item)"
81
+ exact
82
+ class="inline-block"
83
+ >
84
+ {{ item.label || item.name }}
85
+ </nuxt-link>
86
+ <a
87
+ v-else
88
+ :href="formatLink(item)"
89
+ :target="isExternalLink(item) ? '_blank' : ''"
90
+ >
91
+ {{ item.label || item.name }}
92
+ </a>
93
+ </li>
94
+ </ul>
95
+ </nav>
96
+ </div>
97
+
98
+ <!-- Mobile Nav -->
99
+ <div
100
+ class="flex flex-col content-start mx-auto min-w-full"
101
+ :class="combinedNavItems.length >= 7 ? 'lg:hidden' : 'md:hidden'"
102
+ >
103
+ <div class="mobile-nav flex flex-row justify-between">
104
+ <CommonDynamicHtml
105
+ v-if="htmlHeader.length"
106
+ class="flex-1"
107
+ :template="htmlHeader"
108
+ ></CommonDynamicHtml>
109
+
110
+ <div class="float-right p-2">
111
+ <button class="flex items-center px-3 py-2" @click="toggle">
112
+ <svg
113
+ class="fill-current h-3 w-3"
114
+ viewBox="0 0 20 20"
115
+ xmlns="http://www.w3.org/2000/svg"
116
+ >
117
+ <title>Menu</title>
118
+ <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
119
+ </svg>
120
+ </button>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="flex">
125
+ <nav :class="open ? 'flex' : 'hidden'" class="w-full">
126
+ <ul class="flex-col self-center list-reset mx-auto">
127
+ <li v-for="(item, index) in combinedNavItems" :key="index">
128
+ <nuxt-link
129
+ v-if="!isExternalLink(item)"
130
+ :to="formatLink(item)"
131
+ exact
132
+ class="block w-full text-center"
133
+ @click.native="toggle"
134
+ >
135
+ {{ item.label || item.name }}
136
+ </nuxt-link>
137
+
138
+ <a
139
+ v-if="isExternalLink(item)"
140
+ :href="formatLink(item)"
141
+ target="_blank"
142
+ @click.native="toggle"
143
+ >
144
+ {{ item.label || item.name }}
145
+ </a>
146
+ </li>
147
+ </ul>
148
+ </nav>
149
+ </div>
150
+ </div>
151
+ </header>
152
+ </div>
153
+ </div>
154
+ </template>
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { find, get } from "lodash-es";
3
- import { defineAsyncComponent } from "vue";
3
+ import { toRefs, computed, defineAsyncComponent } from "vue";
4
4
  import { Icon, Icons } from "../../models/icons";
5
5
 
6
6
  /**
@@ -6,7 +6,7 @@ import { useConferencesStore } from "../../store/conferences";
6
6
  import { useConferenceHelpers } from "../../composables/useConferenceHelpers";
7
7
 
8
8
  interface Props {
9
- conference?: Conference;
9
+ conference?: Conference | null;
10
10
  useEventText?: boolean;
11
11
  }
12
12
 
@@ -26,7 +26,7 @@ const {
26
26
  getConferenceRegUrl,
27
27
  getConferenceRegText,
28
28
  showConferenceRegButton,
29
- } = useConferenceHelpers(pastEvents);
29
+ } = useConferenceHelpers();
30
30
 
31
31
  const goEventPage = (conference: Conference) => {
32
32
  router.push(`/upcoming-events/${conference.id}`);
@@ -32,7 +32,7 @@ const {
32
32
  getConferenceRegUrl,
33
33
  getConferenceRegText,
34
34
  showConferenceRegButton,
35
- } = useConferenceHelpers(upcomingEvents);
35
+ } = useConferenceHelpers();
36
36
  const goEventPage = (conference: Conference) => {
37
37
  router.push(`/upcoming-events/${conference.id}`);
38
38
  };
@@ -1,6 +1,4 @@
1
1
  <script lang="ts" setup>
2
- import { PropType } from "vue";
3
-
4
2
  type Props = {
5
3
  errors: Array<string>;
6
4
  };
@@ -12,7 +10,7 @@ const { errors } = toRefs(props);
12
10
 
13
11
  <template>
14
12
  <div>
15
- <div v-if="errors" class="my-1 text-red-dark">
13
+ <div v-if="errors" class="my-1 text-red-500">
16
14
  <div v-for="error in errors">{{ error }}</div>
17
15
  </div>
18
16
  </div>
@@ -10,11 +10,11 @@ const props = withDefaults(defineProps<Props>(), {
10
10
  const { success } = toRefs(props);
11
11
 
12
12
  const errorClass = computed(() => {
13
- return "bg-red-100 border border-red-400 text-red-600 font-bold px-4 py-3 mb-4 rounded relative";
13
+ return "message-base bg-red-100 border-red-400 text-red-600";
14
14
  });
15
15
 
16
16
  const successClass = computed(() => {
17
- return "bg-green-100 border border-green-400 text-green-600 font-bold px-4 py-3 mb-4 rounded relative";
17
+ return "message-base bg-green-100 border-green-400 text-green-600";
18
18
  });
19
19
  </script>
20
20
 
@@ -23,3 +23,9 @@ const successClass = computed(() => {
23
23
  <slot class="pb-0" />
24
24
  </div>
25
25
  </template>
26
+
27
+ <style lang="scss" scoped>
28
+ .message-base {
29
+ @apply border font-bold px-4 py-3 mb-4 rounded relative;
30
+ }
31
+ </style>
@@ -1,6 +1,14 @@
1
1
  <script lang="ts" setup>
2
2
  import CloseIcon from "../../assets/svg/close-icon.svg";
3
3
 
4
+ type Props = {
5
+ placeholder: string;
6
+ };
7
+
8
+ const props = withDefaults(defineProps<Props>(), {
9
+ placeholder: "Search...",
10
+ });
11
+
4
12
  const value = ref<string>("");
5
13
 
6
14
  const emit = defineEmits<{
@@ -15,15 +23,15 @@ const clear = () => {
15
23
  </script>
16
24
 
17
25
  <template>
18
- <div class="relative">
26
+ <div class="flex flex-row items-center">
19
27
  <input
20
28
  v-model="value"
21
29
  type="text"
22
- class="w-full pl-2 pr-5 py-3"
23
- placeholder="Search..."
30
+ class="flex-1 pl-2 pr-5 py-1"
31
+ :placeholder="placeholder"
24
32
  @input="emit('onChange', value)"
25
33
  />
26
- <span class="pin-r absolute mt-3 mr-5 cursor-pointer" @click="clear">
34
+ <span class="flex-initial cursor-pointer px-4 py-2" @click="clear">
27
35
  <close-icon class="fill-current text-black" />
28
36
  </span>
29
37
  </div>
@@ -8,6 +8,8 @@ const form = ref({
8
8
  message: "",
9
9
  });
10
10
  const submitted = ref<boolean>(false);
11
+
12
+ // @todo add error handling to other form fields, or remove error fields from each field
11
13
  const errors = ref<[]>([]);
12
14
 
13
15
  const supportStore = useSupportStore();
@@ -20,9 +22,10 @@ const handleForm = () => {
20
22
  submitted.value = true;
21
23
  })
22
24
  .catch((error) => {
23
- errors.value = get(error.response.data, "errors", {});
25
+ console.log(error.response);
26
+ errors.value = get(error.response._data, "errors", {});
24
27
  errors.value.response = [
25
- "Error: " + get(error.response.data, "message", ""),
28
+ "Error: " + get(error.response._data, "message", ""),
26
29
  ];
27
30
  });
28
31
  };
@@ -77,7 +80,7 @@ const acceptNumber = () => {
77
80
  v-model="form.phone"
78
81
  placeholder="Phone"
79
82
  :required="false"
80
- type="text"
83
+ type="tel"
81
84
  @input="acceptNumber"
82
85
  />
83
86
  </div>
@@ -89,13 +92,13 @@ const acceptNumber = () => {
89
92
 
90
93
  <CommonTextArea v-model="form.message" />
91
94
 
92
- <CopmmonErrorField :errors="errors['message']" />
95
+ <CommonErrorField :errors="errors['message']" />
93
96
  </div>
94
97
 
98
+ <button class="btn btn-secondary" type="submit">Submit</button>
95
99
  <div class="mb-3">
96
100
  <CommonErrorField :errors="errors['response']" />
97
101
  </div>
98
- <button class="btn btn-secondary" type="submit">Submit</button>
99
102
  </form>
100
103
 
101
104
  <!-- Submitted Message -->
@@ -7,6 +7,7 @@ interface Props {
7
7
  }
8
8
 
9
9
  const props = withDefaults(defineProps<Props>(), {
10
+ isEnabled: false,
10
11
  color: "#4D4D4D",
11
12
  });
12
13
 
@@ -22,6 +22,7 @@ const changeInput = (e) => {
22
22
  class="form-input px-2 py-1"
23
23
  :type="type"
24
24
  :value="props.modelValue"
25
+ :placeholder="placeholder"
25
26
  @change="changeInput"
26
27
  />
27
28
  </template>
@@ -1,4 +1,6 @@
1
1
  <script lang="ts" setup>
2
+ import { ref, toRefs, computed } from "vue";
3
+
2
4
  type Props = {
3
5
  title?: string;
4
6
  tabContent?: {