- Added hub_customer_id to TModuleApprovalStats for better tracking. - Introduced TModuleWizardEditRequest for editing time entries, allowing updates to description, hours, and billing method. - Implemented approval and rejection logic for Hub Worklogs, including handling negative IDs. - Created a new endpoint for updating entry details, supporting both Hub Worklogs and Module Times. - Updated frontend to include an edit modal for time entries, with specific fields for Hub Worklogs and Module Times. - Enhanced customer statistics retrieval to include pending counts from Hub Worklogs. - Added migrations for ticket enhancements, including new fields and constraints for worklogs and prepaid cards.
15 lines
609 B
SQL
15 lines
609 B
SQL
-- Migration 063: Ticket Enhancements (Types, Internal Notes, Worklog Visibility)
|
|
|
|
-- 1. Add ticket_type and internal_note to tickets
|
|
-- Defaults: ticket_type='incident' (for existing rows)
|
|
ALTER TABLE tticket_tickets
|
|
ADD COLUMN IF NOT EXISTS ticket_type VARCHAR(50) DEFAULT 'incident',
|
|
ADD COLUMN IF NOT EXISTS internal_note TEXT;
|
|
|
|
-- 2. Add is_internal to worklog (singular)
|
|
ALTER TABLE tticket_worklog
|
|
ADD COLUMN IF NOT EXISTS is_internal BOOLEAN DEFAULT FALSE;
|
|
|
|
-- 3. Create index for performance on filtering by type
|
|
CREATE INDEX IF NOT EXISTS idx_tticket_tickets_type ON tticket_tickets(ticket_type);
|