From f383ca4f305c1fcf9537d7b7a6b1503fc92bf07d Mon Sep 17 00:00:00 2001 From: max-baranikov Date: Tue, 28 Jun 2022 14:45:55 +0300 Subject: [PATCH] Added Front-office worker --- CHANGELOG.md | 3 +++ VERSION | 2 +- retailcrm/retailcrm.php | 7 ++--- retailcrm/views/js/worker.umd.min.js | 38 ++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 retailcrm/views/js/worker.umd.min.js diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc76eb9..90eb37f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.4.5 +* Исправлена работа воркеров публичной части сайта + ## v3.4.4 * Улучшена горячая подгрузка данных на странице настроек модуля * Исправлены ошибки при отсутствующем или невалидном api-ключе diff --git a/VERSION b/VERSION index f9892605..4f5e6973 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.4.4 +3.4.5 diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index 08ccbc36..631299fd 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -150,7 +150,7 @@ public function __construct() { $this->name = 'retailcrm'; $this->tab = 'export'; - $this->version = '3.4.4'; + $this->version = '3.4.5'; $this->author = 'DIGITAL RETAIL TECHNOLOGIES SL'; $this->displayName = $this->l('Simla.com'); $this->description = $this->l('Integration module for Simla.com'); @@ -290,10 +290,7 @@ public function uninstallOldTabs() public function hookHeader() { if (!empty($this->context) && !empty($this->context->controller)) { - $this->context->controller->addJS($this->assetsBase . '/js/retailcrm-compat.min.js'); - $this->context->controller->addJS($this->assetsBase . '/js/retailcrm-jobs.min.js'); - $this->context->controller->addJS($this->assetsBase . '/js/retailcrm-collector.min.js'); - $this->context->controller->addJS($this->assetsBase . '/js/retailcrm-consultant.min.js'); + $this->context->controller->addJS($this->assetsBase . '/js/worker.umd.min.js'); } } diff --git a/retailcrm/views/js/worker.umd.min.js b/retailcrm/views/js/worker.umd.min.js new file mode 100644 index 00000000..a885bfb8 --- /dev/null +++ b/retailcrm/views/js/worker.umd.min.js @@ -0,0 +1,38 @@ +/*! + * MIT License + * + * Copyright (c) 2021 DIGITAL RETAIL TECHNOLOGIES SL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade PrestaShop to newer + * versions in the future. If you wish to customize PrestaShop for your + * needs please refer to http://www.prestashop.com for more information. + * + * @author DIGITAL RETAIL TECHNOLOGIES SL + * @copyright 2021 DIGITAL RETAIL TECHNOLOGIES SL + * @license https://opensource.org/licenses/MIT The MIT License + * + * Don\'t forget to prefix your containers with your own identifier + * to avoid any conflicts with others containers. + * + */ +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["prestashop"]=t():e["prestashop"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fae3")}({"47bc":function(e,t,n){var r=n("9523").default;(function(){class e{constructor(){r(this,"init",()=>{this.executeJobs()}),r(this,"executeJobs",()=>{const e=new XMLHttpRequest;e.open("GET","/index.php?fc=module&module=retailcrm&controller=Jobs",!0),e.timeout=0,e.send(null)})}}(new e).init()})()},8875:function(e,t,n){var r,o,c;(function(n,i){o=[],r=i,c="function"===typeof r?r.apply(t,o):r,void 0===c||(e.exports=c)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(p.stack)||i.exec(p.stack),l=u&&u[1]||!1,s=u&&u[2]||!1,a=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");l===a&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*