[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 5668.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5668],{1017:(e,t,a)=>{a.d(t,{A:()=>l});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 l=(0,a(6262).A)(o,[["render",function(e,t,a,o,l,r){var s=(0,n.resolveComponent)("TailwindPagination");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createVNode)(s,{data:a.pagination,onPaginationChangePage:r.page,"active-classes":l.activeClass,limit:1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1606:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(9726);const o={name:"SmViewComponent",props:{link:String,id:Number}};const l=(0,a(6262).A)(o,[["render",function(e,t,a,o,l,r){var s=(0,n.resolveComponent)("router-link");return(0,n.openBlock)(),(0,n.createBlock)(s,{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:()=>r});var n=a(9726),o={class:"flex flex-1 justify-between sm:hidden"};const l={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 r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){var i=(0,n.resolveComponent)("TailwindPagination");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(i,{data:a.pagination,onPaginationChangePage:s.page,"active-classes":r.activeClass,limit:-1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1889:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726),o={class:"text-sm text-gray-700"};const l={name:"PaginationTextComponent",props:["props"]};const r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){var i,c;return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("p",o,(0,n.toDisplayString)(e.$t("message.pagination_label",{from:null!==(i=a.props.page.from)&&void 0!==i?i:0,to:null!==(c=a.props.page.to)&&void 0!==c?c: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,l=t-o,r=t+o,s=2*(o+2),i=2*(o+2)-1,c=[],d=[],m=1;m<=n;m++)(1===m||m===n||m>=l&&m<=r||a&&m<s&&t<s-2||a&&m>n-i&&t>n-i+2)&&c.push(m);return c.forEach(function(t){e&&(t-e===2?d.push(e+1):t-e!==1&&d.push("...")),d.push(t),e=t}),d}},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)}})})}},l=(e,t)=>{const a=e.__vccOpts||e;for(const[e,n]of t)a[e]=n;return a};Boolean,Boolean;Boolean,Boolean;const r={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)}}},s=["disabled"],i=(0,n.createElementVNode)("span",{class:"sr-only"},"Previous",-1),c=(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),d=["aria-current","disabled"],m=["disabled"],u=(0,n.createElementVNode)("span",{class:"sr-only"},"Next",-1),p=(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=l(r,[["render",function(e,t,a,o,l,r){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:r.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",{},()=>[i,c])],16,s),((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,d))),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",{},()=>[u,p])],16,m)],16)):(0,n.createCommentVNode)("",!0)]),_:3},8,["data","limit","keep-length","onPaginationChangePage"])}]])},3721:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726),o={class:"db-btn-outline sm danger modal-btn m-0.5"};const l={name:"SmDeleteComponent"};const r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){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)])}]])},4579:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726),o={class:"db-card-filter-btn table-filter-btn"};const l={name:"FilterComponent"};const r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){return(0,n.openBlock)(),(0,n.createElementBlock)("button",o,[t[0]||(t[0]=(0,n.createElementVNode)("i",{class:"lab lab-line-filter lab-font-size-14"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.filter")),1)])}]])},5458:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726),o={class:"db-btn-outline sm success modal-btn m-0.5"};const l={name:"SmModalEditComponent"};const r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){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)])}]])},5668:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$e});var n=a(9726),o={class:"db-card db-tab-div active"},l={class:"db-card-header border-none"},r={class:"db-card-title"},s={class:"db-card-filter"},i={class:"table-filter-div",id:"city-filter"},c={class:"form-col-12 sm:form-col-6 lg:form-col-4"},d={for:"name",class:"db-field-title"},m={key:0,class:"db-field-alert"},u={class:"form-col-12 sm:form-col-6 lg:form-col-4"},p={class:"db-field-title",for:"active"},g={class:"form-col-12 sm:form-col-6 lg:form-col-4"},h={class:"db-field-title",for:"active"},b={class:"col-12 sm:form-col-6 lg:form-col-4"},f={class:"flex flex-wrap gap-3 mt-4"},v={class:"db-btn py-2 text-white bg-primary"},y={class:"db-table-responsive"},E={class:"db-table stripe",id:"print"},V={class:"db-table-head"},N={class:"db-table-head-tr"},C={class:"db-table-head-th"},A={class:"db-table-head-th"},k={class:"db-table-head-th"},S={class:"db-table-head-th"},P={key:0,class:"db-table-body"},x={class:"db-table-body-td"},B={key:0},w={key:1},$={class:"db-table-body-td"},D={class:"db-table-body-td"},_={class:"db-table-body-td hidden-print"},T={class:"flex justify-start items-center sm:items-start sm:justify-start gap-1.5"},L={class:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-6"},U={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"};var M=a(5475),j={id:"modal",class:"modal"},I={class:"modal-dialog"},R={class:"modal-header"},O={class:"modal-title"},F={class:"modal-body"},z={class:"form-row"},H={class:"form-col-12"},q={for:"name",class:"db-field-title required"},G={key:0,class:"db-field-alert"},J={class:"form-col-12 sm:form-col-6"},K={class:"db-field-title required",for:"active"},Q={key:0,class:"db-field-alert"},W={class:"form-col-12 sm:form-col-6"},X={class:"db-field-title required",for:"active"},Y={class:"db-field-radio-group"},Z={class:"db-field-radio"},ee={class:"custom-radio"},te=["value"],ae={for:"active",class:"db-field-label"},ne={class:"db-field-radio"},oe={class:"custom-radio"},le=["value"],re={for:"inactive",class:"db-field-label"},se={class:"form-col-12"},ie={class:"modal-btns"},ce={type:"submit",class:"db-btn py-2 text-white bg-primary"};var de=a(8691),me=a(6884),ue=a(9856),pe=a(8655);function ge(e){return ge="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},ge(e)}function he(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ge(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const be={name:"CityCreateComponent",components:{SmModalCreateComponent:de.A,LoadingComponent:M.A},props:["props"],data:function(){return{loading:{isActive:!1},enums:{statusEnum:me.A,statusEnumArray:he(he({},me.A.ACTIVE,this.$t("label.active")),me.A.INACTIVE,this.$t("label.inactive"))},search:{status:me.A.ACTIVE,order_column:"id",order_type:"desc"},errors:{}}},computed:{states:function(){return this.$store.getters["state/simpleLists"]},addButton:function(){return{title:this.$t("button.add_city")}}},mounted:function(){},methods:{reset:function(){pe.A.modalHide(),this.$store.dispatch("city/reset").then().catch(),this.errors={},this.$props.props.form={name:"",state:null,status:me.A.ACTIVE}},save:function(){var e=this;try{var t=this.$store.getters["city/temp"].temp_id;this.loading.isActive=!0,this.$store.dispatch("city/save",{form:this.props.form,search:this.props.search}).then(function(a){pe.A.modalHide(),e.loading.isActive=!1,ue.A.successFlip(null===t?0:1,e.$t("menu.cities")),e.props.form={name:"",state:null,status:me.A.ACTIVE},e.errors={}}).catch(function(t){e.loading.isActive=!1,e.errors=t.response.data.errors})}catch(e){this.loading.isActive=!1,ue.A.error(e)}}}};var fe=a(6262);const ve=(0,fe.A)(be,[["render",function(e,t,a,o,l,r){var s=(0,n.resolveComponent)("LoadingComponent"),i=(0,n.resolveComponent)("SmModalCreateComponent"),c=(0,n.resolveComponent)("vue-select");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(s,{props:l.loading},null,8,["props"]),(0,n.createVNode)(i,{props:r.addButton},null,8,["props"]),(0,n.createElementVNode)("div",j,[(0,n.createElementVNode)("div",I,[(0,n.createElementVNode)("div",R,[(0,n.createElementVNode)("h3",O,(0,n.toDisplayString)(e.$t("menu.cities")),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 r.reset&&r.reset.apply(r,arguments)})})]),(0,n.createElementVNode)("div",F,[(0,n.createElementVNode)("form",{onSubmit:t[6]||(t[6]=(0,n.withModifiers)(function(){return r.save&&r.save.apply(r,arguments)},["prevent"]))},[(0,n.createElementVNode)("div",z,[(0,n.createElementVNode)("div",H,[(0,n.createElementVNode)("label",q,(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}),class:(0,n.normalizeClass)([l.errors.name?"invalid":"","db-field-control"]),type:"text",id:"name"},null,2),[[n.vModelText,a.props.form.name]]),l.errors.name?((0,n.openBlock)(),(0,n.createElementBlock)("small",G,(0,n.toDisplayString)(l.errors.name[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",J,[(0,n.createElementVNode)("label",K,(0,n.toDisplayString)(e.$t("label.state")),1),(0,n.createVNode)(c,{class:"db-field-control f-b-custom-select",id:"searchStatus",modelValue:a.props.form.state,"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.props.form.state=e}),options:r.states,"label-by":"name","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["modelValue","options"]),l.errors.state?((0,n.openBlock)(),(0,n.createElementBlock)("small",Q,(0,n.toDisplayString)(l.errors.state[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",W,[(0,n.createElementVNode)("label",X,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createElementVNode)("div",Y,[(0,n.createElementVNode)("div",Z,[(0,n.createElementVNode)("div",ee,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:l.enums.statusEnum.ACTIVE,"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.props.form.status=e}),id:"active",type:"radio",class:"custom-radio-field"},null,8,te),[[n.vModelRadio,a.props.form.status]]),t[7]||(t[7]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",ae,(0,n.toDisplayString)(e.$t("label.active")),1)]),(0,n.createElementVNode)("div",ne,[(0,n.createElementVNode)("div",oe,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:l.enums.statusEnum.INACTIVE,"onUpdate:modelValue":t[4]||(t[4]=function(e){return a.props.form.status=e}),type:"radio",id:"inactive",class:"custom-radio-field"},null,8,le),[[n.vModelRadio,a.props.form.status]]),t[8]||(t[8]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",re,(0,n.toDisplayString)(e.$t("label.inactive")),1)])])]),(0,n.createElementVNode)("div",se,[(0,n.createElementVNode)("div",ie,[(0,n.createElementVNode)("button",{type:"button",class:"modal-btn-outline modal-close",onClick:t[5]||(t[5]=function(){return r.reset&&r.reset.apply(r,arguments)})},[t[9]||(t[9]=(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",ce,[t[10]||(t[10]=(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 ye=a(1889),Ee=a(1017),Ve=a(1751),Ne=a(9319),Ce=a(3721),Ae=a(1606),ke=a(5458),Se=a(4579),Pe=a(9238);function xe(e){return xe="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},xe(e)}function Be(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=xe(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const we={name:"CouponListComponent",components:{SmModalEditComponent:ke.A,TableLimitComponent:Ne.A,PaginationSMBox:Ve.A,PaginationBox:Ee.A,PaginationTextComponent:ye.A,CityCreateComponent:ve,LoadingComponent:M.A,SmDeleteComponent:Ce.A,SmViewComponent:Ae.A,FilterComponent:Se.A,SmIconViewComponent:Pe.A},data:function(){return{loading:{isActive:!1},enums:{statusEnum:me.A,statusEnumArray:Be(Be({},me.A.ACTIVE,this.$t("label.active")),me.A.INACTIVE,this.$t("label.inactive"))},props:{form:{name:"",state:null,status:me.A.ACTIVE},search:{paginate:1,page:1,per_page:10,order_column:"name",order_type:"asc",name:"",state_id:null,status:null}},errors:{}}},mounted:function(){this.list(),this.stateList()},computed:{states:function(){return this.$store.getters["state/simpleLists"]},cities:function(){return this.$store.getters["city/lists"]},pagination:function(){return this.$store.getters["city/pagination"]},paginationPage:function(){return this.$store.getters["city/page"]}},methods:{statusClass:function(e){return pe.A.statusClass(e)},textShortener:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;return pe.A.textShortener(e,t)},handleSlide:function(e){return pe.A.handleSlide(e)},search:function(){this.list()},clear:function(){this.props.search.name="",this.props.search.code="",this.props.search.status=null,this.props.search.state_id=null,this.list()},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("city/lists",this.props.search).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},stateList:function(){var e,t=this;(null===(e=this.$store.getters["state/simpleLists"])||void 0===e?void 0:e.length)<1&&this.$store.dispatch("state/simpleLists",{page:1,order_column:"name",order_type:"asc"}).then(function(e){t.loading.isActive=!1}).catch(function(e){t.loading.isActive=!1})},edit:function(e){var t=this;pe.A.modalShow(),this.loading.isActive=!0,this.$store.dispatch("city/edit",e.id).then(function(a){t.loading.isActive=!1,t.props.errors={},t.props.form={name:e.name,state:e.state_id,status:e.status}}).catch(function(e){ue.A.error(e.response.data.message)})},destroy:function(e){var t=this;pe.A.destroyConfirmation().then(function(a){try{t.loading.isActive=!0,t.$store.dispatch("city/destroy",{id:e,search:t.props.search}).then(function(e){t.loading.isActive=!1,ue.A.successFlip(null,t.$t("menu.cities"))}).catch(function(e){t.loading.isActive=!1,ue.A.error(e.response.data.message)})}catch(e){t.loading.isActive=!1,ue.A.error(e.response.data.message)}}).catch(function(e){t.loading.isActive=!1})}}},$e=(0,fe.A)(we,[["render",function(e,t,a,M,j,I){var R=(0,n.resolveComponent)("LoadingComponent"),O=(0,n.resolveComponent)("TableLimitComponent"),F=(0,n.resolveComponent)("FilterComponent"),z=(0,n.resolveComponent)("CityCreateComponent"),H=(0,n.resolveComponent)("vue-select"),q=(0,n.resolveComponent)("SmModalEditComponent"),G=(0,n.resolveComponent)("SmDeleteComponent"),J=(0,n.resolveComponent)("PaginationSMBox"),K=(0,n.resolveComponent)("PaginationTextComponent"),Q=(0,n.resolveComponent)("PaginationBox");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(R,{props:j.loading},null,8,["props"]),(0,n.createElementVNode)("div",o,[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("h3",r,(0,n.toDisplayString)(e.$t("menu.cities")),1),(0,n.createElementVNode)("div",s,[(0,n.createVNode)(O,{method:I.list,search:j.props.search,page:I.paginationPage},null,8,["method","search","page"]),(0,n.createVNode)(F,{onClick:t[0]||(t[0]=(0,n.withModifiers)(function(e){return I.handleSlide("city-filter")},["prevent"]))}),(0,n.createVNode)(z,{props:j.props},null,8,["props"])])]),(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("form",{class:"form-row p-4 sm:p-5 mb-5",onSubmit:t[5]||(t[5]=(0,n.withModifiers)(function(){return I.search&&I.search.apply(I,arguments)},["prevent"]))},[(0,n.createElementVNode)("div",c,[(0,n.createElementVNode)("label",d,(0,n.toDisplayString)(e.$t("label.name")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return j.props.search.name=e}),class:(0,n.normalizeClass)([j.errors.name?"invalid":"","db-field-control"]),type:"text",id:"name"},null,2),[[n.vModelText,j.props.search.name]]),j.errors.name?((0,n.openBlock)(),(0,n.createElementBlock)("small",m,(0,n.toDisplayString)(j.errors.name[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("label",p,(0,n.toDisplayString)(e.$t("label.state")),1),(0,n.createVNode)(H,{class:"db-field-control f-b-custom-select",id:"searchStatus",modelValue:j.props.search.state_id,"onUpdate:modelValue":t[2]||(t[2]=function(e){return j.props.search.state_id=e}),options:I.states,"label-by":"name","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["modelValue","options"])]),(0,n.createElementVNode)("div",g,[(0,n.createElementVNode)("label",h,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createVNode)(H,{class:"db-field-control f-b-custom-select",id:"searchStatus",modelValue:j.props.search.status,"onUpdate:modelValue":t[3]||(t[3]=function(e){return j.props.search.status=e}),options:[{id:j.enums.statusEnum.ACTIVE,name:e.$t("label.active")},{id:j.enums.statusEnum.INACTIVE,name:e.$t("label.inactive")}],"label-by":"name","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["modelValue","options"])]),(0,n.createElementVNode)("div",b,[(0,n.createElementVNode)("div",f,[(0,n.createElementVNode)("button",v,[t[6]||(t[6]=(0,n.createElementVNode)("i",{class:"lab lab-line-search lab-font-size-16"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.search")),1)]),(0,n.createElementVNode)("button",{class:"db-btn py-2 text-white bg-gray-600",onClick:t[4]||(t[4]=function(){return I.clear&&I.clear.apply(I,arguments)})},[t[7]||(t[7]=(0,n.createElementVNode)("i",{class:"lab lab-line-cross lab-font-size-22"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.clear")),1)])])])],32)]),(0,n.createElementVNode)("div",y,[(0,n.createElementVNode)("table",E,[(0,n.createElementVNode)("thead",V,[(0,n.createElementVNode)("tr",N,[(0,n.createElementVNode)("th",C,(0,n.toDisplayString)(e.$t("label.name")),1),(0,n.createElementVNode)("th",A,(0,n.toDisplayString)(e.$t("label.state")),1),(0,n.createElementVNode)("th",k,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createElementVNode)("th",S,(0,n.toDisplayString)(e.$t("label.action")),1)])]),I.cities.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("tbody",P,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(I.cities,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("tr",{class:"db-table-body-tr",key:e},[(0,n.createElementVNode)("td",x,[e.name.length<40?((0,n.openBlock)(),(0,n.createElementBlock)("div",B,(0,n.toDisplayString)(e.name),1)):((0,n.openBlock)(),(0,n.createElementBlock)("div",w,(0,n.toDisplayString)(e.name.substring(0,40)+".."),1))]),(0,n.createElementVNode)("td",$,(0,n.toDisplayString)(e.state_name),1),(0,n.createElementVNode)("td",D,[(0,n.createElementVNode)("span",{class:(0,n.normalizeClass)(I.statusClass(e.status))},(0,n.toDisplayString)(j.enums.statusEnumArray[e.status]),3)]),(0,n.createElementVNode)("td",_,[(0,n.createElementVNode)("div",T,[(0,n.createVNode)(q,{onClick:function(t){return I.edit(e)}},null,8,["onClick"]),(0,n.createVNode)(G,{onClick:function(t){return I.destroy(e.id)}},null,8,["onClick"])])])])}),128))])):(0,n.createCommentVNode)("",!0)])]),(0,n.createElementVNode)("div",L,[(0,n.createVNode)(J,{pagination:I.pagination,method:I.list},null,8,["pagination","method"]),(0,n.createElementVNode)("div",U,[(0,n.createVNode)(K,{props:{page:I.paginationPage}},null,8,["props"]),(0,n.createVNode)(Q,{pagination:I.pagination,method:I.list},null,8,["pagination","method"])])])])],64)}]])},8691:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726);var o=a(8655);const l={name:"SmModalCreateComponent",props:["props"],methods:{add:function(){o.A.modalShow()}}};const r=(0,a(6262).A)(l,[["render",function(e,t,a,o,l,r){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:"button",onClick:t[0]||(t[0]=function(){return r.add&&r.add.apply(r,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)])}]])},9238:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(9726),o={class:"db-tooltip"};const l={name:"SmIconViewComponent",props:{link:String,id:Number}};const r=(0,a(6262).A)(l,[["render",function(e,t,a,l,r,s){var i=(0,n.resolveComponent)("router-link");return(0,n.openBlock)(),(0,n.createBlock)(i,{class:"db-table-action view",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)),(0,n.createElementVNode)("span",o,(0,n.toDisplayString)(e.$t("button.view")),1)]}),_:1,__:[0]},8,["to"])}]])},9319:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(9726),o={key:0,class:"db-field-down-arrow"},l={value:"10"},r={value:"25"},s={value:"50"},i={value:"100"},c={value:"500"},d={value:"1000"};const m={name:"TableLimitComponent",props:{page:{type:Object},search:{type:Object},method:{type:Function}},methods:{limitChange:function(){this.method()}}};const u=(0,a(6262).A)(m,[["render",function(e,t,a,m,u,p){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 p.limitChange&&p.limitChange.apply(p,arguments)}),"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.search.per_page=e}),class:"db-card-filter-select"},[(0,n.createElementVNode)("option",l,(0,n.toDisplayString)(e.$t("number.10")),1),(0,n.createElementVNode)("option",r,(0,n.toDisplayString)(e.$t("number.25")),1),(0,n.createElementVNode)("option",s,(0,n.toDisplayString)(e.$t("number.50")),1),(0,n.createElementVNode)("option",i,(0,n.toDisplayString)(e.$t("number.100")),1),(0,n.createElementVNode)("option",c,(0,n.toDisplayString)(e.$t("number.500")),1),(0,n.createElementVNode)("option",d,(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