From 54b502e7a513f1e4f3e3d3a6e4c896ad314cba8f Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Mon, 26 Feb 2024 19:56:09 -0500 Subject: [PATCH] Initial implementation of Enrollment Flow infrastructure and Attribute Collector (CFM-31) --- app/config/schema/schema.json | 85 ++++++++++++++++++++ app/templates/EnrollmentFlows/fields-nav.inc | 49 +++++++++++ 2 files changed, 134 insertions(+) create mode 100644 app/templates/EnrollmentFlows/fields-nav.inc diff --git a/app/config/schema/schema.json b/app/config/schema/schema.json index f01e0e9dc..1e96101ca 100644 --- a/app/config/schema/schema.json +++ b/app/config/schema/schema.json @@ -544,6 +544,91 @@ } }, + "enrollment_flows": { + "columns": { + "id": {}, + "co_id": {}, + "name": {}, + "status": {}, + "sor_label": {}, + "authz_type": { "type": "string", "size": 2 }, + "authz_cou_id": { "type": "integer", "foreignkey": { "table": "cous", "column": "id" }}, + "authz_group_id": { "type": "integer", "foreignkey": { "table": "groups", "column": "id" }}, + "collect_enrollee_email": { "type": "boolean" }, + "redirect_on_finalize": { "type": "string", "size": 256 } + }, + "indexes": { + "enrollment_flows_i1": { "columns": [ "co_id" ]}, + "enrollment_flows_i2": { "needed": false, "columns": [ "authz_cou_id" ]}, + "enrollment_flows_i3": { "needed": false, "columns": [ "authz_group_id" ]} + } + }, + + "enrollment_flow_steps": { + "columns": { + "id": {}, + "enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }}, + "description": {}, + "status": {}, + "plugin": {}, + "ordr": {}, + "actor_type": { "type": "string", "size": 2 } + }, + "indexes": { + "enrollment_flow_steps_i1": { "columns": [ "enrollment_flow_id" ]} + } + }, + + "petitions": { + "columns": { + "id": {}, + "enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }}, + "status": {}, + "cou_id": {}, + "enrollee_email": { "type": "string", "size": 256 }, + "enrollee_identifier": { "type": "string", "size": 256 }, + "enrollee_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }}, + "petitioner_identifier": { "type": "string", "size": 256 }, + "petitioner_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }}, + "token": { "type": "string", "size": 256 } + }, + "indexes": { + "petitions_i1": { "columns": [ "enrollment_flow_id" ]}, + "petitions_i2": { "columns": [ "cou_id" ]}, + "petitions_i3": { "columns": [ "enrollee_person_id" ]}, + "petitions_i4": { "columns": [ "petitioner_person_id" ]} + } + }, + + "petition_step_results": { + "columns": { + "id": {}, + "petition_id": {}, + "enrollment_flow_step_id": {}, + "comment": {} + }, + "indexes": { + "petition_step_results_i1": { "columns": [ "petition_id" ] }, + "petition_step_results_i2": { "needed": false, "columns": [ "enrollment_flow_step_id" ] } + } + }, + + "petition_history_records": { + "columns": { + "id": {}, + "petition_id": {}, + "enrollment_flow_step_id": {}, + "action": {}, + "comment": {}, + "actor_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } } + }, + "indexes": { + "petition_history_records_i1": { "columns": [ "petition_id" ] }, + "petition_history_records_i2": { "columns": [ "actor_person_id" ] }, + "petition_history_records_i3": { "needed": false, "columns": [ "enrollment_flow_step_id" ] } + } + }, + "message_templates": { "columns": { "id": {}, diff --git a/app/templates/EnrollmentFlows/fields-nav.inc b/app/templates/EnrollmentFlows/fields-nav.inc new file mode 100644 index 000000000..0784d543c --- /dev/null +++ b/app/templates/EnrollmentFlows/fields-nav.inc @@ -0,0 +1,49 @@ + 'format_list_numbered', + 'order' => 'Default', + 'label' => __d('controller', 'EnrollmentFlowSteps', [99]), + 'link' => [ + 'controller' => 'enrollment_flow_steps', + 'action' => 'index', + 'enrollment_flow_id' => $vv_obj->id + ], + 'class' => '' +]; + +$topLinks[] = [ + 'icon' => 'start', + 'order' => 'Default', + 'label' => __d('operation', 'EnrollmentFlows.start'), + 'link' => [ + 'action' => 'start', + $vv_obj->id + ], + 'class' => '' +];