Compare commits

..

7 Commits
4.0.1 ... 4.0.2

Author SHA1 Message Date
yuri
e2deaf57dd fix portal account contact select acl 2016-03-03 13:02:10 +02:00
yuri
0530d9deb8 fix case compose email 2016-03-03 12:30:58 +02:00
yuri
b57ccf0c6a fix case assigned status 2016-03-03 12:27:01 +02:00
yuri
9ea9cf693d v 2016-03-03 12:19:44 +02:00
yuri
3460931fba fix portal windows issue 2016-03-03 12:19:05 +02:00
yuri
b743d113cc fix acl 2016-03-03 12:12:13 +02:00
yuri
f810371e70 fix tabbing 2016-03-03 12:12:07 +02:00
15 changed files with 64 additions and 31 deletions

View File

@@ -5,8 +5,8 @@
<rewrite>
<rules>
<rule name="rule 1G" stopProcessing="true">
<match url="^" />
<action type="Rewrite" url="index.php" appendQueryString="true" />
<match url="^" />
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>

View File

@@ -175,7 +175,7 @@ class Table
public function getLevel($scope, $action)
{
if (isset($this->data->table->$scope)) {
if (isset($this->table->$scope->$action)) {
if (isset($this->data->table->$scope->$action)) {
return $this->data->table->$scope->$action;
}
}

View File

@@ -25,7 +25,7 @@
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
@@ -43,10 +43,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
$dateFrom = $request->get('dateFrom');
$dateTo = $request->get('dateTo');
return $this->getService('Opportunity')->reportByLeadSource($dateFrom, $dateTo);
}
public function actionReportByStage($params, $data, $request)
{
$level = $this->getAcl()->getLevel('Opportunity', 'read');
@@ -56,10 +56,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
$dateFrom = $request->get('dateFrom');
$dateTo = $request->get('dateTo');
return $this->getService('Opportunity')->reportByStage($dateFrom, $dateTo);
}
public function actionReportSalesByMonth($params, $data, $request)
{
$level = $this->getAcl()->getLevel('Opportunity', 'read');
@@ -69,10 +69,10 @@ class Opportunity extends \Espo\Core\Controllers\Record
$dateFrom = $request->get('dateFrom');
$dateTo = $request->get('dateTo');
return $this->getService('Opportunity')->reportSalesByMonth($dateFrom, $dateTo);
return $this->getService('Opportunity')->reportSalesByMonth($dateFrom, $dateTo);
}
public function actionReportSalesPipeline($params, $data, $request)
{
$level = $this->getAcl()->getLevel('Opportunity', 'read');
@@ -82,7 +82,7 @@ class Opportunity extends \Espo\Core\Controllers\Record
$dateFrom = $request->get('dateFrom');
$dateTo = $request->get('dateTo');
return $this->getService('Opportunity')->reportSalesPipeline($dateFrom, $dateTo);
}
}

View File

@@ -12,7 +12,7 @@
{
"name":"activities",
"label":"Activities",
"view":"crm:views/record/panels/activities",
"view":"crm:views/case/record/panels/activities",
"aclScope": "Activities"
},
{

View File

@@ -3,7 +3,7 @@
"layouts": true,
"tab": true,
"acl": true,
"aclPortal": "recordAllAccountOwnNo",
"aclPortal": "recordAllAccountNo",
"module": "Crm",
"customizable": true,
"stream": true,

View File

@@ -3,7 +3,7 @@
"layouts":true,
"tab":true,
"acl":true,
"aclPortal": "recordAllAccountContactOwnNo",
"aclPortal": "recordAllAccountContactNo",
"module":"Crm",
"customizable": true,
"stream": true,

View File

@@ -52,5 +52,22 @@ class Account extends \Espo\Core\SelectManagers\Base
);
}
protected function accessPortalOnlyAccount(&$result)
{
$d = array();
$accountIdList = $this->getUser()->getLinkMultipleIdList('accounts');
if (count($accountIdList)) {
$result['whereClause'][] = array(
'id' => $accountIdList
);
} else {
$result['whereClause'][] = array(
'id' => null
);
}
}
}

View File

@@ -44,5 +44,22 @@ class Contact extends \Espo\Core\SelectManagers\Base
), $result);
}
protected function accessPortalOnlyContact(&$result)
{
$d = array();
$contactId = $this->getUser()->get('contactId');
if ($contactId) {
$result['whereClause'][] = array(
'id' => $contactId
);
} else {
$result['whereClause'][] = array(
'id' => null
);
}
}
}

View File

@@ -421,6 +421,7 @@ class InboundEmail extends \Espo\Services\Record
if ($user) {
$case->set('assignedUserId', $user->id);
$case->set('status', 'Assigned');
}
}
@@ -437,6 +438,7 @@ class InboundEmail extends \Espo\Services\Record
if ($user) {
$case->set('assignedUserId', $user->id);
$case->set('status', 'Assigned');
}
}
@@ -468,19 +470,17 @@ class InboundEmail extends \Espo\Services\Record
$caseDistribution = $params['caseDistribution'];
}
$targetUserPosition = null;
if (!empty($params['targetUserPosition'])) {
$targetUserPosition = $params['targetUserPosition'];
}
$case->set('status', 'Assigned');
switch ($caseDistribution) {
case 'Direct-Assignment':
if ($userId) {
$case->set('assignedUserId', $userId);
$case->set('status', 'Assigned');
}
break;
case 'Round-Robin':

View File

@@ -24,31 +24,31 @@
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
************************************************************************/
Espo.define('Crm:Views.Case.Record.Panels.Activities', 'Crm:Views.Record.Panels.Activities', function (Dep) {
Espo.define('crm:views/case/record/panels/activities', 'crm:views/record/panels/activities', function (Dep) {
return Dep.extend({
getComposeEmailAttributes: function (data, callback) {
data = data || {};
var attributes = {
status: 'Draft',
name: '[#' + this.model.get('number') + '] ' + this.model.get('name')
};
if (this.model.get('contactId')) {
this.getModelFactory().create('Contact', function (contact) {
contact.id = this.model.get('contactId');
this.listenToOnce(contact, 'sync', function () {
var emailAddress = contact.get('emailAddress');
var emailAddress = contact.get('emailAddress');
if (emailAddress) {
attributes.to = emailAddress;
}
callback.call(this, attributes);
});
});
contact.fetch({
error: function () {
callback.call(this, attributes);
@@ -58,8 +58,7 @@ Espo.define('Crm:Views.Case.Record.Panels.Activities', 'Crm:Views.Record.Panels.
} else {
callback.call(this, attributes);
}
},
}
});
});

View File

@@ -37,7 +37,7 @@
id: '{{portalId}}',
useCache: false,
cacheTimestamp: {{cacheTimestamp}},
url: 'api/v1/portal/{{portalId}}',
url: 'api/v1/portal-access/{{portalId}}',
basePath: '{{basePath}}'
}, function (app) {
{{runScript}}

View File

@@ -18,7 +18,7 @@
id: '{{portalId}}',
useCache: {{useCache}},
cacheTimestamp: {{cacheTimestamp}},
url: 'api/v1/portal/{{portalId}}',
url: 'api/v1/portal-access/{{portalId}}',
basePath: '{{basePath}}'
}, function (app) {
{{runScript}}

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "4.0.1",
"version": "4.0.2",
"description": "",
"main": "index.php",
"repository": {