mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-02 08:09:19 +08:00
Add notification configuration to the configs
This commit is contained in:
parent
37deb4787c
commit
6330f2bb8f
3 changed files with 128 additions and 1 deletions
|
@ -49,6 +49,7 @@ services:
|
|||
$legacyActionResolverMap: '%legacy.action_resolver%'
|
||||
$massupdate: '%massupdate%'
|
||||
$uiConfigs: '%ui%'
|
||||
$notificationsConfigs: '%notifications%'
|
||||
$systemSettings: '%system.settings%'
|
||||
$extensions: '%extensions%'
|
||||
$upgradeConfig: '%upgrades%'
|
||||
|
|
124
config/services/ui/notifications.yaml
Normal file
124
config/services/ui/notifications.yaml
Normal file
|
@ -0,0 +1,124 @@
|
|||
parameters:
|
||||
notifications:
|
||||
module: 'alerts'
|
||||
class: 'notifications'
|
||||
maxListHeight: 350
|
||||
direction: 'desc'
|
||||
autoRefreshFrequency: 60000 #1 minutes
|
||||
showNoDataMessage: true
|
||||
noDataLabel: 'LBL_NOTIFICATIONS_NONE'
|
||||
create: null
|
||||
item:
|
||||
collapsible: false
|
||||
collapseLimit: 200
|
||||
itemClass: 'notifications-item'
|
||||
buttonGroupClass: 'd-flex flex-column align-items-end notifications-actions'
|
||||
containerClass: 'flex-row align-items-start py-2 justify-content-start containerClass'
|
||||
dynamicClass: [ 'is_read' ]
|
||||
flexDirection: 'flex-row'
|
||||
layout:
|
||||
body:
|
||||
class: 'itemContentClass'
|
||||
rows:
|
||||
-
|
||||
cols:
|
||||
-
|
||||
field:
|
||||
name: 'target_module_type'
|
||||
type: 'icon'
|
||||
labelDisplay: 'none'
|
||||
hideIfEmpty: false
|
||||
class: 'font-weight-bold stroke-danger-light stroke-hover-danger'
|
||||
-
|
||||
class: 'd-flex flex-column flex-grow-1 pl-2 pr-2'
|
||||
align: 'start'
|
||||
cols:
|
||||
-
|
||||
field:
|
||||
name: 'target_module_label'
|
||||
labelDisplay: 'none'
|
||||
labelClass: 'm-0'
|
||||
display: 'readonly'
|
||||
hideIfEmpty: true
|
||||
class: 'small font-weight-bold text-muted text-uppercase'
|
||||
-
|
||||
field:
|
||||
name: 'name'
|
||||
labelDisplay: 'none'
|
||||
labelClass: 'm-0'
|
||||
display: 'readonly'
|
||||
hideIfEmpty: false
|
||||
class: 'font-weight-bold pb-1'
|
||||
-
|
||||
field:
|
||||
name: 'date_entered'
|
||||
labelDisplay: 'none'
|
||||
labelClass: 'm-0'
|
||||
display: 'readonly'
|
||||
hideIfEmpty: true
|
||||
class: 'small'
|
||||
-
|
||||
field:
|
||||
name: 'is_read'
|
||||
labelDisplay: 'none'
|
||||
display: 'none'
|
||||
hideIfEmpty: true
|
||||
-
|
||||
class: 'd-flex flex-column'
|
||||
align: 'start'
|
||||
justify: 'start'
|
||||
cols:
|
||||
-
|
||||
actionSlot: 'true'
|
||||
class: 'haha'
|
||||
actions:
|
||||
-
|
||||
key: 'delete'
|
||||
icon: 'cross'
|
||||
titleKey: 'LBL_DISMISS'
|
||||
asyncProcess: true
|
||||
params:
|
||||
displayConfirmation: true
|
||||
confirmationLabel: 'NTC_DELETE_CONFIRMATION'
|
||||
klass: ['btn fill-danger-light fill-hover-danger border-0 btn-sm p-0']
|
||||
modes: ['detail', 'edit']
|
||||
acl: []
|
||||
-
|
||||
key: 'snooze'
|
||||
icon: 'clock'
|
||||
titleKey: 'LBL_SNOOZE'
|
||||
asyncProcess: true
|
||||
params:
|
||||
displayConfirmation: true
|
||||
confirmationLabel: 'NTC_SNOOZE_CONFIRMATION'
|
||||
klass: ['btn stroke-danger-light stroke-hover-danger border-0 btn-sm p-0']
|
||||
modes: ['detail', 'edit']
|
||||
acl: []
|
||||
listActionsClass: "d-flex align-items-center justify-content-end notification-list-actions pr-2 pt-1"
|
||||
listActionsButtonClass: "line-actions-button btn btn-link"
|
||||
listActionsButtonGroupClass: 'd-flex justify-content-end'
|
||||
listActions:
|
||||
-
|
||||
key: 'delete-all'
|
||||
label: 'LBL_DISMISS_ALL'
|
||||
labelKey: 'LBL_DISMISS_ALL'
|
||||
asyncProcess: true
|
||||
params:
|
||||
displayConfirmation: true
|
||||
confirmationLabel: 'NTC_DELETE_CONFIRMATION'
|
||||
module: 'alerts'
|
||||
klass: ['']
|
||||
modes: ['detail', 'list']
|
||||
acl: []
|
||||
-
|
||||
key: 'mark-as-read'
|
||||
label: 'LBL_DISMISS_ALL'
|
||||
labelKey: 'LBL_DISMISS_ALL'
|
||||
asyncProcess: true
|
||||
params:
|
||||
displayConfirmation: true
|
||||
confirmationLabel: 'NTC_DELETE_CONFIRMATION'
|
||||
module: 'alerts'
|
||||
klass: ['']
|
||||
modes: []
|
||||
acl: []
|
|
@ -127,6 +127,7 @@ class SystemConfigHandler extends LegacyHandler implements SystemConfigProviderI
|
|||
array $recordViewActionLimits,
|
||||
array $listViewLineActionsLimits,
|
||||
array $uiConfigs,
|
||||
array $notificationsConfigs,
|
||||
array $extensions,
|
||||
array $logoutConfig,
|
||||
array $sessionExpiredConfig,
|
||||
|
@ -154,7 +155,8 @@ class SystemConfigHandler extends LegacyHandler implements SystemConfigProviderI
|
|||
$this->injectedSystemConfigs['listview_actions_limits'] = $listViewActionsLimits;
|
||||
$this->injectedSystemConfigs['recordview_actions_limits'] = $recordViewActionLimits;
|
||||
$this->injectedSystemConfigs['listview_line_actions_limits'] = $listViewLineActionsLimits;
|
||||
$this->injectedSystemConfigs['ui'] = $uiConfigs;
|
||||
$this->injectedSystemConfigs['ui'] = $uiConfigs ?? [];
|
||||
$this->injectedSystemConfigs['ui']['notifications'] = $notificationsConfigs ?? [];
|
||||
$this->injectedSystemConfigs['extensions'] = $extensions;
|
||||
|
||||
$logoutConfig = $logoutConfig ?? [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue