Bug #12237
openIssues in new company my plan & payment settings
0%
Description
2. E-Commerce Only Mode Does Not Hide Offline Payment Methods in Settings UI
Location:
src/pages/Settings/CompanyProfile/OperationsSettings.tsx:840-920
vs
src/services/subscription/companyPaymentSettings.service.js:8-12
Impact: The backend specification in companyPaymentSettings.service.js states:
"For E-Commerce only: Only enable Cards (credit/debit) / online only. pos_terminal, bank_transfer, zelle, check, cash are disabled."
In the frontend UI:
pos_terminal is hidden via {isPosInPlan && ...}.
However, Bank Transfer, Zelle, Check, and Cash cards remain visible in the UI. Inside them, only the "E-Commerce" toggle is visible.
A merchant on an E-Commerce-only plan can still toggle cash or check enabled for online orders, even though
CheckoutPayment.tsx:44
strictly rejects any non-card payments with: "Ecommerce checkout has not implemented bank transfer or check yet. Please choose card to continue."
Fix: When !isPosInPlan && !isLandscapingInPlan (E-Commerce only), hide Cash, Check, and Bank Transfer or display a banner indicating they are unavailable on E-commerce-only plans.
3. disabled={!editMode} Prevents Auto-Enabling Edit Mode on Switch Click
Location:
src/pages/Settings/CompanyProfile/OperationsSettings.tsx:287-290, 344
Code:
tsx
const handleModuleToggle = (moduleKey, checked) => {
if (!editMode) {
setEditMode(true);
toast.info('Edit mode enabled — change toggles, then Save Changes.');
}
updateMethodModules({ ...modules, [moduleKey]: checked });
};
...
<Switch ... disabled={!editMode} onChange={(e) => handleModuleToggle('order', e.target.checked)} />
Impact: Because HTML/MUI <Switch> has disabled={!editMode}, the browser suppresses all click and change events. handleModuleToggle is never invoked, so the helpful setEditMode(true) auto-unlock is dead code.
Fix: Wrap the switch container with an onClick that sets setEditMode(true) if clicked while !editMode.
4. Multi-Module Bundle Defaults Bank Transfer & Check to order: true
Location:
src/services/subscription/companyPaymentSettings.service.js:92-93, 119-120
Code:
js
const bankTransferModules = {
order: !isEcomOnly && hasRegularOrders,
preorder: !isEcomOnly && hasPreorders,
};
const checkModules = {
order: !isEcomOnly && hasRegularOrders,
preorder: !isEcomOnly && hasPreorders,
};
Impact: For standard companies with both POS + E-Commerce, isEcomOnly is false. This causes Bank Transfer and Check to automatically have order: true. Unlike Card payments, check and bank transfer require manual payment reconciliation and clearance, which most storefronts do not want enabled for online retail checkouts by default.
Fix: Default order: false and preorder: false for check and bank_transfer, just as is already done for cash and zelle on lines 101 and 128.
Subtasks
Related issues
No data to display