a8d95d5f92
- Enable Contact Us navigation menu item in sidebar with visible flag set to true - Create TContacts type schema with Zod validation for API responses - Add type safety to contactUsService.getAllContactUs() with return type annotation - Implement contact list table rendering with proper data mapping - Display contact information columns: full name, email, status, phone, created date - Add date formatting using unixToDate utility for created_at timestamps - Update useContactUsListPresenter to return properly structured contacts data - Refactor table columns array to include all contact detail fields - Follows established pattern from recent filtering feature implementations
92 lines
1.9 KiB
TypeScript
92 lines
1.9 KiB
TypeScript
import { GlobeSearch } from "@/assets/icons";
|
|
import { z } from "zod";
|
|
import * as Icons from "../icons";
|
|
|
|
const navSubItemSchema: z.ZodType<any> = z.lazy(() =>
|
|
z.object({
|
|
title: z.string(),
|
|
url: z.string(),
|
|
icon: z.any(),
|
|
items: z.array(navSubItemSchema),
|
|
}),
|
|
);
|
|
|
|
const navItemSchema = z.object({
|
|
label: z.string(),
|
|
items: z.array(navSubItemSchema),
|
|
});
|
|
|
|
const navDataSchema = z.array(navItemSchema);
|
|
export type NavSubItem = z.infer<typeof navSubItemSchema>;
|
|
export type NavData = z.infer<typeof navDataSchema>;
|
|
|
|
export const NAV_DATA: NavData = [
|
|
{
|
|
label: "",
|
|
items: [
|
|
{
|
|
title: "Dashboard",
|
|
url: "/",
|
|
icon: Icons.HomeIcon,
|
|
items: [],
|
|
},
|
|
{
|
|
title: "Admins",
|
|
url: "/admins",
|
|
icon: Icons.User,
|
|
items: [],
|
|
},
|
|
{
|
|
title: "Manage Companies",
|
|
url: "",
|
|
icon: Icons.Building,
|
|
items: [
|
|
{
|
|
icon: Icons.Building,
|
|
url: "/companies",
|
|
title: "Companies",
|
|
items: [],
|
|
},
|
|
{
|
|
icon: Icons.Building,
|
|
url: "/company-categories",
|
|
title: "Company Categories",
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Customers",
|
|
url: "/customers",
|
|
icon: Icons.User,
|
|
items: [],
|
|
},
|
|
{
|
|
title: "Tenders",
|
|
url: "/tenders",
|
|
icon: Icons.Table,
|
|
items: [],
|
|
},
|
|
{
|
|
title: "Notifications",
|
|
url: "/notification-history",
|
|
icon: Icons.NotificationIcon,
|
|
items: [],
|
|
},
|
|
{
|
|
title: "Contact Us",
|
|
url: "/contact-us",
|
|
icon: Icons.CallIncome,
|
|
items: [],
|
|
visible: true,
|
|
},
|
|
{
|
|
title: "Marketing",
|
|
url: "/marketing",
|
|
icon: GlobeSearch,
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
];
|