-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff1bdc9
commit 26c58b8
Showing
10 changed files
with
451 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
presets: ['@vue/cli-plugin-babel/preset'], | ||
presets: ['@vue/cli-plugin-babel/preset'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
preset: '@vue/cli-plugin-unit-jest', | ||
preset: '@vue/cli-plugin-unit-jest', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,65 @@ | ||
<template> | ||
<i class="vhd__parent-bullet"> | ||
<i | ||
v-if="previousBooking && duplicateBookingDates.includes(formatDate)" | ||
class="vhd__bullet" | ||
:style="previousBooking.style" | ||
:class="[ | ||
{ | ||
vhd__checkInCheckOut: duplicateBookingDates.includes(formatDate), | ||
}, | ||
]" | ||
/> | ||
<i | ||
v-if="previousBooking && duplicateBookingDates.includes(formatDate)" | ||
class="vhd__pipe vhd__checkInCheckOut" | ||
:style="previousBooking.style" | ||
/> | ||
<i | ||
v-if=" | ||
currentBooking && | ||
(currentBooking.checkInDate === formatDate || currentBooking.checkOutDate === formatDate) | ||
" | ||
class="vhd__bullet" | ||
:style="currentBooking.style" | ||
:class="[ | ||
{ | ||
vhd__checkIn: currentBooking.checkInDate === formatDate, | ||
vhd__checkOut: currentBooking.checkOutDate === formatDate, | ||
}, | ||
]" | ||
/> | ||
<i | ||
v-if="currentBooking" | ||
class="vhd__pipe" | ||
:class="[ | ||
{ | ||
vhd__checkIn: currentBooking.checkInDate === formatDate, | ||
vhd__checkOut: currentBooking.checkOutDate === formatDate, | ||
}, | ||
]" | ||
:style="currentBooking.style" | ||
/> | ||
</i> | ||
<i class="vhd__parent-bullet"> | ||
<i | ||
v-if="previousBooking && duplicateBookingDates.includes(formatDate)" | ||
class="vhd__bullet" | ||
:style="previousBooking.style" | ||
:class="[ | ||
{ | ||
vhd__checkInCheckOut: duplicateBookingDates.includes(formatDate), | ||
}, | ||
]" | ||
/> | ||
<i | ||
v-if="previousBooking && duplicateBookingDates.includes(formatDate)" | ||
class="vhd__pipe vhd__checkInCheckOut" | ||
:style="previousBooking.style" | ||
/> | ||
<i | ||
v-if="currentBooking && (currentBooking.checkInDate === formatDate || currentBooking.checkOutDate === formatDate)" | ||
class="vhd__bullet" | ||
:style="currentBooking.style" | ||
:class="[ | ||
{ | ||
vhd__checkIn: currentBooking.checkInDate === formatDate, | ||
vhd__checkOut: currentBooking.checkOutDate === formatDate, | ||
}, | ||
]" | ||
/> | ||
<i | ||
v-if="currentBooking" | ||
class="vhd__pipe" | ||
:class="[ | ||
{ | ||
vhd__checkIn: currentBooking.checkInDate === formatDate, | ||
vhd__checkOut: currentBooking.checkOutDate === formatDate, | ||
}, | ||
]" | ||
:style="currentBooking.style" | ||
/> | ||
</i> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'BookingBullet', | ||
props: { | ||
currentBooking: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
duplicateBookingDates: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
formatDate: { | ||
type: String, | ||
default: '', | ||
}, | ||
previousBooking: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
name: 'BookingBullet', | ||
props: { | ||
currentBooking: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
duplicateBookingDates: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
formatDate: { | ||
type: String, | ||
default: '', | ||
}, | ||
previousBooking: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
<template> | ||
<div | ||
class="vhd__datepicker__input" | ||
@click="toggleDatepicker" | ||
@keyup.enter.stop.prevent="toggleDatepicker" | ||
data-qa="vhd__datepickerInput" | ||
:class="inputClass" | ||
:tabindex="tabIndex" | ||
> | ||
{{ inputDate ? inputDate : i18n[inputDateType] }} | ||
</div> | ||
<div | ||
class="vhd__datepicker__input" | ||
@click="toggleDatepicker" | ||
@keyup.enter.stop.prevent="toggleDatepicker" | ||
data-qa="vhd__datepickerInput" | ||
:class="inputClass" | ||
:tabindex="tabIndex" | ||
> | ||
{{ inputDate ? inputDate : i18n[inputDateType] }} | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
isOpen: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
inputDate: { | ||
type: String, | ||
default: null, | ||
}, | ||
inputDateType: { | ||
type: String, | ||
default: 'check-in', | ||
}, | ||
singleDaySelection: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
toggleDatepicker: { | ||
type: Function, | ||
required: true, | ||
}, | ||
i18n: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
computed: { | ||
inputClass() { | ||
return { | ||
'vhd__datepicker__input--is-active': this.isOpen && this.inputDate == null, | ||
'vhd__datepicker__input--single-date': this.singleDaySelection, | ||
} | ||
}, | ||
tabIndex() { | ||
return this.inputDateType === 'check-in' ? 0 : -1 | ||
}, | ||
props: { | ||
isOpen: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
inputDate: { | ||
type: String, | ||
default: null, | ||
}, | ||
inputDateType: { | ||
type: String, | ||
default: 'check-in', | ||
}, | ||
singleDaySelection: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
toggleDatepicker: { | ||
type: Function, | ||
required: true, | ||
}, | ||
i18n: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
computed: { | ||
inputClass() { | ||
return { | ||
'vhd__datepicker__input--is-active': this.isOpen && this.inputDate == null, | ||
'vhd__datepicker__input--single-date': this.singleDaySelection, | ||
} | ||
}, | ||
tabIndex() { | ||
return this.inputDateType === 'check-in' ? 0 : -1 | ||
}, | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.