calendar metadata
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors": {
|
||||
"Meeting": "#558BBD",
|
||||
"Call": "#CF605D",
|
||||
"Task": "#76BA4E"
|
||||
},
|
||||
"scopeList": ["Meeting", "Call", "Task"],
|
||||
"allDayScopeList": ["Task"],
|
||||
"modeList": ["month", "agendaWeek", "agendaDay"],
|
||||
"completedStatusList": ["Held", "Completed"]
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
'selectManagerFactory'
|
||||
);
|
||||
|
||||
protected $calendarEntityTypeList = ['Meeting', 'Call', 'Task'];
|
||||
protected $calendarScopeList = ['Meeting', 'Call', 'Task'];
|
||||
|
||||
protected function getPDO()
|
||||
{
|
||||
@@ -726,13 +726,13 @@ class Activities extends \Espo\Core\Services\Base
|
||||
$pdo = $this->getPDO();
|
||||
|
||||
if (is_null($scopeList)) {
|
||||
$scopeList = $this->calendarEntityTypeList;
|
||||
$scopeList = $this->calendarScopeList;
|
||||
}
|
||||
|
||||
$sqlPartList = [];
|
||||
|
||||
foreach ($scopeList as $scope) {
|
||||
if (!in_array($scope, $this->calendarEntityTypeList)) {
|
||||
if (!in_array($scope, $this->calendarScopeList)) {
|
||||
continue;
|
||||
}
|
||||
if ($this->getAcl()->checkScope($scopeList)) {
|
||||
|
||||
@@ -42,6 +42,8 @@ Espo.define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], functi
|
||||
|
||||
allDayScopeList: ['Task'],
|
||||
|
||||
scopeList: ['Meeting', 'Call', 'Task'],
|
||||
|
||||
canceledStatusList: ['Not Held', 'Canceled'],
|
||||
|
||||
completedStatusList: ['Held', 'Completed'],
|
||||
@@ -128,8 +130,14 @@ Espo.define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], functi
|
||||
this.header = ('header' in this.options) ? this.options.header : this.header;
|
||||
this.slotDuration = this.options.slotDuration || this.slotDuration;
|
||||
|
||||
this.colors = this.getMetadata().get('clientDefs.Calendar.colors') || this.colors;
|
||||
this.modeList = this.getMetadata().get('clientDefs.Calendar.modeList') || this.modeList;
|
||||
this.completedStatusList = this.getMetadata().get('clientDefs.Calendar.completedStatusList') || this.completedStatusList;
|
||||
this.scopeList = this.getMetadata().get('clientDefs.Calendar.scopeList') || Espo.Utils.clone(this.scopeList);
|
||||
this.allDayScopeList = this.getMetadata().get('clientDefs.Calendar.allDaySopeList') || this.allDayScopeList;
|
||||
|
||||
this.scopeFilter = false;
|
||||
this.scopeList = ['Meeting', 'Call', 'Task'];
|
||||
|
||||
var scopeList = [];
|
||||
this.scopeList.forEach(function (scope) {
|
||||
if (this.getAcl().check(scope)) {
|
||||
|
||||
Reference in New Issue
Block a user