[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 7907.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7907],{1017:(e,t,o)=>{o.d(t,{A:()=>l});var a=o(9726);const n={name:"PaginationBox",components:{TailwindPagination:o(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,o(6262).A)(n,[["render",function(e,t,o,n,l,r){var i=(0,a.resolveComponent)("TailwindPagination");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(i,{data:o.pagination,onPaginationChangePage:r.page,"active-classes":l.activeClass,limit:1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1606:(e,t,o)=>{o.d(t,{A:()=>l});var a=o(9726);const n={name:"SmViewComponent",props:{link:String,id:Number}};const l=(0,o(6262).A)(n,[["render",function(e,t,o,n,l,r){var i=(0,a.resolveComponent)("router-link");return(0,a.openBlock)(),(0,a.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,a.withCtx)(function(){return[t[0]||(t[0]=(0,a.createElementVNode)("i",{class:"lab lab-line-eye"},null,-1)),t[1]||(t[1]=(0,a.createTextVNode)()),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.$t("button.view")),1)]}),_:1,__:[0,1]},8,["to"])}]])},1751:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726),n={class:"flex flex-1 justify-between sm:hidden"};const l={name:"PaginationSMBox",components:{TailwindPagination:o(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,o(6262).A)(l,[["render",function(e,t,o,l,r,i){var s=(0,a.resolveComponent)("TailwindPagination");return(0,a.openBlock)(),(0,a.createElementBlock)("div",n,[(0,a.createVNode)(s,{data:o.pagination,onPaginationChangePage:i.page,"active-classes":r.activeClass,limit:-1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1889:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726),n={class:"text-sm text-gray-700"};const l={name:"PaginationTextComponent",props:["props"]};const r=(0,o(6262).A)(l,[["render",function(e,t,o,l,r,i){var s,d;return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createElementVNode)("p",n,(0,a.toDisplayString)(e.$t("message.pagination_label",{from:null!==(s=o.props.page.from)&&void 0!==s?s:0,to:null!==(d=o.props.page.to)&&void 0!==d?d:0,total:o.props.page.total})),1)])}]])},1964:(e,t,o)=>{o.d(t,{L5:()=>g});var a=o(9726);const n={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,o,a,n;return null!=(n=null!=(a=null!=(t=this.data.first_page_url)?t:null==(e=this.data.meta)?void 0:e.first_page_url)?a:null==(o=this.data.links)?void 0:o.first)?n: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,o,a,n;return null!=(n=null!=(a=null!=(t=this.data.last_page_url)?t:null==(e=this.data.meta)?void 0:e.last_page_url)?a:null==(o=this.data.links)?void 0:o.last)?n:null},nextPageUrl(){var e,t,o,a,n;return null!=(n=null!=(a=null!=(t=this.data.next_page_url)?t:null==(e=this.data.meta)?void 0:e.next_page_url)?a:null==(o=this.data.links)?void 0:o.next)?n:null},perPage(){var e;return this.isApiResource?this.data.meta.per_page:null!=(e=this.data.per_page)?e:null},prevPageUrl(){var e,t,o,a,n;return null!=(n=null!=(a=null!=(t=this.data.prev_page_url)?t:null==(e=this.data.meta)?void 0:e.prev_page_url)?a:null==(o=this.data.links)?void 0:o.prev)?n: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,o=this.keepLength,a=this.lastPage,n=this.limit,l=t-n,r=t+n,i=2*(n+2),s=2*(n+2)-1,d=[],c=[],u=1;u<=a;u++)(1===u||u===a||u>=l&&u<=r||o&&u<i&&t<i-2||o&&u>a-s&&t>a-s+2)&&d.push(u);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)}})})}},l=(e,t)=>{const o=e.__vccOpts||e;for(const[e,a]of t)o[e]=a;return o};Boolean,Boolean;Boolean,Boolean;const r={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:n},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,a.createElementVNode)("span",{class:"sr-only"},"Previous",-1),d=(0,a.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,a.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1),c=["aria-current","disabled"],u=["disabled"],p=(0,a.createElementVNode)("span",{class:"sr-only"},"Next",-1),m=(0,a.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,a.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,o,n,l,r){const g=(0,a.resolveComponent)("RenderlessPagination");return(0,a.openBlock)(),(0,a.createBlock)(g,{data:o.data,limit:o.limit,"keep-length":o.keepLength,onPaginationChangePage:r.onPaginationChangePage},{default:(0,a.withCtx)(t=>[t.computed.total>t.computed.perPage?((0,a.openBlock)(),(0,a.createElementBlock)("nav",(0,a.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,a.createElementVNode)("button",(0,a.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",o.itemClasses],disabled:!t.computed.prevPageUrl},(0,a.toHandlers)(t.prevButtonEvents,!0)),[(0,a.renderSlot)(e.$slots,"prev-nav",{},()=>[s,d])],16,i),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(t.computed.pageRange,(e,n)=>((0,a.openBlock)(),(0,a.createElementBlock)("button",(0,a.mergeProps)({class:["relative inline-flex items-center px-4 py-2 text-sm font-medium border focus:z-20",[e==t.computed.currentPage?o.activeClasses:o.itemClasses,e==t.computed.currentPage?"z-30":""]],"aria-current":t.computed.currentPage?"page":null,key:n},(0,a.toHandlers)(t.pageButtonEvents(e),!0),{disabled:e===t.computed.currentPage}),(0,a.toDisplayString)(e),17,c))),128)),(0,a.createElementVNode)("button",(0,a.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",o.itemClasses],disabled:!t.computed.nextPageUrl},(0,a.toHandlers)(t.nextButtonEvents,!0)),[(0,a.renderSlot)(e.$slots,"next-nav",{},()=>[p,m])],16,u)],16)):(0,a.createCommentVNode)("",!0)]),_:3},8,["data","limit","keep-length","onPaginationChangePage"])}]])},3721:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726),n={class:"db-btn-outline sm danger modal-btn m-0.5"};const l={name:"SmDeleteComponent"};const r=(0,o(6262).A)(l,[["render",function(e,t,o,l,r,i){return(0,a.openBlock)(),(0,a.createElementBlock)("button",n,[t[0]||(t[0]=(0,a.createElementVNode)("i",{class:"lab lab-line-trash"},null,-1)),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.$t("button.delete")),1)])}]])},5458:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726),n={class:"db-btn-outline sm success modal-btn m-0.5"};const l={name:"SmModalEditComponent"};const r=(0,o(6262).A)(l,[["render",function(e,t,o,l,r,i){return(0,a.openBlock)(),(0,a.createElementBlock)("button",n,[t[0]||(t[0]=(0,a.createElementVNode)("i",{class:"lab lab-line-edit"},null,-1)),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.$t("button.edit")),1)])}]])},7907:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Qe});var a=o(9726),n={class:"db-card db-tab-div active"},l={class:"db-card-header border-none"},r={class:"db-card-title"},i={class:"db-card-filter"},s={class:"db-table-responsive"},d={class:"db-table stripe"},c={class:"db-table-head"},u={class:"db-table-head-tr"},p={class:"db-table-head-th"},m={class:"db-table-head-th"},g={class:"db-table-head-th"},f={key:0,class:"db-table-body"},h={key:0,class:"db-table-body-td"},b={key:1,class:"db-table-body-td"},v={class:"db-table-body-td"},y={class:"db-table-body-td"},E={class:"flex justify-start items-center sm:items-start sm:justify-start gap-1.5"},V={key:1,class:"db-table-body"},N={class:"db-table-body-tr"},C={class:"db-table-body-td text-center",colspan:"4"},k={class:"p-4"},x={class:"max-w-[300px] mx-auto mt-2"},A=["src"],P={class:"d-block mt-3 text-lg"},B={key:0,class:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-6"},S={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"};var _=o(5475),w={id:"modal",class:"modal"},D={class:"modal-dialog"},$={class:"modal-header"},T={class:"modal-title"},z={class:"modal-body"},U={class:"form-row"},M={class:"form-col-12 sm:form-col-6"},L={for:"name",class:"db-field-title required"},j={key:0,class:"db-field-alert"},R={class:"form-col-12 sm:form-col-6"},O={class:"db-field-title",for:"latitude"},I={class:"db-multiple-field"},F={key:0,class:"db-field-alert"},q={key:1,class:"db-field-alert"},H={class:"form-col-12 sm:form-col-6"},K={for:"email",class:"db-field-title"},G={key:0,class:"db-field-alert"},J={class:"form-col-12 sm:form-col-6"},Q={for:"phone",class:"db-field-title"},W={class:"w-fit flex-shrink-0 dropdown-group"},X={type:"button",class:"flex items-center gap-1 dropdown-btn"},Y={class:"whitespace-nowrap flex-shrink-0 text-xs"},Z={class:"p-1.5 w-24 rounded-lg shadow-xl absolute top-8 -left-4 z-10 border border-gray-200 bg-white scale-y-0 origin-top dropdown-list !h-52 !overflow-x-hidden !overflow-y-auto thin-scrolling"},ee=["onClick"],te={class:"whitespace-nowrap text-xs"},oe={key:0,class:"db-field-alert"},ae={class:"form-col-12 sm:form-col-6"},ne={for:"city",class:"db-field-title required"},le={key:0,class:"db-field-alert"},re={class:"form-col-12 sm:form-col-6"},ie={for:"state",class:"db-field-title required"},se={key:0,class:"db-field-alert"},de={class:"form-col-12 sm:form-col-6"},ce={for:"zip_code",class:"db-field-title required"},ue={key:0,class:"db-field-alert"},pe={class:"form-col-12 sm:form-col-6"},me={class:"db-field-title required",for:"active"},ge={class:"db-field-radio-group"},fe={class:"db-field-radio"},he={class:"custom-radio"},be=["value"],ve={for:"active",class:"db-field-label"},ye={class:"db-field-radio"},Ee={class:"custom-radio"},Ve=["value"],Ne={for:"inactive",class:"db-field-label"},Ce={class:"form-col-12"},ke={for:"address",class:"db-field-title required"},xe={key:0,class:"db-field-alert"},Ae={class:"form-col-12"},Pe={class:"modal-btns"},Be={type:"submit",class:"db-btn py-2 text-white bg-primary"};var Se=o(8691),_e=o(6884),we=o(9856),De=o(8655);function $e(e){return $e="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},$e(e)}function Te(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=$e(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var a=o.call(e,t||"default");if("object"!=$e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$e(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const ze={name:"OutletCreateComponent",components:{SmModalCreateComponent:Se.A,LoadingComponent:_.A},props:["props"],data:function(){return{loading:{isActive:!1},enums:{statusEnum:_e.A,statusEnumArray:Te(Te({},_e.A.ACTIVE,this.$t("label.active")),_e.A.INACTIVE,this.$t("label.inactive"))},flag:"",address:"",errors:{}}},mounted:function(){this.countryCodeList()},computed:{countryCodes:function(){return this.$store.getters["countryCode/lists"]},addButton:function(){return{title:this.$t("button.add_outlet")}}},methods:{phoneNumber:function(e){return De.A.phoneNumber(e)},change:function(e){this.flag=e.flag_emoji,this.props.form.country_code=e.calling_code},countryCodeList:function(){var e=this;this.$store.dispatch("countryCode/lists").then(function(t){""===e.props.form.country_code&&(e.flag=t.data.data[0].flag_emoji,e.props.form.country_code=t.data.data[0].calling_code)})},location:function(e){this.address=e.address,this.props.form.latitude=e.location.lat,this.props.form.longitude=e.location.lng,this.props.form.city=e.other.city,this.props.form.state=e.other.state,this.props.form.zip_code=e.other.zipCode,this.props.form.address=e.address},reset:function(){De.A.modalHide(),this.$store.dispatch("outlet/reset").then().catch(),this.errors={},this.$props.props.form={name:"",email:"",country_code:"",phone:"",latitude:"",longitude:"",city:"",state:"",zip_code:"",address:"",status:_e.A.ACTIVE}},save:function(){var e=this;try{var t=this.$store.getters["outlet/temp"].temp_id;this.loading.isActive=!0,this.$store.dispatch("outlet/save",this.props).then(function(o){De.A.modalHide(),e.loading.isActive=!1,we.A.successFlip(null===t?0:1,e.$t("menu.outlets")),e.props.form={name:"",email:"",country_code:"",phone:"",latitude:"",longitude:"",city:"",state:"",zip_code:"",address:"",status:_e.A.ACTIVE},e.errors={}}).catch(function(t){e.loading.isActive=!1,e.errors=t.response.data.errors})}catch(e){this.loading.isActive=!1,we.A.error(e)}}}};var Ue=o(6262);const Me=(0,Ue.A)(ze,[["render",function(e,t,o,n,l,r){var i=(0,a.resolveComponent)("LoadingComponent"),s=(0,a.resolveComponent)("SmModalCreateComponent");return(0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,null,[(0,a.createVNode)(i,{props:l.loading},null,8,["props"]),(0,a.createVNode)(s,{props:r.addButton},null,8,["props"]),(0,a.createElementVNode)("div",w,[(0,a.createElementVNode)("div",D,[(0,a.createElementVNode)("div",$,[(0,a.createElementVNode)("h3",T,(0,a.toDisplayString)(e.$t("menu.outlets")),1),(0,a.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,a.createElementVNode)("div",z,[(0,a.createElementVNode)("form",{onSubmit:t[14]||(t[14]=(0,a.withModifiers)(function(){return r.save&&r.save.apply(r,arguments)},["prevent"]))},[(0,a.createElementVNode)("div",U,[(0,a.createElementVNode)("div",M,[(0,a.createElementVNode)("label",L,(0,a.toDisplayString)(e.$t("label.name")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return o.props.form.name=e}),class:(0,a.normalizeClass)([l.errors.name?"invalid":"","db-field-control"]),type:"text",id:"name"},null,2),[[a.vModelText,o.props.form.name]]),l.errors.name?((0,a.openBlock)(),(0,a.createElementBlock)("small",j,(0,a.toDisplayString)(l.errors.name[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",R,[(0,a.createElementVNode)("label",O,(0,a.toDisplayString)(e.$t("label.latitude"))+"/"+(0,a.toDisplayString)(e.$t("label.longitude")),1),(0,a.createElementVNode)("div",I,[(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return o.props.form.latitude=e}),class:(0,a.normalizeClass)(l.errors.latitude?"invalid":""),type:"text",id:"latitude"},null,2),[[a.vModelText,o.props.form.latitude]]),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(e){return o.props.form.longitude=e}),class:(0,a.normalizeClass)(l.errors.longitude?"invalid":""),type:"text",id:"longitude"},null,2),[[a.vModelText,o.props.form.longitude]])]),l.errors.latitude?((0,a.openBlock)(),(0,a.createElementBlock)("small",F,(0,a.toDisplayString)(l.errors.latitude[0]),1)):(0,a.createCommentVNode)("",!0),l.errors.longitude?((0,a.openBlock)(),(0,a.createElementBlock)("small",q,(0,a.toDisplayString)(l.errors.longitude[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",H,[(0,a.createElementVNode)("label",K,(0,a.toDisplayString)(e.$t("label.email")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(e){return o.props.form.email=e}),class:(0,a.normalizeClass)([l.errors.email?"invalid":"","db-field-control"]),type:"email",id:"email"},null,2),[[a.vModelText,o.props.form.email]]),l.errors.email?((0,a.openBlock)(),(0,a.createElementBlock)("small",G,(0,a.toDisplayString)(l.errors.email[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",J,[(0,a.createElementVNode)("label",Q,(0,a.toDisplayString)(e.$t("label.phone")),1),(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)([l.errors.phone?"invalid":"","db-field-control flex items-center"])},[(0,a.createElementVNode)("div",W,[(0,a.createElementVNode)("button",X,[(0,a.createTextVNode)((0,a.toDisplayString)(l.flag)+" ",1),(0,a.createElementVNode)("span",Y,(0,a.toDisplayString)(o.props.form.country_code),1),t[15]||(t[15]=(0,a.createElementVNode)("i",{class:"fa-solid fa-caret-down text-xs"},null,-1))]),(0,a.createElementVNode)("ul",Z,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(r.countryCodes,function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("li",{onClick:function(t){return r.change(e)},class:"flex items-center gap-2 p-1.5 rounded-md cursor-pointer hover:bg-gray-100"},[(0,a.createTextVNode)((0,a.toDisplayString)(e.flag_emoji)+" ",1),(0,a.createElementVNode)("span",te,(0,a.toDisplayString)(e.calling_code),1)],8,ee)}),256))])]),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[5]||(t[5]=function(e){return o.props.form.phone=e}),onKeypress:t[6]||(t[6]=function(e){return r.phoneNumber(e)}),class:(0,a.normalizeClass)([l.errors.phone?"invalid":"","pl-2 text-sm w-full h-full"]),type:"text",id:"phone"},null,34),[[a.vModelText,o.props.form.phone]])],2),l.errors.phone?((0,a.openBlock)(),(0,a.createElementBlock)("small",oe,(0,a.toDisplayString)(l.errors.phone[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",ae,[(0,a.createElementVNode)("label",ne,(0,a.toDisplayString)(e.$t("label.city")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[7]||(t[7]=function(e){return o.props.form.city=e}),class:(0,a.normalizeClass)([l.errors.city?"invalid":"","db-field-control"]),type:"text",id:"city"},null,2),[[a.vModelText,o.props.form.city]]),l.errors.city?((0,a.openBlock)(),(0,a.createElementBlock)("small",le,(0,a.toDisplayString)(l.errors.city[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",re,[(0,a.createElementVNode)("label",ie,(0,a.toDisplayString)(e.$t("label.state")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[8]||(t[8]=function(e){return o.props.form.state=e}),class:(0,a.normalizeClass)([l.errors.state?"invalid":"","db-field-control"]),type:"text",id:"state"},null,2),[[a.vModelText,o.props.form.state]]),l.errors.state?((0,a.openBlock)(),(0,a.createElementBlock)("small",se,(0,a.toDisplayString)(l.errors.state[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",de,[(0,a.createElementVNode)("label",ce,(0,a.toDisplayString)(e.$t("label.zip_code")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[9]||(t[9]=function(e){return o.props.form.zip_code=e}),class:(0,a.normalizeClass)([l.errors.zip_code?"invalid":"","db-field-control"]),type:"text",id:"zip_code"},null,2),[[a.vModelText,o.props.form.zip_code]]),l.errors.zip_code?((0,a.openBlock)(),(0,a.createElementBlock)("small",ue,(0,a.toDisplayString)(l.errors.zip_code[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",pe,[(0,a.createElementVNode)("label",me,(0,a.toDisplayString)(e.$t("label.status")),1),(0,a.createElementVNode)("div",ge,[(0,a.createElementVNode)("div",fe,[(0,a.createElementVNode)("div",he,[(0,a.withDirectives)((0,a.createElementVNode)("input",{value:l.enums.statusEnum.ACTIVE,"onUpdate:modelValue":t[10]||(t[10]=function(e){return o.props.form.status=e}),id:"active",type:"radio",class:"custom-radio-field"},null,8,be),[[a.vModelRadio,o.props.form.status]]),t[16]||(t[16]=(0,a.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,a.createElementVNode)("label",ve,(0,a.toDisplayString)(e.$t("label.active")),1)]),(0,a.createElementVNode)("div",ye,[(0,a.createElementVNode)("div",Ee,[(0,a.withDirectives)((0,a.createElementVNode)("input",{value:l.enums.statusEnum.INACTIVE,"onUpdate:modelValue":t[11]||(t[11]=function(e){return o.props.form.status=e}),type:"radio",id:"inactive",class:"custom-radio-field"},null,8,Ve),[[a.vModelRadio,o.props.form.status]]),t[17]||(t[17]=(0,a.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,a.createElementVNode)("label",Ne,(0,a.toDisplayString)(e.$t("label.inactive")),1)])])]),(0,a.createElementVNode)("div",Ce,[(0,a.createElementVNode)("label",ke,(0,a.toDisplayString)(e.$t("label.address")),1),(0,a.withDirectives)((0,a.createElementVNode)("textarea",{"onUpdate:modelValue":t[12]||(t[12]=function(e){return o.props.form.address=e}),class:(0,a.normalizeClass)([l.errors.address?"invalid":"","db-field-control"]),id:"address"},null,2),[[a.vModelText,o.props.form.address]]),l.errors.address?((0,a.openBlock)(),(0,a.createElementBlock)("small",xe,(0,a.toDisplayString)(l.errors.address[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",Ae,[(0,a.createElementVNode)("div",Pe,[(0,a.createElementVNode)("button",{type:"button",class:"modal-btn-outline modal-close",onClick:t[13]||(t[13]=function(){return r.reset&&r.reset.apply(r,arguments)})},[t[18]||(t[18]=(0,a.createElementVNode)("i",{class:"lab lab-fill-close-circle"},null,-1)),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.$t("button.close")),1)]),(0,a.createElementVNode)("button",Be,[t[19]||(t[19]=(0,a.createElementVNode)("i",{class:"lab lab-fill-save"},null,-1)),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(e.$t("button.save")),1)])])])])],32)])])])],64)}]]);var Le=o(1889),je=o(1017),Re=o(1751),Oe=o(9319),Ie=o(3721),Fe=o(5458),qe=o(1606),He=o(8536);function Ke(e){return Ke="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},Ke(e)}function Ge(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=Ke(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var a=o.call(e,t||"default");if("object"!=Ke(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ke(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const Je={name:"OutletListComponent",components:{TableLimitComponent:Oe.A,PaginationSMBox:Re.A,PaginationBox:je.A,PaginationTextComponent:Le.A,OutletCreateComponent:Me,LoadingComponent:_.A,SmDeleteComponent:Ie.A,SmModalEditComponent:Fe.A,SmViewComponent:qe.A},data:function(){return{loading:{isActive:!1},enums:{statusEnum:_e.A,statusEnumArray:Ge(Ge({},_e.A.ACTIVE,this.$t("label.active")),_e.A.INACTIVE,this.$t("label.inactive"))},props:{form:{name:"",email:"",country_code:"",phone:"",latitude:"",longitude:"",city:"",state:"",zip_code:"",address:"",status:_e.A.ACTIVE},search:{paginate:1,page:1,per_page:10,order_column:"id",order_type:"desc"}},site_default_outlet:null,ENV:He.A}},mounted:function(){this.list(),this.siteList()},computed:{outlets:function(){return this.$store.getters["outlet/lists"]},pagination:function(){return this.$store.getters["outlet/pagination"]},paginationPage:function(){return this.$store.getters["outlet/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)},siteList:function(){var e=this;this.loading.isActive=!0,this.$store.dispatch("site/lists").then(function(t){e.site_default_outlet=t.data.data.site_default_outlet,e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},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("outlet/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("outlet/edit",e.id),this.props.form={name:e.name,email:e.email,country_code:e.country_code,phone:e.phone,latitude:e.latitude,longitude:e.longitude,city:e.city,state:e.state,zip_code:e.zip_code,address:e.address,status:e.status},this.loading.isActive=!1},destroy:function(e){var t=this;De.A.destroyConfirmation().then(function(o){try{t.loading.isActive=!0,t.$store.dispatch("outlet/destroy",{id:e,search:t.props.search}).then(function(e){t.loading.isActive=!1,we.A.successFlip(null,t.$t("menu.outlets"))}).catch(function(e){t.loading.isActive=!1,we.A.error(e.response.data.message)})}catch(e){t.loading.isActive=!1,we.A.error(e.response.data.message)}}).catch(function(e){t.loading.isActive=!1})}}},Qe=(0,Ue.A)(Je,[["render",function(e,t,o,_,w,D){var $=(0,a.resolveComponent)("LoadingComponent"),T=(0,a.resolveComponent)("TableLimitComponent"),z=(0,a.resolveComponent)("OutletCreateComponent"),U=(0,a.resolveComponent)("SmViewComponent"),M=(0,a.resolveComponent)("SmModalEditComponent"),L=(0,a.resolveComponent)("SmDeleteComponent"),j=(0,a.resolveComponent)("PaginationSMBox"),R=(0,a.resolveComponent)("PaginationTextComponent"),O=(0,a.resolveComponent)("PaginationBox");return(0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,null,[(0,a.createVNode)($,{props:w.loading},null,8,["props"]),(0,a.createElementVNode)("div",n,[(0,a.createElementVNode)("div",l,[(0,a.createElementVNode)("h3",r,(0,a.toDisplayString)(e.$t("menu.outlets")),1),(0,a.createElementVNode)("div",i,[(0,a.createVNode)(T,{method:D.list,search:w.props.search,page:D.paginationPage},null,8,["method","search","page"]),(0,a.createVNode)(z,{props:w.props},null,8,["props"])])]),(0,a.createElementVNode)("div",s,[(0,a.createElementVNode)("table",d,[(0,a.createElementVNode)("thead",c,[(0,a.createElementVNode)("tr",u,[(0,a.createElementVNode)("th",p,(0,a.toDisplayString)(e.$t("label.name")),1),(0,a.createElementVNode)("th",m,(0,a.toDisplayString)(e.$t("label.status")),1),(0,a.createElementVNode)("th",g,(0,a.toDisplayString)(e.$t("label.action")),1)])]),D.outlets.length>0?((0,a.openBlock)(),(0,a.createElementBlock)("tbody",f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(D.outlets,function(t){return(0,a.openBlock)(),(0,a.createElementBlock)("tr",{class:"db-table-body-tr",key:t},[w.site_default_outlet===t.id?((0,a.openBlock)(),(0,a.createElementBlock)("td",h,(0,a.toDisplayString)(t.name)+"("+(0,a.toDisplayString)(e.$t("label.default"))+") ",1)):((0,a.openBlock)(),(0,a.createElementBlock)("td",b,(0,a.toDisplayString)(t.name),1)),(0,a.createElementVNode)("td",v,[(0,a.createElementVNode)("span",{class:(0,a.normalizeClass)(D.statusClass(t.status))},(0,a.toDisplayString)(w.enums.statusEnumArray[t.status]),3)]),(0,a.createElementVNode)("td",y,[(0,a.createElementVNode)("div",E,[(0,a.createVNode)(U,{link:"admin.settings.outlet.show",id:t.id},null,8,["id"]),(0,a.createVNode)(M,{onClick:function(e){return D.edit(t)}},null,8,["onClick"]),w.site_default_outlet!==t.id?((0,a.openBlock)(),(0,a.createBlock)(L,{key:0,onClick:function(e){return D.destroy(t.id)}},null,8,["onClick"])):(0,a.createCommentVNode)("",!0)])])])}),128))])):((0,a.openBlock)(),(0,a.createElementBlock)("tbody",V,[(0,a.createElementVNode)("tr",N,[(0,a.createElementVNode)("td",C,[(0,a.createElementVNode)("div",k,[(0,a.createElementVNode)("div",x,[(0,a.createElementVNode)("img",{class:"w-full h-full",src:w.ENV.API_URL+"/images/default/not-found/not_found.png",alt:"Not Found"},null,8,A)]),(0,a.createElementVNode)("span",P,(0,a.toDisplayString)(e.$t("message.no_data_found")),1)])])])]))])]),D.outlets.length>0?((0,a.openBlock)(),(0,a.createElementBlock)("div",B,[(0,a.createVNode)(j,{pagination:D.pagination,method:D.list},null,8,["pagination","method"]),(0,a.createElementVNode)("div",S,[(0,a.createVNode)(R,{props:{page:D.paginationPage}},null,8,["props"]),(0,a.createVNode)(O,{pagination:D.pagination,method:D.list},null,8,["pagination","method"])])])):(0,a.createCommentVNode)("",!0)])],64)}]])},8691:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726);var n=o(8655);const l={name:"SmModalCreateComponent",props:["props"],methods:{add:function(){n.A.modalShow()}}};const r=(0,o(6262).A)(l,[["render",function(e,t,o,n,l,r){return(0,a.openBlock)(),(0,a.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,a.createElementVNode)("i",{class:"lab lab-line-add-circle"},null,-1)),(0,a.createElementVNode)("span",null,(0,a.toDisplayString)(o.props.title),1)])}]])},9319:(e,t,o)=>{o.d(t,{A:()=>p});var a=o(9726),n={key:0,class:"db-field-down-arrow"},l={value:"10"},r={value:"25"},i={value:"50"},s={value:"100"},d={value:"500"},c={value:"1000"};const u={name:"TableLimitComponent",props:{page:{type:Object},search:{type:Object},method:{type:Function}},methods:{limitChange:function(){this.method()}}};const p=(0,o(6262).A)(u,[["render",function(e,t,o,u,p,m){return o.page.total>10?((0,a.openBlock)(),(0,a.createElementBlock)("div",n,[(0,a.withDirectives)((0,a.createElementVNode)("select",{onChange:t[0]||(t[0]=function(){return m.limitChange&&m.limitChange.apply(m,arguments)}),"onUpdate:modelValue":t[1]||(t[1]=function(e){return o.search.per_page=e}),class:"db-card-filter-select"},[(0,a.createElementVNode)("option",l,(0,a.toDisplayString)(e.$t("number.10")),1),(0,a.createElementVNode)("option",r,(0,a.toDisplayString)(e.$t("number.25")),1),(0,a.createElementVNode)("option",i,(0,a.toDisplayString)(e.$t("number.50")),1),(0,a.createElementVNode)("option",s,(0,a.toDisplayString)(e.$t("number.100")),1),(0,a.createElementVNode)("option",d,(0,a.toDisplayString)(e.$t("number.500")),1),(0,a.createElementVNode)("option",c,(0,a.toDisplayString)(e.$t("number.1000")),1)],544),[[a.vModelSelect,o.search.per_page]])])):(0,a.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