Problem
The General tab in Settings has two separate save buttons:
- "Save Changes" inside the Discount Limits card (
settings/page.tsx:1041) — saves only discount settings via PUT /settings/discount
- "Save All" at the bottom of the General tab (
settings/page.tsx:1128) — saves business info + loyalty via saveAllSettings(), but does not save discount settings
Issues:
- User has to remember which button saves what
- "Save All" is misleading — it doesn't save discounts
- Neither button is sticky — user must scroll to the exact section to save
- Discount settings can be changed and forgotten if user clicks "Save All" thinking it covers everything
Proposed Fix
- Remove the "Save Changes" button from the Discount Limits card
- Make
saveAllSettings include discount settings — add saveDiscount() to the Promise.all:
const saveAllSettings = async () => {
await Promise.all([saveBusinessInfo(true), saveLoyalty(true), saveDiscount()]);
};
- Make the bottom save bar sticky — pin it to the bottom of the viewport so it is always visible regardless of scroll position:
<div className="sticky bottom-0 bg-white border-t border-gray-200 px-6 py-4 flex justify-end gap-3 z-10">
Scope
General tab only. Print Options and Bill Template tabs are separate and keep their own save buttons.
Problem
The General tab in Settings has two separate save buttons:
settings/page.tsx:1041) — saves only discount settings viaPUT /settings/discountsettings/page.tsx:1128) — saves business info + loyalty viasaveAllSettings(), but does not save discount settingsIssues:
Proposed Fix
saveAllSettingsinclude discount settings — addsaveDiscount()to thePromise.all:Scope
General tab only. Print Options and Bill Template tabs are separate and keep their own save buttons.