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:
parent
26feb8f2f1
commit
3b86c2c72f
@ -82,7 +82,7 @@ const AdminSupportTicketDetail = () => {
|
|||||||
return
|
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}» تغییر کند؟`, () => {
|
showAlert(`وضعیت تیکت به «${label}» تغییر کند؟`, () => {
|
||||||
void changeStatus(nextStatus)
|
void changeStatus(nextStatus)
|
||||||
|
|||||||
@ -348,11 +348,11 @@ const AdminEventDetail = () => {
|
|||||||
<AdminEventLifecycleActions
|
<AdminEventLifecycleActions
|
||||||
event={event}
|
event={event}
|
||||||
pendingId={pendingId}
|
pendingId={pendingId}
|
||||||
onApprove={() => void handleApprove()}
|
onApprove={handleApprove}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
onComplete={handleComplete}
|
onComplete={handleComplete}
|
||||||
onDelete={handleDelete}
|
onDelete={handleDelete}
|
||||||
onForcePublish={() => void handleForcePublish()}
|
onForcePublish={handleForcePublish}
|
||||||
onOpenReject={() => {
|
onOpenReject={() => {
|
||||||
setHasOpenedRejectModal(true)
|
setHasOpenedRejectModal(true)
|
||||||
setIsRejectModalOpen(true)
|
setIsRejectModalOpen(true)
|
||||||
|
|||||||
@ -475,7 +475,9 @@ const EventDiscountsPanel = ({ eventId, isFree, isEnded = false, isAdmin = false
|
|||||||
label=""
|
label=""
|
||||||
name={`code-active-${code.id}`}
|
name={`code-active-${code.id}`}
|
||||||
value={code.isActive}
|
value={code.isActive}
|
||||||
onValueChange={(next) => void handleToggleActive(code, Boolean(next))}
|
onValueChange={(next) => {
|
||||||
|
handleToggleActive(code, Boolean(next))
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<span className="text-xs text-secondary-30">
|
<span className="text-xs text-secondary-30">
|
||||||
{isEnded ? texts.events.eventEndedShort : code.isActive ? texts.events.availableToGuests : texts.events.deactivated}
|
{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}
|
disabled={!canMutateCodes || code.redeemedCount > 0 || pendingCodeId === code.id}
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
onClick={() => void handleDelete(code)}
|
onClick={() => {
|
||||||
|
handleDelete(code)
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{texts.common.delete}
|
{texts.common.delete}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -151,7 +151,9 @@ const AdminEventBookingsTab = ({ eventId, eventStatus, onCheckedIn }: AdminEvent
|
|||||||
isLoading={pendingId === bookingId}
|
isLoading={pendingId === bookingId}
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
onClick={() => void handleCheckIn(bookingId)}
|
onClick={() => {
|
||||||
|
handleCheckIn(bookingId)
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<FileCheckIcon className="size-4" />
|
<FileCheckIcon className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
2466
openapi.json
2466
openapi.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user