mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-26 16:57:19 +02:00
Add Category history saved search and searchkit display and afform for contact sum
This commit is contained in:
parent
93be452053
commit
142479d861
7 changed files with 228 additions and 20 deletions
110
managed/SavedSearch_Category_history.mgd.php
Normal file
110
managed/SavedSearch_Category_history.mgd.php
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
use CRM_Contactcats_ExtensionUtil as E;
|
||||
|
||||
return [
|
||||
[
|
||||
'name' => 'SavedSearch_Category_history',
|
||||
'entity' => 'SavedSearch',
|
||||
'cleanup' => 'unused',
|
||||
'update' => 'unmodified',
|
||||
'params' => [
|
||||
'version' => 4,
|
||||
'values' => [
|
||||
'name' => 'Category_history',
|
||||
'label' => E::ts('Category history'),
|
||||
'api_entity' => 'Activity',
|
||||
'api_params' => [
|
||||
'version' => 4,
|
||||
'select' => [
|
||||
'Activity_ActivityContact_Contact_01.id',
|
||||
'id',
|
||||
'Activity_ActivityContact_Contact_01.sort_name',
|
||||
'Category_changes.previous_category_id',
|
||||
'Category_changes.new_category_id',
|
||||
'activity_date_time',
|
||||
],
|
||||
'orderBy' => [],
|
||||
'where' => [
|
||||
[
|
||||
'activity_type_id:name',
|
||||
'=',
|
||||
'changed_contact_category',
|
||||
],
|
||||
],
|
||||
'groupBy' => [],
|
||||
'join' => [
|
||||
[
|
||||
'Contact AS Activity_ActivityContact_Contact_01',
|
||||
'INNER',
|
||||
'ActivityContact',
|
||||
[
|
||||
'id',
|
||||
'=',
|
||||
'Activity_ActivityContact_Contact_01.activity_id',
|
||||
],
|
||||
[
|
||||
'Activity_ActivityContact_Contact_01.record_type_id:name',
|
||||
'=',
|
||||
'"Activity Targets"',
|
||||
],
|
||||
],
|
||||
],
|
||||
'having' => [],
|
||||
],
|
||||
],
|
||||
'match' => ['name'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'SavedSearch_Category_history_SearchDisplay_Category_history_Category_1',
|
||||
'entity' => 'SearchDisplay',
|
||||
'cleanup' => 'unused',
|
||||
'update' => 'unmodified',
|
||||
'params' => [
|
||||
'version' => 4,
|
||||
'values' => [
|
||||
'name' => 'Category_history_Category_1',
|
||||
'label' => E::ts('Category history Category 1'),
|
||||
'saved_search_id.name' => 'Category_history',
|
||||
'type' => 'contact-cat',
|
||||
'settings' => [
|
||||
'something' => 'nothing',
|
||||
'limit' => 50,
|
||||
'sort' => [],
|
||||
'pager' => [],
|
||||
'columns' => [
|
||||
[
|
||||
'type' => 'field',
|
||||
'key' => 'Activity_ActivityContact_Contact_01.id',
|
||||
'dataType' => 'Integer',
|
||||
],
|
||||
[
|
||||
'type' => 'field',
|
||||
'key' => 'id',
|
||||
'dataType' => 'Integer',
|
||||
],
|
||||
[
|
||||
'type' => 'field',
|
||||
'key' => 'Activity_ActivityContact_Contact_01.sort_name',
|
||||
'dataType' => 'String',
|
||||
],
|
||||
[
|
||||
'type' => 'field',
|
||||
'key' => 'Category_changes.previous_category_id',
|
||||
'dataType' => 'Integer',
|
||||
],
|
||||
[
|
||||
'type' => 'field',
|
||||
'key' => 'Category_changes.new_category_id',
|
||||
'dataType' => 'Integer',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'match' => [
|
||||
'saved_search_id',
|
||||
'name',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue