Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@
"reactnativekeycommand",
"reauthentication",
"Reauthenticator",
"Rebooked",
"REBOOKED",
"recategorize",
"recents",
"REDIRECTURI",
Expand Down
23 changes: 23 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ const CONST = {
TASK_COMPLETED: 'TASKCOMPLETED',
TASK_EDITED: 'TASKEDITED',
TASK_REOPENED: 'TASKREOPENED',
TRAVEL_UPDATE: 'TRAVEL_TRIP_ROOM_UPDATE',
TRIP_PREVIEW: 'TRIPPREVIEW',
UNAPPROVED: 'UNAPPROVED',
UNHOLD: 'UNHOLD',
Expand Down Expand Up @@ -7151,6 +7152,28 @@ const CONST = {
PROVISIONING: {
ERROR_PERMISSION_DENIED: 'permissionDenied',
},
UPDATE_OPERATION_TYPE: {
BOOKING_TICKETED: 'BOOKING_TICKETED',
TICKET_VOIDED: 'TICKET_VOIDED',
TICKET_REFUNDED: 'TICKET_REFUNDED',
FLIGHT_CANCELLED: 'FLIGHT_CANCELLED',
FLIGHT_SCHEDULE_CHANGE_PENDING: 'FLIGHT_SCHEDULE_CHANGE_PENDING',
FLIGHT_SCHEDULE_CHANGE_CLOSED: 'FLIGHT_SCHEDULE_CHANGE_CLOSED',
FLIGHT_CHANGED: 'FLIGHT_CHANGED',
FLIGHT_CABIN_CHANGED: 'FLIGHT_CABIN_CHANGED',
FLIGHT_SEAT_CONFIRMED: 'FLIGHT_SEAT_CONFIRMED',
FLIGHT_SEAT_CHANGED: 'FLIGHT_SEAT_CHANGED',
FLIGHT_SEAT_CANCELLED: 'FLIGHT_SEAT_CANCELLED',
PAYMENT_DECLINED: 'PAYMENT_DECLINED',
BOOKING_CANCELED_BY_TRAVELER: 'BOOKING_CANCELED_BY_TRAVELER',
BOOKING_CANCELED_BY_VENDOR: 'BOOKING_CANCELED_BY_VENDOR',
BOOKING_REBOOKED: 'BOOKING_REBOOKED',
BOOKING_UPDATED: 'BOOKING_UPDATED',
TRIP_UPDATED: 'TRIP_UPDATED',
BOOKING_OTHER_UPDATE: 'BOOKING_OTHER_UPDATE',
REFUND: 'REFUND',
EXCHANGE: 'EXCHANGE',
},
},
LAST_PAYMENT_METHOD: {
LAST_USED: 'lastUsed',
Expand Down
31 changes: 31 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {
AddOrDeletePolicyCustomUnitRateParams,
AddressLineParams,
AdminCanceledRequestParams,
AirlineParams,
AlreadySignedInParams,
ApprovalWorkflowErrorParams,
ApprovedAmountParams,
Expand Down Expand Up @@ -83,6 +84,7 @@ import type {
FileLimitParams,
FiltersAmountBetweenParams,
FlightLayoverParams,
FlightParams,
FormattedMaxLengthParams,
GoBackMessageParams,
GoToRoomParams,
Expand Down Expand Up @@ -137,6 +139,7 @@ import type {
PolicyDisabledReportFieldAllOptionsParams,
PolicyDisabledReportFieldOptionParams,
PolicyExpenseChatNameParams,
RailTicketParams,
ReconciliationWorksParams,
RemovedFromApprovalWorkflowParams,
RemovedTheRequestParams,
Expand Down Expand Up @@ -191,6 +194,7 @@ import type {
TotalAmountGreaterOrLessThanOriginalParams,
ToValidateLoginParams,
TransferParams,
TravelTypeParams,
TrialStartedTitleParams,
UnapproveWithIntegrationWarningParams,
UnshareParams,
Expand Down Expand Up @@ -2997,6 +3001,33 @@ const translations = {
title: 'Get started with travel today!',
message: `Please contact your Account manager or salesteam@expensify.com to get a demo of travel and have it enabled for your company.`,
},
updates: {
bookingTicketed: ({airlineCode, origin, destination, startDate, confirmationID = ''}: FlightParams) =>
`Your flight ${airlineCode} (${origin} → ${destination}) on ${startDate} has been booked. Confirmation code: ${confirmationID}`,
ticketVoided: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Your ticket for flight ${airlineCode} (${origin} → ${destination}) on ${startDate} has been voided.`,
ticketRefunded: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Your ticket for flight ${airlineCode} (${origin} → ${destination}) on ${startDate} has been refunded or exchanged.`,
flightCancelled: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Your flight ${airlineCode} (${origin} → ${destination}) on ${startDate}} has been canceled by the airline.`,
flightScheduleChangePending: ({airlineCode}: AirlineParams) => `The airline has proposed a schedule change for flight ${airlineCode}; we are awaiting confirmation.`,
flightScheduleChangeClosed: ({airlineCode, startDate}: AirlineParams) => `Schedule change confirmed: flight ${airlineCode} now departs at ${startDate}.`,
flightUpdated: ({airlineCode, origin, destination, startDate}: FlightParams) => `Your flight ${airlineCode} (${origin} → ${destination}) on ${startDate} has been updated.`,
flightCabinChanged: ({airlineCode, cabinClass}: AirlineParams) => `Your cabin class has been updated to ${cabinClass} on flight ${airlineCode}.`,
flightSeatConfirmed: ({airlineCode}: AirlineParams) => `Your seat assignment on flight ${airlineCode} has been confirmed.`,
flightSeatChanged: ({airlineCode}: AirlineParams) => `Your seat assignment on flight ${airlineCode} has been changed.`,
flightSeatCancelled: ({airlineCode}: AirlineParams) => `Your seat assignment on flight ${airlineCode} was removed.`,
paymentDeclined: 'Payment for your air booking failed. Please try again.',
bookingCancelledByTraveler: ({type, id = ''}: TravelTypeParams) => `You cancelled your ${type} reservation ${id}.`,
bookingCancelledByVendor: ({type, id = ''}: TravelTypeParams) => `The vendor cancelled your ${type} reservation ${id}.`,
bookingRebooked: ({type, id = ''}: TravelTypeParams) => `Your ${type} reservation was re-booked. New confirmation #:${id}.`,
bookingUpdated: ({type}: TravelTypeParams) => `Your ${type} booking was updated. Review the new details in the itinerary.`,
railTicketRefund: ({origin, destination, startDate}: RailTicketParams) =>
`Your rail ticket for ${origin} → ${destination} on ${startDate} has been refunded. A credit will be processed.`,
railTicketExchange: ({origin, destination, startDate}: RailTicketParams) => `Your rail ticket for ${origin} → ${destination} on ${startDate} has been exchanged.`,
railTicketUpdate: ({origin, destination, startDate}: RailTicketParams) => `Your rail ticket for ${origin} → ${destination} on ${startDate} has been updated.`,
defaultUpdate: ({type}: TravelTypeParams) => `Your ${type} reservation was updated.`,
},
},
workspace: {
common: {
Expand Down
31 changes: 31 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
AddOrDeletePolicyCustomUnitRateParams,
AddressLineParams,
AdminCanceledRequestParams,
AirlineParams,
AlreadySignedInParams,
ApprovalWorkflowErrorParams,
ApprovedAmountParams,
Expand Down Expand Up @@ -82,6 +83,7 @@ import type {
FileLimitParams,
FiltersAmountBetweenParams,
FlightLayoverParams,
FlightParams,
FormattedMaxLengthParams,
GoBackMessageParams,
GoToRoomParams,
Expand Down Expand Up @@ -136,6 +138,7 @@ import type {
PolicyDisabledReportFieldAllOptionsParams,
PolicyDisabledReportFieldOptionParams,
PolicyExpenseChatNameParams,
RailTicketParams,
ReconciliationWorksParams,
RemovedFromApprovalWorkflowParams,
RemovedTheRequestParams,
Expand Down Expand Up @@ -190,6 +193,7 @@ import type {
TotalAmountGreaterOrLessThanOriginalParams,
ToValidateLoginParams,
TransferParams,
TravelTypeParams,
TrialStartedTitleParams,
UnapproveWithIntegrationWarningParams,
UnshareParams,
Expand Down Expand Up @@ -3021,6 +3025,33 @@ const translations = {
title: '¡Empieza a viajar hoy mismo!',
message: `Por favor, contacta a tu gestor de cuenta o a salesteam@expensify.com para solicitar una demostración de Travel y habilitarlo para tu empresa.`,
},
updates: {
bookingTicketed: ({airlineCode, origin, destination, startDate, confirmationID = ''}: FlightParams) =>
`Tu vuelo ${airlineCode} (${origin} → ${destination}) para el ${startDate} ha sido reservado. Código de confirmación: ${confirmationID}`,
ticketVoided: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Tu billete para el vuelo ${airlineCode} (${origin} → ${destination}) del ${startDate} ha sido anulado.`,
ticketRefunded: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Tu billete para el vuelo ${airlineCode} (${origin} → ${destination}) del ${startDate} ha sido reembolsado o cambiado.`,
flightCancelled: ({airlineCode, origin, destination, startDate}: FlightParams) =>
`Tu vuelo ${airlineCode} (${origin} → ${destination}) del ${startDate} ha sido cancelado por la aerolínea.`,
flightScheduleChangePending: ({airlineCode}: AirlineParams) => `La aerolínea ha propuesto un cambio de horario para el vuelo ${airlineCode}; estamos esperando la confirmación.`,
flightScheduleChangeClosed: ({airlineCode, startDate}: AirlineParams) => `Cambio de horario confirmado: el vuelo ${airlineCode} ahora sale a las ${startDate}.`,
flightUpdated: ({airlineCode, origin, destination, startDate}: FlightParams) => `Tu vuelo ${airlineCode} (${origin} → ${destination}) del ${startDate} ha sido actualizado.`,
flightCabinChanged: ({airlineCode, cabinClass}: AirlineParams) => `Tu clase de cabina ha sido actualizada a ${cabinClass} en el vuelo ${airlineCode}.`,
flightSeatConfirmed: ({airlineCode}: AirlineParams) => `Tu asignación de asiento en el vuelo ${airlineCode} ha sido confirmada.`,
flightSeatChanged: ({airlineCode}: AirlineParams) => `Tu asignación de asiento en el vuelo ${airlineCode} ha sido modificada.`,
flightSeatCancelled: ({airlineCode}: AirlineParams) => `Tu asignación de asiento en el vuelo ${airlineCode} fue eliminada.`,
paymentDeclined: 'El pago de tu reserva aérea ha fallado. Por favor, inténtalo de nuevo.',
bookingCancelledByTraveler: ({type, id = ''}: TravelTypeParams) => `Cancelaste tu reserva de ${type} ${id}.`,
bookingCancelledByVendor: ({type, id = ''}: TravelTypeParams) => `El proveedor canceló tu reserva de ${type} ${id}.`,
bookingRebooked: ({type, id = ''}: TravelTypeParams) => `Tu reserva de ${type} fue reprogramada. Nuevo número de confirmación: ${id}.`,
bookingUpdated: ({type}: TravelTypeParams) => `Tu reserva de ${type} fue actualizada. Revisa los nuevos detalles en el itinerario.`,
railTicketRefund: ({origin, destination, startDate}: RailTicketParams) =>
`Tu billete de tren de ${origin} a ${destination} para el ${startDate} ha sido reembolsado. Se procesará un crédito.`,
railTicketExchange: ({origin, destination, startDate}: RailTicketParams) => `Tu billete de tren de ${origin} a ${destination} para el ${startDate} ha sido cambiado.`,
railTicketUpdate: ({origin, destination, startDate}: RailTicketParams) => `Tu billete de tren de ${origin} a ${destination} para el ${startDate} ha sido actualizado.`,
defaultUpdate: ({type}: TravelTypeParams) => `Tu reserva de ${type} fue actualizada.`,
},
},
workspace: {
common: {
Expand Down
29 changes: 29 additions & 0 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,31 @@ type EmployeeInviteMessageParams = {
name: string;
};

type FlightParams = {
startDate: string;
airlineCode: string;
origin: string;
destination: string;
confirmationID?: string;
};

type AirlineParams = {
airlineCode: string;
startDate?: string;
cabinClass?: string;
};

type RailTicketParams = {
origin: string;
destination: string;
startDate: string;
};

type TravelTypeParams = {
type: string;
id?: string;
};

export type {
SplitExpenseEditTitleParams,
SplitExpenseSubtitleParams,
Expand Down Expand Up @@ -1002,4 +1027,8 @@ export type {
ReviewParams,
CurrencyInputDisabledTextParams,
EmployeeInviteMessageParams,
FlightParams,
AirlineParams,
RailTicketParams,
TravelTypeParams,
};
3 changes: 3 additions & 0 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
getReportActionMessageText,
getRetractedMessage,
getSortedReportActions,
getTravelUpdateMessage,
getUpdateRoomDescriptionMessage,
isActionableAddPaymentCard,
isActionableJoinRequest,
Expand Down Expand Up @@ -831,6 +832,8 @@ function getLastMessageTextForReport(
lastMessageTextFromReport = getReopenedMessage();
} else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.CHANGE_POLICY)) {
lastMessageTextFromReport = getPolicyChangeMessage(lastReportAction);
} else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.TRAVEL_UPDATE)) {
lastMessageTextFromReport = getTravelUpdateMessage(lastReportAction);
}

// we do not want to show report closed in LHN for non archived report so use getReportLastMessage as fallback instead of lastMessageText from report
Expand Down
Loading