event 2 page updated
This commit is contained in:
parent
6a4e931bb1
commit
64274570d6
|
|
@ -4,9 +4,9 @@ export const tokenSecret =
|
|||
export const cookieObject: any = {
|
||||
httpOnly: true,
|
||||
path: "/",
|
||||
secure: true,
|
||||
// secure: true,
|
||||
sameSite: "strict",
|
||||
// maxAge: 3600,
|
||||
maxAge: 3600,
|
||||
};
|
||||
|
||||
interface FilterListInterface {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ const Dashboard: React.FC = async () => {
|
|||
redirect("/login/email");
|
||||
}
|
||||
const eventsList = await retrieveAvailableEvents();
|
||||
console.log("eventsList", eventsList);
|
||||
const availableMenu = retrieveAvailableCategories(eventsList || []);
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -50,43 +50,20 @@ const BuildSubCategories = [
|
|||
},
|
||||
];
|
||||
|
||||
const LeftMenuCategories = [
|
||||
const AccountSubCategories = [
|
||||
{
|
||||
title: "Bina Tanımları",
|
||||
icon: BuildIcon,
|
||||
component: BuildPage,
|
||||
allEndpoints: [
|
||||
"/building/build/list",
|
||||
"/building/build/create",
|
||||
"/building/build/update/{build_uu_id}",
|
||||
"/building/parts/list",
|
||||
"/building/parts/create",
|
||||
"/building/parts/update/{build_uu_id}",
|
||||
"/building/area/list",
|
||||
"/building/area/create",
|
||||
"/building/area/update/{build_uu_id}",
|
||||
"/building/living_space/list",
|
||||
"/building/living_space/create",
|
||||
"/building/living_space/update/{build_uu_id}",
|
||||
],
|
||||
selfEndpoints: [
|
||||
"/building/build/list",
|
||||
"/building/build/create",
|
||||
"/building/build/update/{build_uu_id}",
|
||||
],
|
||||
subCategories: BuildSubCategories,
|
||||
title: "Bakiye Sorgulama",
|
||||
icon: AccountIcon,
|
||||
component: AccountPage,
|
||||
selfEndpoints: ["/account/records/list"],
|
||||
allEndpoints: [],
|
||||
subCategories: [],
|
||||
},
|
||||
{
|
||||
title: "Toplantılar",
|
||||
icon: meetingIcon,
|
||||
allEndpoints: [
|
||||
"/build/decision_book/invite/list",
|
||||
"/build/decision_book/invite/create",
|
||||
"/build/decision_book/invite/update",
|
||||
"/build/decision_book/invitations/assign",
|
||||
],
|
||||
component: BuildPage,
|
||||
subCategories: [
|
||||
];
|
||||
|
||||
const DecisionBookSubCategories: any = [];
|
||||
|
||||
const MeetingSubCategories = [
|
||||
{
|
||||
title: "Davetiyeler",
|
||||
icon: InviteIcon,
|
||||
|
|
@ -105,10 +82,63 @@ const LeftMenuCategories = [
|
|||
icon: TaskIcon,
|
||||
component: BuildPage,
|
||||
selfEndpoints: [],
|
||||
subCategories: [],
|
||||
allEndpoints: [],
|
||||
subCategories: [],
|
||||
},
|
||||
];
|
||||
|
||||
const buildAllEndpoints = [
|
||||
"/building/build/list",
|
||||
"/building/build/create",
|
||||
"/building/build/update/{build_uu_id}",
|
||||
"/building/parts/list",
|
||||
"/building/parts/create",
|
||||
"/building/parts/update/{build_uu_id}",
|
||||
"/building/area/list",
|
||||
"/building/area/create",
|
||||
"/building/area/update/{build_uu_id}",
|
||||
"/building/living_space/list",
|
||||
"/building/living_space/create",
|
||||
"/building/living_space/update/{build_uu_id}",
|
||||
];
|
||||
|
||||
const meetingAllEndpoints = [
|
||||
"/build/decision_book/invite/list",
|
||||
"/build/decision_book/invite/create",
|
||||
"/build/decision_book/invite/update",
|
||||
"/build/decision_book/invitations/assign",
|
||||
];
|
||||
|
||||
const accountAllEndpoints = ["/account/records/list"];
|
||||
|
||||
const LeftMenuCategories = [
|
||||
{
|
||||
title: "Bina Tanımları",
|
||||
icon: BuildIcon,
|
||||
component: BuildPage,
|
||||
allEndpoints: buildAllEndpoints,
|
||||
selfEndpoints: [
|
||||
"/building/build/list",
|
||||
"/building/build/create",
|
||||
"/building/build/update/{build_uu_id}",
|
||||
],
|
||||
subCategories: BuildSubCategories,
|
||||
},
|
||||
{
|
||||
title: "Toplantılar",
|
||||
icon: meetingIcon,
|
||||
allEndpoints: meetingAllEndpoints,
|
||||
component: BuildPage,
|
||||
selfEndpoints: [],
|
||||
subCategories: MeetingSubCategories,
|
||||
},
|
||||
{
|
||||
title: "Cari Hesaplar",
|
||||
icon: AccountIcon,
|
||||
component: BuildPage,
|
||||
selfEndpoints: [],
|
||||
allEndpoints: accountAllEndpoints,
|
||||
subCategories: AccountSubCategories,
|
||||
},
|
||||
{
|
||||
title: "Karar Defteri",
|
||||
|
|
@ -116,24 +146,7 @@ const LeftMenuCategories = [
|
|||
component: BuildPage,
|
||||
selfEndpoints: [],
|
||||
allEndpoints: [],
|
||||
subCategories: [],
|
||||
},
|
||||
{
|
||||
title: "Cari Hesaplar",
|
||||
icon: AccountIcon,
|
||||
component: BuildPage,
|
||||
selfEndpoints: [],
|
||||
allEndpoints: ["/account/records/list"],
|
||||
subCategories: [
|
||||
{
|
||||
title: "Bakiye Sorgulama",
|
||||
icon: AccountIcon,
|
||||
component: AccountPage,
|
||||
subCategories: [],
|
||||
selfEndpoints: ["/account/records/list"],
|
||||
allEndpoints: [],
|
||||
},
|
||||
],
|
||||
subCategories: DecisionBookSubCategories,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/EventButton";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
import Table from "@/components/ContextComponents/Commons/Table";
|
||||
|
||||
import { retrieveAvailableEvents } from "@/(apicalls)/cookies/token";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/EventButton";
|
||||
import Table from "@/components/ContextComponents/Commons/Table";
|
||||
import IsNotAllowedButton from "@/components/ContextComponents/Commons/isNotAllowedButton";
|
||||
import IsNotAllowed from "@/components/ContextComponents/Commons/PageisNotAllowed";
|
||||
import DeleteButton from "@/components/ContextComponents/Commons/ButtonDelete";
|
||||
import UpdateButton from "@/components/ContextComponents/Commons/ButtonUpdate";
|
||||
import CreateButton from "@/components/ContextComponents/Commons/ButtonCreate";
|
||||
import BuildUpdatePage from "@/components/ContextComponents/Building/Build/BuildUpdate";
|
||||
|
||||
import { retrieveAvailableEvents } from "@/(apicalls)/cookies/token";
|
||||
import { retrieveBuildList } from "@/(apicalls)/building/build";
|
||||
|
|
@ -10,28 +15,78 @@ const Build: React.FC = () => {
|
|||
const [renderTable, setRenderTable] = React.useState(false);
|
||||
const [renderCreate, setRenderCreate] = React.useState(false);
|
||||
const [renderUpdate, setRenderUpdate] = React.useState(false);
|
||||
const [renderDelete, setRenderDelete] = React.useState(false);
|
||||
const [isFormEnabled, setIsFormEnabled] = React.useState(false);
|
||||
const [rowData, setRowData] = React.useState({});
|
||||
const [formPage, setFormPage] = React.useState(<IsNotAllowed />);
|
||||
|
||||
const endpointNeeds = [
|
||||
{
|
||||
const endpointNeeds = {
|
||||
table: {
|
||||
endpoint: "/building/build/list",
|
||||
component: setRenderTable,
|
||||
component: renderTable ? (
|
||||
<Table
|
||||
createTable={retrieveBuildList}
|
||||
rowClickedFunction={setRowData}
|
||||
/>
|
||||
) : (
|
||||
<IsNotAllowed />
|
||||
),
|
||||
isRender: setRenderTable,
|
||||
},
|
||||
{
|
||||
update: {
|
||||
endpoint: "/building/build/create",
|
||||
component: setRenderCreate,
|
||||
component: renderUpdate ? (
|
||||
<UpdateButton
|
||||
buttonLabel="Bina Güncelle"
|
||||
isFormEnabled={isFormEnabled}
|
||||
pageToSet={
|
||||
<BuildUpdatePage
|
||||
rowData={rowData}
|
||||
setRowData={setRowData}
|
||||
formPageFunction={setFormPage}
|
||||
isFormEnabledFunction={setIsFormEnabled}
|
||||
/>
|
||||
}
|
||||
formPageFunction={setFormPage}
|
||||
isFormEnabledFunction={setIsFormEnabled}
|
||||
/>
|
||||
) : (
|
||||
<IsNotAllowedButton label="Bina Oluştur" />
|
||||
),
|
||||
isRender: setRenderCreate,
|
||||
},
|
||||
{
|
||||
create: {
|
||||
endpoint: "/building/build/update/{build_uu_id}",
|
||||
component: setRenderUpdate,
|
||||
component: renderCreate ? (
|
||||
<CreateButton
|
||||
title="Bina Oluştur Sayfasına Hoş geldiniz"
|
||||
buttonLabel="Yeni Bina ekle"
|
||||
isFormEnabled={isFormEnabled}
|
||||
formPageFunction={setFormPage}
|
||||
isFormEnabledFunction={setIsFormEnabled}
|
||||
/>
|
||||
) : (
|
||||
<IsNotAllowedButton label="Binayı Güncelle" />
|
||||
),
|
||||
isRender: setRenderUpdate,
|
||||
},
|
||||
];
|
||||
delete: {
|
||||
endpoint: "/building/build/delete",
|
||||
component: renderDelete ? (
|
||||
<DeleteButton onClick={() => () => setIsFormEnabled(true)} />
|
||||
) : (
|
||||
<IsNotAllowedButton label="Binayı Sil" />
|
||||
),
|
||||
isRender: setRenderDelete,
|
||||
},
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
retrieveAvailableEvents()
|
||||
.then((data) => {
|
||||
for (const endpointNeed of endpointNeeds) {
|
||||
for (const endpointNeed of Object.values(endpointNeeds)) {
|
||||
if (data?.availableEvents.includes(endpointNeed.endpoint)) {
|
||||
endpointNeed.component(true);
|
||||
endpointNeed.isRender(true);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -42,111 +97,18 @@ const Build: React.FC = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
{isFormEnabled ? (
|
||||
formPage
|
||||
) : (
|
||||
<div>
|
||||
<div className=" md:flex items-center py-5 my-5 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
{renderUpdate && (
|
||||
<EventButton
|
||||
onClick={() => console.log("Delete clicked")}
|
||||
label="Seçili Olanları Sil"
|
||||
bgColor="bg-emerald-700"
|
||||
icon={
|
||||
<svg
|
||||
className="fill-current"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{renderUpdate && (
|
||||
<EventButton
|
||||
onClick={() => console.log("Create clicked")}
|
||||
label="Kayıdı Güncelle"
|
||||
bgColor="bg-blue-500"
|
||||
icon={
|
||||
<svg
|
||||
className="fill-current"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{renderCreate && (
|
||||
<EventButton
|
||||
onClick={() => console.log("Create clicked")}
|
||||
label="Kayıt ekle"
|
||||
bgColor="bg-indigo-700"
|
||||
icon={
|
||||
<svg
|
||||
className="fill-current"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{endpointNeeds.update.component}
|
||||
{endpointNeeds.create.component}
|
||||
{endpointNeeds.delete.component}
|
||||
</div>
|
||||
{renderTable ? <Table createTable={retrieveBuildList} /> : <></>}
|
||||
{endpointNeeds.table.component}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
import React from "react";
|
||||
import PageUpdate from "@/components/ContextComponents/Commons/PageUpdate";
|
||||
import IsNotAllowed from "@/components/ContextComponents/Commons/PageisNotAllowed";
|
||||
|
||||
interface BuildUpdatePageButtonProps {
|
||||
rowData: any;
|
||||
setRowData: React.Dispatch<React.SetStateAction<any>>;
|
||||
formPageFunction: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
isFormEnabledFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
|
||||
const BuildUpdatePage: React.FC<BuildUpdatePageButtonProps> = ({
|
||||
rowData,
|
||||
setRowData,
|
||||
formPageFunction,
|
||||
isFormEnabledFunction,
|
||||
}) => {
|
||||
if (JSON.stringify(rowData) === "{}") {
|
||||
formPageFunction(<IsNotAllowed />);
|
||||
setRowData({});
|
||||
isFormEnabledFunction(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageUpdate
|
||||
title="Bina Güncelle Sayfasına Hoş geldiniz"
|
||||
rowData={rowData}
|
||||
setRowData={setRowData}
|
||||
formPageFunction={formPageFunction}
|
||||
isFormEnabledFunction={isFormEnabledFunction}
|
||||
onClickAction={() => console.log("Create button clicked")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default BuildUpdatePage;
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
import PageCreate from "@/components/ContextComponents/Commons/PageCreate";
|
||||
|
||||
interface CreateButtonProps {
|
||||
title: string;
|
||||
buttonLabel: string;
|
||||
isFormEnabled: boolean;
|
||||
formPageFunction: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
isFormEnabledFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
|
||||
const CreateButton: React.FC<CreateButtonProps> = ({
|
||||
title,
|
||||
buttonLabel,
|
||||
isFormEnabled,
|
||||
formPageFunction,
|
||||
isFormEnabledFunction,
|
||||
}) => {
|
||||
const pageCreate = (
|
||||
<PageCreate
|
||||
title={title}
|
||||
formPageFunction={formPageFunction}
|
||||
isFormEnabledFunction={isFormEnabledFunction}
|
||||
onClickAction={() => console.log("Create button clicked")}
|
||||
/>
|
||||
);
|
||||
|
||||
function openFormPage({
|
||||
isFormEnabled,
|
||||
setFormPage,
|
||||
setIsFormEnabled,
|
||||
}: {
|
||||
isFormEnabled: boolean;
|
||||
setFormPage: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
setIsFormEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}) {
|
||||
if (!isFormEnabled) {
|
||||
setFormPage(pageCreate);
|
||||
setIsFormEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<EventButton
|
||||
onClick={() =>
|
||||
openFormPage({
|
||||
isFormEnabled: isFormEnabled,
|
||||
setFormPage: formPageFunction,
|
||||
setIsFormEnabled: isFormEnabledFunction,
|
||||
})
|
||||
}
|
||||
label={buttonLabel}
|
||||
bgColor="bg-indigo-700"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-square-plus"
|
||||
>
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" />
|
||||
<path d="M8 12h8" />
|
||||
<path d="M12 8v8" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default CreateButton;
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
|
||||
interface DeleteButtonProps {
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
const DeleteButton: React.FC<DeleteButtonProps> = ({ onClick }) => {
|
||||
return (
|
||||
<EventButton
|
||||
onClick={() => onClick()}
|
||||
label="Seçili Olanları Sil"
|
||||
bgColor="bg-emerald-700"
|
||||
icon={
|
||||
<svg
|
||||
className="fill-current"
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
<path
|
||||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||||
fill=""
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeleteButton;
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
import React from "react";
|
||||
|
||||
interface EventButtonProps {
|
||||
onClick: () => void;
|
||||
onClick?: () => void;
|
||||
label: string;
|
||||
icon: React.ReactNode;
|
||||
bgColor?: string;
|
||||
ishover?: boolean;
|
||||
}
|
||||
|
||||
const EventButton: React.FC<EventButtonProps> = ({
|
||||
|
|
@ -12,14 +13,17 @@ const EventButton: React.FC<EventButtonProps> = ({
|
|||
label,
|
||||
icon,
|
||||
bgColor,
|
||||
ishover = true,
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
className="my-5 md:flex md:w-1/4 md:my-auto justify-center text-lg align-middle"
|
||||
onClick={() => onClick()}
|
||||
onClick={onClick ? () => onClick() : () => {}}
|
||||
>
|
||||
<div
|
||||
className={`w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 ${bgColor} px-10 py-4 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10`}
|
||||
className={`w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 ${bgColor} px-10 py-4 text-center font-medium text-white ${
|
||||
ishover ? "hover:bg-opacity-90" : ""
|
||||
} lg:px-8 xl:px-10`}
|
||||
>
|
||||
<span>{icon}</span>
|
||||
{label}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
|
||||
interface UpdateButtonProps {
|
||||
buttonLabel: string;
|
||||
isFormEnabled: boolean;
|
||||
pageToSet: React.JSX.Element;
|
||||
formPageFunction: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
isFormEnabledFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
|
||||
const UpdateButton: React.FC<UpdateButtonProps> = ({
|
||||
buttonLabel,
|
||||
isFormEnabled,
|
||||
pageToSet,
|
||||
formPageFunction,
|
||||
isFormEnabledFunction,
|
||||
}) => {
|
||||
function openFormPage({
|
||||
isFormEnabled,
|
||||
setFormPage,
|
||||
setIsFormEnabled,
|
||||
}: {
|
||||
isFormEnabled: boolean;
|
||||
setFormPage: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
setIsFormEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}) {
|
||||
if (!isFormEnabled) {
|
||||
setFormPage(pageToSet);
|
||||
setIsFormEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<EventButton
|
||||
onClick={() =>
|
||||
openFormPage({
|
||||
isFormEnabled: isFormEnabled,
|
||||
setFormPage: formPageFunction,
|
||||
setIsFormEnabled: isFormEnabledFunction,
|
||||
})
|
||||
}
|
||||
label={buttonLabel}
|
||||
bgColor="bg-blue-900"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-pen"
|
||||
>
|
||||
<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default UpdateButton;
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
import React from "react";
|
||||
import IsNotAllowed from "./PageisNotAllowed";
|
||||
import EventButton from "./ButtonEvent";
|
||||
|
||||
interface CreatePageButtonProps {
|
||||
title: string;
|
||||
formPageFunction: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
isFormEnabledFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
onClickAction: () => void;
|
||||
}
|
||||
|
||||
const PageCreate: React.FC<CreatePageButtonProps> = ({
|
||||
title,
|
||||
formPageFunction,
|
||||
isFormEnabledFunction,
|
||||
onClickAction,
|
||||
}) => {
|
||||
function closeFormPage() {
|
||||
formPageFunction(<IsNotAllowed />);
|
||||
isFormEnabledFunction(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className="text-center text-3xl">{title}</h1>
|
||||
<div className=" md:flex items-center py-5 my-5 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<EventButton
|
||||
onClick={() => closeFormPage()}
|
||||
label="Dashboarda Dön"
|
||||
bgColor="bg-red-700"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-square-x"
|
||||
>
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" ry="2" />
|
||||
<path d="m15 9-6 6" />
|
||||
<path d="m9 9 6 6" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
<div className="absolute right-0">
|
||||
<EventButton
|
||||
onClick={() => onClickAction()}
|
||||
label="Kaydet"
|
||||
bgColor="bg-emerald-700"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-check"
|
||||
>
|
||||
<path d="M20 6 9 17l-5-5" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageCreate;
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
import React from "react";
|
||||
import IsNotAllowed from "./PageisNotAllowed";
|
||||
import EventButton from "./ButtonEvent";
|
||||
|
||||
interface UpdatePageButtonProps {
|
||||
title: string;
|
||||
rowData: any;
|
||||
setRowData: React.Dispatch<React.SetStateAction<any>>;
|
||||
formPageFunction: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||
isFormEnabledFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
onClickAction: () => void;
|
||||
}
|
||||
|
||||
const PageUpdate: React.FC<UpdatePageButtonProps> = ({
|
||||
title,
|
||||
rowData,
|
||||
setRowData,
|
||||
formPageFunction,
|
||||
isFormEnabledFunction,
|
||||
onClickAction,
|
||||
}) => {
|
||||
function closeFormPage() {
|
||||
formPageFunction(<IsNotAllowed />);
|
||||
setRowData({});
|
||||
isFormEnabledFunction(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1 className="text-center text-3xl">{title}</h1>
|
||||
<div className=" md:flex items-center py-5 my-5 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<EventButton
|
||||
onClick={() => closeFormPage()}
|
||||
label="Dashboarda Dön"
|
||||
bgColor="bg-red-700"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-square-x"
|
||||
>
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" ry="2" />
|
||||
<path d="m15 9-6 6" />
|
||||
<path d="m9 9 6 6" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
<div className="absolute right-0">
|
||||
<EventButton
|
||||
onClick={() => onClickAction()}
|
||||
label="Kaydet"
|
||||
bgColor="bg-emerald-700"
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-check"
|
||||
>
|
||||
<path d="M20 6 9 17l-5-5" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{Object.entries(rowData).map(([key, value]: [string, any]) => {
|
||||
return (
|
||||
<>
|
||||
<h1>
|
||||
{key}: {value}
|
||||
</h1>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageUpdate;
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import React from "react";
|
||||
|
||||
const IsNotAllowed: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<div className="rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
||||
<div className="max-w-full max-h-full overflow-x-auto">
|
||||
<div className="w-full h-full ">
|
||||
<div className="text-center my-10">
|
||||
<span className="text-5xl font-serif font-bold text-black dark:text-white">
|
||||
Kullanıcı bu etkinliğe erişim iznine sahip değil.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default IsNotAllowed;
|
||||
|
|
@ -15,13 +15,14 @@ import {
|
|||
|
||||
interface TableProps {
|
||||
createTable: any;
|
||||
rowClickedFunction: React.Dispatch<React.SetStateAction<{}>>;
|
||||
}
|
||||
|
||||
const formSchema = z.object({
|
||||
searchText: z.string().default(""),
|
||||
});
|
||||
|
||||
const Table: React.FC<TableProps> = ({ createTable }) => {
|
||||
const Table: React.FC<TableProps> = ({ createTable, rowClickedFunction }) => {
|
||||
const [initalData, setInitalData] = React.useState([]);
|
||||
const [tabledata, settabledata] = React.useState([]);
|
||||
const [headersList, setHeadersList] = React.useState<string[]>([]);
|
||||
|
|
@ -51,10 +52,13 @@ const Table: React.FC<TableProps> = ({ createTable }) => {
|
|||
function selectItem({ key }: { key: number }) {
|
||||
tabledata.map((item, index) => {
|
||||
if (index === key) {
|
||||
item.selected = !item.selected;
|
||||
item.selected = true;
|
||||
} else {
|
||||
item.selected = false;
|
||||
}
|
||||
});
|
||||
settabledata([...tabledata] as any);
|
||||
rowClickedFunction(tabledata[key]);
|
||||
}
|
||||
|
||||
function cleanSelection() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
|
||||
interface IsNotAllowedButtonProps {
|
||||
label: string;
|
||||
}
|
||||
|
||||
const IsNotAllowedButton: React.FC<IsNotAllowedButtonProps> = ({ label }) => {
|
||||
return (
|
||||
<>
|
||||
<EventButton
|
||||
label={label}
|
||||
bgColor="bg-slate-400"
|
||||
ishover={false}
|
||||
icon={
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="lucide lucide-shield-ban"
|
||||
>
|
||||
<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />
|
||||
<path d="m4.243 5.21 14.39 12.472" />
|
||||
</svg>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default IsNotAllowedButton;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import EventButton from "@/components/ContextComponents/Commons/EventButton";
|
||||
import EventButton from "@/components/ContextComponents/Commons/ButtonEvent";
|
||||
import Table from "@/components/ContextComponents/Commons/Table";
|
||||
|
||||
import { retrieveAvailableEvents } from "@/(apicalls)/cookies/token";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
|
||||
import Landing from "../ContextComponents/Commons/Landing";
|
||||
import Landing from "../ContextComponents/Commons/PageLanding";
|
||||
import DefaultLayout from "@/components/Layouts/DefaultLayout";
|
||||
|
||||
interface DashboardPageProps {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import { retrieveAvailableCategories } from "@/appEvents/categories";
|
||||
// import { retrieveAvailableCategories } from "@/appEvents/categories";
|
||||
|
||||
interface SidebarItemProps {
|
||||
item: any;
|
||||
pageName: any;
|
||||
|
|
@ -27,23 +28,19 @@ const SidebarItem = ({
|
|||
}
|
||||
};
|
||||
|
||||
const isActive = (item: any) => {
|
||||
if (item.title === pageName?.title) {
|
||||
return item.children.some((child: any) => isActive(child));
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const isItemActive = isActive(item);
|
||||
// const isActive = (item: any) => {
|
||||
// if (item.title === pageName?.title) {
|
||||
// console.log("item.title", item.title);
|
||||
// return item.children.some((child: any) => isActive(child));
|
||||
// }
|
||||
// return false;
|
||||
// };
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>{item.title}</h1>
|
||||
<div
|
||||
onClick={handleClick}
|
||||
className={`${
|
||||
isItemActive ? "bg-graydark dark:bg-meta-4" : ""
|
||||
} group relative flex items-center gap-2.5 rounded-sm px-4 py-2 font-medium text-bodydark1 my-5 duration-300 ease-in-out hover:bg-graydark dark:hover:bg-meta-4`}
|
||||
className="h-12 group relative flex items-center gap-2.5 rounded-sm px-4 py-2 font-medium text-bodydark1 my-5 duration-300 ease-in-out hover:bg-graydark dark:hover:bg-meta-4"
|
||||
>
|
||||
{item.icon}
|
||||
{item.title}
|
||||
|
|
|
|||
|
|
@ -111,11 +111,11 @@ const Sidebar = ({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<nav className="mt-5 px-4 py-4 lg:mt-9 lg:px-6">
|
||||
<nav className="mt-5 mb-10 px-4 py-4 lg:mt-9 lg:px-6">
|
||||
<div className="my-5">
|
||||
<div
|
||||
onClick={clearMenu}
|
||||
className=" group relative flex items-center gap-2.5 rounded-sm px-4 py-2 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-graydark dark:hover:bg-meta-4"
|
||||
className="h-16 group relative flex items-center gap-2.5 rounded-sm px-4 py-2 font-medium bg-graydark text-bodydark1 duration-300 ease-in-out hover:bg-slate-950 dark:hover:bg-meta-4"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {
|
|||
RemoveFormattingIcon,
|
||||
SidebarClose,
|
||||
} from "lucide-react";
|
||||
import Landing from "../ContextComponents/Commons/Landing";
|
||||
import Landing from "../ContextComponents/Commons/PageLanding";
|
||||
|
||||
const formSchema = z.object({
|
||||
searchText: z.string().default(""),
|
||||
|
|
|
|||
Loading…
Reference in New Issue