[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 6027.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6027],{1017:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726);const o={name:"PaginationBox",components:{TailwindPagination:a(1964).L5},props:{pagination:{type:Object},method:{type:Function}},data:function(){return{activeClass:["bg-blue-50","border-blue-500","text-primary"]}},methods:{page:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.method(e)}}};const r=(0,a(6262).A)(o,[["render",function(e,t,a,o,r,l){var i=(0,n.resolveComponent)("TailwindPagination");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createVNode)(i,{data:a.pagination,onPaginationChangePage:l.page,"active-classes":r.activeClass,limit:1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1606:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726);const o={name:"SmViewComponent",props:{link:String,id:Number}};const r=(0,a(6262).A)(o,[["render",function(e,t,a,o,r,l){var i=(0,n.resolveComponent)("router-link");return(0,n.openBlock)(),(0,n.createBlock)(i,{class:"db-btn-outline sm primary modal-btn m-0.5",to:{name:this.$props.link,params:{id:this.$props.id}}},{default:(0,n.withCtx)(function(){return[t[0]||(t[0]=(0,n.createElementVNode)("i",{class:"lab lab-line-eye"},null,-1)),t[1]||(t[1]=(0,n.createTextVNode)()),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.view")),1)]}),_:1,__:[0,1]},8,["to"])}]])},1751:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726),o={class:"flex flex-1 justify-between sm:hidden"};const r={name:"PaginationSMBox",components:{TailwindPagination:a(1964).L5},props:{pagination:{type:Object},method:{type:Function}},data:function(){return{activeClass:["bg-blue-50","border-blue-500","text-primary"]}},methods:{page:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.method(e)}}};const l=(0,a(6262).A)(r,[["render",function(e,t,a,r,l,i){var s=(0,n.resolveComponent)("TailwindPagination");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(s,{data:a.pagination,onPaginationChangePage:i.page,"active-classes":l.activeClass,limit:-1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1889:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726),o={class:"text-sm text-gray-700"};const r={name:"PaginationTextComponent",props:["props"]};const l=(0,a(6262).A)(r,[["render",function(e,t,a,r,l,i){var s,d;return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("p",o,(0,n.toDisplayString)(e.$t("message.pagination_label",{from:null!==(s=a.props.page.from)&&void 0!==s?s:0,to:null!==(d=a.props.page.to)&&void 0!==d?d:0,total:a.props.page.total})),1)])}]])},1964:(e,t,a)=>{a.d(t,{L5:()=>g});var n=a(9726);const o={emits:["pagination-change-page"],props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},keepLength:{type:Boolean,default:!1}},computed:{isApiResource(){return!!this.data.meta},currentPage(){var e;return this.isApiResource?this.data.meta.current_page:null!=(e=this.data.current_page)?e:null},firstPageUrl(){var e,t,a,n,o;return null!=(o=null!=(n=null!=(t=this.data.first_page_url)?t:null==(e=this.data.meta)?void 0:e.first_page_url)?n:null==(a=this.data.links)?void 0:a.first)?o:null},from(){var e;return this.isApiResource?this.data.meta.from:null!=(e=this.data.from)?e:null},lastPage(){var e;return this.isApiResource?this.data.meta.last_page:null!=(e=this.data.last_page)?e:null},lastPageUrl(){var e,t,a,n,o;return null!=(o=null!=(n=null!=(t=this.data.last_page_url)?t:null==(e=this.data.meta)?void 0:e.last_page_url)?n:null==(a=this.data.links)?void 0:a.last)?o:null},nextPageUrl(){var e,t,a,n,o;return null!=(o=null!=(n=null!=(t=this.data.next_page_url)?t:null==(e=this.data.meta)?void 0:e.next_page_url)?n:null==(a=this.data.links)?void 0:a.next)?o:null},perPage(){var e;return this.isApiResource?this.data.meta.per_page:null!=(e=this.data.per_page)?e:null},prevPageUrl(){var e,t,a,n,o;return null!=(o=null!=(n=null!=(t=this.data.prev_page_url)?t:null==(e=this.data.meta)?void 0:e.prev_page_url)?n:null==(a=this.data.links)?void 0:a.prev)?o:null},to(){var e;return this.isApiResource?this.data.meta.to:null!=(e=this.data.to)?e:null},total(){var e;return this.isApiResource?this.data.meta.total:null!=(e=this.data.total)?e:null},pageRange(){if(-1===this.limit)return 0;if(0===this.limit)return this.lastPage;for(var e,t=this.currentPage,a=this.keepLength,n=this.lastPage,o=this.limit,r=t-o,l=t+o,i=2*(o+2),s=2*(o+2)-1,d=[],c=[],p=1;p<=n;p++)(1===p||p===n||p>=r&&p<=l||a&&p<i&&t<i-2||a&&p>n-s&&t>n-s+2)&&d.push(p);return d.forEach(function(t){e&&(t-e===2?c.push(e+1):t-e!==1&&c.push("...")),c.push(t),e=t}),c}},methods:{previousPage(){this.selectPage(this.currentPage-1)},nextPage(){this.selectPage(this.currentPage+1)},selectPage(e){"..."===e||e===this.currentPage||this.$emit("pagination-change-page",e)}},render(){return this.$slots.default({data:this.data,limit:this.limit,computed:{isApiResource:this.isApiResource,currentPage:this.currentPage,firstPageUrl:this.firstPageUrl,from:this.from,lastPage:this.lastPage,lastPageUrl:this.lastPageUrl,nextPageUrl:this.nextPageUrl,perPage:this.perPage,prevPageUrl:this.prevPageUrl,to:this.to,total:this.total,pageRange:this.pageRange},prevButtonEvents:{click:e=>{e.preventDefault(),this.previousPage()}},nextButtonEvents:{click:e=>{e.preventDefault(),this.nextPage()}},pageButtonEvents:e=>({click:t=>{t.preventDefault(),this.selectPage(e)}})})}},r=(e,t)=>{const a=e.__vccOpts||e;for(const[e,n]of t)a[e]=n;return a};Boolean,Boolean;Boolean,Boolean;const l={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:o},props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},keepLength:{type:Boolean,default:!1},itemClasses:{type:Array,default:()=>["bg-white","text-gray-500","border-gray-300","hover:bg-gray-50"]},activeClasses:{type:Array,default:()=>["bg-blue-50","border-blue-500","text-blue-600"]}},methods:{onPaginationChangePage(e){this.$emit("pagination-change-page",e)}}},i=["disabled"],s=(0,n.createElementVNode)("span",{class:"sr-only"},"Previous",-1),d=(0,n.createElementVNode)("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1),c=["aria-current","disabled"],p=["disabled"],m=(0,n.createElementVNode)("span",{class:"sr-only"},"Next",-1),u=(0,n.createElementVNode)("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1);const g=r(l,[["render",function(e,t,a,o,r,l){const g=(0,n.resolveComponent)("RenderlessPagination");return(0,n.openBlock)(),(0,n.createBlock)(g,{data:a.data,limit:a.limit,"keep-length":a.keepLength,onPaginationChangePage:l.onPaginationChangePage},{default:(0,n.withCtx)(t=>[t.computed.total>t.computed.perPage?((0,n.openBlock)(),(0,n.createElementBlock)("nav",(0,n.mergeProps)({key:0},e.$attrs,{class:"inline-flex -space-x-px rounded-md shadow-sm isolate ltr:flex-row rtl:flex-row-reverse","aria-label":"Pagination"}),[(0,n.createElementVNode)("button",(0,n.mergeProps)({class:["relative inline-flex items-center px-2 py-2 text-sm font-medium border rounded-l-md focus:z-20 disabled:opacity-50",a.itemClasses],disabled:!t.computed.prevPageUrl},(0,n.toHandlers)(t.prevButtonEvents,!0)),[(0,n.renderSlot)(e.$slots,"prev-nav",{},()=>[s,d])],16,i),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(t.computed.pageRange,(e,o)=>((0,n.openBlock)(),(0,n.createElementBlock)("button",(0,n.mergeProps)({class:["relative inline-flex items-center px-4 py-2 text-sm font-medium border focus:z-20",[e==t.computed.currentPage?a.activeClasses:a.itemClasses,e==t.computed.currentPage?"z-30":""]],"aria-current":t.computed.currentPage?"page":null,key:o},(0,n.toHandlers)(t.pageButtonEvents(e),!0),{disabled:e===t.computed.currentPage}),(0,n.toDisplayString)(e),17,c))),128)),(0,n.createElementVNode)("button",(0,n.mergeProps)({class:["relative inline-flex items-center px-2 py-2 text-sm font-medium border rounded-r-md focus:z-20 disabled:opacity-50",a.itemClasses],disabled:!t.computed.nextPageUrl},(0,n.toHandlers)(t.nextButtonEvents,!0)),[(0,n.renderSlot)(e.$slots,"next-nav",{},()=>[m,u])],16,p)],16)):(0,n.createCommentVNode)("",!0)]),_:3},8,["data","limit","keep-length","onPaginationChangePage"])}]])},3721:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726),o={class:"db-btn-outline sm danger modal-btn m-0.5"};const r={name:"SmDeleteComponent"};const l=(0,a(6262).A)(r,[["render",function(e,t,a,r,l,i){return(0,n.openBlock)(),(0,n.createElementBlock)("button",o,[t[0]||(t[0]=(0,n.createElementVNode)("i",{class:"lab lab-line-trash"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.delete")),1)])}]])},5458:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726),o={class:"db-btn-outline sm success modal-btn m-0.5"};const r={name:"SmModalEditComponent"};const l=(0,a(6262).A)(r,[["render",function(e,t,a,r,l,i){return(0,n.openBlock)(),(0,n.createElementBlock)("button",o,[t[0]||(t[0]=(0,n.createElementVNode)("i",{class:"lab lab-line-edit"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.edit")),1)])}]])},6027:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Be});var n=a(9726),o={class:"db-card db-tab-div active"},r={class:"db-card-header border-none"},l={class:"db-card-title"},i={class:"db-card-filter"},s={class:"db-table-responsive"},d={class:"db-table stripe"},c={class:"db-table-head"},p={class:"db-table-head-tr"},m={class:"db-table-head-th"},u={class:"db-table-head-th"},g={class:"db-table-head-th"},h={class:"db-table-head-th"},b={key:0,class:"db-table-body"},v={class:"db-table-body-td"},f={class:"db-table-body-td"},y={class:"db-table-body-td"},E={class:"db-table-body-td"},V={class:"flex justify-start items-center sm:items-start sm:justify-start gap-1.5"},N={key:1,class:"db-table-body"},C={class:"db-table-body-tr"},P={class:"db-table-body-td text-center",colspan:"4"},k={class:"p-4"},A={class:"max-w-[300px] mx-auto mt-2"},B=["src"],x={class:"d-block mt-3 text-lg"},S={key:0,class:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-6"},w={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"};var $=a(5475),D={id:"modal",class:"modal"},_={class:"modal-dialog"},T={class:"modal-header"},j={class:"modal-title"},U={class:"modal-body"},L={class:"form-row"},M={class:"form-col-12 sm:form-col-6"},R={for:"name",class:"db-field-title required"},I={key:0,class:"db-field-alert"},F={class:"form-col-12 sm:form-col-6"},O={class:"db-field-title required",for:"active"},z={class:"db-field-radio-group"},H={class:"db-field-radio"},q={class:"custom-radio"},G=["value"],J={for:"active",class:"db-field-label"},K={class:"db-field-radio"},Q={class:"custom-radio"},W=["value"],X={for:"inactive",class:"db-field-label"},Y={class:"form-col-12 sm:form-col-12"},Z={for:"image",class:"db-field-title"},ee={key:0,class:"db-field-alert"},te={class:"form-col-12"},ae={for:"description",class:"db-field-title"},ne={key:0,class:"db-field-alert"},oe={class:"form-col-12"},re={class:"modal-btns"},le={type:"submit",class:"db-btn py-2 text-white bg-primary"};var ie=a(8691),se=a(9856),de=a(8655),ce=a(6884);function pe(e){return pe="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},pe(e)}function me(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=pe(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const ue={name:"ProductBrandCreateComponent",components:{SmModalCreateComponent:ie.A,LoadingComponent:$.A},props:["props"],data:function(){return{loading:{isActive:!1},enums:{statusEnum:ce.A,statusEnumArray:me(me({},ce.A.ACTIVE,this.$t("label.active")),ce.A.INACTIVE,this.$t("label.inactive"))},image:"",errors:{}}},computed:{addButton:function(){return{title:this.$t("button.add_product_brand")}}},methods:{changeImage:function(e){this.image=e.target.files[0]},reset:function(){de.A.modalHide(),this.$store.dispatch("productBrand/reset").then().catch(),this.errors={},this.$props.props.form={name:"",description:"",status:ce.A.ACTIVE},this.image&&(this.image="",this.$refs.imageProperty.value=null)},save:function(){var e=this;try{var t=new FormData;t.append("name",this.props.form.name),t.append("status",this.props.form.status),t.append("description",this.props.form.description),this.image&&t.append("image",this.image);var a=this.$store.getters["productBrand/temp"].temp_id;this.loading.isActive=!0,this.$store.dispatch("productBrand/save",{form:t,search:this.props.search}).then(function(t){de.A.modalHide(),e.loading.isActive=!1,se.A.successFlip(null===a?0:1,e.$t("menu.product_brands")),e.props.form={name:"",description:"",status:ce.A.ACTIVE},e.image="",e.errors={},e.$refs.imageProperty.value=null}).catch(function(t){e.loading.isActive=!1,e.errors=t.response.data.errors})}catch(e){this.loading.isActive=!1,se.A.error(e)}}}};var ge=a(6262);const he=(0,ge.A)(ue,[["render",function(e,t,a,o,r,l){var i=(0,n.resolveComponent)("LoadingComponent"),s=(0,n.resolveComponent)("SmModalCreateComponent");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(i,{props:r.loading},null,8,["props"]),(0,n.createVNode)(s,{props:l.addButton},null,8,["props"]),(0,n.createElementVNode)("div",D,[(0,n.createElementVNode)("div",_,[(0,n.createElementVNode)("div",T,[(0,n.createElementVNode)("h3",j,(0,n.toDisplayString)(e.$t("menu.product_brands")),1),(0,n.createElementVNode)("button",{class:"modal-close fa-solid fa-xmark text-xl text-slate-400 hover:text-red-500",onClick:t[0]||(t[0]=function(){return l.reset&&l.reset.apply(l,arguments)})})]),(0,n.createElementVNode)("div",U,[(0,n.createElementVNode)("form",{onSubmit:t[7]||(t[7]=(0,n.withModifiers)(function(){return l.save&&l.save.apply(l,arguments)},["prevent"]))},[(0,n.createElementVNode)("div",L,[(0,n.createElementVNode)("div",M,[(0,n.createElementVNode)("label",R,(0,n.toDisplayString)(e.$t("label.name")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.props.form.name=e}),type:"text",id:"name",class:(0,n.normalizeClass)([r.errors.name?"invalid":"","db-field-control"])},null,2),[[n.vModelText,a.props.form.name]]),r.errors.name?((0,n.openBlock)(),(0,n.createElementBlock)("small",I,(0,n.toDisplayString)(r.errors.name[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",F,[(0,n.createElementVNode)("label",O,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createElementVNode)("div",z,[(0,n.createElementVNode)("div",H,[(0,n.createElementVNode)("div",q,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:r.enums.statusEnum.ACTIVE,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.props.form.status=e}),id:"active",type:"radio",class:"custom-radio-field"},null,8,G),[[n.vModelRadio,a.props.form.status]]),t[8]||(t[8]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",J,(0,n.toDisplayString)(e.$t("label.active")),1)]),(0,n.createElementVNode)("div",K,[(0,n.createElementVNode)("div",Q,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:r.enums.statusEnum.INACTIVE,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.props.form.status=e}),type:"radio",id:"inactive",class:"custom-radio-field"},null,8,W),[[n.vModelRadio,a.props.form.status]]),t[9]||(t[9]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",X,(0,n.toDisplayString)(e.$t("label.inactive")),1)])])]),(0,n.createElementVNode)("div",Y,[(0,n.createElementVNode)("label",Z,(0,n.toDisplayString)(e.$t("label.image"))+" (108px,108px)",1),(0,n.createElementVNode)("input",{onChange:t[4]||(t[4]=function(){return l.changeImage&&l.changeImage.apply(l,arguments)}),class:(0,n.normalizeClass)([r.errors.image?"invalid":"","db-field-control"]),id:"image",type:"file",ref:"imageProperty",accept:"image/png, image/jpeg, image/jpg"},null,34),r.errors.image?((0,n.openBlock)(),(0,n.createElementBlock)("small",ee,(0,n.toDisplayString)(r.errors.image[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",te,[(0,n.createElementVNode)("label",ae,(0,n.toDisplayString)(e.$t("label.description")),1),(0,n.withDirectives)((0,n.createElementVNode)("textarea",{"onUpdate:modelValue":t[5]||(t[5]=function(e){return a.props.form.description=e}),class:(0,n.normalizeClass)([r.errors.description?"invalid":"","db-field-control"]),id:"description"},null,2),[[n.vModelText,a.props.form.description]]),r.errors.description?((0,n.openBlock)(),(0,n.createElementBlock)("small",ne,(0,n.toDisplayString)(r.errors.description[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",oe,[(0,n.createElementVNode)("div",re,[(0,n.createElementVNode)("button",{type:"button",class:"modal-btn-outline modal-close",onClick:t[6]||(t[6]=function(){return l.reset&&l.reset.apply(l,arguments)})},[t[10]||(t[10]=(0,n.createElementVNode)("i",{class:"lab lab-fill-close-circle"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.close")),1)]),(0,n.createElementVNode)("button",le,[t[11]||(t[11]=(0,n.createElementVNode)("i",{class:"lab lab-fill-save"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.save")),1)])])])])],32)])])])],64)}]]);var be=a(1889),ve=a(1017),fe=a(1751),ye=a(9319),Ee=a(3721),Ve=a(5458),Ne=a(1606),Ce=a(8536);function Pe(e){return Pe="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},Pe(e)}function ke(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const Ae={name:"ProductBrandListComponent",components:{TableLimitComponent:ye.A,PaginationSMBox:fe.A,PaginationBox:ve.A,PaginationTextComponent:be.A,ProductBrandCreateComponent:he,LoadingComponent:$.A,SmDeleteComponent:Ee.A,SmModalEditComponent:Ve.A,SmViewComponent:Ne.A},data:function(){return{loading:{isActive:!1},enums:{statusEnum:ce.A,statusEnumArray:ke(ke({},ce.A.ACTIVE,this.$t("label.active")),ce.A.INACTIVE,this.$t("label.inactive"))},props:{form:{name:"",description:"",status:ce.A.ACTIVE},search:{paginate:1,page:1,per_page:10,order_column:"id",order_type:"desc"}},ENV:Ce.A}},mounted:function(){this.list()},computed:{productBrands:function(){return this.$store.getters["productBrand/lists"]},pagination:function(){return this.$store.getters["productBrand/pagination"]},paginationPage:function(){return this.$store.getters["productBrand/page"]}},methods:{statusClass:function(e){return de.A.statusClass(e)},textShortener:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;return de.A.textShortener(e,t)},list:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.loading.isActive=!0,this.props.search.page=t,this.$store.dispatch("productBrand/lists",this.props.search).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},edit:function(e){de.A.modalShow(),this.loading.isActive=!0,this.$store.dispatch("productBrand/edit",e.id),this.props.form={name:e.name,description:e.description,status:e.status},this.loading.isActive=!1},destroy:function(e){var t=this;de.A.destroyConfirmation().then(function(a){try{t.loading.isActive=!0,t.$store.dispatch("productBrand/destroy",{id:e,search:t.props.search}).then(function(e){t.loading.isActive=!1,se.A.successFlip(null,t.$t("menu.product_brands"))}).catch(function(e){t.loading.isActive=!1,se.A.error(e.response.data.message)})}catch(e){t.loading.isActive=!1,se.A.error(e.response.data.message)}}).catch(function(e){t.loading.isActive=!1})}}},Be=(0,ge.A)(Ae,[["render",function(e,t,a,$,D,_){var T=(0,n.resolveComponent)("LoadingComponent"),j=(0,n.resolveComponent)("TableLimitComponent"),U=(0,n.resolveComponent)("ProductBrandCreateComponent"),L=(0,n.resolveComponent)("SmViewComponent"),M=(0,n.resolveComponent)("SmModalEditComponent"),R=(0,n.resolveComponent)("SmDeleteComponent"),I=(0,n.resolveComponent)("PaginationSMBox"),F=(0,n.resolveComponent)("PaginationTextComponent"),O=(0,n.resolveComponent)("PaginationBox");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(T,{props:D.loading},null,8,["props"]),(0,n.createElementVNode)("div",o,[(0,n.createElementVNode)("div",r,[(0,n.createElementVNode)("h3",l,(0,n.toDisplayString)(e.$t("menu.product_brands")),1),(0,n.createElementVNode)("div",i,[(0,n.createVNode)(j,{method:_.list,search:D.props.search,page:_.paginationPage},null,8,["method","search","page"]),(0,n.createVNode)(U,{props:D.props},null,8,["props"])])]),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("table",d,[(0,n.createElementVNode)("thead",c,[(0,n.createElementVNode)("tr",p,[(0,n.createElementVNode)("th",m,(0,n.toDisplayString)(e.$t("label.name")),1),(0,n.createElementVNode)("th",u,(0,n.toDisplayString)(e.$t("label.description")),1),(0,n.createElementVNode)("th",g,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createElementVNode)("th",h,(0,n.toDisplayString)(e.$t("label.action")),1)])]),_.productBrands.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("tbody",b,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.productBrands,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("tr",{class:"db-table-body-tr",key:e},[(0,n.createElementVNode)("td",v,(0,n.toDisplayString)(e.name),1),(0,n.createElementVNode)("td",f,(0,n.toDisplayString)(_.textShortener(e.description)),1),(0,n.createElementVNode)("td",y,[(0,n.createElementVNode)("span",{class:(0,n.normalizeClass)(_.statusClass(e.status))},(0,n.toDisplayString)(D.enums.statusEnumArray[e.status]),3)]),(0,n.createElementVNode)("td",E,[(0,n.createElementVNode)("div",V,[(0,n.createVNode)(L,{link:"admin.settings.productBrand.show",id:e.id},null,8,["id"]),(0,n.createVNode)(M,{onClick:function(t){return _.edit(e)}},null,8,["onClick"]),(0,n.createVNode)(R,{onClick:function(t){return _.destroy(e.id)}},null,8,["onClick"])])])])}),128))])):((0,n.openBlock)(),(0,n.createElementBlock)("tbody",N,[(0,n.createElementVNode)("tr",C,[(0,n.createElementVNode)("td",P,[(0,n.createElementVNode)("div",k,[(0,n.createElementVNode)("div",A,[(0,n.createElementVNode)("img",{class:"w-full h-full",src:D.ENV.API_URL+"/images/default/not-found/not_found.png",alt:"Not Found"},null,8,B)]),(0,n.createElementVNode)("span",x,(0,n.toDisplayString)(e.$t("message.no_data_found")),1)])])])]))])]),_.productBrands.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",S,[(0,n.createVNode)(I,{pagination:_.pagination,method:_.list},null,8,["pagination","method"]),(0,n.createElementVNode)("div",w,[(0,n.createVNode)(F,{props:{page:_.paginationPage}},null,8,["props"]),(0,n.createVNode)(O,{pagination:_.pagination,method:_.list},null,8,["pagination","method"])])])):(0,n.createCommentVNode)("",!0)])],64)}]])},8691:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726);var o=a(8655);const r={name:"SmModalCreateComponent",props:["props"],methods:{add:function(){o.A.modalShow()}}};const l=(0,a(6262).A)(r,[["render",function(e,t,a,o,r,l){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:"button",onClick:t[0]||(t[0]=function(){return l.add&&l.add.apply(l,arguments)}),"data-modal":"#modal",class:"db-btn h-[37px] text-white bg-primary"},[t[1]||(t[1]=(0,n.createElementVNode)("i",{class:"lab lab-line-add-circle"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(a.props.title),1)])}]])},9319:(e,t,a)=>{a.d(t,{A:()=>m});var n=a(9726),o={key:0,class:"db-field-down-arrow"},r={value:"10"},l={value:"25"},i={value:"50"},s={value:"100"},d={value:"500"},c={value:"1000"};const p={name:"TableLimitComponent",props:{page:{type:Object},search:{type:Object},method:{type:Function}},methods:{limitChange:function(){this.method()}}};const m=(0,a(6262).A)(p,[["render",function(e,t,a,p,m,u){return a.page.total>10?((0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.withDirectives)((0,n.createElementVNode)("select",{onChange:t[0]||(t[0]=function(){return u.limitChange&&u.limitChange.apply(u,arguments)}),"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.search.per_page=e}),class:"db-card-filter-select"},[(0,n.createElementVNode)("option",r,(0,n.toDisplayString)(e.$t("number.10")),1),(0,n.createElementVNode)("option",l,(0,n.toDisplayString)(e.$t("number.25")),1),(0,n.createElementVNode)("option",i,(0,n.toDisplayString)(e.$t("number.50")),1),(0,n.createElementVNode)("option",s,(0,n.toDisplayString)(e.$t("number.100")),1),(0,n.createElementVNode)("option",d,(0,n.toDisplayString)(e.$t("number.500")),1),(0,n.createElementVNode)("option",c,(0,n.toDisplayString)(e.$t("number.1000")),1)],544),[[n.vModelSelect,a.search.per_page]])])):(0,n.createCommentVNode)("",!0)}]])}}]);
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