Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/yandex.market/orderview/crm/cancelreason/ |
Upload File : |
this.BX=this.BX||{},this.BX.YandexMarket=this.BX.YandexMarket||{},this.BX.YandexMarket.OrderView=this.BX.YandexMarket.OrderView||{},function(t){"use strict";class e{constructor(t={}){this.onFailureDialogCreated=t=>{if(!this.isMatchDialog(t))return;const e=t.getWrapper().querySelector('textarea[name="REASON_CANCELED"]');null!=e&&(e.insertAdjacentHTML("afterend",this.buildSelect(e.value)),e.remove())},this.onBeforeFailureDialogClose=(t,e)=>{if(!this.isMatchDialog(e))return;const i=BX.CrmOrderStatusManager.current,a=e.getWrapper().querySelector('select[name="REASON_CANCELED"]');null!=a&&("object"==typeof i.saveParams?i.saveParams[a.name]=a.value:console.warn("missing statusManager.saveParams"))},this.options=Object.assign({},this.constructor.defaults,t),this.bind()}bind(){BX.addCustomEvent("CrmProcessFailureDialogContentCreated",this.onFailureDialogCreated),BX.addCustomEvent("CrmProgressControlBeforeFailureDialogClose",this.onBeforeFailureDialogClose)}isMatchDialog(t){const e=t.getWrapper(),i=t.getEntityType(),a=t.getEntityId();return e&&i===this.options.entityType&&null!=a&&""+a==""+this.options.entityId}buildSelect(t){let e=!1;return`<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100">\n\t\t\t<select class="ui-ctl-element" name="REASON_CANCELED" style="max-width: 100%">\n\t\t\t\t${this.options.variants.map((i=>{const a=i.ID===t;return a&&(e=!0),`<option value="${i.ID}" ${a?"selected":""}>${i.VALUE}</option>`})).join("")}\n\t\t\t\t${e||null==t||""===t?"":`<option selected>${t}</option>`}\n\t\t\t</select>\n\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t</div>`}}e.defaults={entityType:"ORDER",entityId:null,variants:[]},t.CancelReason=e}(this.BX.YandexMarket.OrderView.Crm=this.BX.YandexMarket.OrderView.Crm||{}); //# sourceMappingURL=script.js.map