DONE: queue management for customer side to get queue number, add logo to teller display, advertisement module
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 15 KiB |
@@ -13,8 +13,8 @@ const geistMono = Geist_Mono({
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Customer Queue",
|
||||
description: "Take a queue ticket for your branch and service",
|
||||
title: "MyKOPKB QMS-Customer App",
|
||||
description: "MyKOPKB QMS-Customer App",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import Link from "next/link";
|
||||
import CustomerTicketFlow from "@/components/CustomerTicketFlow";
|
||||
import { decodeBranchQrToken } from "@/lib/branchToken";
|
||||
|
||||
type PageProps = {
|
||||
params: Promise<{
|
||||
token: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export default async function BranchQrPage({ params }: PageProps) {
|
||||
const { token } = await params;
|
||||
const payload = decodeBranchQrToken(token);
|
||||
|
||||
if (!payload) {
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 flex-col bg-zinc-50">
|
||||
<main className="mx-auto flex w-full max-w-xl flex-col gap-4 px-6 py-12">
|
||||
<h1 className="text-2xl font-semibold text-zinc-900">Invalid link</h1>
|
||||
<p className="text-zinc-600">
|
||||
This branch QR link is not valid. Scan again or enter a company code.
|
||||
</p>
|
||||
<Link
|
||||
href="/"
|
||||
className="text-sm text-zinc-900 underline-offset-2 hover:underline"
|
||||
>
|
||||
Enter company code
|
||||
</Link>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 flex-col bg-zinc-50">
|
||||
<CustomerTicketFlow
|
||||
initialTenantCode={payload.tenantCode}
|
||||
initialBranchId={payload.branchId}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import Link from "next/link";
|
||||
import CustomerTicketFlow from "@/components/CustomerTicketFlow";
|
||||
|
||||
type PageProps = {
|
||||
params: Promise<{
|
||||
tenantCode: string;
|
||||
branchId: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export default async function BranchTicketPage({ params }: PageProps) {
|
||||
const { tenantCode, branchId: branchIdParam } = await params;
|
||||
const branchId = Number(branchIdParam);
|
||||
|
||||
if (!Number.isFinite(branchId)) {
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 flex-col bg-zinc-50">
|
||||
<main className="mx-auto flex w-full max-w-xl flex-col gap-4 px-6 py-12">
|
||||
<h1 className="text-2xl font-semibold text-zinc-900">Invalid link</h1>
|
||||
<p className="text-zinc-600">
|
||||
This branch QR link is not valid. Scan again or enter a company code.
|
||||
</p>
|
||||
<Link
|
||||
href="/"
|
||||
className="text-sm text-zinc-900 underline-offset-2 hover:underline"
|
||||
>
|
||||
Enter company code
|
||||
</Link>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 flex-col bg-zinc-50">
|
||||
<CustomerTicketFlow
|
||||
initialTenantCode={tenantCode}
|
||||
initialBranchId={branchId}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user