Skip to content

UI: Merge General tab save buttons into one sticky footer #61

Description

@khaira777

Problem

The General tab in Settings has two separate save buttons:

  1. "Save Changes" inside the Discount Limits card (settings/page.tsx:1041) — saves only discount settings via PUT /settings/discount
  2. "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

  1. Remove the "Save Changes" button from the Discount Limits card
  2. Make saveAllSettings include discount settings — add saveDiscount() to the Promise.all:
    const saveAllSettings = async () => {
      await Promise.all([saveBusinessInfo(true), saveLoyalty(true), saveDiscount()]);
    };
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions