YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/InterestsConflictModal.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"InterestsConflictModal.min.js","sources":["InterestsConflictModal.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n$.Class(\n\t'Base_InterestsConflictModal_JS',\n\t{},\n\t{\n\t\t/**\n\t\t * Register modal events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterEvents: function (modalContainer) {\n\t\t\tswitch (modalContainer.data('mode')) {\n\t\t\t\tcase 'users':\n\t\t\t\t\tthis.registerUsersEvents(modalContainer);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'unlock':\n\t\t\t\t\tthis.registerUnlockEvents(modalContainer);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'confirmation':\n\t\t\t\t\tthis.registerConfirmationEvents(modalContainer);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Register users events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterUsersEvents: function (modalContainer) {\n\t\t\tmodalContainer.find('.js-ic-canceled-btn').click(function (e) {\n\t\t\t\tlet btn = $(e.currentTarget);\n\t\t\t\tlet tr = btn.closest('tr');\n\t\t\t\tlet icon = tr.find('.js-change-icon');\n\t\t\t\tapp.hideModalWindow();\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttitle: app.vtranslate('JS_ENTER_A_REASON'),\n\t\t\t\t\tshowDialog: true,\n\t\t\t\t\tmultiLineDialog: true,\n\t\t\t\t\tconfirmedCallback: (notice, value) => {\n\t\t\t\t\t\tAppConnector.request(\n\t\t\t\t\t\t\t$.extend(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\t\t\t\t\tmode: 'usersCancel',\n\t\t\t\t\t\t\t\t\tid: tr.data('id'),\n\t\t\t\t\t\t\t\t\tcomment: value\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tmodalContainer.find('.js-modal-form').serializeFormData()\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t).done(function (data) {\n\t\t\t\t\t\t\tif (data.result) {\n\t\t\t\t\t\t\t\tbtn.hide();\n\t\t\t\t\t\t\t\tif (icon.length) {\n\t\t\t\t\t\t\t\t\ticon.removeClass('fa-times text-danger').addClass('fa-slash text-dark');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\ttext: data.result.message,\n\t\t\t\t\t\t\t\t\ttype: data.result.type\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register unlock events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterUnlockEvents: function (modalContainer) {\n\t\t\tlet form = modalContainer.find('.js-modal-form');\n\t\t\tmodalContainer.find('.js-ic-send-btn').click(function (e) {\n\t\t\t\tif (!form.validationEngine('validate')) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tAppConnector.request(\n\t\t\t\t\t$.extend(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\t\t\tmode: 'unlock'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tform.serializeFormData()\n\t\t\t\t\t)\n\t\t\t\t).done(function (data) {\n\t\t\t\t\tif (data.result) {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: data.result.message,\n\t\t\t\t\t\t\ttype: data.result.type\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (data.result.type === 'success') {\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register confirmation events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterConfirmationEvents: function (modalContainer) {\n\t\t\tmodalContainer.find('.js-ic-confirmation').click(function (e) {\n\t\t\t\tlet value = $(e.currentTarget).data('value');\n\t\t\t\tAppConnector.request(\n\t\t\t\t\t$.extend(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\t\t\tmode: 'confirmation',\n\t\t\t\t\t\t\tvalue: value\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmodalContainer.find('.js-modal-form').serializeFormData()\n\t\t\t\t\t)\n\t\t\t\t).done(function (data) {\n\t\t\t\t\tif (data.result) {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: data.result.message,\n\t\t\t\t\t\t\ttype: data.result.type\n\t\t\t\t\t\t});\n\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["$","Class","registerEvents","modalContainer","data","registerUsersEvents","registerUnlockEvents","registerConfirmationEvents","find","click","e","btn","currentTarget","tr","closest","icon","app","hideModalWindow","showConfirmModal","title","vtranslate","showDialog","multiLineDialog","confirmedCallback","notice","value","AppConnector","request","extend","module","getModuleName","action","mode","id","comment","serializeFormData","done","result","hide","length","removeClass","addClass","showNotify","text","message","type","form","validationEngine","window","location","reload"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,gCAAgC,CAChC,EAAE,CACF;AAED;AACA;AACA,KACEC,cAAc,CAAE,SAAAA,cAAAA,CAAUC,cAAc,CAAE,CACzC,OAAQA,cAAc,CAACC,IAAI,CAAC,MAAM,CAAC,E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