Browse Source

safari bugs and tyler's date bug

master
Spencer Flagg 3 years ago
parent
commit
c87d4515e0
5 changed files with 9 additions and 6 deletions
  1. +1
    -1
      assets/css/main.css
  2. +1
    -1
      components/DatePicker.vue
  3. +1
    -1
      components/FlightsFlyout.vue
  4. +4
    -1
      components/Map.vue
  5. +2
    -2
      pages/flights.vue

+ 1
- 1
assets/css/main.css View File

@ -51,7 +51,7 @@ main {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: baseline;
align-items: flex-end;
flex-wrap: wrap; flex-wrap: wrap;
} }

+ 1
- 1
components/DatePicker.vue View File

@ -39,7 +39,7 @@ export default {
startingDates () { startingDates () {
const listOfDates = [] const listOfDates = []
for (let index = 0; index < this.numberOfMonths; index++) { for (let index = 0; index < this.numberOfMonths; index++) {
const thisDate = new Date(this.startingDate.getFullYear(), this.startingDate.getMonth() + index, 1)
const thisDate = new Date(this.startingDate.getUTCFullYear(), this.startingDate.getUTCMonth() + index, 1)
listOfDates.push(thisDate) listOfDates.push(thisDate)
} }
return listOfDates return listOfDates

+ 1
- 1
components/FlightsFlyout.vue View File

@ -6,7 +6,7 @@
:class="['btn btn--primary',{'btn--empty': !selectedOrig.iata || !selectedDest.iata}]" :class="['btn btn--primary',{'btn--empty': !selectedOrig.iata || !selectedDest.iata}]"
> >
<span :class="['btn__content']"> <span :class="['btn__content']">
see fights
see flights
</span> </span>
</NuxtLink> </NuxtLink>
</div> </div>

+ 4
- 1
components/Map.vue View File

@ -175,7 +175,10 @@ export default {
50.44556513009691, 50.44556513009691,
-127.25240004101528 -127.25240004101528
] ]
]
],
options: {
tap: false
}
}, },
mapBoxAccessToken: 'pk.eyJ1IjoiZmx5bG9jYWwiLCJhIjoiY2t0OHUxZXB6MTVueTJ4cGVwOHRuc2s2NyJ9.YF9frLvISHfOuT7nqs3TNg', mapBoxAccessToken: 'pk.eyJ1IjoiZmx5bG9jYWwiLCJhIjoiY2t0OHUxZXB6MTVueTJ4cGVwOHRuc2s2NyJ9.YF9frLvISHfOuT7nqs3TNg',
mapBoxAttribution: 'FlyLocal | Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', mapBoxAttribution: 'FlyLocal | Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',

+ 2
- 2
pages/flights.vue View File

@ -200,7 +200,7 @@ export default {
// const tomorrow = addDays(new Date(), 1).toLocaleDateString('en-CA') // const tomorrow = addDays(new Date(), 1).toLocaleDateString('en-CA')
const scheduleFetchFilterFormula = `AND(Is_Current="Yes",Origin_IATA="${this.$route.params.o}",Destination_IATA="${this.$route.params.d}",Effective_End>"${today}",SEARCH("${new Date(this.$route.params.departure).getDay()}",Frequency)>0)`
const scheduleFetchFilterFormula = `AND(Is_Current="Yes",Origin_IATA="${this.$route.params.o}",Destination_IATA="${this.$route.params.d}",Effective_End>"${today}",SEARCH("${new Date(this.$route.params.departure).getUTCDay()}",Frequency)>0)`
// console.log(scheduleFetchFilterFormula) // console.log(scheduleFetchFilterFormula)
const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc' const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc'
@ -232,7 +232,7 @@ export default {
formattedDate (date) { formattedDate (date) {
const thisDate = new Date(date) const thisDate = new Date(date)
const month = thisDate.toLocaleString('en-us', { month: 'short' }) const month = thisDate.toLocaleString('en-us', { month: 'short' })
const year = ((thisDate.getFullYear() !== new Date().getFullYear()) ? ', ' + thisDate.getFullYear() : '')
const year = ((thisDate.getUTCFullYear() !== new Date().getUTCFullYear()) ? ', ' + thisDate.getUTCFullYear() : '')
return month + ' ' + thisDate.getUTCDate() + year return month + ' ' + thisDate.getUTCDate() + year
}, },
daysList (days) { daysList (days) {

Loading…
Cancel
Save