-- Add multipleSelect option to Hours and Expenses tables in Case Management modal
UPDATE ui_modals
SET config = '{"title":"Case Management","header":[{"type":"filter-select","options":{"source_table":"cases","source_column":"id","display_column":"title","default_label":"Select Case","data_column":"case_id","scope":"admin_user","userField":"lead_rep_id"}}],"body":[{"type":"tabs","tabs":[{"label":"Details","elements":[{"type":"detail-view","viewId":2,"filterField":"case_id","tableName":"cases"}]},{"label":"Instructions","elements":[{"type":"button","label":"Add Instruction","formName":"Case Instruction","prefillFilter":"case_id"},{"type":"table","options":{"tableName":"case_instructions","showGlobalSearch":false,"addButton":false,"filterField":"case_id"}}]},{"label":"Documents","elements":[{"type":"documents","options":{"filterField":"case_id"}}]},{"label":"Hours","elements":[{"type":"button","label":"Add Hour","formName":"Case Hour","prefillFilter":"case_id"},{"type":"table","options":{"tableName":"case_hours","tableUrl":"../api/case_hours","showGlobalSearch":false,"addButton":false,"editFormId":38,"filterField":"case_id","multipleSelect":true}}]},{"label":"Expenses","elements":[{"type":"button","label":"Add Expense","formName":"Case Expense","prefillFilter":"case_id"},{"type":"table","options":{"tableName":"expenses","showGlobalSearch":false,"addButton":false,"editFormId":48,"filterField":"case_id","multipleSelect":true}}]},{"label":"Invoices","elements":[{"type":"button","label":"Create Invoice","formName":"Case Invoice"},{"type":"table","options":{"tableName":"invoices","showGlobalSearch":false,"addButton":false,"filterField":"case_id"}}]},{"label":"Payments","elements":[{"type":"button","label":"Record Payment","formName":"Case Payment"},{"type":"table","options":{"tableName":"payments","showGlobalSearch":false,"addButton":false,"filterField":"case_id"}}]}]}],"footer":[{"type":"button","label":"Close","onClick":"closeModal"}]}'
WHERE name = 'Case Management';
