-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: align pickup times with API data
Fixed weekday ordering and mapped pickup times accurately to match API data. Closes #INT-663
- Loading branch information
Clerise Swart
committed
Oct 30, 2024
1 parent
32678a1
commit 6694c35
Showing
3 changed files
with
77 additions
and
47 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
110 changes: 69 additions & 41 deletions
110
.../MyParcelDeliveryOptions/Pickup/PickupLocationOpeningHours/PickupLocationOpeningHours.vue
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
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,12 +1,12 @@ | ||
import {format} from 'date-fns'; | ||
import {type DateLike, normalizeDate} from '@vueuse/core'; | ||
import {type Timestamp} from '@myparcel/sdk'; | ||
import {DEFAULT_TIMEZONE, DEFAULT_TIMEZONE_TYPE, API_DATE_FORMAT} from '../data'; | ||
import {API_DATE_FORMAT} from '../data'; | ||
|
||
export const createTimestamp = (date: DateLike = new Date()): Timestamp => { | ||
return { | ||
date: format(normalizeDate(date), API_DATE_FORMAT), | ||
timezone: DEFAULT_TIMEZONE, | ||
timezone_type: DEFAULT_TIMEZONE_TYPE, | ||
timezone: 'GMT', | ||
timezone_type: 0, | ||
}; | ||
}; |