diff --git a/ondeck/src/components/admin/task-template-manager.tsx b/ondeck/src/components/admin/task-template-manager.tsx index 2da6b75..9318d66 100644 --- a/ondeck/src/components/admin/task-template-manager.tsx +++ b/ondeck/src/components/admin/task-template-manager.tsx @@ -66,6 +66,7 @@ interface TaskTemplate { displayOrder: number | null level: TaskLevel designationId: string | null + policyTypeFilter: string | null designation: Designation | null _count: { tasks: number } } @@ -102,6 +103,25 @@ const LEVELS: { value: TaskLevel; label: string }[] = [ { value: 'POLICY', label: 'Policy only' }, ] +const POLICY_TYPES = [ + 'Workers Compensation', + 'Package', + 'General Liability', + 'Business Auto', + 'Umbrella(C)', + 'Commercial Property', + 'Inland Marine (C)', + 'Cyber Liability', + 'BOP', + 'Crime', + 'Pollution Liability', + 'Errors & Ommissions Professional Liability', + 'Employment Practices Liability', + 'Directors & Officers', + 'Motor Truck Cargo', + 'ERISA', +] + const emptyTemplate = { name: '', description: '', @@ -114,6 +134,7 @@ const emptyTemplate = { displayOrder: null as number | null, level: 'BOTH' as TaskLevel, designationId: null as string | null, + policyTypeFilter: null as string | null, } export function TaskTemplateManager({ @@ -166,6 +187,7 @@ export function TaskTemplateManager({ displayOrder: template.displayOrder, level: template.level, designationId: template.designationId, + policyTypeFilter: template.policyTypeFilter, }) setIsDialogOpen(true) } @@ -188,6 +210,7 @@ export function TaskTemplateManager({ description: formData.description || null, displayOrder: formData.displayOrder || null, designationId: formData.designationId || null, + policyTypeFilter: formData.policyTypeFilter || null, }), }) @@ -477,6 +500,31 @@ export function TaskTemplateManager({ +
Only generate this task for policies of this type. Leave blank for all types.
+