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:
AmirReza Jamali
2025-09-30 12:43:41 +03:30
parent cfb95d3bb1
commit ae89c45a7e
9 changed files with 114 additions and 58 deletions
+19 -1
View File
@@ -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)),