Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

editappgroup.min.js 4.9KB

1
  1. var Unibase;(function(n){let t;(function(t){let i;(function(i){let r;(function(r){class u extends t.Core.BaseComponent{constructor(){super();this._appGroupManager=i.Managers.AppGroupManager.Instance()}cssFiles(){return[]}jsFiles(){return["platform/appgroups/requests/appgroup.js"]}html(){return`<form id="frm_Bizgaze_EditAppGroup" method="post" data-validate="parsley" class="w-f bg-white"><input type="hidden" id="AppGroupId" value="" /><div class="header b-b bg-white p-3" id="div_EditAppGroupHeader"><strong>Edit App Group</strong></div><div class="scrollable"><div id="Bizgaze_ErrorMessagesEditAppGroup" class="clear"></div><div class="card"><div class="card-body"><div class="row"><div class="col-sm-6"><div class="floating-label-form-group floating-label-form-group-with-value" id="div_AppGroupName"><label for="txt_RenameGroup" id="lbl_RenameGroup">App Group Name <span class="text-danger">*</span></label><input type="text" id="txt_RenameGroup" class="form-control value-control floating-label-control" data-isdynamic="false" placeholder="App Group Name *" data-placeholder="Enter Group Name" data-label="App Group Name *" value="" /></div></div><div class="col-sm-6"><div class="floating-label-form-group floating-label-form-group-with-value" id="div_Index"><label for="txt_DisplayIndex" id="lbl_DisplayIndex">Display Index</label><div class=""><input type="number" min="0" onkeypress="return event.charCode != 45 && event.charCode!=101" id="txt_DisplayIndex" class="form-control value-control floating-label-control" placeholder="Display Index" data-placeholder="Enter Display Index" data-label="Display Index" value="" /></div></div></div></div><br /><div class="panel panel-danger mt-3"><div class="panel-body text-center">You can delete this Group if you do not want this Group to exists for any users across all the portals<div class="clear text-center mt-2"><input onclick="Unibase.Platform.AppGroups.Components.EditAppGroup.Instance().deleteGroup();" type="button" id="DeleteGrp" value="Delete Group" class="btn btn-danger m-t-lg" /></div></div></div></div></div><div class="mt-30 hidden" id="GrpItemDiv"><div class="card"><div class="card-body"><p style="color:red"><em>* Before deleting the Group, Apps needs to be Un-grouped.</em></p></div><ul class="list-group list-group-flush" id="UlMoveGroup"></ul><div class="card-footer"><input type="button" style="width:auto" id="" value="Un-group all Apps & Delete" onclick="Unibase.Platform.AppGroups.Components.EditAppGroup.Instance().UnGroupAllandDelete()" class="btn btn-warning btn-sm" /><br /></div></div></div></div><div class="footer bg-white"><a href="javascript:;" id="btn_CloseAppGroup" class="btn btn-sm btn-light mr-auto">Close</a><a href="javascript:;" onclick="Unibase.Platform.AppGroups.Components.EditAppGroup.Instance().renameGroup();" id="RenameGrp" class="btn btn-sm btn-primary">Save</a></div></form>`}load(n){var t=this;$("#div_EditAppGroupHeader").removeClass("pa-5");$("#btn_CloseAppGroup").click(function(){t.navigationHelper.closePopUp()});t._appGroupManager.getAppGroup(n).then(function(n){var t=n.result;$("#AppGroupId").val(t.AppGroupId);$("#txt_RenameGroup").val(t.AppGroupName);$("#txt_DisplayIndex").val(t.DisplayIndex)})}deleteGroup(){var t=this,i=Number($("#AppGroupId").val());t._appGroupManager.getAppsByGroup(i).then(function(r){for(var e,f="",u=0;u<r.result.length;u++)f+='<li id="'+r.result[u].InstalledAppId+'" class="list-group-item">'+r.result[u].AppTitle+"<\/li>";f!=""&&($("#UlMoveGroup").html(f),$("#GrpItemDiv").removeClass("hidden"));e=$("#UlMoveGroup li").length;e==0&&t._appGroupManager.deleteAppGroup(i).then(function(i){t.navigationHelper.closePopUp();n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups();i.errors==null?MessageHelper.Instance().showSuccess("Group Deleted Successfully",""):MessageHelper.Instance().showError(i.errors[0],"Bizgaze_AppGroupErrorMessages")})})}UnGroupAllandDelete(){var t=this,i=$("#AppGroupId").val();t._appGroupManager.deleteAppGroup(i).then(function(i){t.navigationHelper.closePopUp();n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups();i.errors==null?MessageHelper.Instance().showSuccess("Group Deleted Successfully",""):MessageHelper.Instance().showError(i.errors[0],"Bizgaze_AppGroupErrorMessages")})}renameGroup(){var i=this,t=new n.Platform.AppGroups.Requests.AppGroup;t.AppGroupId=Number($("#AppGroupId").val());t.DisplayIndex=Number($("#txt_DisplayIndex").val());t.AppGroupName=String($("#txt_RenameGroup").val());i._appGroupManager.saveAppGroup(t).then(function(t){t.errors==null?(MessageHelper.Instance().showSuccess("App Group Saved Successfully",""),i.navigationHelper.closePopUp(),n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups()):MessageHelper.Instance().showError(t.errors[0],"Bizgaze_ErrorMessagesEditAppGroup")})}static Instance(){return new u}}r.EditAppGroup=u})(r=i.Components||(i.Components={}))})(i=t.AppGroups||(t.AppGroups={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));