fix: remittances totalAmount+clientId (FIBEROPS-221), create client URL (FIBEROPS-222), tickets /messages (FIBEROPS-224)

This commit is contained in:
root
2026-03-31 04:15:33 +00:00
parent 5843499815
commit a77759cc97
3 changed files with 10 additions and 10 deletions

View File

@@ -60,11 +60,11 @@ export default function ClientsPage() {
const createClient = useMutation({
mutationFn: async () => {
const res = await api.post("/api/v1/clients/onboard", {
const res = await api.post("/api/v1/clients", {
firstName: form.firstName, lastName: form.lastName,
email: form.email, phone: form.phone, address: form.address,
areaId: form.areaId || undefined, planId: form.planId,
billingType: form.billingType,
areaId: form.areaId || undefined,
planId: form.planId || undefined,
});
return res.data;
},
@@ -73,7 +73,7 @@ export default function ClientsPage() {
qc.invalidateQueries({ queryKey: ["clients"] });
setShowAdd(false);
setForm({ firstName: "", lastName: "", email: "", phone: "", address: "", areaId: "", planId: "", billingType: "POSTPAID" });
if (data?.client?.id) router.push(`/clients/${data.client.id}`);
if (data?.id) router.push(`/clients/${data.id}`);
},
onError: (e: any) => toast.error(e.response?.data?.message ?? "Failed to create client"),
});