-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Adjustment][Antonio] Moved ParkingLogs to /parking-history page
- Loading branch information
1 parent
c431249
commit 12f4f85
Showing
8 changed files
with
143 additions
and
95 deletions.
There are no files selected for viewing
26 changes: 0 additions & 26 deletions
26
app/(routes)/dashboard/components/dashboard-announcement.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
app/(routes)/parking-history/_components/dashboard-announcement.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Link from "next/link"; | ||
|
||
const Announcement: React.FC = () => { | ||
return ( | ||
<div className="flex flex-col items-stretch bg-primary-foreground text-black rounded-lg p-4 "> | ||
<div className="mb-4 px-10 p-4 bg-primary text-center rounded"> | ||
<Link href="" className="text-black hover:underline "> | ||
ANNOUNCEMENT! | ||
</Link> | ||
</div> | ||
<div className="px-10 p-4 bg-primary text-center rounded "> | ||
STATUS | ||
<div className="mt-4"> | ||
<div className="relative w-[100px] h-[100px] mx-auto"> | ||
<svg className="absolute inset-0 w-[100px] h-[100px]"> | ||
<circle | ||
cx="50%" | ||
cy="50%" | ||
r="45%" | ||
stroke="black" | ||
strokeWidth="10" | ||
fill="none" | ||
/> | ||
<circle | ||
cx="50%" | ||
cy="50%" | ||
r="45%" | ||
stroke="orange" | ||
strokeWidth="10" | ||
strokeDasharray="calc(282.6 * 0.25) 282.6" | ||
fill="none" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Announcement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
app/(routes)/parking-history/_components/dashboard-layout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { useState } from "react"; | ||
|
||
import DataList from "./dashboard-data-list-logs"; | ||
import Announcement from "./dashboard-announcement"; | ||
|
||
type Tab = "logs" | "vehicles" | "delete" | "configure"; | ||
|
||
const ParkingLogs: React.FC = () => { | ||
const [selectedTab, setSelectedTab] = useState<Tab>("logs"); | ||
|
||
const renderContent = () => { | ||
return <DataList tab={selectedTab} />; | ||
}; | ||
|
||
return ( | ||
<div className="flex flex-col justify-center items-stretch h-full p-2"> | ||
<div className="flex flex-col bg-primary-foreground text-white rounded-lg mb-4 p-4"> | ||
<div className="flex justify-between mb-5 space-x-1"> | ||
<button | ||
className={`flex-1 p-2 rounded text-xs md:text-base ${ | ||
selectedTab === "logs" | ||
? "bg-black text-white" | ||
: "bg-primary text-black" | ||
}`} | ||
onClick={() => setSelectedTab("logs")} | ||
> | ||
Logs | ||
</button> | ||
<button | ||
className={`flex-1 p-2 rounded text-xs md:text-base ${ | ||
selectedTab === "vehicles" | ||
? "bg-black text-white" | ||
: "bg-primary text-black" | ||
}`} | ||
onClick={() => setSelectedTab("vehicles")} | ||
> | ||
Vehicles | ||
</button> | ||
{/* <button | ||
className={`flex-1 p-2 rounded text-xs md:text-base ${ | ||
selectedTab === "delete" | ||
? "bg-black text-white" | ||
: "bg-primary text-black" | ||
}`} | ||
onClick={() => setSelectedTab("delete")} | ||
> | ||
Delete | ||
</button> */} | ||
<button | ||
className={`flex-1 p-2 rounded text-xs md:text-base ${ | ||
selectedTab === "configure" | ||
? "bg-black text-white" | ||
: "bg-primary text-black" | ||
}`} | ||
onClick={() => setSelectedTab("configure")} | ||
> | ||
Configure | ||
</button> | ||
</div> | ||
<div className="flex flex-col space-y-4 bg-main rounded"> | ||
{renderContent()} | ||
</div> | ||
</div> | ||
<Announcement /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ParkingLogs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters