SK/FB work

This commit is contained in:
Rich Lott / Artful Robot 2025-02-25 17:42:47 +00:00
parent 16f2b6235d
commit a4c9251f5e
10 changed files with 163 additions and 233 deletions

View file

@ -1,24 +0,0 @@
<?php
use CRM_Contactcats_ExtensionUtil as E;
return [
[
'name' => 'OptionValue_changed_contact_category',
'entity' => 'OptionValue',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'option_group_id.name' => 'activity_type',
'label' => E::ts('Changed Contact Category'),
'name' => 'changed_contact_category',
'icon' => 'fa-tags',
],
'match' => [
'option_group_id',
'name',
],
],
],
];

View file

@ -1,83 +0,0 @@
<?php
use CRM_Contactcats_ExtensionUtil as E;
return [
[
'name' => 'SavedSearch_Contact_Category_Summary',
'entity' => 'SavedSearch',
'cleanup' => 'always',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'name' => 'Contact_Category_Summary',
'label' => E::ts('Contact Category Summary'),
'api_entity' => 'ContactCategory',
'api_params' => [
'version' => 4,
'select' => [
'category:label',
'COUNT(contact_id) AS COUNT_contact_id',
],
'orderBy' => [],
'where' => [],
'groupBy' => [
'category',
],
'join' => [],
'having' => [],
],
],
'match' => [
'name',
],
],
],
[
'name' => 'SavedSearch_Contact_Category_Summary_SearchDisplay_Contact_Category_Summary',
'entity' => 'SearchDisplay',
'cleanup' => 'always',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'name' => 'Contact_Category_Summary',
'label' => E::ts('Contact Category Summary'),
'saved_search_id.name' => 'Contact_Category_Summary',
'type' => 'table',
'settings' => [
'description' => NULL,
'sort' => [],
'limit' => 0,
'pager' => FALSE,
'placeholder' => 5,
'columns' => [
[
'type' => 'field',
'key' => 'category:label',
'dataType' => 'Integer',
'label' => E::ts('Category'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'COUNT_contact_id',
'dataType' => 'Integer',
'label' => E::ts('Count'),
'sortable' => TRUE,
],
],
'actions' => TRUE,
'classes' => [
'table',
'table-striped',
],
],
],
'match' => [
'saved_search_id',
'name',
],
],
],
];

View file

@ -19,11 +19,7 @@ return [
'id',
'contact_sub_type:label',
'display_name',
'Contact_ContactCategory_contact_id_01.category:label',
'Synopsis_Fields.Amount_of_last_contribution',
'Synopsis_Fields.Date_of_Last_Contribution',
'Synopsis_Fields.Total_Lifetime_Contributions',
'Synopsis_Fields.Total_count_of_contributions',
'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label',
],
'orderBy' => [],
'where' => [
@ -43,6 +39,25 @@ return [
'=',
'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' => [],
@ -77,13 +92,6 @@ return [
'pager' => [],
'placeholder' => 5,
'columns' => [
[
'type' => 'field',
'key' => 'Contact_ContactCategory_contact_id_01.category:label',
'dataType' => 'Integer',
'label' => E::ts('Category'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'display_name',
@ -108,34 +116,10 @@ return [
],
[
'type' => 'field',
'key' => 'Synopsis_Fields.Total_Lifetime_Contributions',
'dataType' => 'Money',
'label' => E::ts('£ total'),
'key' => 'Contact_ContactCategory_contact_id_01_ContactCategory_ContactCategoryDefinition_category_definition_id_01.label',
'dataType' => 'String',
'label' => E::ts('Category'),
'sortable' => TRUE,
'alignment' => 'text-right',
],
[
'type' => 'field',
'key' => 'Synopsis_Fields.Total_count_of_contributions',
'dataType' => 'Integer',
'label' => E::ts('Count donations'),
'sortable' => TRUE,
'alignment' => 'text-right',
],
[
'type' => 'field',
'key' => 'Synopsis_Fields.Date_of_Last_Contribution',
'dataType' => 'Timestamp',
'label' => E::ts('Latest donation'),
'sortable' => TRUE,
],
[
'type' => 'field',
'key' => 'Synopsis_Fields.Amount_of_last_contribution',
'dataType' => 'Money',
'label' => E::ts('£ latest'),
'sortable' => TRUE,
'alignment' => 'text-right',
],
],
'actions' => TRUE,
@ -143,9 +127,11 @@ return [
'table-striped',
],
'headerCount' => TRUE,
'actions_display_mode' => 'menu',
],
],
'match' => [
'saved_search_id',
'name',
],
],