fix pargar mande

This commit is contained in:
2026-07-25 12:13:30 +03:30
parent 9319906737
commit 7cd3fac28b
20 changed files with 608 additions and 41 deletions
+24
View File
@@ -0,0 +1,24 @@
import useAxios from '@/utils/useAxios'
export type AppNotificationSeverity = 'info' | 'success' | 'warning' | 'danger'
export interface CustomerAppNotification {
id: number
title: string
body: string
severity: AppNotificationSeverity
created_at?: string
is_read: boolean
}
export const getAppNotifications = async () =>
await useAxios.get<CustomerAppNotification[]>(`/customer/app_notifications`)
export const getAppNotificationsUnreadCount = async () =>
await useAxios.get<{ unread_count: number }>(`/customer/app_notifications/unread-count`)
export const markAppNotificationRead = async (id: number) =>
await useAxios.post(`/customer/app_notifications/${id}/read`)
export const markAllAppNotificationsRead = async () =>
await useAxios.post(`/customer/app_notifications/read-all`)