clean up sk/fb

This commit is contained in:
Rich Lott / Artful Robot 2025-02-28 10:02:33 +00:00
parent a967d9a538
commit 131ebcc684
7 changed files with 59 additions and 379 deletions

View file

@ -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,

View file

@ -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',
],
],

View file

@ -1,104 +0,0 @@
<?php
use CRM_Contactcats_ExtensionUtil as E;
return [
[
'name' => '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',
],
],
],
];

View file

@ -1,67 +0,0 @@
<?php
use CRM_Contactcats_ExtensionUtil as E;
return [
[
'name' => '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',
],
],
],
];

View file

@ -1,139 +0,0 @@
<?php
use CRM_Contactcats_ExtensionUtil as E;
return [
[
'name' => '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',
],
],
],
];