From f0e9d7da80a2220f7f08d9452daa5f22bb874b33 Mon Sep 17 00:00:00 2001 From: shubham Date: Tue, 10 Sep 2024 20:52:32 +0530 Subject: [PATCH] Set POS default view on wallet --- locales/en.json | 1 + stores/SettingsStore.ts | 6 +++--- views/Wallet/Wallet.tsx | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/locales/en.json b/locales/en.json index e3d1181a4..7024a0c36 100644 --- a/locales/en.json +++ b/locales/en.json @@ -795,6 +795,7 @@ "views.Settings.POS.Category.noCategoriesDefined": "No categories defined yet", "views.Settings.POS.saveCategory": "Save category", "views.Settings.POS.Products": "Products", + "views.Settings.POS.Keypad": "POS Keypad", "views.Settings.POS.Product": "Product", "views.Settings.POS.Product.name": "Product name", "views.Settings.POS.Product.noProductsDefined": "No products defined yet", diff --git a/stores/SettingsStore.ts b/stores/SettingsStore.ts index f0d7a0b06..8813255f2 100644 --- a/stores/SettingsStore.ts +++ b/stores/SettingsStore.ts @@ -941,9 +941,9 @@ export const DEFAULT_VIEW_KEYS_POS = [ value: 'Products' }, { - key: 'Keypad', - translateKey: 'views.Settings.Display.DefaultView.keypad', - value: 'Keypad' + key: 'POS Keypad', + translateKey: 'views.Settings.POS.Keypad', + value: 'POS Keypad' } ]; diff --git a/views/Wallet/Wallet.tsx b/views/Wallet/Wallet.tsx index 78ae0766a..107a3dc46 100644 --- a/views/Wallet/Wallet.tsx +++ b/views/Wallet/Wallet.tsx @@ -697,7 +697,9 @@ export default class Wallet extends React.Component { initialRouteName={ posEnabled !== PosEnabled.Disabled && posStatus === 'active' - ? 'POS' + ? (settings.pos && + settings.pos.defaultView) || + 'Products' : isSyncing ? 'Balance' : (settings.display && @@ -720,7 +722,7 @@ export default class Wallet extends React.Component { if (route.name === 'Balance') { return ; } - if (route.name === 'POS') { + if (route.name === 'Products') { return ; } if (route.name === 'POS Keypad') {