Skip to content

Commit

Permalink
Merge pull request #2620 from myxmaster/fix-pos-disable
Browse files Browse the repository at this point in the history
Reset POS status when disabling POS
  • Loading branch information
kaloudis authored Dec 16, 2024
2 parents 536736c + 3931c6e commit 107e4df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions views/Settings/PointOfSale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 107e4df

Please sign in to comment.