[Legacy] Add case updates widget configuration

This commit is contained in:
Clemente Raposo 2021-05-13 15:27:59 +01:00 committed by Dillon-Brown
parent 114f04dd97
commit d38a6850b0

View file

@ -139,21 +139,120 @@ array(
]
]
],
['type' => 'statistics',
[
'type' => 'record-thread',
'labelKey' => 'LBL_CASE_UPDATES',
'options' => [
'sidebarStatistic' => [
'rows' => [
[
'align' => 'start',
'cols' => [
[
'icon' => 'CaseUpdate',
'iconClass' => 'img-fluid',
]
]
],
]
'recordThread' => [
'module' => 'case-updates',
'class' => 'case-updates',
'filters' => [
'parentFilters' => [
'id' => 'case_id'
],
'orderBy' => 'date_entered',
'sortOrder' => 'DESC'
],
'item' => [
'itemClass' => 'case-updates-item pt-2 pb-2',
'collapsible' => true,
'layout' => [
'header' => [
'rows' => [
[
'justify' => 'start',
'align' => 'end',
'cols' => [
[
'field' => 'author',
'labelDisplay' => 'none',
'hideIfEmpty' => true,
'class' => 'font-weight-light'
],
[
'field' => 'date_entered',
'labelDisplay' => 'none',
'hideIfEmpty' => true,
'class' => 'small ml-auto font-weight-light'
],
]
],
]
],
'body' =>[
'rows' => [
[
'align' => 'end',
'justify' => 'end',
'cols' => [
[
'field' => 'internal',
'labelDisplay' => 'inline',
'labelClass' => 'm-0',
'display' => 'none',
'hideIfEmpty' => true,
'class' => 'small ml-auto font-weight-light'
],
]
],
[
'justify' => 'start',
'class' => 'flex-grow-1',
'cols' => [
[
'field' => [
'name' => 'description',
'type' => 'html',
],
'labelDisplay' => 'none',
]
]
]
]
]
],
],
'create' => [
'presetFields' => [
'parentValues' => [
'id' => 'case_id'
],
],
'layout' => [
'header' => ['rows' => []],
'body' =>[
'rows' => [
[
'justify' => 'start',
'class' => 'flex-grow-1',
'cols' => [
[
'field' => [
'name' => 'description',
'metadata' => [
'rows' => 3
]
],
'labelDisplay' => 'top',
'class' => 'flex-grow-1',
]
]
],
[
'align' => 'end',
'justify' => 'start',
'class' => 'flex-grow-1',
'cols' => [
[
'field' => 'internal',
'labelDisplay' => 'inline',
],
]
]
]
]
],
]
]
]
],