From 5b326544a144fb7b16f9406fdd527698674c4872 Mon Sep 17 00:00:00 2001 From: colemanw Date: Fri, 21 Jul 2023 13:25:02 -0400 Subject: [PATCH] AdminUI - Add Administer Scheduled Reminders page --- .../afsearchAdminScheduledReminders.aff.html | 9 + .../afsearchAdminScheduledReminders.aff.json | 8 + ...rch_Administer_Scheduled_Reminders.mgd.php | 202 ++++++++++++++++++ 3 files changed, 219 insertions(+) create mode 100644 ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.html create mode 100644 ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.json create mode 100644 ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php diff --git a/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.html b/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.html new file mode 100644 index 000000000000..4d5161e50fff --- /dev/null +++ b/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.html @@ -0,0 +1,9 @@ +
+
+
+ {{:: ts('Scheduled reminders allow you to automatically send messages to contacts regarding their memberships, participation in events, or other activities.') }} + {{:: ts('Learn more...') }} +
+
+ +
diff --git a/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.json b/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.json new file mode 100644 index 000000000000..36136fa0be35 --- /dev/null +++ b/ext/civicrm_admin_ui/ang/afsearchAdminScheduledReminders.aff.json @@ -0,0 +1,8 @@ +{ + "type": "search", + "title": "Scheduled Reminders", + "description": "Administer scheduled reminders", + "icon": "fa-list-alt", + "server_route": "civicrm/admin/scheduleReminders", + "permission": "administer CiviCRM data" +} diff --git a/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php new file mode 100644 index 000000000000..c19aef775332 --- /dev/null +++ b/ext/civicrm_admin_ui/managed/SavedSearch_Administer_Scheduled_Reminders.mgd.php @@ -0,0 +1,202 @@ + 'SavedSearch_Administer_Scheduled_Reminders', + 'entity' => 'SavedSearch', + 'cleanup' => 'always', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'Administer_Scheduled_Reminders', + 'label' => E::ts('Administer Scheduled Reminders'), + 'form_values' => NULL, + 'mapping_id' => NULL, + 'search_custom_id' => NULL, + 'api_entity' => 'ActionSchedule', + 'api_params' => [ + 'version' => 4, + 'select' => [ + 'title', + 'mapping_id:label', + 'entity_value:label', + 'entity_status:label', + 'is_repeat', + 'is_active', + 'start_action_offset', + 'start_action_unit:label', + 'start_action_condition', + 'start_action_date:label', + 'absolute_date', + ], + 'orderBy' => [], + 'where' => [], + 'groupBy' => [], + 'join' => [], + 'having' => [], + ], + 'expires_date' => NULL, + 'description' => NULL, + ], + 'match' => [ + 'name', + ], + ], + ], + [ + 'name' => 'SavedSearch_Administer_Scheduled_Reminders_SearchDisplay_Administer_Scheduled_Reminders_Table', + 'entity' => 'SearchDisplay', + 'cleanup' => 'always', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'name' => 'Administer_Scheduled_Reminders_Table', + 'label' => E::ts('Administer Scheduled Reminders Table'), + 'saved_search_id.name' => 'Administer_Scheduled_Reminders', + 'type' => 'table', + 'settings' => [ + 'description' => NULL, + 'sort' => [ + [ + 'title', + 'ASC', + ], + ], + 'limit' => 50, + 'pager' => [], + 'placeholder' => 5, + 'columns' => [ + [ + 'type' => 'field', + 'key' => 'title', + 'dataType' => 'String', + 'label' => E::ts('Title'), + 'sortable' => TRUE, + 'editable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'mapping_id:label', + 'dataType' => 'String', + 'label' => E::ts('Used For'), + 'sortable' => TRUE, + 'rewrite' => '[mapping_id:label] - [entity_value:label]', + ], + [ + 'type' => 'field', + 'key' => 'absolute_date', + 'dataType' => 'Date', + 'label' => E::ts('When'), + 'sortable' => TRUE, + 'empty_value' => '[start_action_offset] [start_action_unit:label] [start_action_condition] [start_action_date:label]', + ], + [ + 'type' => 'field', + 'key' => 'entity_status:label', + 'dataType' => 'String', + 'label' => E::ts('While'), + 'sortable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'is_repeat', + 'dataType' => 'Boolean', + 'label' => E::ts('Repeat'), + 'sortable' => TRUE, + ], + [ + 'type' => 'field', + 'key' => 'is_active', + 'dataType' => 'Boolean', + 'label' => E::ts('Enabled'), + 'sortable' => TRUE, + 'editable' => TRUE, + ], + [ + 'size' => 'btn-xs', + 'links' => [ + [ + 'entity' => 'ActionSchedule', + 'action' => 'update', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => 'fa-pencil', + 'text' => E::ts('Update'), + 'style' => 'default', + 'path' => '', + 'task' => '', + 'condition' => [], + ], + [ + 'task' => 'disable', + 'entity' => 'ActionSchedule', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => 'fa-toggle-off', + 'text' => E::ts('Disable'), + 'style' => 'default', + 'path' => '', + 'action' => '', + 'condition' => [ + 'is_active', + '=', + TRUE, + ], + ], + [ + 'task' => 'enable', + 'entity' => 'ActionSchedule', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => 'fa-toggle-on', + 'text' => E::ts('Enable'), + 'style' => 'default', + 'path' => '', + 'action' => '', + 'condition' => [ + 'is_active', + '=', + FALSE, + ], + ], + [ + 'entity' => 'ActionSchedule', + 'action' => 'delete', + 'join' => '', + 'target' => 'crm-popup', + 'icon' => 'fa-trash', + 'text' => E::ts('Delete'), + 'style' => 'danger', + 'path' => '', + 'task' => '', + 'condition' => [], + ], + ], + 'type' => 'buttons', + 'alignment' => 'text-right', + ], + ], + 'actions' => FALSE, + 'classes' => [ + 'table', + 'table-striped', + 'crm-sticky-header', + ], + 'addButton' => [ + 'path' => 'civicrm/admin/scheduleReminders/edit?reset=1&action=add', + 'text' => E::ts('Add Scheduled Reminder'), + 'icon' => 'fa-plus', + ], + ], + 'acl_bypass' => FALSE, + ], + 'match' => [ + 'name', + 'saved_search_id', + ], + ], + ], +];