mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: allow saving 0% period discount in promo groups
Changed condition from percent > 0 to percent >= 0 so that admins can explicitly set 0% discount for a period. Previously 0% entries were silently dropped and not sent to the backend.
This commit is contained in:
@@ -135,7 +135,7 @@ export default function AdminPromoGroupCreate() {
|
||||
periodDiscounts.forEach((pd) => {
|
||||
const days = pd.days === '' ? 0 : pd.days;
|
||||
const percent = pd.percent === '' ? 0 : pd.percent;
|
||||
if (days > 0 && percent > 0) {
|
||||
if (days > 0 && percent >= 0) {
|
||||
periodDiscountsRecord[days] = percent;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user