diff --git a/src/page-modules/contact/refund/forms/refund-and-travel-guarantee/refundTaxiForm.tsx b/src/page-modules/contact/refund/forms/refund-and-travel-guarantee/refundTaxiForm.tsx index 99f828d20..886a580f7 100644 --- a/src/page-modules/contact/refund/forms/refund-and-travel-guarantee/refundTaxiForm.tsx +++ b/src/page-modules/contact/refund/forms/refund-and-travel-guarantee/refundTaxiForm.tsx @@ -4,7 +4,6 @@ import { ReasonForTransportFailure, TransportModeType } from '../../../types'; import { Line } from '../../..'; import { RefundFormEvents } from '../../events'; import { RefundContextProps } from '../../refundFormMachine'; -import { Typo } from '@atb/components/typography'; import { Fieldset, Input, @@ -31,26 +30,9 @@ export const RefundTaxiForm = ({ state, send }: RefundTaxiFormProps) => { return ( <>
- - {t(PageText.Contact.refund.refundTaxi.taxiReceipt.info)} - - - { - send({ - type: 'ON_INPUT_CHANGE', - inputName: 'attachments', - value: files, - }); - }} - errorMessage={t(state.context?.errorMessages['attachments']?.[0])} - /> { }) } /> - - {t(PageText.Contact.input.amount.info)} - + + { + send({ + type: 'ON_INPUT_CHANGE', + inputName: 'attachments', + value: files, + }); + }} + errorMessage={ + state.context?.errorMessages['attachments']?.[0] + ? t(state.context?.errorMessages['attachments']?.[0]) + : undefined + } + />
; const RefundSection = ({ state, send }: RefundSectionProps) => { const { t } = useTranslation(); + const ticketTypeOptions = PageText.Contact.input.ticketType.options.filter( + (option) => + option.id == TicketTypeId.SingleTicket || + option.id == TicketTypeId.PeriodTicket, + ); + return (
{ }); }} placeholder={t(PageText.Contact.input.ticketType.optionLabelRefund)} - options={PageText.Contact.input.ticketType.options} + options={ticketTypeOptions} isRequired error={ state.context?.errorMessages['ticketType']?.[0] @@ -49,35 +53,33 @@ const RefundSection = ({ state, send }: RefundSectionProps) => { : undefined } /> -
- - send({ - type: 'ON_INPUT_CHANGE', - inputName: 'showInputTravelCardNumber', - value: !state.context.showInputTravelCardNumber, - }) - } - /> - - send({ - type: 'ON_INPUT_CHANGE', - inputName: 'showInputTravelCardNumber', - value: !state.context.showInputTravelCardNumber, - }) - } - /> -
+ + send({ + type: 'ON_INPUT_CHANGE', + inputName: 'orderId', + value: e.target.value, + }) + } + modalContent={{ + description: t(PageText.Contact.input.orderId.description), + instruction: t(PageText.Contact.input.orderId.instruction), + bulletPoints: + PageText.Contact.input.orderId.descriptionBulletPoints.map( + (bulletPoint) => t(bulletPoint), + ), + }} + /> - {state.context.showInputTravelCardNumber && ( + {state.context.ticketType?.id === TicketTypeId.PeriodTicket && ( { /> )} - {!state.context.showInputTravelCardNumber && ( - - send({ - type: 'ON_INPUT_CHANGE', - inputName: 'customerNumber', - value: e.target.value, - }) - } - modalContent={{ - description: t(PageText.Contact.input.customerNumber.description), - }} - /> - )} - send({ type: 'ON_INPUT_CHANGE', - inputName: 'orderId', + inputName: 'amount', value: e.target.value, }) } - modalContent={{ - description: t(PageText.Contact.input.orderId.description), - instruction: t(PageText.Contact.input.orderId.instruction), - bulletPoints: - PageText.Contact.input.orderId.descriptionBulletPoints.map( - (bulletPoint) => t(bulletPoint), - ), - }} />