From 77080b7f9cfa00bba948fee3ad748b1f4defcfc6 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 11:59:59 +0530 Subject: [PATCH 1/6] add more cosntants --- lib/CONST.ts | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/lib/CONST.ts b/lib/CONST.ts index 16869f4f..67efdc34 100644 --- a/lib/CONST.ts +++ b/lib/CONST.ts @@ -25,6 +25,25 @@ const CONST = { */ ACH_DEFAULT_MAX_AMOUNT_LIMIT: 2000000, + /** + * This is set in main.html and is derived from a PHP template variable + * @type {String} + */ + URL_TO_SECURE_WEBSITE: '', + + /** + * This is the maximum number of transactions that can be exported to quickbooks + * + * @type {Number} + */ + QUICKBOOKS_EXPORT_LIMIT: 1500, + + /** + * UNUSED, BY KEPT FOR "STORAGE" + * This key is only valid for URLs in the https://www.expensify.com/ realm. + */ + GOOGLE_API_KEY: 'ABQIAAAAjtisvqrcGboNGaMCOuZ0ohQhhEh1oy_9rMnViic8Bkkf7v7oORR3gYYz-G4SlC7hy72TbmOpwIHAtg', + /** * IRS remimbursement rate for mileage * WARNING ! UPDATE THE PHP CONSTANT VERSION WHEN UPDATING THIS ONE @@ -42,16 +61,19 @@ const CONST = { COUNTRY: { US: 'US', + MX: 'MX', AU: 'AU', + CA: 'CA', UK: 'UK', NZ: 'NZ', }, CURRENCIES: { - US: 'USD', AU: 'AUD', - UK: 'GBP', + GB: 'GBP', + US: 'USD', NZ: 'NZD', + UK: 'GBP', EU: 'EUR', }, @@ -447,6 +469,11 @@ const CONST = { MAX_AGE_SAME_COMMENT: 300, SMARTREPORT_AGENT_EMAIL: 'smartreports@expensify.com', + + /** + * Email to submit smart reports to (alias for consistency) + */ + SMART_REPORT_AGENT_EMAIL: 'smartreports@expensify.com', }, /** @@ -485,6 +512,13 @@ const CONST = { */ MOMENT_DATE_TIME: 'YYYY-MM-DD HH:mm', + /** + * This is a typical format of the date plus the time and seconds + * + * @type {String} + */ + MOMENT_DATE_TIME_WITH_SECONDS: 'YYYY-MM-DD HH:mm:ss', + /** * Pretty format used for report history items * @@ -572,6 +606,23 @@ const CONST = { VERIFICATION_MAX_ATTEMPTS: 7, }, + // The number of days that certain banks limit their transaction imports to + // see https://stackoverflow.com/c/expensify/questions/1289/1290#1290 for more about this. + // If a bank isn't on this list, we default to 90 days + BANK_IMPORT_DAY_LIMITS: { + 'americanexpress.com': 30, + 'oauth.bankofamerica.com': 30, + 'oauth.capitalone.com': 90, + 'oauth.chase.com': 90, + 'discover.com': 30, + 'admin.pexcard.com': 30, + svbdirect: 75, + 'oauth.wellsfargo.com': 30, + }, + DEFAULT_BANK_IMPORT_DAYS: 90, + PERSONAL_CARD_START_DATE_TOOLTIP: + 'Expensify will automatically import the earliest available transactions from this card. If a start date is selected, transactions with a posted date prior to this will not be included.', + /** * Emails that the user shouldn't be interacting with from the front-end interface * Trying to add these emails as a delegate, onto a policy, or as an approver is considered invalid From 87876231e962f68789cc6c2204f94f49a1632e78 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 12:04:14 +0530 Subject: [PATCH 2/6] remove GB --- lib/CONST.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/CONST.ts b/lib/CONST.ts index 67efdc34..f6b3ba60 100644 --- a/lib/CONST.ts +++ b/lib/CONST.ts @@ -70,7 +70,6 @@ const CONST = { CURRENCIES: { AU: 'AUD', - GB: 'GBP', US: 'USD', NZ: 'NZD', UK: 'GBP', From f0a08029188ff8d8c9b5170cb42d34d278a5d0b7 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 12:13:16 +0530 Subject: [PATCH 3/6] get rid of a few const since they are unused --- lib/CONST.ts | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/lib/CONST.ts b/lib/CONST.ts index f6b3ba60..9e16d4b1 100644 --- a/lib/CONST.ts +++ b/lib/CONST.ts @@ -31,19 +31,6 @@ const CONST = { */ URL_TO_SECURE_WEBSITE: '', - /** - * This is the maximum number of transactions that can be exported to quickbooks - * - * @type {Number} - */ - QUICKBOOKS_EXPORT_LIMIT: 1500, - - /** - * UNUSED, BY KEPT FOR "STORAGE" - * This key is only valid for URLs in the https://www.expensify.com/ realm. - */ - GOOGLE_API_KEY: 'ABQIAAAAjtisvqrcGboNGaMCOuZ0ohQhhEh1oy_9rMnViic8Bkkf7v7oORR3gYYz-G4SlC7hy72TbmOpwIHAtg', - /** * IRS remimbursement rate for mileage * WARNING ! UPDATE THE PHP CONSTANT VERSION WHEN UPDATING THIS ONE @@ -69,10 +56,10 @@ const CONST = { }, CURRENCIES: { - AU: 'AUD', US: 'USD', - NZ: 'NZD', + AU: 'AUD', UK: 'GBP', + NZ: 'NZD', EU: 'EUR', }, @@ -511,13 +498,6 @@ const CONST = { */ MOMENT_DATE_TIME: 'YYYY-MM-DD HH:mm', - /** - * This is a typical format of the date plus the time and seconds - * - * @type {String} - */ - MOMENT_DATE_TIME_WITH_SECONDS: 'YYYY-MM-DD HH:mm:ss', - /** * Pretty format used for report history items * From ae052d1a4bdad1cedbe88439c086d17657b69e1d Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 12:51:46 +0530 Subject: [PATCH 4/6] add quotes --- .prettierrc.js | 1 + lib/CONST.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.prettierrc.js b/.prettierrc.js index ad1fafbb..e55bab01 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -6,4 +6,5 @@ module.exports = { arrowParens: 'always', printWidth: 190, singleAttributePerLine: true, + quoteProps: 'consistent', }; diff --git a/lib/CONST.ts b/lib/CONST.ts index 9e16d4b1..8d477438 100644 --- a/lib/CONST.ts +++ b/lib/CONST.ts @@ -595,7 +595,7 @@ const CONST = { 'oauth.chase.com': 90, 'discover.com': 30, 'admin.pexcard.com': 30, - svbdirect: 75, + 'svbdirect': 75, 'oauth.wellsfargo.com': 30, }, DEFAULT_BANK_IMPORT_DAYS: 90, From 5f11b0fdb90c4be1b4c528974411bfe0dd795414 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 15:35:20 +0530 Subject: [PATCH 5/6] remove quuote change : --- .prettierrc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.prettierrc.js b/.prettierrc.js index e55bab01..ad1fafbb 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -6,5 +6,4 @@ module.exports = { arrowParens: 'always', printWidth: 190, singleAttributePerLine: true, - quoteProps: 'consistent', }; From 913bfa43d02520d51d396d3a6ef5e60b5c754f26 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 4 Aug 2025 15:42:13 +0530 Subject: [PATCH 6/6] remove quote --- lib/CONST.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CONST.ts b/lib/CONST.ts index 8d477438..9e16d4b1 100644 --- a/lib/CONST.ts +++ b/lib/CONST.ts @@ -595,7 +595,7 @@ const CONST = { 'oauth.chase.com': 90, 'discover.com': 30, 'admin.pexcard.com': 30, - 'svbdirect': 75, + svbdirect: 75, 'oauth.wellsfargo.com': 30, }, DEFAULT_BANK_IMPORT_DAYS: 90,