Skip to content

Commit

Permalink
ui things v nice much wow
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Dec 10, 2023
1 parent b2f582d commit 88891e5
Show file tree
Hide file tree
Showing 10 changed files with 1,173 additions and 1,134 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/controllers/ticket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,14 @@ export function ticketRoutes(fastify: FastifyInstance) {

// Get all tickets (admin)
fastify.get(
"/api/v1/tickets/all/admin",
"/api/v1/tickets/all",
async (request: FastifyRequest, reply: FastifyReply) => {
const bearer = request.headers.authorization!.split(" ")[1];
const token = checkToken(bearer);

if (token) {
const tickets = await prisma.ticket.findMany({
where: { hidden: false },
orderBy: [
{
createdAt: "desc",
Expand Down
8 changes: 6 additions & 2 deletions apps/client/layouts/newLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ export default function NewLayout({ children }: any) {
"group -mx-2 flex gap-x-3 p-1 mll-2 text-xs font-semibold leading-6"
)}
>
<span className="whitespace-nowrap">open</span>
<span className="whitespace-nowrap">
{user.name}'s open
</span>
<div className="flex w-full justify-end float-right">
<span className="flex h-6 w-6 shrink-0 items-center bg-transparent border-none justify-center text-md font-medium">
o
Expand All @@ -436,7 +438,9 @@ export default function NewLayout({ children }: any) {
"group -mx-2 flex gap-x-3 p-1 text-xs font-semibold leading-6"
)}
>
<span className="whitespace-nowrap">closed</span>
<span className="whitespace-nowrap">
{user.name}'s closed
</span>
<div className="flex w-full justify-end float-right">
<span className="flex h-6 w-6 shrink-0 items-center bg-transparent border-none justify-center text-md font-medium">
f
Expand Down
144 changes: 71 additions & 73 deletions apps/client/layouts/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,101 +17,99 @@ export default function Settings({ children }) {
};

return (
<div>
<main className="relative">
<div className="max-w-screen-xl mx-auto pb-6 px-4 sm:px-6 lg:pb-16 lg:px-8">
<div className="bg-white rounded-lg shadow overflow-hidden">
<div className="divide-y divide-gray-200 lg:grid lg:grid-cols-12 lg:divide-y-0 lg:divide-x">
<aside className="py-6 lg:col-span-3">
<nav>
<Link
href="/settings/profile"
className={
router.pathname === "/settings/profile"
? linkStyles.active
: linkStyles.inactive
}
aria-current="page"
<main className="relative mt-8">
<div className="max-w-screen-xl mx-auto pb-6 px-4 sm:px-6 lg:pb-16 lg:px-8">
<div className="bg-white rounded-lg shadow overflow-hidden">
<div className="divide-y divide-gray-200 lg:grid lg:grid-cols-12 lg:divide-y-0 lg:divide-x">
<aside className="py-6 lg:col-span-3">
<nav>
<Link
href="/settings/profile"
className={
router.pathname === "/settings/profile"
? linkStyles.active
: linkStyles.inactive
}
aria-current="page"
>
<svg
className="text-teal-500 group-hover:text-teal-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
>
<svg
className="text-teal-500 group-hover:text-teal-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<span className="truncate">{t("profile")}</span>
</Link>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<span className="truncate">{t("profile")}</span>
</Link>

<Link
href="/settings/notifications"
className={
router.pathname === "/settings/notifications"
? linkStyles.active
: linkStyles.inactive
}
aria-current="page"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
className="flex-shrink-0 -ml-1 mr-3 h-6 w-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
/>
</svg>
<span className="truncate">{t("notifications")}</span>
</Link>

{!user.sso_active && (
<Link
href="/settings/notifications"
href="/settings/password"
className={
router.pathname === "/settings/notifications"
router.pathname === "/settings/password"
? linkStyles.active
: linkStyles.inactive
}
aria-current="page"
>
<svg
className=" flex-shrink-0 -ml-1 mr-3 h-6 w-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
className="flex-shrink-0 -ml-1 mr-3 h-6 w-6"
aria-hidden="true"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
stroke-width="2"
d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"
/>
</svg>
<span className="truncate">{t("notifications")}</span>
<span className="truncate">{t("reset_password")}</span>
</Link>
)}
</nav>
</aside>

{!user.sso_active && (
<Link
href="/settings/password"
className={
router.pathname === "/settings/password"
? linkStyles.active
: linkStyles.inactive
}
>
<svg
className=" flex-shrink-0 -ml-1 mr-3 h-6 w-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"
/>
</svg>
<span className="truncate">{t("reset_password")}</span>
</Link>
)}
</nav>
</aside>

<div className=" lg:col-span-9">{children}</div>
</div>
<div className=" lg:col-span-9">{children}</div>
</div>
</div>
</main>
</div>
</div>
</main>
);
}
2 changes: 1 addition & 1 deletion apps/client/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function Home() {
}, []);

return (
<div className="flex flex-col xl:flex-row min-h-[85vh] p-8 justify-center w-full">
<div className="flex flex-col xl:flex-row p-8 justify-center w-full">
<div className="w-full xl:w-[70%] max-w-5xl">
{!loading && (
<>
Expand Down
6 changes: 3 additions & 3 deletions apps/client/pages/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function CreateTicket() {
}, []);

return (
<div className="min-h-screen overflow-hidden bg-white">
<div className="overflow-hidden bg-white">
<div className="w-full border-b-[1px] p-2 flex flex-row justify-between items-center">
<div className="flex flex-row space-x-4">
<Listbox value={company} onChange={setCompany}>
Expand Down Expand Up @@ -375,7 +375,7 @@ export default function CreateTicket() {
</div>
</div>
<div className="flex flex-col xl:flex-row h-full w-full">
<div className="w-full xl:w-2/3 order-2 xl:order-1">
<div className="w-full xl:w-2/3 order-2 xl:order-2">
<RichTextEditor
editor={editor}
style={{ borderRadius: 0, border: 0 }}
Expand Down Expand Up @@ -423,7 +423,7 @@ export default function CreateTicket() {
<RichTextEditor.Content style={{ minHeight: "50vh" }} />
</RichTextEditor>
</div>
<div className="w-full xl:w-1/4 p-3 flex flex-col border-b-[1px] xl:border-b-0 xl:border-l-[1px] order-1 xl:order-2">
<div className="w-full xl:w-1/6 p-3 flex flex-col border-b-[1px] xl:border-b-0 xl:border-r-[1px] order-1 xl:order-1">
<div className="flex flex-col">
<input
type="text"
Expand Down
22 changes: 10 additions & 12 deletions apps/client/pages/notebook/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,17 @@ export default function NoteBooksIndex() {
}

return (
<>
<div className="px-4 sm:px-6 lg:px-8">
<div className="sm:flex sm:items-center">
<div className="sm:flex-auto">
<h1 className="text-base font-semibold leading-6 text-gray-900">
{t("notebooks")}
</h1>
<p className="mt-2 text-sm text-gray-700">
{t("notebooks_description")}
</p>
</div>
<div className="px-4 py-4 sm:px-6 lg:px-8">
<div className="sm:flex sm:items-center">
<div className="sm:flex-auto">
<h1 className="text-base font-semibold leading-6 text-gray-900">
{t("notebooks")}
</h1>
<p className="mt-2 text-sm text-gray-700">
{t("notebooks_description")}
</p>
</div>
</div>
</>
</div>
);
}
Loading

0 comments on commit 88891e5

Please sign in to comment.