testing 127.0.0.1 issue

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-07 13:40:07 +08:00
parent 244aa607f7
commit 6624c0d27f
62 changed files with 662 additions and 1889 deletions
@@ -100,20 +100,10 @@ export default function PaymentPolicy() {
},
promo_rules: promoRules,
});
toast("Payment policy saved.", {
action: {
label: "Close",
onClick: () => {}
}
});
toast("Payment policy saved.");
navigate("/admin/tiers/plans");
} catch (err) {
toast(err?.response?.data?.message ?? "Could not save payment policy.", {
action: {
label: "Close",
onClick: () => {}
}
});
toast(err?.response?.data?.message ?? "Could not save payment policy.");
} finally {
setSaving(false);
}
@@ -123,25 +113,10 @@ export default function PaymentPolicy() {
const handleAddPromo = () => {
const code = addForm.code.trim().toUpperCase();
if (!code) { toast("Code is required.", {
action: {
label: "Close",
onClick: () => {}
}
}); return; }
if (!addForm.value || Number(addForm.value) <= 0) { toast("Value must be greater than 0.", {
action: {
label: "Close",
onClick: () => {}
}
}); return; }
if (!code) { toast("Code is required."); return; }
if (!addForm.value || Number(addForm.value) <= 0) { toast("Value must be greater than 0."); return; }
if (promoRules.some((r) => r.code.toUpperCase() === code)) {
toast("A rule with this code already exists.", {
action: {
label: "Close",
onClick: () => {}
}
}); return;
toast("A rule with this code already exists."); return;
}
const rule = {