fix: add special requests to store

This commit is contained in:
Christel Westerberg
2024-12-11 15:19:43 +01:00
parent ed3879f6d2
commit 4872847ecb
10 changed files with 26 additions and 30 deletions

View File

@@ -53,9 +53,17 @@ export default function Details({ user, memberPrice }: DetailsProps) {
membershipNo: initialData.membershipNo,
phoneNumber: user?.phoneNumber ?? initialData.phoneNumber,
zipCode: initialData.zipCode,
specialRequests: initialData.specialRequests,
},
})
const noPreferenceItem = {
value: "",
label: intl.formatMessage({
id: "No preference",
}),
}
const onSubmit = useCallback(
(values: DetailsSchema) => {
updateDetails(values)
@@ -135,12 +143,7 @@ export default function Details({ user, memberPrice }: DetailsProps) {
label={intl.formatMessage({ id: "Floor preference" })}
name="specialRequests.floorPreference"
items={[
{
value: "",
label: intl.formatMessage({
id: "No preference",
}),
},
noPreferenceItem,
{
value: FloorPreference.HIGH,
label: intl.formatMessage({ id: FloorPreference.HIGH }),
@@ -156,12 +159,7 @@ export default function Details({ user, memberPrice }: DetailsProps) {
label={intl.formatMessage({ id: "Elevator preference" })}
name="specialRequests.elevatorPreference"
items={[
{
value: "",
label: intl.formatMessage({
id: "No preference",
}),
},
noPreferenceItem,
{
value: ElevatorPreference.AWAY_FROM_ELEVATOR,
label: intl.formatMessage({