wag-frontend-version-3/oldCode/pageTemplate.tsx

50 lines
1.7 KiB
TypeScript

const BuildingPage = (
<div className="p-4 overflow-hidden">
<h1 className="text-2xl font-bold mb-4 ">Dashboard</h1>
<form
action={handleFormSubmission}
className="bg-white p-4 rounded-lg shadow"
>
<div className="grid gap-4">
<p>Welcome to your dashboard</p>
{restrictionsChecked?.create && (
<Link
href={"/building/create"}
className="flex items-center justify-center gap-2 px-4 py-2 bg-slate-500 text-white rounded hover:bg-slate-700"
>
<PlusCircle size={16} />
Create
</Link>
)}
<h1>{JSON.stringify(queryEncrypt)}</h1>
{restrictionsChecked && (
<>
<input type="hidden" name="section" value={buildKey} readOnly />
<TableComponent
restrictions={restrictionsChecked}
query={queryEncrypt?.query || {}}
orderByValue={queryEncrypt?.orderBy || "uu_id"}
orderTypeValue={queryEncrypt?.orderType || "asc"}
/>
</>
)}
<button
type="submit"
className="flex items-center justify-center gap-2 px-4 py-2 bg-slate-500 text-white rounded hover:bg-slate-700"
>
<RefreshCcw size={16} />
Search
</button>
<Pagination
size={parseInt(queryEncrypt?.size || "10")}
page={parseInt(queryEncrypt?.page || "1")}
orderBy={queryEncrypt?.orderBy || "id"}
orderType={queryEncrypt?.orderType || "asc"}
totalPage={3}
/>
</div>
</form>
</div>
);