diff --git a/Frontend/src/app/recent-activities/page.tsx b/Frontend/src/app/recent-activities/page.tsx new file mode 100644 index 0000000..680a8be --- /dev/null +++ b/Frontend/src/app/recent-activities/page.tsx @@ -0,0 +1,15 @@ +"use client"; +import { Table } from "@/components"; +import { recentActivitiesData, recentActivitiesColumns } from "@/data"; + +export default function RecentActivities() { + return ( +
+ + + ); +} diff --git a/Frontend/src/data/camera-data.tsx b/Frontend/src/data/camera-data.tsx new file mode 100644 index 0000000..02eaeac --- /dev/null +++ b/Frontend/src/data/camera-data.tsx @@ -0,0 +1,40 @@ +import { Camera } from "@/types"; + +export const cameras: Camera[] = [ + { + key: "backyard", + name: "Backyard", + isActive: true, + url: "https://www.youtube.com/embed/Sv2h-csnlps?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, + { + key: "main-road", + name: "Main road", + isActive: true, + url: "https://www.youtube.com/embed/yNQmth5kUZ0?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, + { + key: "door", + name: "Door", + isActive: true, + url: "https://www.youtube.com/embed/dV9ngLCKE7k?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, + { + key: "pet-room", + name: "Pet room", + isActive: true, + url: "https://www.youtube.com/embed/ewEW_xAKRMg?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, + { + key: "basement", + name: "Basement", + isActive: false, + url: "https://www.youtube.com/embed/ewEW_xAKRMg?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, + { + key: "baby-room", + name: "Baby room", + isActive: false, + url: "https://www.youtube.com/embed/ewEW_xAKRMg?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1", + }, +]; diff --git a/Frontend/src/data/index.ts b/Frontend/src/data/index.ts index 4bfa3b5..c5960e9 100644 --- a/Frontend/src/data/index.ts +++ b/Frontend/src/data/index.ts @@ -5,3 +5,8 @@ export { } from "./authorized-entities-data"; export { contactUsData } from "./contact-us-data"; export { aboutUsData } from "./about-us-data"; +export { cameras } from "./camera-data"; +export { + recentActivitiesData, + recentActivitiesColumns, +} from "./recent-activities-data"; diff --git a/Frontend/src/data/recent-activities-data.tsx b/Frontend/src/data/recent-activities-data.tsx new file mode 100644 index 0000000..8dca1e4 --- /dev/null +++ b/Frontend/src/data/recent-activities-data.tsx @@ -0,0 +1,69 @@ +"use client"; +import { Activity } from "@/types"; +import { Button } from "@/components"; +import { Space } from "antd"; +import { CameraOutlined, VideoCameraOutlined } from "@ant-design/icons"; +import type { ColumnsType } from "antd/es/table"; +import { cameras } from "./camera-data"; +import { authorizedEntitiesData } from "./authorized-entities-data"; + +export const recentActivitiesColumns: ColumnsType = [ + { + title: "Time", + dataIndex: "timestamp", + key: "timestamp", + }, + { + title: "Camera", + dataIndex: "camera", + render: (_, record) => {record.camera.name}, + }, + { + title: "Entity", + dataIndex: "entity", + render: (_, record) => ( + + {record.entity ? record.entity.name : "Unkown"} + + ), + }, + { + title: "Action", + key: "action", + render: (_, record) => ( + +