From 3931c6e24e47a5050fb75e602008b7add396a1be Mon Sep 17 00:00:00 2001 From: myxmaster Date: Wed, 11 Dec 2024 14:19:59 +0100 Subject: [PATCH] reset pos status when disabling pos --- views/Settings/PointOfSale.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/Settings/PointOfSale.tsx b/views/Settings/PointOfSale.tsx index 9183296d6..9788cb982 100644 --- a/views/Settings/PointOfSale.tsx +++ b/views/Settings/PointOfSale.tsx @@ -174,9 +174,15 @@ export default class PointOfSale extends React.Component< title={localeString('views.Settings.POS.enablePos')} selectedValue={posEnabled} onValueChange={async (value: PosEnabled) => { + const { SettingsStore } = this.props; + const { setPosStatus } = SettingsStore; + this.setState({ posEnabled: value }); + if (value === PosEnabled.Disabled) { + setPosStatus('unselected'); + } await updateSettings({ pos: { posEnabled: value,