CEventsCalendar.ts

calendarioeventi.ts
CMySingleEvent.ts
evento.ts
This commit is contained in:
Paolo Arena
2021-10-04 01:29:15 +02:00
parent 3aebf19a91
commit 76918f6b2c
31 changed files with 1068 additions and 561 deletions

View File

@@ -2288,29 +2288,29 @@ export const tools = {
}
},
getstrDateTimeEvent(mythis: any, myevent: IEvents, withhtml: boolean) {
getstrDateTimeEvent($t: any, myevent: IEvents, withhtml: boolean) {
let mystr = ''
// is same day?
if (this.getstrDate(myevent.dateTimeStart) === this.getstrDate(myevent.dateTimeEnd)) {
if (withhtml) {
mystr += `<span class="cal__where-content">${this.getstrDateLong(myevent.dateTimeStart)}</span>
<span class="cal__hours-content">${mythis.$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)}
${mythis.$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)}`
<span class="cal__hours-content">${$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)}
${$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)}`
} else {
mystr = `${this.getstrDateLong(myevent.dateTimeStart)}
${mythis.$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)}
${mythis.$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)}`
${$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)}
${$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)}`
}
} else {
mystr = `<span class="cal__where-content">${this.getstrDateLong(myevent.dateTimeStart)}</span>
<span class="cal__hours-content">${mythis.$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)} </span>
${mythis.$t('cal.enddate')} ${this.getstrDateLong(myevent.dateTimeEnd)}
<span class="cal__hours-content">${mythis.$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)} </span>`
<span class="cal__hours-content">${$t('cal.starttime')} ${this.getstrTime(myevent.dateTimeStart)} </span>
${$t('cal.enddate')} ${this.getstrDateLong(myevent.dateTimeEnd)}
<span class="cal__hours-content">${$t('cal.endtime')} ${this.getstrTime(myevent.dateTimeEnd)} </span>`
}
if (myevent.infoextra) {
mystr += `<span class="cal__hours">
<span class="cal__hours-title">${mythis.$t('cal.hours')}: </span>
<span class="cal__hours-title">${$t('cal.hours')}: </span>
<span class="cal__hours-content">${myevent.infoextra} </span>
</span>
</span>`