[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 7261.js
/*! For license information please see 7261.js.LICENSE.txt */ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7261],{1017:(e,t,o)=>{o.d(t,{A:()=>r});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 r=(0,o(6262).A)(n,[["render",function(e,t,o,n,r,l){var s=(0,a.resolveComponent)("TailwindPagination");return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createVNode)(s,{data:o.pagination,onPaginationChangePage:l.page,"active-classes":r.activeClass,limit:1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1606:(e,t,o)=>{o.d(t,{A:()=>r});var a=o(9726);const n={name:"SmViewComponent",props:{link:String,id:Number}};const r=(0,o(6262).A)(n,[["render",function(e,t,o,n,r,l){var s=(0,a.resolveComponent)("router-link");return(0,a.openBlock)(),(0,a.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,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:()=>l});var a=o(9726),n={class:"flex flex-1 justify-between sm:hidden"};const r={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 l=(0,o(6262).A)(r,[["render",function(e,t,o,r,l,s){var i=(0,a.resolveComponent)("TailwindPagination");return(0,a.openBlock)(),(0,a.createElementBlock)("div",n,[(0,a.createVNode)(i,{data:o.pagination,onPaginationChangePage:s.page,"active-classes":l.activeClass,limit:-1},null,8,["data","onPaginationChangePage","active-classes"])])}]])},1889:(e,t,o)=>{o.d(t,{A:()=>l});var a=o(9726),n={class:"text-sm text-gray-700"};const r={name:"PaginationTextComponent",props:["props"]};const l=(0,o(6262).A)(r,[["render",function(e,t,o,r,l,s){var i,c;return(0,a.openBlock)(),(0,a.createElementBlock)("div",null,[(0,a.createElementVNode)("p",n,(0,a.toDisplayString)(e.$t("message.pagination_label",{from:null!==(i=o.props.page.from)&&void 0!==i?i:0,to:null!==(c=o.props.page.to)&&void 0!==c?c:0,total:o.props.page.total})),1)])}]])},1964:(e,t,o)=>{o.d(t,{L5:()=>h});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,r=t-n,l=t+n,s=2*(n+2),i=2*(n+2)-1,c=[],d=[],p=1;p<=a;p++)(1===p||p===a||p>=r&&p<=l||o&&p<s&&t<s-2||o&&p>a-i&&t>a-i+2)&&c.push(p);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)}})})}},r=(e,t)=>{const o=e.__vccOpts||e;for(const[e,a]of t)o[e]=a;return o};Boolean,Boolean;Boolean,Boolean;const l={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)}}},s=["disabled"],i=(0,a.createElementVNode)("span",{class:"sr-only"},"Previous",-1),c=(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),d=["aria-current","disabled"],p=["disabled"],m=(0,a.createElementVNode)("span",{class:"sr-only"},"Next",-1),u=(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 h=r(l,[["render",function(e,t,o,n,r,l){const h=(0,a.resolveComponent)("RenderlessPagination");return(0,a.openBlock)(),(0,a.createBlock)(h,{data:o.data,limit:o.limit,"keep-length":o.keepLength,onPaginationChangePage:l.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",{},()=>[i,c])],16,s),((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,d))),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",{},()=>[m,u])],16,p)],16)):(0,a.createCommentVNode)("",!0)]),_:3},8,["data","limit","keep-length","onPaginationChangePage"])}]])},3721:(e,t,o)=>{o.d(t,{A:()=>l});var a=o(9726),n={class:"db-btn-outline sm danger modal-btn m-0.5"};const r={name:"SmDeleteComponent"};const l=(0,o(6262).A)(r,[["render",function(e,t,o,r,l,s){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:()=>l});var a=o(9726),n={class:"db-btn-outline sm success modal-btn m-0.5"};const r={name:"SmModalEditComponent"};const l=(0,o(6262).A)(r,[["render",function(e,t,o,r,l,s){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)])}]])},7261:(e,t,o)=>{o.r(t),o.d(t,{default:()=>qe});var a=o(9726),n={class:"db-card db-tab-div active"},r={class:"db-card-header border-none"},l={class:"db-card-title"},s={class:"db-card-filter"},i={class:"db-table-responsive"},c={class:"db-table stripe"},d={class:"db-table-head"},p={class:"db-table-head-tr"},m={class:"db-table-head-th"},u={class:"db-table-head-th"},h={class:"db-table-head-th"},g={class:"db-table-head-th"},f={class:"db-table-head-th"},y={key:0,class:"db-table-body"},b={class:"db-table-body-td"},v={class:"db-table-body-td"},V={class:"db-table-body-td"},E={class:"db-table-body-td"},N={class:"db-table-body-td"},k={class:"flex justify-start items-center sm:items-start sm:justify-start gap-1.5"},C={key:1,class:"db-table-body"},x={class:"db-table-body-tr"},P={class:"db-table-body-td text-center",colspan:"5"},B={class:"p-4"},S={class:"max-w-[300px] mx-auto mt-2"},_=["src"],A={class:"d-block mt-3 text-lg"},w={key:0,class:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-6"},$={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"};var D=o(5475),j={id:"modal",class:"modal"},T={class:"modal-dialog"},z={class:"modal-header"},U={class:"modal-title"},O={class:"modal-body"},L={class:"form-row"},M={class:"form-col-12 sm:form-col-6"},R={for:"company",class:"db-field-title required"},F={key:0,class:"db-field-alert"},G={class:"form-col-12 sm:form-col-6"},H={for:"name",class:"db-field-title required"},I={key:0,class:"db-field-alert"},q={class:"form-col-12 sm:form-col-6"},K={for:"email",class:"db-field-title"},J={key:0,class:"db-field-alert"},Q={class:"form-col-12 sm:form-col-6"},W={for:"phone",class:"db-field-title"},X={class:"w-fit flex-shrink-0 dropdown-group"},Y={type:"button",class:"flex items-center gap-1 dropdown-btn"},Z={class:"whitespace-nowrap flex-shrink-0 text-xs"},ee={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"},te=["onClick"],oe={class:"whitespace-nowrap text-xs"},ae={key:0,class:"db-field-alert"},ne={class:"form-col-12 sm:form-col-6"},re={class:"db-field-title",for:"country"},le={key:0,class:"db-field-alert"},se={class:"form-col-12 sm:form-col-6"},ie={class:"db-field-title",for:"state"},ce={key:0,class:"db-field-alert"},de={class:"form-col-12 sm:form-col-6"},pe={class:"db-field-title"},me={key:0,class:"db-field-alert"},ue={class:"form-col-12 sm:form-col-6"},he={for:"zip_code",class:"db-field-title"},ge={key:0,class:"db-field-alert"},fe={class:"form-col-12 sm:form-col-12"},ye={for:"image",class:"db-field-title"},be={key:0,class:"db-field-alert"},ve={class:"form-col-12"},Ve={for:"address",class:"db-field-title"},Ee={key:0,class:"db-field-alert"},Ne={class:"form-col-12"},ke={class:"modal-btns"},Ce={type:"submit",class:"db-btn py-2 text-white bg-primary"};var xe=o(8691),Pe=o(9856),Be=o(8655),Se=o(6884);const _e={name:"SupplierCreateComponent",components:{SmModalCreateComponent:xe.A,LoadingComponent:D.A},props:["props"],data:function(){return{loading:{isActive:!1},image:"",errors:{},flag:"",calling_code:""}},mounted:function(){var e=this;try{this.loading.isActive=!0,setTimeout(function(){e.callCountry()},300),this.$store.dispatch("countryCode/lists"),this.$store.dispatch("company/lists").then(function(t){e.$store.dispatch("countryCode/show",t.data.data.company_country_code).then(function(t){e.props.form.country_code=t.data.data.calling_code,e.calling_code=t.data.data.calling_code,e.props.flag=t.data.data.flag_emoji,e.flag=t.data.data.flag_emoji,e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})}).catch(function(t){e.loading.isActive=!1}),this.loading.isActive=!1}catch(e){this.loading.isActive=!1,Pe.A.error(e)}},computed:{countryCodes:function(){return this.$store.getters["countryCode/lists"]},addButton:function(){return{title:this.$t("button.add_supplier")}},countries:function(){return this.$store.getters["country/lists"]}},methods:{phoneNumber:function(e){return Be.A.phoneNumber(e)},callCountry:function(){this.$store.dispatch("country/lists",{status:Se.A.ACTIVE}),this.loading.isActive=!1},callStates:function(e){var t=this;this.props.states=[],this.props.form.state=null,this.props.cities=[],this.props.form.city=null,this.$store.dispatch("state/statesByCountry",e).then(function(e){t.props.states=e.data.data})},callCities:function(e){var t=this;this.props.form.city=null,this.props.cities=[],this.$store.dispatch("city/citiesByState",e).then(function(e){t.props.cities=e.data.data})},changeImage:function(e){this.image=e.target.files[0]},reset:function(){Be.A.modalHide(),this.$store.dispatch("supplier/reset").then().catch(),this.errors={},this.$props.props.form={company:"",name:"",email:"",phone:"",country_code:this.calling_code,country:null,state:null,city:null,zip_code:"",address:""},this.$props.props.states=[],this.$props.props.cities=[],this.$props.props.form.country_code=this.calling_code,this.$props.props.flag=this.flag,this.image&&(this.image="",this.$refs.imageProperty.value=null)},change:function(e){this.props.flag=e.flag_emoji,this.$props.props.form.country_code=e.calling_code},save:function(){var e=this;try{var t=new FormData;t.append("company",this.props.form.company),t.append("name",this.props.form.name),t.append("email",this.props.form.email),t.append("country_code",this.props.form.country_code),t.append("phone",this.props.form.phone),t.append("country",null===this.props.form.country?"":this.props.form.country),t.append("state",null===this.props.form.state?"":this.props.form.state),t.append("city",null===this.props.form.city?"":this.props.form.city),t.append("zip_code",this.props.form.zip_code),t.append("address",this.props.form.address),this.image&&t.append("image",this.image);var o=this.$store.getters["supplier/temp"].temp_id;this.loading.isActive=!0,this.$store.dispatch("supplier/save",{form:t,search:this.props.search}).then(function(t){Be.A.modalHide(),e.loading.isActive=!1,Pe.A.successFlip(null===o?0:1,e.$t("menu.suppliers")),e.props.form={company:"",name:"",email:"",phone:"",country_code:e.calling_code,country:null,state:null,city:null,zip_code:"",address:""},e.$props.props.flag=e.flag,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,Pe.A.error(e)}}}};var Ae=o(6262);const we=(0,Ae.A)(_e,[["render",function(e,t,o,n,r,l){var s=(0,a.resolveComponent)("LoadingComponent"),i=(0,a.resolveComponent)("SmModalCreateComponent"),c=(0,a.resolveComponent)("vue-select");return(0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,null,[(0,a.createVNode)(s,{props:r.loading},null,8,["props"]),(0,a.createVNode)(i,{props:l.addButton},null,8,["props"]),(0,a.createElementVNode)("div",j,[(0,a.createElementVNode)("div",T,[(0,a.createElementVNode)("div",z,[(0,a.createElementVNode)("h3",U,(0,a.toDisplayString)(e.$t("menu.suppliers")),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 l.reset&&l.reset.apply(l,arguments)})})]),(0,a.createElementVNode)("div",O,[(0,a.createElementVNode)("form",{onSubmit:t[15]||(t[15]=(0,a.withModifiers)(function(){return l.save&&l.save.apply(l,arguments)},["prevent"]))},[(0,a.createElementVNode)("div",L,[(0,a.createElementVNode)("div",M,[(0,a.createElementVNode)("label",R,(0,a.toDisplayString)(e.$t("label.company")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return o.props.form.company=e}),type:"text",id:"company",class:"db-field-control"},null,512),[[a.vModelText,o.props.form.company]]),r.errors.company?((0,a.openBlock)(),(0,a.createElementBlock)("small",F,(0,a.toDisplayString)(r.errors.company[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",G,[(0,a.createElementVNode)("label",H,(0,a.toDisplayString)(e.$t("label.name")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return o.props.form.name=e}),type:"text",id:"name",class:"db-field-control"},null,512),[[a.vModelText,o.props.form.name]]),r.errors.name?((0,a.openBlock)(),(0,a.createElementBlock)("small",I,(0,a.toDisplayString)(r.errors.name[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",q,[(0,a.createElementVNode)("label",K,(0,a.toDisplayString)(e.$t("label.email")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(e){return o.props.form.email=e}),type:"text",id:"email",class:"db-field-control"},null,512),[[a.vModelText,o.props.form.email]]),r.errors.email?((0,a.openBlock)(),(0,a.createElementBlock)("small",J,(0,a.toDisplayString)(r.errors.email[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",Q,[(0,a.createElementVNode)("label",W,(0,a.toDisplayString)(e.$t("label.phone")),1),(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)([r.errors.phone?"invalid":"","db-field-control flex items-center"])},[(0,a.createElementVNode)("div",X,[(0,a.createElementVNode)("button",Y,[(0,a.createTextVNode)((0,a.toDisplayString)(o.props.flag)+" ",1),(0,a.createElementVNode)("span",Z,(0,a.toDisplayString)(o.props.form.country_code),1),t[16]||(t[16]=(0,a.createElementVNode)("i",{class:"fa-solid fa-caret-down text-xs"},null,-1))]),(0,a.createElementVNode)("ul",ee,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(l.countryCodes,function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("li",{onClick:function(t){return l.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",oe,(0,a.toDisplayString)(e.calling_code),1)],8,te)}),256))])]),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(e){return o.props.form.phone=e}),onKeypress:t[5]||(t[5]=function(e){return l.phoneNumber(e)}),class:(0,a.normalizeClass)([r.errors.phone?"invalid":"","pl-2 text-sm w-full h-full"]),type:"text",id:"phone"},null,34),[[a.vModelText,o.props.form.phone]])],2),r.errors.phone?((0,a.openBlock)(),(0,a.createElementBlock)("small",ae,(0,a.toDisplayString)(r.errors.phone[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",ne,[(0,a.createElementVNode)("label",re,(0,a.toDisplayString)(e.$t("label.country")),1),(0,a.createVNode)(c,{class:(0,a.normalizeClass)(["db-field-control",r.errors.country?"is-invalid":""]),id:"country",modelValue:o.props.form.country,"onUpdate:modelValue":[t[6]||(t[6]=function(e){return o.props.form.country=e}),t[7]||(t[7]=function(e){return l.callStates(e)})],options:l.countries,"label-by":"name","value-by":"name",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["class","modelValue","options"]),r.errors.country?((0,a.openBlock)(),(0,a.createElementBlock)("small",le,(0,a.toDisplayString)(r.errors.country[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",se,[(0,a.createElementVNode)("label",ie,(0,a.toDisplayString)(e.$t("label.state")),1),(0,a.createVNode)(c,{class:(0,a.normalizeClass)(["db-field-control",r.errors.state?"is-invalid":""]),id:"state",modelValue:o.props.form.state,"onUpdate:modelValue":[t[8]||(t[8]=function(e){return o.props.form.state=e}),t[9]||(t[9]=function(e){return l.callCities(e)})],options:o.props.states,"label-by":"name","value-by":"name",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["class","modelValue","options"]),r.errors.state?((0,a.openBlock)(),(0,a.createElementBlock)("small",ce,(0,a.toDisplayString)(r.errors.state[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",de,[(0,a.createElementVNode)("label",pe,(0,a.toDisplayString)(e.$t("label.city")),1),(0,a.createVNode)(c,{class:(0,a.normalizeClass)(["db-field-control",r.errors.city?"is-invalid":""]),id:"city",modelValue:o.props.form.city,"onUpdate:modelValue":t[10]||(t[10]=function(e){return o.props.form.city=e}),options:o.props.cities,"label-by":"name","value-by":"name",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:"--","search-placeholder":"--"},null,8,["class","modelValue","options"]),r.errors.city?((0,a.openBlock)(),(0,a.createElementBlock)("small",me,(0,a.toDisplayString)(r.errors.city[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",ue,[(0,a.createElementVNode)("label",he,(0,a.toDisplayString)(e.$t("label.zip_code")),1),(0,a.withDirectives)((0,a.createElementVNode)("input",{"onUpdate:modelValue":t[11]||(t[11]=function(e){return o.props.form.zip_code=e}),type:"text",id:"zip_code",class:"db-field-control"},null,512),[[a.vModelText,o.props.form.zip_code]]),r.errors.zip_code?((0,a.openBlock)(),(0,a.createElementBlock)("small",ge,(0,a.toDisplayString)(r.errors.zip_code[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",fe,[(0,a.createElementVNode)("label",ye,(0,a.toDisplayString)(e.$t("label.image")),1),(0,a.createElementVNode)("input",{onChange:t[12]||(t[12]=function(){return l.changeImage&&l.changeImage.apply(l,arguments)}),class:(0,a.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,a.openBlock)(),(0,a.createElementBlock)("small",be,(0,a.toDisplayString)(r.errors.image[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",ve,[(0,a.createElementVNode)("label",Ve,(0,a.toDisplayString)(e.$t("label.address")),1),(0,a.withDirectives)((0,a.createElementVNode)("textarea",{"onUpdate:modelValue":t[13]||(t[13]=function(e){return o.props.form.address=e}),class:(0,a.normalizeClass)([r.errors.address?"invalid":"","db-field-control"]),id:"address"},null,2),[[a.vModelText,o.props.form.address]]),r.errors.address?((0,a.openBlock)(),(0,a.createElementBlock)("small",Ee,(0,a.toDisplayString)(r.errors.address[0]),1)):(0,a.createCommentVNode)("",!0)]),(0,a.createElementVNode)("div",Ne,[(0,a.createElementVNode)("div",ke,[(0,a.createElementVNode)("button",{type:"button",class:"modal-btn-outline modal-close",onClick:t[14]||(t[14]=function(){return l.reset&&l.reset.apply(l,arguments)})},[t[17]||(t[17]=(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",Ce,[t[18]||(t[18]=(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 $e=o(1889),De=o(1017),je=o(1751),Te=o(9319),ze=o(3721),Ue=o(5458),Oe=o(1606),Le=o(8536);function Me(){var e,t,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",n=o.toStringTag||"@@toStringTag";function r(o,a,n,r){var i=a&&a.prototype instanceof s?a:s,c=Object.create(i.prototype);return Re(c,"_invoke",function(o,a,n){var r,s,i,c=0,d=n||[],p=!1,m={p:0,n:0,v:e,a:u,f:u.bind(e,4),d:function(t,o){return r=t,s=0,i=e,m.n=o,l}};function u(o,a){for(s=o,i=a,t=0;!p&&c&&!n&&t<d.length;t++){var n,r=d[t],u=m.p,h=r[2];o>3?(n=h===a)&&(i=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=u&&((n=o<2&&u<r[1])?(s=0,m.v=a,m.n=r[1]):u<h&&(n=o<3||r[0]>a||a>h)&&(r[4]=o,r[5]=a,m.n=h,s=0))}if(n||o>1)return l;throw p=!0,a}return function(n,d,h){if(c>1)throw TypeError("Generator is already running");for(p&&1===d&&u(d,h),s=d,i=h;(t=s<2?e:i)||!p;){r||(s?s<3?(s>1&&(m.n=-1),u(s,i)):m.n=i:m.v=i);try{if(c=2,r){if(s||(n="next"),t=r[n]){if(!(t=t.call(r,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(i=TypeError("The iterator does not provide a '"+n+"' method"),s=1);r=e}else if((t=(p=m.n<0)?i:o.call(a,m))!==l)break}catch(t){r=e,s=1,i=t}finally{c=1}}return{value:t,done:p}}}(o,n,r),!0),c}var l={};function s(){}function i(){}function c(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(Re(t={},a,function(){return this}),t),p=c.prototype=s.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Re(e,n,"GeneratorFunction")),e.prototype=Object.create(p),e}return i.prototype=c,Re(p,"constructor",c),Re(c,"constructor",i),i.displayName="GeneratorFunction",Re(c,n,"GeneratorFunction"),Re(p),Re(p,n,"Generator"),Re(p,a,function(){return this}),Re(p,"toString",function(){return"[object Generator]"}),(Me=function(){return{w:r,m}})()}function Re(e,t,o,a){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}Re=function(e,t,o,a){if(t)n?n(e,t,{value:o,enumerable:!a,configurable:!a,writable:!a}):e[t]=o;else{var r=function(t,o){Re(e,t,function(e){return this._invoke(t,o,e)})};r("next",0),r("throw",1),r("return",2)}},Re(e,t,o,a)}function Fe(e,t,o,a,n,r,l){try{var s=e[r](l),i=s.value}catch(e){return void o(e)}s.done?t(i):Promise.resolve(i).then(a,n)}const Ge={name:"SupplierListComponent",components:{TableLimitComponent:Te.A,PaginationSMBox:je.A,PaginationBox:De.A,PaginationTextComponent:$e.A,SupplierCreateComponent:we,LoadingComponent:D.A,SmDeleteComponent:ze.A,SmModalEditComponent:Ue.A,SmViewComponent:Oe.A},data:function(){return{loading:{isActive:!1},props:{form:{company:"",name:"",email:"",phone:"",country_code:"",country:null,state:null,city:null,zip_code:"",address:""},search:{paginate:1,page:1,per_page:10,order_column:"id",order_type:"desc"},flag:"",states:[],cities:[]},ENV:Le.A}},mounted:function(){this.list()},computed:{suppliers:function(){return this.$store.getters["supplier/lists"]},pagination:function(){return this.$store.getters["supplier/pagination"]},paginationPage:function(){return this.$store.getters["supplier/page"]}},methods:{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("supplier/lists",this.props.search).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},edit:(He=Me().m(function e(t){var o=this;return Me().w(function(e){for(;;)switch(e.n){case 0:if(Be.A.modalShow(),this.loading.isActive=!0,this.$store.dispatch("supplier/edit",t.id),""===t.country){e.n=6;break}if(""===t.state){e.n=3;break}return e.n=1,this.$store.dispatch("state/statesByCountry",t.country).then(function(e){o.props.states=e.data.data});case 1:return e.n=2,this.$store.dispatch("city/citiesByState",t.state).then(function(e){o.props.cities=e.data.data});case 2:""===t.city&&(this.props.form.city=null),e.n=5;break;case 3:return e.n=4,this.$store.dispatch("state/statesByCountry",t.country).then(function(e){o.props.states=e.data.data});case 4:this.props.form.state=null,this.props.form.city=null;case 5:e.n=7;break;case 6:this.props.states=[],this.props.form.country=null,this.props.form.state=null,this.props.form.city=null;case 7:setTimeout(function(){o.props.form={company:t.company,name:t.name,email:t.email,phone:t.phone,country_code:t.country_code,country:t.country,state:t.state,city:t.city,zip_code:t.zip_code,address:t.address},""===t.country&&(o.props.form.country=null),""===t.state&&(o.props.form.state=null),""===t.city&&(o.props.form.city=null)},200),this.$store.dispatch("countryCode/callingCode",t.country_code).then(function(e){o.props.flag=e.data.data.flag_emoji,o.loading.isActive=!1}).catch(function(e){o.loading.isActive=!1}),this.loading.isActive=!1;case 8:return e.a(2)}},e,this)}),Ie=function(){var e=this,t=arguments;return new Promise(function(o,a){var n=He.apply(e,t);function r(e){Fe(n,o,a,r,l,"next",e)}function l(e){Fe(n,o,a,r,l,"throw",e)}r(void 0)})},function(e){return Ie.apply(this,arguments)}),destroy:function(e){var t=this;Be.A.destroyConfirmation().then(function(o){try{t.loading.isActive=!0,t.$store.dispatch("supplier/destroy",{id:e,search:t.props.search}).then(function(e){t.loading.isActive=!1,Pe.A.successFlip(null,t.$t("menu.suppliers"))}).catch(function(e){t.loading.isActive=!1,Pe.A.error(e.response.data.message)})}catch(e){t.loading.isActive=!1,Pe.A.error(e.response.data.message)}}).catch(function(e){t.loading.isActive=!1})}}};var He,Ie;const qe=(0,Ae.A)(Ge,[["render",function(e,t,o,D,j,T){var z=(0,a.resolveComponent)("LoadingComponent"),U=(0,a.resolveComponent)("TableLimitComponent"),O=(0,a.resolveComponent)("SupplierCreateComponent"),L=(0,a.resolveComponent)("SmViewComponent"),M=(0,a.resolveComponent)("SmModalEditComponent"),R=(0,a.resolveComponent)("SmDeleteComponent"),F=(0,a.resolveComponent)("PaginationSMBox"),G=(0,a.resolveComponent)("PaginationTextComponent"),H=(0,a.resolveComponent)("PaginationBox");return(0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,null,[(0,a.createVNode)(z,{props:j.loading},null,8,["props"]),(0,a.createElementVNode)("div",n,[(0,a.createElementVNode)("div",r,[(0,a.createElementVNode)("h3",l,(0,a.toDisplayString)(e.$t("menu.suppliers")),1),(0,a.createElementVNode)("div",s,[(0,a.createVNode)(U,{method:T.list,search:j.props.search,page:T.paginationPage},null,8,["method","search","page"]),(0,a.createVNode)(O,{props:j.props},null,8,["props"])])]),(0,a.createElementVNode)("div",i,[(0,a.createElementVNode)("table",c,[(0,a.createElementVNode)("thead",d,[(0,a.createElementVNode)("tr",p,[(0,a.createElementVNode)("th",m,(0,a.toDisplayString)(e.$t("label.company")),1),(0,a.createElementVNode)("th",u,(0,a.toDisplayString)(e.$t("label.name")),1),(0,a.createElementVNode)("th",h,(0,a.toDisplayString)(e.$t("label.email")),1),(0,a.createElementVNode)("th",g,(0,a.toDisplayString)(e.$t("label.phone")),1),(0,a.createElementVNode)("th",f,(0,a.toDisplayString)(e.$t("label.action")),1)])]),T.suppliers.length>0?((0,a.openBlock)(),(0,a.createElementBlock)("tbody",y,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(T.suppliers,function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("tr",{class:"db-table-body-tr",key:e},[(0,a.createElementVNode)("td",b,(0,a.toDisplayString)(e.company),1),(0,a.createElementVNode)("td",v,(0,a.toDisplayString)(e.name),1),(0,a.createElementVNode)("td",V,(0,a.toDisplayString)(e.email),1),(0,a.createElementVNode)("td",E,(0,a.toDisplayString)(e.phone),1),(0,a.createElementVNode)("td",N,[(0,a.createElementVNode)("div",k,[(0,a.createVNode)(L,{link:"admin.settings.supplier.show",id:e.id},null,8,["id"]),(0,a.createVNode)(M,{onClick:function(t){return T.edit(e)}},null,8,["onClick"]),(0,a.createVNode)(R,{onClick:function(t){return T.destroy(e.id)}},null,8,["onClick"])])])])}),128))])):((0,a.openBlock)(),(0,a.createElementBlock)("tbody",C,[(0,a.createElementVNode)("tr",x,[(0,a.createElementVNode)("td",P,[(0,a.createElementVNode)("div",B,[(0,a.createElementVNode)("div",S,[(0,a.createElementVNode)("img",{class:"w-full h-full",src:j.ENV.API_URL+"/images/default/not-found/not_found.png",alt:"Not Found"},null,8,_)]),(0,a.createElementVNode)("span",A,(0,a.toDisplayString)(e.$t("message.no_data_found")),1)])])])]))])]),T.suppliers.length>0?((0,a.openBlock)(),(0,a.createElementBlock)("div",w,[(0,a.createVNode)(F,{pagination:T.pagination,method:T.list},null,8,["pagination","method"]),(0,a.createElementVNode)("div",$,[(0,a.createVNode)(G,{props:{page:T.paginationPage}},null,8,["props"]),(0,a.createVNode)(H,{pagination:T.pagination,method:T.list},null,8,["pagination","method"])])])):(0,a.createCommentVNode)("",!0)])],64)}]])},8691:(e,t,o)=>{o.d(t,{A:()=>l});var a=o(9726);var n=o(8655);const r={name:"SmModalCreateComponent",props:["props"],methods:{add:function(){n.A.modalShow()}}};const l=(0,o(6262).A)(r,[["render",function(e,t,o,n,r,l){return(0,a.openBlock)(),(0,a.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,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:()=>m});var a=o(9726),n={key:0,class:"db-field-down-arrow"},r={value:"10"},l={value:"25"},s={value:"50"},i={value:"100"},c={value:"500"},d={value:"1000"};const p={name:"TableLimitComponent",props:{page:{type:Object},search:{type:Object},method:{type:Function}},methods:{limitChange:function(){this.method()}}};const m=(0,o(6262).A)(p,[["render",function(e,t,o,p,m,u){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 u.limitChange&&u.limitChange.apply(u,arguments)}),"onUpdate:modelValue":t[1]||(t[1]=function(e){return o.search.per_page=e}),class:"db-card-filter-select"},[(0,a.createElementVNode)("option",r,(0,a.toDisplayString)(e.$t("number.10")),1),(0,a.createElementVNode)("option",l,(0,a.toDisplayString)(e.$t("number.25")),1),(0,a.createElementVNode)("option",s,(0,a.toDisplayString)(e.$t("number.50")),1),(0,a.createElementVNode)("option",i,(0,a.toDisplayString)(e.$t("number.100")),1),(0,a.createElementVNode)("option",c,(0,a.toDisplayString)(e.$t("number.500")),1),(0,a.createElementVNode)("option",d,(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