diff --git a/client/.env b/client/.env index 30293ab..0038af3 100644 --- a/client/.env +++ b/client/.env @@ -1,4 +1,4 @@ # VITE_API_URL=http://localhost:3001 -VITE_API_URL=http://192.168.1.171:3001 -# VITE_API_URL=https://crm.stream.graff.tech/api +# VITE_API_URL=http://192.168.1.171:3001 +VITE_API_URL=https://crm.stream.graff.tech/api VITE_STREAM_URL=https://stream.graff.tech diff --git a/client/src/components/Card.tsx b/client/src/components/Card.tsx index 338f51a..75fe451 100644 --- a/client/src/components/Card.tsx +++ b/client/src/components/Card.tsx @@ -60,7 +60,7 @@ function Card({ }, [isShow]); return ( -
+
diff --git a/client/src/components/EmptyCard.tsx b/client/src/components/EmptyCard.tsx index 818a0de..478562e 100644 --- a/client/src/components/EmptyCard.tsx +++ b/client/src/components/EmptyCard.tsx @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import { isAfter } from "date-fns"; import useModalStore from "../stores/useModalStore"; import Button from "./Button"; import PlusIcon from "./icons/PlusIcon"; @@ -15,22 +16,24 @@ function EmptyCard({ buildId, startAt, duration }: Props) { return (
- + {isAfter(startAt, new Date()) && ( + + )}
); } diff --git a/client/src/components/Managers.tsx b/client/src/components/Managers.tsx index b7ccc21..80ee7fb 100644 --- a/client/src/components/Managers.tsx +++ b/client/src/components/Managers.tsx @@ -26,7 +26,7 @@ function Managers() { {isShowManagers && (
- {managers?.map((manager) => ( + {managers.map((manager) => (
(setDate(date), console.log(date))} + onChange={(date) => setDate(date)} /> )}
diff --git a/client/src/components/modals/CreateScheduledSessionModal.tsx b/client/src/components/modals/CreateScheduledSessionModal.tsx index 38c7b68..5c161a2 100644 --- a/client/src/components/modals/CreateScheduledSessionModal.tsx +++ b/client/src/components/modals/CreateScheduledSessionModal.tsx @@ -28,7 +28,7 @@ function CreateScheduledSessionModal({ buildId, startAt, duration }: Props) { setIsLoading(true); try { - const result = await api + await api .post(`scheduled_sessions`, { json: { buildId, @@ -41,8 +41,6 @@ function CreateScheduledSessionModal({ buildId, startAt, duration }: Props) { }, }) .json(); - - console.log("result", result); } catch (error) { alert((error as Error).message); } diff --git a/client/src/pages/DashboardPage.tsx b/client/src/pages/DashboardPage.tsx index 50a6f3b..dac4886 100644 --- a/client/src/pages/DashboardPage.tsx +++ b/client/src/pages/DashboardPage.tsx @@ -254,8 +254,6 @@ function DashboardPage() { async function getSchedules() { if (!company || !selectedBuild) return; - console.log("selectedBuild.id", selectedBuild.id); - const result: any[] = await api .get(`companies/${company.id}/builds/${selectedBuild.id}/schedules`) .json(); @@ -300,7 +298,7 @@ function DashboardPage() { useEffect(() => { if (!company || !selectedBuild) return; - console.log("selectedBuild", selectedBuild); + getSchedules(); getManagers(); }, [selectedBuild]); diff --git a/client/src/pages/LoginPage.tsx b/client/src/pages/LoginPage.tsx index 3e6128c..f9096db 100644 --- a/client/src/pages/LoginPage.tsx +++ b/client/src/pages/LoginPage.tsx @@ -1,8 +1,8 @@ /* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { useEffect, useRef, useState } from "react"; +import { useEffect, useState } from "react"; import ky from "ky"; -import ReCAPTCHA from "react-google-recaptcha"; +// import ReCAPTCHA from "react-google-recaptcha"; import Form from "../components/Form"; import Label from "../components/Label"; import Input from "../components/Input"; @@ -13,7 +13,7 @@ import useAuthStore from "../stores/useAuthStore"; function LoginPage() { const [username, setUsername] = useState(); const [password, setPassword] = useState(); - const recaptchaRef = useRef(null); + // const recaptchaRef = useRef(null); const [accessToken, setAccessToken, setUser] = useAuthStore((state) => [ state.accessToken, state.setAccessToken, @@ -79,11 +79,11 @@ function LoginPage() { handleChange={(value) => setPassword(value)} />
- + /> */}