Skip to content

Commit e6dc28b

Browse files
authored
Merge pull request #77638 from bernhardoj/fix/75223-dew-system-msg-after-submit/approvel
Show concierge system message after submit/approval action
2 parents 280303f + 191600f commit e6dc28b

26 files changed

Lines changed: 558 additions & 17 deletions

src/CONST/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,7 @@ const CONST = {
12391239
DELETED_TRANSACTION: 'DELETEDTRANSACTION',
12401240
DISMISSED_VIOLATION: 'DISMISSEDVIOLATION',
12411241
DONATION: 'DONATION', // Deprecated OldDot Action
1242+
DYNAMIC_EXTERNAL_WORKFLOW_ROUTED: 'DYNAMICEXTERNALWORKFLOWROUTED',
12421243
EXPENSIFY_CARD_SYSTEM_MESSAGE: 'EXPENSIFYCARDSYSTEMMESSAGE',
12431244
EXPORTED_TO_CSV: 'EXPORTCSV', // OldDot Action
12441245
EXPORTED_TO_INTEGRATION: 'EXPORTINTEGRATION', // OldDot Action

src/hooks/useOriginalReportID.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useMemo} from 'react';
22
import {getAllNonDeletedTransactions} from '@libs/MoneyRequestReportUtils';
3-
import {getOneTransactionThreadReportID} from '@libs/ReportActionsUtils';
3+
import {getOneTransactionThreadReportID, withDEWRoutedActionsObject} from '@libs/ReportActionsUtils';
44
import CONST from '@src/CONST';
55
import ONYXKEYS from '@src/ONYXKEYS';
66
import type {OnyxInputOrEntry, ReportAction} from '@src/types/onyx';
@@ -21,7 +21,7 @@ import useTransactionsAndViolationsForReport from './useTransactionsAndViolation
2121
*
2222
*/
2323
function useOriginalReportID(reportID: string | undefined, reportAction: OnyxInputOrEntry<Pick<ReportAction, 'reportActionID' | 'childReportID'>>): string | undefined {
24-
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {canBeMissing: true});
24+
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {canBeMissing: true, selector: withDEWRoutedActionsObject});
2525
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {canBeMissing: true});
2626
const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.chatReportID}`, {canBeMissing: true});
2727
const {isOffline} = useNetwork();

src/languages/de.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ import type {
139139
RoleNamesParams,
140140
RoomNameReservedErrorParams,
141141
RoomRenamedToParams,
142+
RoutedDueToDEWParams,
142143
RulesEnableWorkflowsParams,
143144
SecondaryLoginParams,
144145
SetTheDistanceMerchantParams,
@@ -1513,6 +1514,7 @@ const translations: TranslationDeepObject<typeof en> = {
15131514
splitDates: 'Datumsangaben aufteilen',
15141515
splitDateRange: ({startDate, endDate, count}: SplitDateRangeParams) => `${startDate} bis ${endDate} (${count} Tage)`,
15151516
splitByDate: 'Nach Datum aufteilen',
1517+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `bericht aufgrund eines benutzerdefinierten Genehmigungsworkflows an ${to} weitergeleitet`,
15161518
},
15171519
transactionMerge: {
15181520
listPage: {

src/languages/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ import type {
127127
RoleNamesParams,
128128
RoomNameReservedErrorParams,
129129
RoomRenamedToParams,
130+
RoutedDueToDEWParams,
130131
RulesEnableWorkflowsParams,
131132
SecondaryLoginParams,
132133
SetTheDistanceMerchantParams,
@@ -1484,6 +1485,7 @@ const translations = {
14841485
},
14851486
},
14861487
chooseWorkspace: 'Choose a workspace',
1488+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `report routed to ${to} due to custom approval workflow`,
14871489
},
14881490
transactionMerge: {
14891491
listPage: {

src/languages/es.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {CONST as COMMON_CONST} from 'expensify-common';
22
import dedent from '@libs/StringUtils/dedent';
33
import CONST from '@src/CONST';
44
import type en from './en';
5-
import type {HarvestCreatedExpenseReportParams, SplitDateRangeParams, ViolationsRterParams} from './params';
5+
import type {HarvestCreatedExpenseReportParams, RoutedDueToDEWParams, SplitDateRangeParams, ViolationsRterParams} from './params';
66
import type {TranslationDeepObject} from './types';
77

88
/* eslint-disable max-len */
@@ -1186,6 +1186,7 @@ const translations: TranslationDeepObject<typeof en> = {
11861186
},
11871187
},
11881188
chooseWorkspace: 'Elige un espacio de trabajo',
1189+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `informe enviado a ${to} debido a un flujo de aprobación personalizado`,
11891190
},
11901191
transactionMerge: {
11911192
listPage: {

src/languages/fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ import type {
139139
RoleNamesParams,
140140
RoomNameReservedErrorParams,
141141
RoomRenamedToParams,
142+
RoutedDueToDEWParams,
142143
RulesEnableWorkflowsParams,
143144
SecondaryLoginParams,
144145
SetTheDistanceMerchantParams,
@@ -1515,6 +1516,7 @@ const translations: TranslationDeepObject<typeof en> = {
15151516
splitDates: 'Diviser les dates',
15161517
splitDateRange: ({startDate, endDate, count}: SplitDateRangeParams) => `Du ${startDate} au ${endDate} (${count} jours)`,
15171518
splitByDate: 'Scinder par date',
1519+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `rapport acheminé vers ${to} en raison d'un workflow d'approbation personnalisé`,
15181520
},
15191521
transactionMerge: {
15201522
listPage: {

src/languages/it.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ import type {
139139
RoleNamesParams,
140140
RoomNameReservedErrorParams,
141141
RoomRenamedToParams,
142+
RoutedDueToDEWParams,
142143
RulesEnableWorkflowsParams,
143144
SecondaryLoginParams,
144145
SetTheDistanceMerchantParams,
@@ -1508,6 +1509,7 @@ const translations: TranslationDeepObject<typeof en> = {
15081509
splitDates: 'Dividi date',
15091510
splitDateRange: ({startDate, endDate, count}: SplitDateRangeParams) => `${startDate} a ${endDate} (${count} giorni)`,
15101511
splitByDate: 'Dividi per data',
1512+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `rapporto inoltrato a ${to} a causa del flusso di lavoro di approvazione personalizzato`,
15111513
},
15121514
transactionMerge: {
15131515
listPage: {

src/languages/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ import type {
139139
RoleNamesParams,
140140
RoomNameReservedErrorParams,
141141
RoomRenamedToParams,
142+
RoutedDueToDEWParams,
142143
RulesEnableWorkflowsParams,
143144
SecondaryLoginParams,
144145
SetTheDistanceMerchantParams,
@@ -1508,6 +1509,7 @@ const translations: TranslationDeepObject<typeof en> = {
15081509
splitDates: '日付を分割',
15091510
splitDateRange: ({startDate, endDate, count}: SplitDateRangeParams) => `${startDate} から ${endDate} まで(${count} 日間)`,
15101511
splitByDate: '日付で分割',
1512+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `カスタム承認ワークフローにより、${to} 宛にルーティングされたレポート`,
15111513
},
15121514
transactionMerge: {
15131515
listPage: {

src/languages/nl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ import type {
139139
RoleNamesParams,
140140
RoomNameReservedErrorParams,
141141
RoomRenamedToParams,
142+
RoutedDueToDEWParams,
142143
RulesEnableWorkflowsParams,
143144
SecondaryLoginParams,
144145
SetTheDistanceMerchantParams,
@@ -1507,6 +1508,7 @@ const translations: TranslationDeepObject<typeof en> = {
15071508
splitDates: 'Datums splitsen',
15081509
splitDateRange: ({startDate, endDate, count}: SplitDateRangeParams) => `${startDate} tot ${endDate} (${count} dagen)`,
15091510
splitByDate: 'Splitsen op datum',
1511+
routedDueToDEW: ({to}: RoutedDueToDEWParams) => `rapport doorgestuurd naar ${to} vanwege aangepaste goedkeuringsworkflow`,
15101512
},
15111513
transactionMerge: {
15121514
listPage: {

src/languages/params.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,10 @@ type FocusModeUpdateParams = {
771771
priorityModePageUrl: string;
772772
};
773773

774+
type RoutedDueToDEWParams = {
775+
to: string;
776+
};
777+
774778
export type {
775779
SettlementAccountReconciliationParams,
776780
ToggleImportTitleParams,
@@ -1022,6 +1026,7 @@ export type {
10221026
NextStepParams,
10231027
ReportFieldParams,
10241028
FocusModeUpdateParams,
1029+
RoutedDueToDEWParams,
10251030
UpdatedPolicyCustomUnitRateIndexParams,
10261031
UpdatedPolicyCustomUnitRateEnabledParams,
10271032
};

0 commit comments

Comments
 (0)