diff --git a/ang/afsearchContactsByCategory.aff.html b/ang/afsearchContactsByCategory.aff.html index b07b107..29f645c 100644 --- a/ang/afsearchContactsByCategory.aff.html +++ b/ang/afsearchContactsByCategory.aff.html @@ -1,7 +1,4 @@
-
- - -
- + +
diff --git a/ang/afsearchContactsByCategory.aff.json b/ang/afsearchContactsByCategory.aff.json index dccb86a..3e80da9 100644 --- a/ang/afsearchContactsByCategory.aff.json +++ b/ang/afsearchContactsByCategory.aff.json @@ -1,31 +1,31 @@ { "type": "search", - "requires": null, - "entity_type": null, - "join_entity": null, - "title": "Contacts by category", - "description": "Individuals only", + "title": "Contacts by Category", "placement": [], - "summary_contact_type": null, - "summary_weight": null, "icon": "fa-tags", - "server_route": "civicrm/contact/search/category", - "is_public": false, + "server_route": "civicrm/search/contacts-by-category", "permission": [ "access CiviCRM" ], "permission_operator": "AND", + "navigation": { + "parent": "Search", + "label": "Contacts by Category", + "weight": 0 + }, + "modified_date": "2025-02-27 18:24:17", + "requires": null, + "entity_type": null, + "join_entity": null, + "description": null, + "summary_contact_type": null, + "summary_weight": null, + "is_public": false, "redirect": null, "submit_enabled": true, "submit_limit": null, - "create_submission": false, - "manual_processing": false, - "allow_verification_by_email": false, - "email_confirmation_template_id": null, - "navigation": { - "parent": "Search", - "label": "Contacts by category", - "weight": 0 - }, - "modified_date": "2025-02-25 14:51:17" + "create_submission": null, + "manual_processing": null, + "allow_verification_by_email": null, + "email_confirmation_template_id": null } diff --git a/managed/SavedSearch_Contact_Category_Counts.mgd.php b/managed/SavedSearch_Contact_Category_Counts.mgd.php index 7ace725..8389819 100644 --- a/managed/SavedSearch_Contact_Category_Counts.mgd.php +++ b/managed/SavedSearch_Contact_Category_Counts.mgd.php @@ -3,7 +3,7 @@ use CRM_Contactcats_ExtensionUtil as E; return [ [ - 'name' => 'SavedSearch_Contact_Category_Counts', + 'name' => 'SavedSearch_SavedSearch_Contact_Category_Counts', 'entity' => 'SavedSearch', 'cleanup' => 'unused', 'update' => 'unmodified', @@ -20,7 +20,7 @@ return [ 'label', 'color', 'icon', - 'COUNT(ContactCategoryDefinition_ContactCategory_category_definition_id_01.contact_id) AS COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_contact_id', + 'COUNT(ContactCategoryDefinition_ContactCategory_category_definition_id_01.id) AS COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_id', ], 'orderBy' => [], 'where' => [], @@ -43,7 +43,7 @@ return [ ], ], [ - 'name' => 'SavedSearch_Contact_Category_Counts_table', + 'name' => 'SavedSearch_SavedSearch_Contact_Category_Counts_SearchDisplay_Category_counts', 'entity' => 'SearchDisplay', 'cleanup' => 'unused', 'update' => 'unmodified', @@ -75,15 +75,20 @@ return [ 'field' => 'icon', 'side' => 'left', ], + [ + 'field' => 'icon', + 'side' => 'left', + ], ], 'cssRules' => [], ], [ 'type' => 'field', - 'key' => 'COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_contact_id', + 'key' => 'COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_id', 'dataType' => 'Integer', 'label' => E::ts('Count'), 'sortable' => TRUE, + 'alignment' => 'text-right', ], ], 'actions' => FALSE, diff --git a/managed/SavedSearch_Contacts_by_category.mgd.php b/managed/SavedSearch_Contacts_by_category_uxxr.mgd.php similarity index 53% rename from managed/SavedSearch_Contacts_by_category.mgd.php rename to managed/SavedSearch_Contacts_by_category_uxxr.mgd.php index f790916..e839292 100644 --- a/managed/SavedSearch_Contacts_by_category.mgd.php +++ b/managed/SavedSearch_Contacts_by_category_uxxr.mgd.php @@ -3,60 +3,45 @@ use CRM_Contactcats_ExtensionUtil as E; return [ [ - 'name' => 'SavedSearch_Contacts_by_category', + 'name' => 'SavedSearch_Contacts_by_category_uxxr', 'entity' => 'SavedSearch', 'cleanup' => 'unused', 'update' => 'unmodified', 'params' => [ 'version' => 4, 'values' => [ - 'name' => 'Contacts_by_category', + 'name' => 'Contacts_by_category_uxxr', 'label' => E::ts('Contacts by category'), 'api_entity' => 'Contact', 'api_params' => [ 'version' => 4, 'select' => [ 'id', - 'contact_sub_type:label', - 'display_name', - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', + 'sort_name', + 'contact_type:label', + 'Contact_ContactCategory_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', + 'email_primary.email', ], 'orderBy' => [], - 'where' => [ - [ - 'contact_type:name', - '=', - 'Individual', - ], - ], + 'where' => [], 'groupBy' => [], 'join' => [ [ - 'ContactCategory AS Contact_ContactCategory_contact_id_01', + 'ContactCategory AS Contact_ContactCategory_id_01', 'INNER', [ 'id', '=', - 'Contact_ContactCategory_contact_id_01.contact_id', - ], - [ - 'Contact_ContactCategory_contact_id_01.id', - '=', - 'id', + 'Contact_ContactCategory_id_01.id', ], ], [ - 'ContactCategoryDefinition AS Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01', + 'ContactCategoryDefinition AS Contact_ContactCategory_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01', 'INNER', [ - 'Contact_ContactCategory_contact_id_01.category_definition_id', + 'Contact_ContactCategory_id_01.category_definition_id', '=', - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.id', - ], - [ - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.id', - '=', - 'Contact_ContactCategory_contact_id_01.category_definition_id', + 'Contact_ContactCategory_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.id', ], ], ], @@ -67,24 +52,21 @@ return [ ], ], [ - 'name' => 'SavedSearch_Contacts_by_category_SearchDisplay_Contacts_by_category_Table_1', + 'name' => 'SavedSearch_Contacts_by_category_uxxr_SearchDisplay_Contacts_by_category', 'entity' => 'SearchDisplay', 'cleanup' => 'unused', 'update' => 'unmodified', 'params' => [ 'version' => 4, 'values' => [ - 'name' => 'Contacts_by_category_Table_1', + 'name' => 'Contacts_by_category', 'label' => E::ts('Contacts by category'), - 'saved_search_id.name' => 'Contacts_by_category', + 'saved_search_id.name' => 'Contacts_by_category_uxxr', 'type' => 'table', 'settings' => [ 'description' => E::ts(NULL), 'sort' => [ - [ - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', - 'ASC', - ], + ['sort_name', 'ASC'], ], 'limit' => 50, 'pager' => [], @@ -92,7 +74,7 @@ return [ 'columns' => [ [ 'type' => 'field', - 'key' => 'display_name', + 'key' => 'sort_name', 'dataType' => 'String', 'label' => E::ts('Name'), 'sortable' => TRUE, @@ -107,28 +89,34 @@ return [ ], [ 'type' => 'field', - 'key' => 'contact_sub_type:label', + 'key' => 'contact_type:label', 'dataType' => 'String', - 'label' => E::ts('Contact Subtype'), + 'label' => E::ts('Contact Type'), 'sortable' => TRUE, ], [ 'type' => 'field', - 'key' => 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', + 'key' => 'Contact_ContactCategory_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', 'dataType' => 'String', 'label' => E::ts('Category'), 'sortable' => TRUE, 'icons' => [ [ - 'field' => 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.icon', + 'field' => 'Contact_ContactCategory_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.icon', 'side' => 'left', ], ], ], + [ + 'type' => 'field', + 'key' => 'email_primary.email', + 'dataType' => 'String', + 'label' => E::ts('Email'), + 'sortable' => TRUE, + ], ], 'actions' => TRUE, - 'classes' => ['table-striped'], - 'headerCount' => TRUE, + 'classes' => ['table', 'table-striped'], 'actions_display_mode' => 'menu', ], ], diff --git a/managed/SavedSearch_SavedSearch_Contact_Category_Counts.mgd.php b/managed/SavedSearch_SavedSearch_Contact_Category_Counts.mgd.php deleted file mode 100644 index 8389819..0000000 --- a/managed/SavedSearch_SavedSearch_Contact_Category_Counts.mgd.php +++ /dev/null @@ -1,104 +0,0 @@ - 'SavedSearch_SavedSearch_Contact_Category_Counts', - 'entity' => 'SavedSearch', - 'cleanup' => 'unused', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'SavedSearch_Contact_Category_Counts', - 'label' => E::ts('Category Counts query'), - 'api_entity' => 'ContactCategoryDefinition', - 'api_params' => [ - 'version' => 4, - 'select' => [ - 'id', - 'label', - 'color', - 'icon', - 'COUNT(ContactCategoryDefinition_ContactCategory_category_definition_id_01.id) AS COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_id', - ], - 'orderBy' => [], - 'where' => [], - 'groupBy' => ['id'], - 'join' => [ - [ - 'ContactCategory AS ContactCategoryDefinition_ContactCategory_category_definition_id_01', - 'LEFT', - [ - 'id', - '=', - 'ContactCategoryDefinition_ContactCategory_category_definition_id_01.category_definition_id', - ], - ], - ], - 'having' => [], - ], - ], - 'match' => ['name'], - ], - ], - [ - 'name' => 'SavedSearch_SavedSearch_Contact_Category_Counts_SearchDisplay_Category_counts', - 'entity' => 'SearchDisplay', - 'cleanup' => 'unused', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'Category_counts', - 'label' => E::ts('Category counts'), - 'saved_search_id.name' => 'SavedSearch_Contact_Category_Counts', - 'type' => 'table', - 'settings' => [ - 'description' => E::ts('Shows a list of all categories and how many contacts are in each one.'), - 'sort' => [ - ['label', 'ASC'], - ], - 'limit' => 50, - 'pager' => FALSE, - 'placeholder' => 0, - 'columns' => [ - [ - 'type' => 'field', - 'key' => 'label', - 'dataType' => 'String', - 'label' => E::ts('Category'), - 'sortable' => TRUE, - 'rewrite' => '', - 'icons' => [ - [ - 'field' => 'icon', - 'side' => 'left', - ], - [ - 'field' => 'icon', - 'side' => 'left', - ], - ], - 'cssRules' => [], - ], - [ - 'type' => 'field', - 'key' => 'COUNT_ContactCategoryDefinition_ContactCategory_category_definition_id_01_id', - 'dataType' => 'Integer', - 'label' => E::ts('Count'), - 'sortable' => TRUE, - 'alignment' => 'text-right', - ], - ], - 'actions' => FALSE, - 'classes' => ['table', 'table-striped'], - ], - ], - 'match' => [ - 'saved_search_id', - 'name', - ], - ], - ], -]; diff --git a/managed/searchkit-category-for-contact-summary.mgd.php b/managed/searchkit-category-for-contact-summary.mgd.php deleted file mode 100644 index 78b5748..0000000 --- a/managed/searchkit-category-for-contact-summary.mgd.php +++ /dev/null @@ -1,67 +0,0 @@ - 'SavedSearch_Category_for_contact', - 'entity' => 'SavedSearch', - 'cleanup' => 'always', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'Category_for_contact', - 'label' => E::ts('Category for contact'), - 'api_entity' => 'ContactCategory', - 'api_params' => [ - 'version' => 4, - 'select' => [ - 'id', - 'category:label', - 'contact_id', - ], - 'orderBy' => [], - 'where' => [], - 'groupBy' => [], - 'join' => [], - 'having' => [], - ], - ], - 'match' => [ - 'name', - ], - ], - ], -[ - 'name' => 'SavedSearch_Category_for_contact_SearchDisplay_Category_for_contact_List_1', - 'entity' => 'SearchDisplay', - 'cleanup' => 'always', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'Category_for_contact_List_1', - 'label' => E::ts('Category for contact List 1'), - 'saved_search_id.name' => 'Category_for_contact', - 'type' => 'list', - 'settings' => [ - 'style' => 'ul', - 'limit' => 0, - 'sort' => [], - 'pager' => FALSE, - 'columns' => [ - [ - 'type' => 'field', - 'key' => 'category:label', - 'dataType' => 'Integer', - ], - ], - 'placeholder' => 0, - ], - ], - 'match' => [ - 'name', - ], - ], -], -]; diff --git a/managed/searchkit-contacts-by-category.mgd.php b/managed/searchkit-contacts-by-category.mgd.php deleted file mode 100644 index bb0f268..0000000 --- a/managed/searchkit-contacts-by-category.mgd.php +++ /dev/null @@ -1,139 +0,0 @@ - 'SavedSearch_Contacts_by_category', - 'entity' => 'SavedSearch', - 'cleanup' => 'always', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'Contacts_by_category', - 'label' => E::ts('Contacts by category'), - 'api_entity' => 'Contact', - 'api_params' => [ - 'version' => 4, - 'select' => [ - 'id', - 'contact_sub_type:label', - 'display_name', - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', - ], - 'orderBy' => [], - 'where' => [ - [ - 'contact_type:name', - '=', - 'Individual', - ], - ], - 'groupBy' => [], - 'join' => [ - [ - 'ContactCategory AS Contact_ContactCategory_contact_id_01', - 'INNER', - [ - 'id', - '=', - 'Contact_ContactCategory_contact_id_01.contact_id', - ], - [ - 'Contact_ContactCategory_contact_id_01.id', - '=', - 'id', - ], - ], - [ - 'ContactCategoryDefinition AS Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01', - 'INNER', - [ - 'Contact_ContactCategory_contact_id_01.category_definition_id', - '=', - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.id', - ], - [ - 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.id', - '=', - 'Contact_ContactCategory_contact_id_01.category_definition_id', - ], - ], - ], - 'having' => [], - ], - ], - 'match' => [ - 'name', - ], - ], - ], - [ - 'name' => 'SavedSearch_Contacts_by_category_SearchDisplay_Contacts_by_category_Table_1', - 'entity' => 'SearchDisplay', - 'cleanup' => 'always', - 'update' => 'unmodified', - 'params' => [ - 'version' => 4, - 'values' => [ - 'name' => 'Contacts_by_category_Table_1', - 'label' => E::ts('Contacts by category'), - 'saved_search_id.name' => 'Contacts_by_category', - 'type' => 'table', - 'settings' => [ - 'description' => NULL, - 'sort' => [ - [ - 'sort_name', - 'ASC', - ], - ], - 'limit' => 50, - 'pager' => [], - 'placeholder' => 5, - 'columns' => [ - [ - 'type' => 'field', - 'key' => 'display_name', - 'dataType' => 'String', - 'label' => E::ts('Name'), - 'sortable' => TRUE, - 'link' => [ - 'path' => '', - 'entity' => 'Contact', - 'action' => 'view', - 'join' => '', - 'target' => '', - ], - 'title' => E::ts('View Contact'), - ], - [ - 'type' => 'field', - 'key' => 'contact_sub_type:label', - 'dataType' => 'String', - 'label' => E::ts('Contact Subtype'), - 'sortable' => TRUE, - ], - [ - 'type' => 'field', - 'key' => 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label', - 'dataType' => 'String', - 'label' => E::ts('Category'), - 'sortable' => TRUE, - ], - ], - 'actions' => TRUE, - 'classes' => [ - 'table-striped', - ], - 'headerCount' => TRUE, - 'actions_display_mode' => 'menu', - ], - ], - 'match' => [ - 'saved_search_id', - 'name', - ], - ], - ], -];