diff --git a/api/webservice/Portal/PrivilegeQuery.php b/api/webservice/Portal/PrivilegeQuery.php index eed916c7c563..33dab68b1a17 100644 --- a/api/webservice/Portal/PrivilegeQuery.php +++ b/api/webservice/Portal/PrivilegeQuery.php @@ -53,7 +53,7 @@ public static function getConditions(\App\Db\Query $query, string $moduleName, $ return; } $where = ['and']; - $where[] = [$fieldInfo['tablename'] . '.' . $fieldInfo['columnname'] => 1]; + $where[] = [$fieldInfo['tablename'] . '.' . $fieldInfo['columnname'] => 1]; $parentModule = \App\Record::getType($parentId); $fields = \App\Field::getRelatedFieldForModule($moduleName); $foundField = true; diff --git a/app/Map/Routing/Yours.php b/app/Map/Routing/Yours.php new file mode 100644 index 000000000000..fd515f63105a --- /dev/null +++ b/app/Map/Routing/Yours.php @@ -0,0 +1,89 @@ + + * + * @see https://wiki.openstreetmap.org/wiki/YOURS + */ + +namespace App\Map\Routing; + +/** + * Connector for service YOURS to get routing. + */ +class Yours extends Base +{ + /** + * {@inheritdoc} + */ + public function calculate() + { + if (!\App\RequestUtil::isNetConnection()) { + throw new \App\Exceptions\AppException('ERR_NO_INTERNET_CONNECTION'); + } + $coordinates = []; + $travel = $distance = 0; + $description = ''; + foreach ($this->parsePoints() as $track) { + $url = $this->url . '?format=geojson&flat=' . $track['startLat'] . '&flon=' . $track['startLon'] . '&tlat=' . $track['endLat'] . '&tlon=' . $track['endLon'] . '&lang=' . \App\Language::getLanguage() . '&instructions=1'; + \App\Log::beginProfile("GET|Yours::calculate|{$url}", __NAMESPACE__); + $response = (new \GuzzleHttp\Client(\App\RequestHttp::getOptions()))->request('GET', $url, [ + 'timeout' => 60, + 'http_errors' => false, + ]); + \App\Log::endProfile("GET|Yours::calculate|{$url}", __NAMESPACE__); + if (200 === $response->getStatusCode()) { + $json = \App\Json::decode($response->getBody()); + } else { + throw new \App\Exceptions\AppException('Error with connection |' . $response->getReasonPhrase() . '|' . $response->getBody()); + } + $coordinates = array_merge($coordinates, $json['coordinates']); + $description .= $json['properties']['description']; + $travel += $json['properties']['traveltime']; + $distance += $json['properties']['distance']; + } + $this->geoJson = [ + 'type' => 'LineString', + 'coordinates' => $coordinates, + ]; + $this->travelTime = $travel; + $this->distance = $distance; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public function parsePoints(): array + { + $tracks = []; + $startLat = $this->start['lat']; + $startLon = $this->start['lon']; + if (!empty($this->indirectPoints)) { + foreach ($this->indirectPoints as $tempLon) { + $endLon = $tempLon['lon']; + $endLat = $tempLon['lat']; + $tracks[] = [ + 'startLat' => $startLat, + 'startLon' => $startLon, + 'endLat' => $endLat, + 'endLon' => $endLon, + ]; + $startLat = $endLat; + $startLon = $endLon; + } + } + $tracks[] = [ + 'startLat' => $startLat, + 'startLon' => $startLon, + 'endLat' => $this->end['lat'], + 'endLon' => $this->end['lon'] + ]; + return $tracks; + } +} diff --git a/app/YetiForce/Shop/Product/YetiForceHelp.php b/app/YetiForce/Shop/Product/YetiForceHelp.php new file mode 100644 index 000000000000..f5a936896fd3 --- /dev/null +++ b/app/YetiForce/Shop/Product/YetiForceHelp.php @@ -0,0 +1,56 @@ + + */ + +namespace App\YetiForce\Shop\Product; + +/** + * YetiForce shop PremiumSupport class. + */ +class YetiForceHelp extends \App\YetiForce\Shop\AbstractBaseProduct +{ + /** {@inheritdoc} */ + public $label = 'YetiForce Help'; + + /** {@inheritdoc} */ + public $category = 'Support'; + + /** {@inheritdoc} */ + public $website = 'https://yetiforce.com/en/marketplace/support'; + + /** {@inheritdoc} */ + public $prices = [ + 'Micro' => 50, + 'Small' => 80, + 'Medium' => 200, + 'Large' => 400, + 'Corporation' => 800 + ]; + /** {@inheritdoc} */ + public $featured = true; + + /** {@inheritdoc} */ + public function getAdditionalButtons(): array + { + return [ + \Vtiger_Link_Model::getInstanceFromValues([ + 'linklabel' => 'Website', + 'relatedModuleName' => '_Base', + 'linkicon' => 'fas fa-globe', + 'linkhref' => true, + 'linkExternal' => true, + 'linktarget' => '_blank', + 'linkurl' => $this->website, + 'linkclass' => 'btn-info', + 'showLabel' => 1, + ]), + ]; + } +} diff --git a/modules/MailIntegration/installation/outlook.xml b/modules/MailIntegration/installation/outlook.xml new file mode 100644 index 000000000000..9b0a83e34a7f --- /dev/null +++ b/modules/MailIntegration/installation/outlook.xml @@ -0,0 +1,245 @@ + + + + + + {__CRM_GUID__} + 1.0.0.0 + YetiForceCompany + en-US + + + + + + + yetiforce.com + + + + + + + + + + +
+ + + 450 + +
+
+ + + +
+
+ ReadWriteItem + + + + + false + + + + + + + + + + + + + +