feat(notifications): Implement notification details page and card
This commit introduces a dedicated page for viewing the full details of a notification and refactors the related UI components for better modularity and user experience. Key changes include: - Created a new reusable `NotificationDetailsCard` component to display notification details, decoupling the presentation logic from the page. - Refactored the notification details page (`/notification-history/[id]`) to use the new card component, resulting in cleaner code. - Made notification items in the header dropdown clickable, linking each to its respective details page. - Added a dedicated "Mark as Read" button to each notification item in the dropdown for improved usability. - Updated the application's global title metadata for branding consistency. - Added a specific page title for the Tenders page to improve SEO and navigation.
This commit is contained in:
@@ -8,7 +8,7 @@ import { z } from "zod";
|
||||
import { createApiResponseSchema } from "./Factory";
|
||||
|
||||
export const notificationSchema = z.object({
|
||||
created_at: z.string(),
|
||||
created_at: z.number(),
|
||||
event_type: z.string(),
|
||||
id: z.string(),
|
||||
image: z.string(),
|
||||
@@ -35,6 +35,24 @@ export const notificationSchema = z.object({
|
||||
type: z.string(),
|
||||
updated_at: z.string(),
|
||||
user_id: z.string(),
|
||||
recipient: z
|
||||
.object({
|
||||
id: z.string(),
|
||||
full_name: z.string(),
|
||||
username: z.string(),
|
||||
email: z.string(),
|
||||
role: z.string(),
|
||||
status: z.string(),
|
||||
department: z.string(),
|
||||
position: z.string(),
|
||||
phone: z.string(),
|
||||
profile_image: z.string(),
|
||||
is_verified: z.boolean(),
|
||||
last_login_at: z.number(),
|
||||
updated_at: z.number(),
|
||||
created_at: z.number(),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
const createNotificationCredentialsSchema = z.object({
|
||||
channels: z.array(z.enum(NotificationChannels)),
|
||||
|
||||
Reference in New Issue
Block a user