YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Users/resources/Groups.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Groups.min.js","sources":["Groups.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';\nwindow.Users_Groups_JS = class {\n\t/**\n\t * Modal container\n\t */\n\tcontainer = false;\n\t/**\n\t * DataTable api object\n\t */\n\tdataTable;\n\n\t/**\n\t * Register DataTable\n\t */\n\tregisterDataTable() {\n\t\tlet table = this.container.find('.js-data-table');\n\t\tlet form = this.container.find('form');\n\t\treturn app.registerDataTables(table, {\n\t\t\torder: [],\n\t\t\tprocessing: true,\n\t\t\tserverSide: false,\n\t\t\tajax: {\n\t\t\t\turl: table.data('url'),\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: function (data) {\n\t\t\t\t\t$.extend(data, form.serializeFormData());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register remove member\n\t */\n\tregisterRemoveMember() {\n\t\tthis.container.find('.js-data-table').on('click', '.js-member-delete', (e) => {\n\t\t\tlet url = e.currentTarget.dataset.url;\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttext: app.vtranslate('JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tlet progress = jQuery.progressIndicator();\n\t\t\t\t\tAppConnector.request(url)\n\t\t\t\t\t\t.done(() => {\n\t\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tthis.dataTable.ajax.reload();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail((_) => {\n\t\t\t\t\t\t\tapp.showNotify({ text: app.vtranslate('JS_ERROR'), type: 'error' });\n\t\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register add members\n\t */\n\tregisterAddMember() {\n\t\tthis.container.find('.js-data-table').on('click', '.js-member-add', (e) => {\n\t\t\tlet url = e.currentTarget.dataset.url + '&groupID=' + this.container.find('form').serializeFormData()['groupID'];\n\t\t\tapp.showModalWindow(\n\t\t\t\tnull,\n\t\t\t\turl,\n\t\t\t\t(modalContainer) => {\n\t\t\t\t\tmodalContainer.find('.js-modal__save').on('click', () => {\n\t\t\t\t\t\tlet modalForm = modalContainer.find('form');\n\t\t\t\t\t\tif (modalForm.validationEngine('validate')) {\n\t\t\t\t\t\t\tlet progress = $.progressIndicator({\n\t\t\t\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\t\t\t\tblockInfo: { enabled: true }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlet formData = modalForm.serializeFormData();\n\t\t\t\t\t\t\tapp\n\t\t\t\t\t\t\t\t.saveAjax('', [], formData)\n\t\t\t\t\t\t\t\t.done((response) => {\n\t\t\t\t\t\t\t\t\tlet result = response.result;\n\t\t\t\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\t\tif (result.success) {\n\t\t\t\t\t\t\t\t\t\tapp.hideModalWindow(null, 'memberList');\n\t\t\t\t\t\t\t\t\t\tthis.dataTable.ajax.reload();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\t\ttext: result.message ? result.message : app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\t\t\t\tdelay: 3000,\n\t\t\t\t\t\t\t\t\t\t\thide: true\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.fail(() => {\n\t\t\t\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\t\tapp.showNotify({ text: app.vtranslate('JS_ERROR'), type: 'error' });\n\t\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\t{ modalId: 'memberList' }\n\t\t\t);\n\t\t});\n\t}\n\t/**\n\t * Register base events\n\t * @param {jQuery} modalContainer\n\t */\n\tregisterEvents(modalContainer) {\n\t\tthis.container = modalContainer;\n\t\tthis.dataTable = this.registerDataTable();\n\t\tthis.registerRemoveMember();\n\t\tthis.registerAddMember();\n\t\tthis.container.on('change', '[name=\"groupID\"]', () => {\n\t\t\tthis.dataTable.ajax.reload();\n\t\t});\n\t}\n};\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","_defineProperty","obj","value","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","window","Users_Groups_JS","_class2","registerDataTable","table","container","find","form","app","registerDataTables","order","processing","serverSide","ajax","url","data","type","$","extend","serializeFormData","registerRemoveMember","_this","on","e","currentTarget","dataset","showConfirmModal","text","vtranslate","confirmedCallback","progress","jQuery","progressIndicator","AppConnector","request","done","mode","dataTable","reload","fail","showNotify","registerAddMember","_this2","groupID","showModalWindow","modalContainer","modalForm","validationEngine","message","blockInfo","enabled","formData","saveAjax","response","result","success","hideModalWindow","delay","hide","modalId","registerEvents","_this3"],"mappings":";;AAAA,kKACA,YAAY,CAAC,SAAAA,OAAAA,CAAAC,CAAA,CAAA,CAAA,yBAAA,CAAA,OAAAD,OAAA,CAAA,UAAA,EAAA,OAAAE,MAAA,EAAA,QAAA,EAAA,OAAAA,MAAA,CAAAC,QAAA,CAAAF,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,OAAAA,CAAA,CAAAA,CAAAA,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,CAAA,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