@explorer-1/vue 0.2.5 → 0.2.7
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/explorer-1-vue.js +2612 -2556
- package/dist/explorer-1-vue.umd.cjs +14 -12
- package/dist/src/components/CalendarButton/CalendarButton.vue.d.ts +3 -2
- package/dist/src/components/EventCard/EventCard.vue.d.ts +9 -4
- package/dist/src/components/EventDetailHero/EventDetailHero.vue.d.ts +11 -0
- package/dist/src/components/NavDesktopEdu/NavDesktopEdu.stories.d.ts +58 -11
- package/dist/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.d.ts +57 -29
- package/dist/src/utils/mixins.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/BaseButton/BaseButton.vue +1 -1
- package/src/components/BaseImage/BaseImage.vue +1 -1
- package/src/components/BaseTag/BaseTag.vue +2 -2
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +3 -2
- package/src/components/BlockImage/BlockImageStandard.vue +1 -1
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +2 -2
- package/src/components/BlockLinkCard/BlockLinkCard.vue +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +29 -27
- package/src/components/BlockRelatedLinks/RelatedLink.vue +3 -3
- package/src/components/BlockVideo/BlockVideo.vue +1 -1
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +1 -1
- package/src/components/CalendarButton/CalendarButton.vue +9 -10
- package/src/components/EventCard/EventCard.vue +22 -8
- package/src/components/EventDetailHero/EventDetailHero.vue +45 -21
- package/src/components/HeroMedia/HeroMedia.vue +2 -2
- package/src/components/MixinCarousel/MixinCarousel.vue +2 -2
- package/src/components/NavDesktop/NavDesktopDropdown.vue +1 -1
- package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +6 -15
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +35 -9
- package/src/components/NavHeading/NavHeading.stories.js +1 -1
- package/src/components/NavHeading/NavHeading.vue +1 -1
- package/src/components/NavLinkList/NavLinkList.vue +1 -1
- package/src/components/NavMobile/NavMobile.vue +36 -11
- package/src/components/ShareButtons/ShareButtons.vue +1 -1
- package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +1 -1
- package/src/components/TheFooter/TheFooter.vue +18 -2
- package/src/templates/PageEventDetail/PageEventDetail.vue +2 -1
- package/src/templates/PageNewsDetail/PageNewsDetail.vue +3 -1
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +146 -104
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.vue +101 -50
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.vue +1 -1
- package/src/utils/mixins.ts +18 -14
- package/tsconfig.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="data"
|
|
4
|
-
class="PageEduEventDetail
|
|
4
|
+
class="PageEduEventDetail ThemeVariantLight"
|
|
5
|
+
:class="{
|
|
6
|
+
'pt-5 lg:pt-12': heroIsInline
|
|
7
|
+
}"
|
|
5
8
|
itemscope
|
|
6
9
|
itemtype="http://schema.org/Event"
|
|
7
10
|
>
|
|
@@ -25,7 +28,28 @@
|
|
|
25
28
|
itemprop="description"
|
|
26
29
|
:content="data.summary || data.body"
|
|
27
30
|
/>
|
|
28
|
-
|
|
31
|
+
<div
|
|
32
|
+
v-if="!heroIsInline"
|
|
33
|
+
class="relative max-w-screen-3xl mx-auto -mt-1"
|
|
34
|
+
>
|
|
35
|
+
<!-- hero image -->
|
|
36
|
+
<HeroMedia
|
|
37
|
+
class="md:mb-12 lg:mb-18 mb-10"
|
|
38
|
+
:image="data.eventImage"
|
|
39
|
+
:constrain="data.heroConstrain"
|
|
40
|
+
/>
|
|
41
|
+
<div
|
|
42
|
+
v-if="formattedSplitEventDates"
|
|
43
|
+
class="ThemeVariantLight absolute top-0 left-0 z-10 px-4 py-4 text-center text-white bg-primary print:hidden"
|
|
44
|
+
>
|
|
45
|
+
<div class="font-extrabold text-6xl leading-tight tracking-wider">
|
|
46
|
+
{{ formattedSplitEventDates.month }}
|
|
47
|
+
</div>
|
|
48
|
+
<div class="text-subtitle">
|
|
49
|
+
{{ formattedSplitEventDates.year }}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
29
53
|
<LayoutHelper
|
|
30
54
|
indent="col-2"
|
|
31
55
|
class="mb-6 lg:mb-12"
|
|
@@ -47,6 +71,14 @@
|
|
|
47
71
|
>
|
|
48
72
|
{{ data.title }}
|
|
49
73
|
</BaseHeading>
|
|
74
|
+
<div
|
|
75
|
+
v-if="data.targetAudience"
|
|
76
|
+
class="text-body-lg mt-3 mb-6"
|
|
77
|
+
>
|
|
78
|
+
<strong>Target Audience:</strong>
|
|
79
|
+
|
|
80
|
+
{{ data.targetAudience }}
|
|
81
|
+
</div>
|
|
50
82
|
<ShareButtonsEdu
|
|
51
83
|
class="mt-4"
|
|
52
84
|
:title="data.title"
|
|
@@ -56,8 +88,11 @@
|
|
|
56
88
|
|
|
57
89
|
<LayoutHelper indent="col-2">
|
|
58
90
|
<EventDetailHero
|
|
91
|
+
v-if="heroIsInline"
|
|
59
92
|
:image="data.eventImage"
|
|
60
93
|
:start-date-split="formattedSplitEventDates"
|
|
94
|
+
:constrain="data.heroConstrain"
|
|
95
|
+
:ongoing="data.ongoing"
|
|
61
96
|
/>
|
|
62
97
|
|
|
63
98
|
<!-- Event details -->
|
|
@@ -67,17 +102,18 @@
|
|
|
67
102
|
:class="data.registerLink && data.registerLink.length > 0 ? '' : 'lg:mb-10'"
|
|
68
103
|
>
|
|
69
104
|
<div
|
|
70
|
-
v-if="
|
|
105
|
+
v-if="data.ongoing || data.customDate || formattedEventDates"
|
|
71
106
|
class="PageEduEventDetail__Metadata text-primary"
|
|
107
|
+
:class="{ 'flex-2': data.customDate }"
|
|
72
108
|
>
|
|
73
|
-
<IconCalendar class="relative mr-3 text-[1.2rem]" />
|
|
74
|
-
<span>{{
|
|
109
|
+
<IconCalendar class="relative mr-3 lg:mr-2 xl:mr-3 text-[1.2rem]" />
|
|
110
|
+
<span>{{ data.ongoing ? 'Ongoing' : data.customDate || formattedEventDates }}</span>
|
|
75
111
|
</div>
|
|
76
112
|
<div
|
|
77
113
|
v-show="displayTime"
|
|
78
114
|
class="PageEduEventDetail__Metadata text-primary"
|
|
79
115
|
>
|
|
80
|
-
<IconTime class="relative mr-3" />
|
|
116
|
+
<IconTime class="relative mr-3 lg:mr-2 xl:mr-3" />
|
|
81
117
|
<span>{{ displayTime }}</span>
|
|
82
118
|
</div>
|
|
83
119
|
<!--Virtual location -->
|
|
@@ -96,7 +132,7 @@
|
|
|
96
132
|
itemprop="name"
|
|
97
133
|
:content="data.locationName"
|
|
98
134
|
/>
|
|
99
|
-
<IconLocation class="relative mr-3" />
|
|
135
|
+
<IconLocation class="relative mr-3 lg:mr-2 xl:mr-3" />
|
|
100
136
|
<BaseLink
|
|
101
137
|
variant="none"
|
|
102
138
|
class="text-action"
|
|
@@ -109,13 +145,14 @@
|
|
|
109
145
|
<!-- Normal location -->
|
|
110
146
|
<div
|
|
111
147
|
v-else-if="data.locationName"
|
|
148
|
+
min-
|
|
112
149
|
class="PageEduEventDetail__Metadata text-primary"
|
|
113
150
|
>
|
|
114
151
|
<meta
|
|
115
152
|
itemprop="location"
|
|
116
153
|
:content="data.locationName"
|
|
117
154
|
/>
|
|
118
|
-
<IconLocation class="relative mr-3" />
|
|
155
|
+
<IconLocation class="relative mr-3 lg:mr-2 xl:mr-3" />
|
|
119
156
|
<BaseLink
|
|
120
157
|
v-if="data.locationLink"
|
|
121
158
|
variant="none"
|
|
@@ -126,13 +163,6 @@
|
|
|
126
163
|
</BaseLink>
|
|
127
164
|
<span v-else>{{ data.locationName }}</span>
|
|
128
165
|
</div>
|
|
129
|
-
<div
|
|
130
|
-
v-if="data.targetAudience"
|
|
131
|
-
class="PageEduEventDetail__Metadata text-primary"
|
|
132
|
-
>
|
|
133
|
-
<IconUser class="relative mr-3 text-[.9rem]" />
|
|
134
|
-
<span>{{ data.targetAudience }}</span>
|
|
135
|
-
</div>
|
|
136
166
|
|
|
137
167
|
<div class="PageEduEventDetail__Buttons">
|
|
138
168
|
<BaseButton
|
|
@@ -172,6 +202,12 @@
|
|
|
172
202
|
class="grid-cols-10 lg:grid -mx-4 lg:mx-0"
|
|
173
203
|
>
|
|
174
204
|
<div class="col-span-7">
|
|
205
|
+
<BlockText
|
|
206
|
+
v-if="data.topper && data.topper.length > 2"
|
|
207
|
+
class="lg:mb-8 mb-5 px-4 lg:px-0"
|
|
208
|
+
:text="data.topper"
|
|
209
|
+
/>
|
|
210
|
+
|
|
175
211
|
<p
|
|
176
212
|
v-if="data.summary"
|
|
177
213
|
class="BlockText text-body-lg mb-8 px-4 lg:px-0 font-semibold"
|
|
@@ -204,7 +240,7 @@
|
|
|
204
240
|
>
|
|
205
241
|
<div class="flex flex-col flex-wrap justify-start md:flex-row md:-mx-4">
|
|
206
242
|
<div
|
|
207
|
-
v-for="(
|
|
243
|
+
v-for="(item, index) in data.speakers"
|
|
208
244
|
:key="index"
|
|
209
245
|
class="flex flex-1 mb-6 md:flex-none md:flex-wrap md:mx-4 md:w-56"
|
|
210
246
|
>
|
|
@@ -215,10 +251,10 @@
|
|
|
215
251
|
transparent-mode
|
|
216
252
|
>
|
|
217
253
|
<BaseImage
|
|
218
|
-
v-if="speaker.image && speaker.image.src"
|
|
219
|
-
:src="speaker.image.src.url"
|
|
220
|
-
:width="speaker.image.src.width"
|
|
221
|
-
:height="speaker.image.src.height"
|
|
254
|
+
v-if="item.speaker.image && item.speaker.image.src"
|
|
255
|
+
:src="item.speaker.image.src.url"
|
|
256
|
+
:width="item.speaker.image.src.width"
|
|
257
|
+
:height="item.speaker.image.src.height"
|
|
222
258
|
alt=""
|
|
223
259
|
class="object-cover"
|
|
224
260
|
loading="lazy"
|
|
@@ -232,30 +268,30 @@
|
|
|
232
268
|
</div>
|
|
233
269
|
<div class="flex-1 h-full">
|
|
234
270
|
<h3
|
|
235
|
-
v-if="speaker.name"
|
|
271
|
+
v-if="item.speaker.name"
|
|
236
272
|
class="my-3 text-lg !font-normal !tracking-normal leading-none"
|
|
237
273
|
>
|
|
238
274
|
<BaseLink
|
|
239
|
-
v-if="speaker.internalLink || speaker.externalLink"
|
|
275
|
+
v-if="item.speaker.internalLink || item.speaker.externalLink"
|
|
240
276
|
link-class="no-underline normal-case"
|
|
241
|
-
:to="speaker.internalLink ? speaker.internalLink.url : null"
|
|
242
|
-
:href="speaker.externalLink ? speaker.externalLink : null"
|
|
277
|
+
:to="item.speaker.internalLink ? item.speaker.internalLink.url : null"
|
|
278
|
+
:href="item.speaker.externalLink ? item.speaker.externalLink : null"
|
|
243
279
|
external-target-blank
|
|
244
280
|
>
|
|
245
|
-
{{ speaker.name }}
|
|
281
|
+
{{ item.speaker.name }}
|
|
246
282
|
</BaseLink>
|
|
247
283
|
<template v-else>
|
|
248
|
-
{{ speaker.name }}
|
|
284
|
+
{{ item.speaker.name }}
|
|
249
285
|
</template>
|
|
250
286
|
</h3>
|
|
251
287
|
<p
|
|
252
|
-
v-if="speaker.title"
|
|
288
|
+
v-if="item.speaker.title"
|
|
253
289
|
class="mb-3 text-gray-mid-dark"
|
|
254
290
|
>
|
|
255
|
-
{{ speaker.title }}
|
|
291
|
+
{{ item.speaker.title }}
|
|
256
292
|
</p>
|
|
257
293
|
<p class="text-action capitalize">
|
|
258
|
-
{{ speaker.host }}
|
|
294
|
+
{{ item.speaker.host }}
|
|
259
295
|
</p>
|
|
260
296
|
</div>
|
|
261
297
|
</div>
|
|
@@ -280,7 +316,7 @@
|
|
|
280
316
|
<LayoutHelper
|
|
281
317
|
v-if="data.relatedEvents?.length"
|
|
282
318
|
indent="col-1"
|
|
283
|
-
class="my-12 lg:my-16"
|
|
319
|
+
class="my-12 lg:my-16 px-0"
|
|
284
320
|
>
|
|
285
321
|
<BlockLinkCarousel
|
|
286
322
|
item-type="cards"
|
|
@@ -292,7 +328,7 @@
|
|
|
292
328
|
<!-- Related Content -->
|
|
293
329
|
<div
|
|
294
330
|
v-if="data.relatedContent?.length"
|
|
295
|
-
class="bg-stars bg-[#15003B] lg:py-24 lg:mt-24 py-12 mt-12"
|
|
331
|
+
class="bg-stars bg-[#15003B] lg:py-24 lg:mt-24 py-12 mt-12 print:px-4"
|
|
296
332
|
>
|
|
297
333
|
<BlockLinkCarousel
|
|
298
334
|
class="ThemeVariantDark"
|
|
@@ -315,10 +351,10 @@ import BaseHeading from './../../../components/BaseHeading/BaseHeading.vue'
|
|
|
315
351
|
import BaseTag from './../../../components/BaseTag/BaseTag.vue'
|
|
316
352
|
import ShareButtonsEdu from './../../../components/ShareButtonsEdu/ShareButtonsEdu.vue'
|
|
317
353
|
import EventDetailHero from './../../../components/EventDetailHero/EventDetailHero.vue'
|
|
354
|
+
import HeroMedia from './../../../components/HeroMedia/HeroMedia.vue'
|
|
318
355
|
import IconCalendar from './../../../components/Icons/IconCalendar.vue'
|
|
319
356
|
import IconLocation from './../../../components/Icons/IconLocation.vue'
|
|
320
357
|
import IconTime from './../../../components/Icons/IconTime.vue'
|
|
321
|
-
import IconUser from './../../../components/Icons/IconUser.vue'
|
|
322
358
|
import BaseLink from './../../../components/BaseLink/BaseLink.vue'
|
|
323
359
|
import BaseButton from './../../../components/BaseButton/BaseButton.vue'
|
|
324
360
|
import CalendarButton from './../../../components/CalendarButton/CalendarButton.vue'
|
|
@@ -327,6 +363,8 @@ import BaseImagePlaceholder from './../../../components/BaseImagePlaceholder/Bas
|
|
|
327
363
|
import BaseImage from './../../../components/BaseImage/BaseImage.vue'
|
|
328
364
|
import BlockRelatedLinks from './../../../components/BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
329
365
|
import BlockLinkCarousel from './../../../components/BlockLinkCarousel/BlockLinkCarousel.vue'
|
|
366
|
+
import BlockText from './../../../components/BlockText/BlockText.vue'
|
|
367
|
+
|
|
330
368
|
// @ts-ignore
|
|
331
369
|
import PlaceholderPortrait from '@explorer-1/common/src/images/svg/placeholder-portrait.svg'
|
|
332
370
|
|
|
@@ -338,10 +376,10 @@ export default defineComponent({
|
|
|
338
376
|
BaseTag,
|
|
339
377
|
ShareButtonsEdu,
|
|
340
378
|
EventDetailHero,
|
|
379
|
+
HeroMedia,
|
|
341
380
|
IconCalendar,
|
|
342
381
|
IconLocation,
|
|
343
382
|
IconTime,
|
|
344
|
-
IconUser,
|
|
345
383
|
BaseLink,
|
|
346
384
|
BaseButton,
|
|
347
385
|
CalendarButton,
|
|
@@ -349,7 +387,8 @@ export default defineComponent({
|
|
|
349
387
|
BaseImagePlaceholder,
|
|
350
388
|
BaseImage,
|
|
351
389
|
BlockRelatedLinks,
|
|
352
|
-
BlockLinkCarousel
|
|
390
|
+
BlockLinkCarousel,
|
|
391
|
+
BlockText
|
|
353
392
|
},
|
|
354
393
|
props: {
|
|
355
394
|
data: {
|
|
@@ -364,22 +403,35 @@ export default defineComponent({
|
|
|
364
403
|
}
|
|
365
404
|
},
|
|
366
405
|
computed: {
|
|
406
|
+
startDateTimeForFormatting(): string {
|
|
407
|
+
return this.data?.startDatetime || this.data?.startDate
|
|
408
|
+
},
|
|
367
409
|
displayTime(): string {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
410
|
+
if (!this.data?.customDate) {
|
|
411
|
+
const time =
|
|
412
|
+
this.data && this.startDateTimeForFormatting
|
|
413
|
+
? mixinFormatEventTimeInHoursAndMinutes(
|
|
414
|
+
this.startDateTimeForFormatting,
|
|
415
|
+
this.data.endDatetime,
|
|
416
|
+
this.data.endTime
|
|
417
|
+
)
|
|
418
|
+
: undefined
|
|
419
|
+
return time ? time.replaceAll(':00', '') : ''
|
|
420
|
+
}
|
|
421
|
+
return ''
|
|
375
422
|
},
|
|
376
|
-
formattedEventDates(): string {
|
|
377
|
-
return this.data
|
|
423
|
+
formattedEventDates(): string | undefined {
|
|
424
|
+
return this.data && this.startDateTimeForFormatting
|
|
425
|
+
? mixinFormatEventDates(this.startDateTimeForFormatting, this.data.endDatetime)
|
|
426
|
+
: undefined
|
|
378
427
|
},
|
|
379
428
|
formattedSplitEventDates() {
|
|
380
|
-
return this.data
|
|
381
|
-
? mixinFormatSplitEventDates(this.
|
|
429
|
+
return this.data && this.startDateTimeForFormatting
|
|
430
|
+
? mixinFormatSplitEventDates(this.startDateTimeForFormatting, this.data.endDatetime)
|
|
382
431
|
: undefined
|
|
432
|
+
},
|
|
433
|
+
heroIsInline(): boolean {
|
|
434
|
+
return this.data?.heroPosition === 'inline'
|
|
383
435
|
}
|
|
384
436
|
}
|
|
385
437
|
})
|
|
@@ -389,12 +441,11 @@ export default defineComponent({
|
|
|
389
441
|
.PageEduEventDetail__Metadata {
|
|
390
442
|
@apply flex;
|
|
391
443
|
@apply items-baseline;
|
|
392
|
-
@apply mr-
|
|
444
|
+
@apply mr-4 md:mr-4 xl:mr-12;
|
|
393
445
|
@apply mb-5 lg:mb-7;
|
|
446
|
+
@apply lg:max-w-[17rem] lg:min-w-[10rem];
|
|
394
447
|
|
|
395
448
|
span {
|
|
396
|
-
max-width: 230px;
|
|
397
|
-
min-width: 110px;
|
|
398
449
|
@apply text-gray-dark;
|
|
399
450
|
}
|
|
400
451
|
|
|
@@ -409,8 +460,8 @@ export default defineComponent({
|
|
|
409
460
|
@apply lg:ml-auto;
|
|
410
461
|
@apply mt-10;
|
|
411
462
|
@apply lg:mt-0;
|
|
412
|
-
|
|
413
|
-
max-
|
|
463
|
+
@apply text-center;
|
|
464
|
+
@apply max-w-[17rem];
|
|
414
465
|
}
|
|
415
466
|
.bg-stars .MixinCarousel__Heading {
|
|
416
467
|
@apply text-white;
|
|
@@ -192,7 +192,7 @@ export default defineComponent({
|
|
|
192
192
|
<!-- related content -->
|
|
193
193
|
<BlockLinkCarousel
|
|
194
194
|
item-type="cards"
|
|
195
|
-
class="lg:my-24 my-12"
|
|
195
|
+
class="lg:my-24 my-12 print:px-4"
|
|
196
196
|
:heading="data.relatedContentHeading"
|
|
197
197
|
:items="data.relatedContent"
|
|
198
198
|
/>
|
package/src/utils/mixins.ts
CHANGED
|
@@ -57,6 +57,8 @@ export type lightboxGalleryObject = {
|
|
|
57
57
|
|
|
58
58
|
export interface EventDateObject {
|
|
59
59
|
day: string
|
|
60
|
+
month: string
|
|
61
|
+
year: string
|
|
60
62
|
monthAndYear: string
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -285,6 +287,8 @@ export const mixinFormatSplitEventDates = (
|
|
|
285
287
|
const startDateDayjs = dayjs(startDatetime)
|
|
286
288
|
|
|
287
289
|
let day = startDateDayjs.format('D')
|
|
290
|
+
const month = startDateDayjs.format('MMM').replace('.', '')
|
|
291
|
+
const year = startDateDayjs.format('YYYY')
|
|
288
292
|
const monthAndYear = startDateDayjs.format('MMM YYYY')
|
|
289
293
|
|
|
290
294
|
if (endDatetime) {
|
|
@@ -299,7 +303,7 @@ export const mixinFormatSplitEventDates = (
|
|
|
299
303
|
}
|
|
300
304
|
// Otherwise, we only show the start date
|
|
301
305
|
}
|
|
302
|
-
return { day, monthAndYear }
|
|
306
|
+
return { day, month, year, monthAndYear }
|
|
303
307
|
}
|
|
304
308
|
|
|
305
309
|
// return event dates formatted for listing cards
|
|
@@ -335,27 +339,27 @@ export const mixinFormatEventTimeInHoursAndMinutes = (
|
|
|
335
339
|
endDatetime?: string,
|
|
336
340
|
endTime?: string
|
|
337
341
|
): string => {
|
|
338
|
-
// Only display time if event spans less than one day
|
|
339
342
|
const startDateDayjs = dayjs(startDatetime)
|
|
340
343
|
let time = ''
|
|
341
344
|
|
|
342
345
|
if (endDatetime) {
|
|
343
346
|
const endDateDayjs = dayjs(endDatetime)
|
|
344
|
-
if
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
)
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
time = `${startDateDayjs.format('h:mm a')} - ${endDateDayjs.format('h:mm a z')}`
|
|
354
|
-
}
|
|
347
|
+
// Only display time if event spans less than one day
|
|
348
|
+
// if (
|
|
349
|
+
// endDateDayjs.diff(startDateDayjs, 'hour') <= 24 &&
|
|
350
|
+
// endDateDayjs.diff(startDateDayjs, 'day') === 0
|
|
351
|
+
// ) {
|
|
352
|
+
// Event is less than 24 hours and spans 1 day
|
|
353
|
+
if (endTime) {
|
|
354
|
+
if (startDateDayjs.format('a') === endDateDayjs.format('a')) {
|
|
355
|
+
time = `${startDateDayjs.format('h:mm')} - ${endDateDayjs.format('h:mm a z')}`
|
|
355
356
|
} else {
|
|
356
|
-
time = `${startDateDayjs.format('h:mm a z')}`
|
|
357
|
+
time = `${startDateDayjs.format('h:mm a')} - ${endDateDayjs.format('h:mm a z')}`
|
|
357
358
|
}
|
|
359
|
+
} else {
|
|
360
|
+
time = `${startDateDayjs.format('h:mm a z')}`
|
|
358
361
|
}
|
|
362
|
+
// }
|
|
359
363
|
}
|
|
360
364
|
return time
|
|
361
365
|
}
|