Skip to content

Commit

Permalink
Before major change
Browse files Browse the repository at this point in the history
  • Loading branch information
Alien501 committed Nov 14, 2024
1 parent 6a0bc99 commit a86ec51
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Admin</title>
</head>
<body>
<div id="root"></div>
Expand Down
18 changes: 9 additions & 9 deletions admin/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ import { Button } from "@/components/ui/button";

const Login = () => {
return(
<div className="h-screen overflow-hidden flex justify-center items-center bg-coal font-noto" id="login-page">
<Card className="bg-black border-0 w-[90%] h-[90%] flex gap-2 flex-row items-center p-5 shadow-sm">
<div className="h-screen overflow-hidden flex justify-center items-center bg-white font-noto" id="login-page">
<Card className="bg-gray-200 text-black border-0 w-[90%] h-[90%] flex gap-2 flex-row items-center p-5 shadow-md border-black">
<div className="slider-image-container bg-white h-[97%] w-[50%] rounded-sm relative">
<img src={banner1} alt="Banner One" className="block h-full object-cover" />
<div className="overlay bg-black/50 absolute top-0 bottom-0 w-full h-full"></div>
{/* <span className="app-name text-white font-bold absolute text-3xl mt-6 left-1/2 -translate-x-1/2 -translate-y-1/2 top-0 mx-auto">CoalWorks</span> */}
</div>
<div className="login-form-container h-[97%] rounded-sm flex flex-col bg-coal/0 w-full">
<div className="h-full bg-slate-50/0 flex items-center justify-center">
<div className="text-white/30 text-sm h-[50%] p-1 flex flex-col justify-between w-[320px] space-y-4 mx-auto">
<div className="text-black/30 text-sm h-[50%] p-1 flex flex-col justify-between w-[320px] space-y-4 mx-auto">
<form>
<div className="text-white mt-3 ml-3">
<div className="text-black mt-3 ml-3">
<h1 className="text-3xl font-semibold text-center">Sign-In</h1>
</div>
<div className="h-max m-2">
<Label className="text-sm font-normal">
<Label className="text-sm font-normal text-black/70">
Username
</Label>
<Input className="h-10 border-0 bg-slate-50/5 focus:border focus:border-slate-300/10" />
<Input className="h-10 border-0 bg-white focus:border focus:border-slate-300/10" />
</div>
<div className="h-max m-2">
<Label className="text-sm font-normal">
<Label className="text-sm font-normal text-black/70">
Password
</Label>
<Input className="h-10 border-0 bg-slate-50/5 focus:border focus:border-slate-300/10" />
<Input className="h-10 border-0 bg-white focus:border focus:border-slate-300/10" />
</div>
<div className="h-max m-2 text-right">
<a href="#" className="hover:text-white/60">Forgot Password?</a>
<a href="#" className="hover:text-black/60">Forgot Password?</a>
</div>
<div className="h-max m-2">
<Button className="w-full">
Expand Down
2 changes: 1 addition & 1 deletion client_supervisor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Supervisor</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 2 additions & 1 deletion client_supervisor/src/components/custom/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const pageTitles: PageTitle[] = [
{ url: '/observations', title: 'Observations' },
{ url: '/archives', title: 'Archives' },
{ url: '/templates', title: 'Templates' },
{ url: '/shift-handover', title: 'Shift Handover' }
{ url: '/shift-handover', title: 'Shift Handover' },
{ url: '/pdf-generator', title: 'Generate PDF' }
]

const Layout = () => {
Expand Down
9 changes: 6 additions & 3 deletions client_supervisor/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { DialogTitle } from "@radix-ui/react-dialog";
import { ChartBar, ChartColumn, ChartPie, ChartSpline, FileText, MailPlus } from "lucide-react";
import { useState } from "react";
import { Link } from "react-router-dom";

const WidgetForm = () => {
const [chartType, setChartType] = useState<string>('');
Expand Down Expand Up @@ -135,9 +136,11 @@ const Dashboard = () => {
<Button variant="secondary" className="hover:bg-gray-200">
<span><MailPlus /></span>
</Button>
<Button variant="secondary" className="hover:bg-gray-200">
<span><FileText /></span>
</Button>
<Link to={'/pdf-generator'}>
<Button variant="secondary" className="hover:bg-gray-200">
<span><FileText /></span>
</Button>
</Link>
<Dialog>
<DialogTrigger>
<Button>
Expand Down
5 changes: 4 additions & 1 deletion client_supervisor/src/pages/PdfGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Label } from "@/components/ui/label";
import { DownloadIcon, MoveLeftIcon } from "lucide-react";
import { useState } from "react";
import { Document, Text, View, Page, StyleSheet, PDFDownloadLink } from "@react-pdf/renderer";
import { useNavigate } from "react-router-dom";

const PdfGenerator = () => {
const [config, setConfig] = useState({
Expand All @@ -20,6 +21,8 @@ const PdfGenerator = () => {
customLabel: ""
});

const navigate = useNavigate();

const onCheckBoxClicked = (key) => {
setConfig(prev => ({
...prev,
Expand Down Expand Up @@ -179,7 +182,7 @@ const PdfGenerator = () => {
return (
<div className="pdf-gen-wrapper">
<div className="pdf-gen-header w-full h-14 flex items-center">
<Button id="back-button" variant="ghost">
<Button onClick={() => navigate(-1)} id="back-button" variant="ghost">
<MoveLeftIcon />
</Button>
<Label htmlFor="back-button">Back</Label>
Expand Down

0 comments on commit a86ec51

Please sign in to comment.