MDL-68169 user: Limit the number of filter conditions
[moodle.git] / user / amd / build / status_field.min.js.map
CommitLineData
f879cc51 1{"version":3,"sources":["../src/status_field.js"],"names":["Selectors","editEnrolment","showDetails","unenrol","statusElement","getDynamicTableFromLink","link","closest","DynamicTableSelectors","main","region","getStatusContainer","getUserEnrolmentIdFromLink","getAttribute","registerEventListeners","contextId","uniqueId","getBodyFunction","userEnrolmentId","formData","getBody","document","addEventListener","e","tableRoot","target","fromRegionId","editLink","preventDefault","showEditDialogue","unenrolLink","showUnenrolConfirmation","showDetailsLink","showStatusDetails","container","ModalFactory","create","large","title","Str","get_string","dataset","fullname","type","types","SAVE_CANCEL","body","then","modal","getRoot","on","ModalEvents","save","submitEditFormAjax","hidden","destroy","show","catch","Notification","exception","submitUnenrolFormAjax","ueid","stringData","key","component","param","user","course","coursename","enrolinstancename","Promise","all","get_strings","strings","setTitle","setSaveButtonText","setBody","context","editenrollink","statusclass","querySelector","editEnrolLink","outerHTML","CANCEL","Templates","render","hide","click","clickedLink","userData","form","find","Repository","submitUserEnrolmentForm","serialize","data","result","DynamicTable","refreshTableContent","notificationString","JSON","stringify","args","unenrolUser","alert","errors","message","formdata","Fragment","loadFragment","init","contextid","uniqueid"],"mappings":"2nBAuBA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,O,mwEAGMA,CAAAA,CAAS,CAAG,CACdC,aAAa,CAAE,iCADD,CAEdC,WAAW,CAAE,+BAFC,CAGdC,OAAO,CAAE,2BAHK,CAIdC,aAAa,CAAE,eAJD,C,CAaZC,CAAuB,CAAG,SAAAC,CAAI,QAAIA,CAAAA,CAAI,CAACC,OAAL,CAAaC,UAAsBC,IAAtB,CAA2BC,MAAxC,CAAJ,C,CAQ9BC,CAAkB,CAAG,SAAAL,CAAI,QAAIA,CAAAA,CAAI,CAACC,OAAL,CAAaP,CAAS,CAACI,aAAvB,CAAJ,C,CAQzBQ,CAA0B,CAAG,SAAAN,CAAI,QAAIA,CAAAA,CAAI,CAACO,YAAL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CAnBD,EAoBC1C,IApBD,CAoBM,SAAAoD,CAAkB,CAAI,CACxB,UAAWA,CAAX,CAGH,CAxBD,EAyBC1C,KAzBD,CAyBOC,UAAaC,SAzBpB,CA0BH,C,CAUKvC,CAAO,CAAG,SAACL,CAAD,CAAY8C,CAAZ,KAAkB8C,CAAAA,CAAlB,wDAA6B,IAA7B,OAAsCC,WAASC,YAAT,CAClD,OADkD,CAElD,qBAFkD,CAGlD9F,CAHkD,CAIlD,CACI8C,IAAI,CAAJA,CADJ,CAEI8C,QAAQ,CAARA,CAFJ,CAJkD,CAAtC,C,QAgBI,QAAPG,CAAAA,IAAO,GAA2B,IAAzBC,CAAAA,CAAyB,GAAzBA,SAAyB,CAAdC,CAAc,GAAdA,QAAc,CAC3ClG,CAAsB,CAACiG,CAAD,CAAYC,CAAZ,CACzB,C","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * AMD module for the user enrolment status field in the course participants page.\n *\n * @module core_user/status_field\n * @copyright 2017 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport * as DynamicTable from 'core_table/dynamic';\nimport * as Repository from './repository';\nimport * as Str from 'core/str';\nimport DynamicTableSelectors from 'core_table/local/dynamic/selectors';\nimport Fragment from 'core/fragment';\nimport ModalEvents from 'core/modal_events';\nimport ModalFactory from 'core/modal_factory';\nimport Notification from 'core/notification';\nimport Templates from 'core/templates';\nimport {add as notifyUser} from 'core/toast';\n\nconst Selectors = {\n editEnrolment: '[data-action=\"editenrolment\"]',\n showDetails: '[data-action=\"showdetails\"]',\n unenrol: '[data-action=\"unenrol\"]',\n statusElement: '[data-status]',\n};\n\n/**\n * Get the dynamic table from the specified link.\n *\n * @param {HTMLElement} link\n * @returns {HTMLElement}\n */\nconst getDynamicTableFromLink = link => link.closest(DynamicTableSelectors.main.region);\n\n/**\n * Get the status container from the specified link.\n *\n * @param {HTMLElement} link\n * @returns {HTMLElement}\n */\nconst getStatusContainer = link => link.closest(Selectors.statusElement);\n\n/**\n * Get user enrolment id from the specified link\n *\n * @param {HTMLElement} link\n * @returns {Number}\n */\nconst getUserEnrolmentIdFromLink = link => link.getAttribute('rel');\n\n/**\n * Register all event listeners for the status fields.\n *\n * @param {Number} contextId\n * @param {Number} uniqueId\n */\nconst registerEventListeners = (contextId, uniqueId) => {\n const getBodyFunction = (userEnrolmentId, formData) => getBody(contextId, userEnrolmentId, formData);\n\n document.addEventListener('click', e => {\n const tableRoot = e.target.closest(DynamicTableSelectors.main.fromRegionId(uniqueId));\n if (!tableRoot) {\n return;\n }\n\n const editLink = e.target.closest(Selectors.editEnrolment);\n if (editLink) {\n e.preventDefault();\n\n showEditDialogue(editLink, getBodyFunction);\n }\n\n const unenrolLink = e.target.closest(Selectors.unenrol);\n if (unenrolLink) {\n e.preventDefault();\n\n showUnenrolConfirmation(unenrolLink);\n }\n\n const showDetailsLink = e.target.closest(Selectors.showDetails);\n if (showDetailsLink) {\n e.preventDefault();\n\n showStatusDetails(showDetailsLink);\n }\n });\n};\n\n/**\n * Show the edit dialogue.\n *\n * @param {HTMLElement} link\n * @param {Function} getBody Function to get the body for the specified user enrolment\n */\nconst showEditDialogue = (link, getBody) => {\n const container = getStatusContainer(link);\n const userEnrolmentId = getUserEnrolmentIdFromLink(link);\n\n ModalFactory.create({\n large: true,\n title: Str.get_string('edituserenrolment', 'enrol', container.dataset.fullname),\n type: ModalFactory.types.SAVE_CANCEL,\n body: getBody(userEnrolmentId)\n })\n .then(modal => {\n // Handle save event.\n modal.getRoot().on(ModalEvents.save, e => {\n // Don't close the modal yet.\n e.preventDefault();\n\n // Submit form data.\n submitEditFormAjax(link, getBody, modal, userEnrolmentId, container.dataset);\n });\n\n // Handle hidden event.\n modal.getRoot().on(ModalEvents.hidden, () => {\n // Destroy when hidden.\n modal.destroy();\n });\n\n // Show the modal.\n modal.show();\n\n return modal;\n })\n .catch(Notification.exception);\n};\n\n/**\n * Show and handle the unenrolment confirmation dialogue.\n *\n * @param {HTMLElement} link\n */\nconst showUnenrolConfirmation = link => {\n const container = getStatusContainer(link);\n const userEnrolmentId = getUserEnrolmentIdFromLink(link);\n\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n })\n .then(modal => {\n // Handle confirm event.\n modal.getRoot().on(ModalEvents.save, e => {\n // Don't close the modal yet.\n e.preventDefault();\n\n // Submit data.\n submitUnenrolFormAjax(\n link,\n modal,\n {\n ueid: userEnrolmentId,\n },\n container.dataset\n );\n });\n\n // Handle hidden event.\n modal.getRoot().on(ModalEvents.hidden, () => {\n // Destroy when hidden.\n modal.destroy();\n });\n\n // Display the delete confirmation modal.\n modal.show();\n\n const stringData = [\n {\n key: 'unenrol',\n component: 'enrol',\n },\n {\n key: 'unenrolconfirm',\n component: 'enrol',\n param: {\n user: container.dataset.fullname,\n course: container.dataset.coursename,\n enrolinstancename: container.dataset.enrolinstancename,\n }\n }\n ];\n\n return Promise.all([Str.get_strings(stringData), modal]);\n })\n .then(([strings, modal]) => {\n modal.setTitle(strings[0]);\n modal.setSaveButtonText(strings[0]);\n modal.setBody(strings[1]);\n\n return modal;\n })\n .catch(Notification.exception);\n};\n\n/**\n * Show the user details dialogue.\n *\n * @param {HTMLElement} link\n */\nconst showStatusDetails = link => {\n const container = getStatusContainer(link);\n\n const context = {\n editenrollink: '',\n statusclass: container.querySelector('span.badge').getAttribute('class'),\n ...container.dataset,\n };\n\n // Find the edit enrolment link.\n const editEnrolLink = container.querySelector(Selectors.editEnrolment);\n if (editEnrolLink) {\n // If there's an edit enrolment link for this user, clone it into the context for the modal.\n context.editenrollink = editEnrolLink.outerHTML;\n }\n\n ModalFactory.create({\n large: true,\n type: ModalFactory.types.CANCEL,\n title: Str.get_string('enroldetails', 'enrol'),\n body: Templates.render('core_user/status_details', context),\n })\n .then(modal => {\n if (editEnrolLink) {\n modal.getRoot().on('click', Selectors.editEnrolment, e => {\n e.preventDefault();\n modal.hide();\n\n // Trigger click event for the edit enrolment link to show the edit enrolment modal.\n editEnrolLink.click();\n });\n }\n\n modal.show();\n\n // Handle hidden event.\n modal.getRoot().on(ModalEvents.hidden, () => modal.destroy());\n\n return modal;\n })\n .catch(Notification.exception);\n};\n\n/**\n * Submit the edit dialogue.\n *\n * @param {HTMLElement} clickedLink\n * @param {Function} getBody\n * @param {Object} modal\n * @param {Number} userEnrolmentId\n * @param {Object} userData\n */\nconst submitEditFormAjax = (clickedLink, getBody, modal, userEnrolmentId, userData) => {\n const form = modal.getRoot().find('form');\n\n Repository.submitUserEnrolmentForm(form.serialize())\n .then(data => {\n if (!data.result) {\n throw data.result;\n }\n\n // Dismiss the modal.\n modal.hide();\n modal.destroy();\n\n return data;\n })\n .then(() => {\n DynamicTable.refreshTableContent(getDynamicTableFromLink(clickedLink));\n\n return Str.get_string('enrolmentupdatedforuser', 'core_enrol', userData);\n })\n .then(notificationString => {\n notifyUser(notificationString);\n\n return;\n })\n .catch(() => {\n modal.setBody(getBody(userEnrolmentId, JSON.stringify(form.serialize())));\n\n return modal;\n });\n};\n\n/**\n * Submit the unenrolment form.\n *\n * @param {HTMLElement} clickedLink\n * @param {Object} modal\n * @param {Object} args\n * @param {Object} userData\n */\nconst submitUnenrolFormAjax = (clickedLink, modal, args, userData) => {\n Repository.unenrolUser(args.ueid)\n .then(data => {\n if (!data.result) {\n // Display an alert containing the error message\n Notification.alert(data.errors[0].key, data.errors[0].message);\n\n return data;\n }\n\n // Dismiss the modal.\n modal.hide();\n modal.destroy();\n\n return data;\n })\n .then(() => {\n DynamicTable.refreshTableContent(getDynamicTableFromLink(clickedLink));\n\n return Str.get_string('unenrolleduser', 'core_enrol', userData);\n })\n .then(notificationString => {\n notifyUser(notificationString);\n\n return;\n })\n .catch(Notification.exception);\n};\n\n/**\n * Get the body fragment.\n *\n * @param {Number} contextId\n * @param {Number} ueid The user enrolment id\n * @param {Object} formdata\n * @returns {Promise}\n */\nconst getBody = (contextId, ueid, formdata = null) => Fragment.loadFragment(\n 'enrol',\n 'user_enrolment_form',\n contextId,\n {\n ueid,\n formdata,\n }\n);\n\n/**\n * Initialise the statu field handler.\n *\n * @param {Number} contextid\n * @param {Number} uniqueid\n */\nexport const init = ({contextid, uniqueid}) => {\n registerEventListeners(contextid, uniqueid);\n};\n"],"file":"status_field.min.js"}