feat(api): add notifications endpoints for user notifications

Introduced new API endpoints for managing in-app notifications. The `/api/v1/notifications/me` endpoint retrieves a paginated list of notifications for the authenticated user, while the `/api/v1/notifications/me/unread-count` endpoint returns the count of unread notifications. Enhanced the OpenAPI documentation to reflect these changes, including detailed parameter descriptions and response schemas for better clarity and usability.
This commit is contained in:
alisaza 2026-09-13 13:04:02 +03:30
parent 26feb8f2f1
commit 3b86c2c72f
5 changed files with 1245 additions and 1239 deletions

View File

@ -82,7 +82,7 @@ const AdminSupportTicketDetail = () => {
return
}
const label = SUPPORT_ADMIN_STATUS_LABELS[nextStatus as keyof typeof SUPPORT_ADMIN_STATUS_LABELS] ?? nextStatus
const label = SUPPORT_ADMIN_STATUS_LABELS[nextStatus] ?? nextStatus
showAlert(`وضعیت تیکت به «${label}» تغییر کند؟`, () => {
void changeStatus(nextStatus)

View File

@ -348,11 +348,11 @@ const AdminEventDetail = () => {
<AdminEventLifecycleActions
event={event}
pendingId={pendingId}
onApprove={() => void handleApprove()}
onApprove={handleApprove}
onCancel={handleCancel}
onComplete={handleComplete}
onDelete={handleDelete}
onForcePublish={() => void handleForcePublish()}
onForcePublish={handleForcePublish}
onOpenReject={() => {
setHasOpenedRejectModal(true)
setIsRejectModalOpen(true)

View File

@ -475,7 +475,9 @@ const EventDiscountsPanel = ({ eventId, isFree, isEnded = false, isAdmin = false
label=""
name={`code-active-${code.id}`}
value={code.isActive}
onValueChange={(next) => void handleToggleActive(code, Boolean(next))}
onValueChange={(next) => {
handleToggleActive(code, Boolean(next))
}}
/>
<span className="text-xs text-secondary-30">
{isEnded ? texts.events.eventEndedShort : code.isActive ? texts.events.availableToGuests : texts.events.deactivated}
@ -486,7 +488,9 @@ const EventDiscountsPanel = ({ eventId, isFree, isEnded = false, isAdmin = false
disabled={!canMutateCodes || code.redeemedCount > 0 || pendingCodeId === code.id}
size="sm"
variant="flat"
onClick={() => void handleDelete(code)}
onClick={() => {
handleDelete(code)
}}
>
{texts.common.delete}
</Button>

View File

@ -151,7 +151,9 @@ const AdminEventBookingsTab = ({ eventId, eventStatus, onCheckedIn }: AdminEvent
isLoading={pendingId === bookingId}
size="sm"
variant="flat"
onClick={() => void handleCheckIn(bookingId)}
onClick={() => {
handleCheckIn(bookingId)
}}
>
<FileCheckIcon className="size-4" />
</Button>

File diff suppressed because it is too large Load Diff