fix: add special requests to store
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -22,7 +22,7 @@ const specialRequestsSchema = z
|
||||
.object({
|
||||
floorPreference: z.nativeEnum(FloorPreference).optional(),
|
||||
elevatorPreference: z.nativeEnum(ElevatorPreference).optional(),
|
||||
comments: z.string().optional(),
|
||||
comments: z.string().default(""),
|
||||
})
|
||||
.optional()
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
.accordion:not(:last-child) .iconWrapper::after {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
bottom: calc(0px - var(--Spacing-x7));
|
||||
bottom: calc(0px - var(--Spacing-x5));
|
||||
top: var(--circle-height);
|
||||
|
||||
content: "";
|
||||
|
||||
Reference in New Issue
Block a user