feat: Implement ticket commenting functionality
Adds the ability for users to comment on tickets, view comments, and distinguish between user and admin responses. Also introduces a new 'SUSPENDED' status for tickets and refactors database schema and API endpoints to support comments.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
import { Family, Payment, AppSettings, User, AlertDefinition, Condo, Notice, NoticeRead, Ticket, TicketAttachment } from '../types';
|
||||
import { Family, Payment, AppSettings, User, AlertDefinition, Condo, Notice, NoticeRead, Ticket, TicketAttachment, TicketComment } from '../types';
|
||||
|
||||
// --- CONFIGURATION TOGGLE ---
|
||||
const FORCE_LOCAL_DB = false;
|
||||
@@ -325,6 +325,17 @@ export const CondoService = {
|
||||
return request<TicketAttachment>(`/tickets/${ticketId}/attachments/${attachmentId}`);
|
||||
},
|
||||
|
||||
getTicketComments: async (ticketId: string): Promise<TicketComment[]> => {
|
||||
return request<TicketComment[]>(`/tickets/${ticketId}/comments`);
|
||||
},
|
||||
|
||||
addTicketComment: async (ticketId: string, text: string): Promise<void> => {
|
||||
await request(`/tickets/${ticketId}/comments`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ text })
|
||||
});
|
||||
},
|
||||
|
||||
// --- SEEDING ---
|
||||
seedPayments: () => {
|
||||
// No-op in remote mode
|
||||
|
||||
Reference in New Issue
Block a user