Fix weekStart passThrough + allow all days (#3108)

This commit is contained in:
Alex van Andel authored and GitHub committed 2022-06-20 10:01:57 +01:00
1 parent d440458794
commit 5ca914b32e
2 files changed
+12

No files matched your search

@@ -664,6 +664,13 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
)*/}
</div>
<SlotPicker
weekStart={
typeof profile.weekStart === "string"
? (["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].indexOf(
profile.weekStart
) as 0 | 1 | 2 | 3 | 4 | 5 | 6)
: profile.weekStart /* Allows providing weekStart as number */
}
eventType={eventType}
timezoneDropdown={timezoneDropdown}
timeZone={timeZone}
+5
View File
@@ -358,6 +358,11 @@ function SettingsView(props: ComponentProps<typeof Settings> & { localeProp: str
options={[
{ value: "Sunday", label: nameOfDay(props.localeProp, 0) },
{ value: "Monday", label: nameOfDay(props.localeProp, 1) },
{ value: "Tuesday", label: nameOfDay(props.localeProp, 2) },
{ value: "Wednesday", label: nameOfDay(props.localeProp, 3) },
{ value: "Thursday", label: nameOfDay(props.localeProp, 4) },
{ value: "Friday", label: nameOfDay(props.localeProp, 5) },
{ value: "Saturday", label: nameOfDay(props.localeProp, 6) },
]}
/>
</div>