[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 4596.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4596],{4596:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var l=a(9726),s={class:"col-12"},c={class:"db-card"},o={class:"db-card-header"},i={class:"db-card-title"},n={class:"text-primary"},d={class:"db-table-responsive"},r={class:"db-table stripe"},h={class:"db-table-head"},m={class:"db-table-head-tr"},b={class:"db-table-head-th"},u={class:"db-table-head-th"},p={class:"db-table-head-th"},f={class:"db-table-head-th"},g={class:"db-table-head-th"},k={key:0,class:"db-table-body"},v={class:"db-table-body-td"},y={class:"custom-checkbox"},E=["name","value","id","checked","onChange"],N=["colspan"],V={class:"custom-checkbox"},S=["id","disabled","value","checked","onChange"],$={class:"db-card-body border-t"},x={class:"db-btn text-white bg-primary"};var A=a(5475),B=a(9856);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}const D={name:"RoleShowComponent",components:{LoadingComponent:A.A},data:function(){return{loading:{isActive:!1},form:[],disabledStatue:{},checkedStatue:{}}},computed:{permissions:function(){return this.$store.getters["permission/lists"]},role:function(){return this.$store.getters["role/show"]}},mounted:function(){var e=this;this.list(),this.$store.dispatch("role/show",this.$route.params.id).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},methods:{list:function(){var e=this;this.loading.isActive=!0,this.$store.dispatch("permission/lists",this.$route.params.id).then(function(t){var a,l,s,c=t.data.data,o=0;for(l=0;l<c.length;l++)if(c[l].access&&(e.form[o]=c[l].id,o++,e.disabledStatue[c[l].id]=c[l].access,e.checkedStatue[c[l].id]=c[l].access),"object"===C(c[l].children)&&null!=c[l].children)for(a=c[l].children,s=0;s<a.length;s++)a[s].access&&(e.form[o]=a[s].id,o++),e.disabledStatue[c[l].id]?e.disabledStatue[a[s].id]=c[l].access:e.disabledStatue[a[s].id]=a[s].access,e.checkedStatue[a[s].id]=a[s].access;e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},enable:function(e,t,a){if(!0===a.target.checked){var l=this.form.length;this.form[l]=e.id}else{var s=0;for(s=0;s<this.form.length;s++)this.form[s]===e.id&&this.form.splice(s,1)}if("object"===C(e.children)&&null!=e.children){var c,o=e.children;for(c=0;c<o.length;c++)if(0===t&&(this.disabledStatue[o[c].id]=!this.disabledStatue[o[c].id],this.checkedStatue[o[c].id]=a.target.checked),!0===a.target.checked){var i=this.form.length;this.form[i]=o[c].id}else{var n=void 0;for(n=0;n<this.form.length;n++)this.form[n]===o[c].id&&this.form.splice(n,1)}}},save:function(){var e=this;this.loading.isActive=!0,this.$store.dispatch("permission/save",{form:this.form,id:this.$route.params.id}).then(function(t){e.list(),e.loading.isActive=!1,B.A.successFlip(1,e.$t("label.permissions"))}).catch(function(t){e.loading.isActive=!1,B.A.error(t.response.data.message)})}}};const w=(0,a(6262).A)(D,[["render",function(e,t,a,A,B,C){var D=(0,l.resolveComponent)("LoadingComponent");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(D,{props:B.loading},null,8,["props"]),(0,l.createElementVNode)("div",s,[(0,l.createElementVNode)("form",{class:"!d-block w-full",onSubmit:t[0]||(t[0]=(0,l.withModifiers)(function(){return C.save&&C.save.apply(C,arguments)},["prevent"])),id:"form",enctype:"multipart/form-data"},[(0,l.createElementVNode)("div",c,[(0,l.createElementVNode)("div",o,[(0,l.createElementVNode)("h3",i,[(0,l.createTextVNode)((0,l.toDisplayString)(e.$t("menu.role"))+" & "+(0,l.toDisplayString)(e.$t("label.permissions"))+" ",1),(0,l.createElementVNode)("span",n,"("+(0,l.toDisplayString)(C.role.name)+")",1)])]),(0,l.createElementVNode)("div",d,[(0,l.createElementVNode)("table",r,[(0,l.createElementVNode)("thead",h,[(0,l.createElementVNode)("tr",m,[t[1]||(t[1]=(0,l.createElementVNode)("th",{class:"db-table-head-th"},"#",-1)),(0,l.createElementVNode)("th",b,(0,l.toDisplayString)(e.$t("label.page")),1),(0,l.createElementVNode)("th",u,(0,l.toDisplayString)(e.$t("label.create")),1),(0,l.createElementVNode)("th",p,(0,l.toDisplayString)(e.$t("label.update")),1),(0,l.createElementVNode)("th",f,(0,l.toDisplayString)(e.$t("label.delete")),1),(0,l.createElementVNode)("th",g,(0,l.toDisplayString)(e.$t("label.view")),1)])]),C.permissions.length>0?((0,l.openBlock)(),(0,l.createElementBlock)("tbody",k,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(C.permissions,function(e){return(0,l.openBlock)(),(0,l.createElementBlock)("tr",{key:e,class:"db-table-body-tr"},[(0,l.createElementVNode)("td",v,[(0,l.createElementVNode)("div",y,[(0,l.createElementVNode)("input",{type:"checkbox",class:"custom-checkbox-field",name:"feature_"+e.id,value:e.id,id:"feature_"+e.id,checked:e.access,onChange:function(t){return C.enable(e,0,t)}},null,40,E),t[2]||(t[2]=(0,l.createElementVNode)("i",{class:"lab lab-fill-check custom-checkbox-icon lab-font-size-10"},null,-1))])]),(0,l.createElementVNode)("td",{colspan:e.children?"":5,class:"db-table-body-td text-base capitalize"},(0,l.toDisplayString)(e.title),9,N),e.children?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:0},(0,l.renderList)(e.children,function(e){return(0,l.openBlock)(),(0,l.createElementBlock)("td",{key:e,class:"db-table-body-td text-sm"},[(0,l.createElementVNode)("div",V,[(0,l.createElementVNode)("input",{type:"checkbox",class:"custom-checkbox-field",id:"feature_"+e.id,disabled:!B.disabledStatue[e.id],value:e.id,checked:B.checkedStatue[e.id],onChange:function(t){return C.enable(e,1,t)}},null,40,S),t[3]||(t[3]=(0,l.createElementVNode)("i",{class:"lab lab-fill-check custom-checkbox-icon lab-font-size-10"},null,-1))])])}),128)):(0,l.createCommentVNode)("",!0)])}),128))])):(0,l.createCommentVNode)("",!0)])]),(0,l.createElementVNode)("div",$,[(0,l.createElementVNode)("button",x,[t[4]||(t[4]=(0,l.createElementVNode)("i",{class:"lab lab-fill-save"},null,-1)),(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.$t("button.save")),1)])])])],32)])],64)}]])}}]);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.87 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285