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,EAAW+J,EAAWC,EAAoBC,GAC7E,OAAOzK,EAAGqJ,QAAQiB,0BAA0B9J,EAAW+J,EAAWC,EAAoBC,EACxF,EAMAnB,uBAAwB,SAAU9I,EAAWkK,EAAkBF,EAAoBC,GACjF,OAAOzK,EAAGqJ,QAAQC,uBAAuB9I,EAAWkK,EAAkBF,EAAoBC,EAC5F,EAMAE,oBAAqB,SAAUnK,EAAWkK,EAAkBF,GAC1D,OAAOxK,EAAGqJ,QAAQsB,oBAAoBnK,EAAWkK,EAAkBF,EACrE,EAMAI,uBAAwB,SAAUpK,GAChC,OAAOR,EAAGqJ,QAAQuB,uBAAuBpK,EAC3C,EAMAqK,wBAAyB,SAAUrK,EAAWkK,EAAkBF,GAC9D,OAAOxK,EAAGqJ,QAAQwB,wBAAwBrK,EAAWkK,EAAkBF,EACzE,EAMAM,4BAA6B,SAAUtK,EAAWkK,EAAkBF,GAClE,OAAOxK,EAAGqJ,QAAQyB,4BAA4BtK,EAAWkK,EAAkBF,EAC7E,E","sources":["webpack://shipley-du-lib/./common/js/legacy/custPortal/cw/cw.pages.brokerSiteAdmin.js","webpack://shipley-du-lib/./common/js/legacy/custPortal/cw/lib/cw.dtTools.js"],"sourcesContent":["import * as BootstrapDialog from \"bootstrap3-dialog\";\r\nimport \"../cw/lib/cw.dtTools\";\r\n\r\n(function (cw, $, undefined) {\r\n \"use strict\";\r\n $.extend(true, cw, {\r\n pages: {\r\n brokerSiteAdmin: {\r\n args: null,\r\n dataTable: null,\r\n userStatus: {\r\n Active: 1,\r\n Inactive: 0,\r\n },\r\n userPermission: {\r\n Administrator: 1,\r\n NonAdmin: 0,\r\n },\r\n init: function (args) {\r\n this.args = args;\r\n this.bindInteractions(args);\r\n },\r\n bindInteractions: function (args) {\r\n $('[data-toggle=\"dropdown\"]').dropdown();\r\n var self = this;\r\n var tableOptions = self.loadDataTable(args);\r\n //self.dataTable = cw.pages.brokerdashboard.drawCustomerTable(args);\r\n\r\n $(\".edit-broker-user\").off(\"click\");\r\n $(\".edit-broker-user\").on(\"click\", function (e) {\r\n //edit button\r\n e.preventDefault();\r\n var $this = $(this);\r\n var currentUserObj = {\r\n editUserId: $this.data(\"id\"),\r\n adminUser: $this.data(\"admin-id\"),\r\n activeUser: $this.data(\"active-id\"),\r\n vendCode: $this.data(\"vend-id\"),\r\n userName: $this.data(\"username-id\"),\r\n firstName: $this.data(\"firstname-id\"),\r\n lastName: $this.data(\"lastname-id\"),\r\n email: $this.data(\"emailaddress-id\"),\r\n };\r\n self.editUserModal(args, currentUserObj);\r\n });\r\n\r\n $(\".impersonate-broker\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n var $this = $(this);\r\n var webLogin = $this.data(\"usernameId\");\r\n alert(\"This functionality is currently not in place. Unable to view user: \" + webLogin + \".\");\r\n // if (webLogin) {\r\n // \tcw.loadingIndicator.start();\r\n // \tcw.webservices.getJson('S1AccountManager/impersonate-web-user',\r\n // \t\twebLogin,\r\n // \t\tfunction (rtnData) {\r\n // \t\t\tif (rtnData) {\r\n // \t\t\t\twindow.location = rtnData;\r\n // \t\t\t}\r\n // \t\t\telse {\r\n // \t\t\t\tcw.loadingIndicator.stop();\r\n // \t\t\t\tcw.modal.Alert({ title: 'Error', text: 'There was an error impersonating this user' });\r\n // \t\t\t}\r\n // \t\t}\r\n // \t);\r\n // }\r\n });\r\n\r\n $(\".add-new-broker-user\").off(\"click\");\r\n $(\".add-new-broker-user\").on(\"click\", function (e) {\r\n //add new user button\r\n e.preventDefault();\r\n cw.pages.brokerSiteAdmin.addNewUserModal();\r\n });\r\n\r\n $(\".dash-collapse\").off(\"click\");\r\n $(\".dash-collapse\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n $(\"#admin-listing-table\", this).toggleClass(\"fa-chevron-down fa-chevron-circle-down\");\r\n });\r\n\r\n $(\".user-collapse\").off(\"click\");\r\n $(\".user-collapse\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n $(\"#user-listing-table\", this).toggleClass(\"fa-chevron-circle-down fa-chevron-down\");\r\n });\r\n\r\n $(\".delete-broker-user\").off(\"click\");\r\n $(\".delete-broker-user\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n var $this = $(this);\r\n var userId = $this.data(\"id\");\r\n var userName = $this.data(\"usernameId\");\r\n cw.pages.brokerSiteAdmin.deleteUserModal(userId, userName);\r\n });\r\n },\r\n\r\n deleteUserModal: function (userId, userName) {\r\n cw.modal.Open({\r\n title: \"Delete User Confirmation\",\r\n modalBody:\r\n \"
You are about to delete user: \" +\r\n userName +\r\n \". Would you like to continue?
Please be aware, this action cannot be undone!
\",\r\n size: BootstrapDialog.SIZE_NORMAL,\r\n buttons: [\r\n {\r\n label: ' Cancel',\r\n cssClass: \"btn btn-white\",\r\n action: function (dialogRef) {\r\n dialogRef.close();\r\n },\r\n },\r\n {\r\n label: ' Delete',\r\n cssClass: \"btn btn-danger delete-broker-user-button\",\r\n action: function (dialogRef) {\r\n cw.pages.brokerSiteAdmin.deleteBrokerUser(userId, userName, dialogRef);\r\n },\r\n onShownCallback: function () {\r\n cw.pages.brokerSiteAdmin.vendCodeDisable();\r\n },\r\n },\r\n ],\r\n });\r\n },\r\n\r\n addNewUserModal: function (args) {\r\n cw.templating.GetRenderedTemplateHTML(\r\n \"BrokerSiteAdminNewUser.html\",\r\n cw.appEnum.TemplateType.CwWidget,\r\n args,\r\n function (renderedTmpl) {\r\n cw.modal.Open({\r\n title: \"Create New User\",\r\n modalBody: $(renderedTmpl),\r\n size: BootstrapDialog.SIZE_WIDE,\r\n buttons: [\r\n {\r\n label: ' Cancel',\r\n cssClass: \"btn btn-white\",\r\n action: function (dialogRef) {\r\n dialogRef.close();\r\n },\r\n },\r\n {\r\n label: ' Save',\r\n cssClass: \"btn btn-secondary save-user-data\",\r\n type: \"submit\",\r\n action: function (dialogRef) {\r\n var $errPnl = dialogRef.$modalBody.find(\".error-wrapper\");\r\n cw.alert.ClearAlert($errPnl);\r\n var userFieldsObj = {\r\n userName: $(\".username-update\").val(),\r\n newPassword: $(\".password-update\").val(),\r\n confirmPassword: $(\".confirm-password-update\").val(),\r\n emailAddress: $(\".email-update\").val(),\r\n firstName: $(\".first-name-update\").val(),\r\n lastName: $(\".last-name-update\").val(),\r\n activeUser: $(\"#active-user-select option:selected\").val(),\r\n adminUser: $(\"#admin-user-select option:selected\").val(),\r\n newVendCode:\r\n typeof $(\"#vend-code-select\").val() !== \"undefined\"\r\n ? $(\"#vend-code-select\").val()\r\n : null,\r\n };\r\n\r\n cw.webservices.getJson(\r\n \"BrokerApi/check-duplicate-user\",\r\n userFieldsObj,\r\n function (rtnData) {\r\n if (rtnData === 0) {\r\n var required = cw.pages.brokerSiteAdmin.validateRequiredFields(dialogRef);\r\n if (required.length < 1) {\r\n userFieldsObj.vendCode = $(\".vend-code-select\").val();\r\n cw.pages.brokerSiteAdmin.addNewUserFunction(userFieldsObj, dialogRef);\r\n } else {\r\n $errPnl.removeClass(\"hidden\");\r\n }\r\n location.reload();\r\n } else {\r\n cw.modal.Alert({\r\n title: \"Unable to complete your request.\",\r\n text: \"Duplicate Username Found.\",\r\n });\r\n }\r\n }\r\n );\r\n },\r\n },\r\n ],\r\n onShownCallback: function (mr) {\r\n var self = this;\r\n mr.$modalFooter\r\n .find(\".bootstrap-dialog-footer-buttons\")\r\n .prepend(\r\n '