- {data.length} ta to'lov -
-| - {h} - | - ), - )} -||||||
|---|---|---|---|---|---|---|
| - {String(row.id).padStart(2, '0')} - | -- {row.service} - | -- {row.amount.toLocaleString()} UZS - | -
- {row.discount > 0 ? (
-
- -{row.discount.toLocaleString()} UZS
-
- ) : (
- —
+ const handleSubmit = ({ document_id }: { document_id: number }) => {
+ if (document_id === 0) {
+ toast.error('Id not found');
+ return;
+ }
+ payment.mutate({ order_id: document_id });
+ };
+
+ return (
+ <>
+
+
+
+
+ + To'lovlar tarixi +++ {data?.length ?? 0} ta to'lov + +
+ {isLoading ? (
+
+
+ ) : !data || data.length === 0 ? (
+
+
+ ) : (
+ To'lovlar tarixi mavjud emas +
+
| |||
| + {String(row.id).padStart(2, '0')} + | ++ {row.turi} + | ++ {formatPrice(row.total_price)} UZS + | ++ {row.discount ? ( + + -{formatPrice(row.discount)} UZS + + ) : ( + — + )} + | ++ {formatDate(row.created_at)} + | +
+ {row.state ? (
+ {
+ if (row.state === 'unpaid') {
+ setIsPaymentOpen(true);
+ }
+ }}
+ className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium text-emerald-600 bg-emerald-50"
+ >
+ |
+