diff --git a/app/(dashboard)/devices/[deviceId]/page.tsx b/app/(dashboard)/devices/[deviceId]/page.tsx index 4058770..d57f4f7 100644 --- a/app/(dashboard)/devices/[deviceId]/page.tsx +++ b/app/(dashboard)/devices/[deviceId]/page.tsx @@ -27,11 +27,16 @@ export default async function DeviceDetails({
+
Device active until{" "} {new Date(device?.expiry_date || "").toLocaleDateString("en-US", { month: "short", @@ -40,7 +45,7 @@ export default async function DeviceDetails({ })}
ACTIVE
diff --git a/components/clickable-row.tsx b/components/clickable-row.tsx
index 243e2e9..88bbfe6 100644
--- a/components/clickable-row.tsx
+++ b/components/clickable-row.tsx
@@ -9,96 +9,99 @@ import { cn } from "@/lib/utils";
import AddDevicesToCartButton from "./add-devices-to-cart-button";
import BlockDeviceDialog from "./block-device-dialog";
export default function ClickableRow({
- device,
- parentalControl,
- admin = false,
+ device,
+ parentalControl,
+ admin = false,
+ idx,
}: {
- device: Device;
- parentalControl?: boolean;
- admin?: boolean;
+ device: Device;
+ parentalControl?: boolean;
+ admin?: boolean;
+ idx?: number;
}) {
- const [devices, setDeviceCart] = useAtom(deviceCartAtom);
+ const [devices, setDeviceCart] = useAtom(deviceCartAtom);
- return (
- Device Inactive Device Inactive {device?.reason_for_blocking} {device?.reason_for_blocking} Device Inactive Device Inactive {device?.reason_for_blocking} {device?.reason_for_blocking} Total {meta?.total} device.
- Total {meta?.total} devices.
- Total {meta?.total} device.
+ Total {meta?.total} devices.
+
- Total {meta?.total} payment.
-
- Total {meta?.total} payments.
-
+ Total {meta?.total} payment.
+
+ Total {meta?.total} payments.
+ Total {meta?.total} topup. Total {meta?.total} topups. Total {meta?.total} topup. Total {meta?.total} topups.{parentalControl ? "No active devices" : "No devices."}
-
-
- {parentalControl ? "No active devices" : "No devices."}
+
+
+ {JSON.stringify(error, null, 2)}
;
- }
- }
- const { data, meta } = payments;
- return (
- No Payments.
-
-
+ {JSON.stringify(error, null, 2)}
;
+ }
+ }
+ const { data, meta } = payments;
+ return (
+ No Payments.
+
+
- Devices
-
- {payment.devices.map((device) => (
-
- Devices
+
+ {payment.devices.map((device) => (
+
+ Devices
-
- {payment.devices.map((device) => (
-
- Duration
-
- {payment.number_of_months} Months
-
- Amount
- Devices
+
+ {payment.devices.map((device) => (
+
+ Duration
+
+ {payment.number_of_months} Months
+
+ Amount
+ {JSON.stringify(error, null, 2)}
;
- }
- }
- const { data, meta } = topups;
- return (
- No topups.
-
-
+ {JSON.stringify(error, null, 2)}
;
+ }
+ }
+ const { data, meta } = topups;
+ return (
+ No topups.
+
+
- Amount
-
- {topup.amount.toFixed(2)} MVR
-
- Amount
+
+ {topup.amount.toFixed(2)} MVR
+
+
- Sar Link Portal
-
-
+ Sar Link Portal
+
+
- {firstName} {lastName} -
-+ {firstName} {lastName} +
+