/home/techb158/dev.balacoffee.com/public/js/bundle
NameSizeModeActions
431.js3963290644editdlrm
431.js.LICENSE.txt130910644editdlrm
1120.js2012970644editdlrm
1120.js.LICENSE.txt10090644editdlrm
2614.js10990644editdlrm
7731.js2550644editdlrm
7856.js199180644editdlrm
7856.js.LICENSE.txt1880644editdlrm
8494.js1519890644editdlrm
adjustments.js2550644editdlrm
attendance.js845930644editdlrm
Backup.js33280644editdlrm
barcode.js713590644editdlrm
Brands.js103940644editdlrm
Categories.js88460644editdlrm
change_to_sale.js320970644editdlrm
company.js93890644editdlrm
Currencies.js96130644editdlrm
Customers.js4016160644editdlrm
Customers.js.LICENSE.txt130910644editdlrm
customers_report.js56360644editdlrm
customizer.js61360644editdlrm
dashboard.js4269350644editdlrm
departments.js107880644editdlrm
designations.js112150644editdlrm
detail_customer_report.js3989660644editdlrm
detail_customer_report.js.LICENSE.txt130910644editdlrm
detail_employee.js789980644editdlrm
detail_product.js675100644editdlrm
detail_purchase.js107420644editdlrm
detail_purchase_return.js107900644editdlrm
detail_quotation.js100060644editdlrm
detail_sale.js104280644editdlrm
detail_sale_return.js105340644editdlrm
detail_stock_report.js4040420644editdlrm
detail_stock_report.js.LICENSE.txt130910644editdlrm
detail_supplier_report.js3954450644editdlrm
detail_supplier_report.js.LICENSE.txt130910644editdlrm
detail_user_report.js4085250644editdlrm
detail_user_report.js.LICENSE.txt130910644editdlrm
edit_adjustment.js119450644editdlrm
edit_employee.js531810644editdlrm
edit_expense.js58310644editdlrm
edit_permission.js888600644editdlrm
edit_product.js3687770644editdlrm
edit_product.js.LICENSE.txt5640644editdlrm
edit_purchase.js260910644editdlrm
edit_purchase_return.js266220644editdlrm
edit_quotation.js261080644editdlrm
edit_sale.js264720644editdlrm
edit_sale_return.js262690644editdlrm
edit_transfer.js253840644editdlrm
employees.js2550644editdlrm
expenses.js2550644editdlrm
expense_category.js97430644editdlrm
groupPermission.js51390644editdlrm
holidays.js517500644editdlrm
hrm.js2550644editdlrm
index_adjustment.js3942810644editdlrm
index_adjustment.js.LICENSE.txt130910644editdlrm
index_employee.js3930580644editdlrm
index_employee.js.LICENSE.txt130910644editdlrm
index_expense.js3924970644editdlrm
index_expense.js.LICENSE.txt130910644editdlrm
index_products.js3975790644editdlrm
index_products.js.LICENSE.txt130910644editdlrm
index_purchases.js4118620644editdlrm
index_purchases.js.LICENSE.txt130910644editdlrm
index_purchase_return.js4122540644editdlrm
index_purchase_return.js.LICENSE.txt130910644editdlrm
index_sales.js4957330644editdlrm
index_sales.js.LICENSE.txt130910644editdlrm
index_sale_return.js4119370644editdlrm
index_sale_return.js.LICENSE.txt130910644editdlrm
index_transfer.js3962960644editdlrm
index_transfer.js.LICENSE.txt130910644editdlrm
largeSidebar.js1807270644editdlrm
largeSidebar.js.LICENSE.txt2320644editdlrm
leaves.js2550644editdlrm
leave_list.js577150644editdlrm
leave_type.js81070644editdlrm
node_modules_canvg_lib_index_es_js.js4609300644editdlrm
node_modules_dompurify_dist_purify_js.js597730644editdlrm
node_modules_html2canvas_dist_html2canvas_js.js4417030644editdlrm
NotFound.js7570644editdlrm
not_authorize.js7700644editdlrm
office_shift.js474160644editdlrm
payments_purchases.js5279570644editdlrm
payments_purchases.js.LICENSE.txt131060644editdlrm
payments_purchases_returns.js5280880644editdlrm
payments_purchases_returns.js.LICENSE.txt131060644editdlrm
payments_sales.js5277680644editdlrm
payments_sales.js.LICENSE.txt131060644editdlrm
payments_sales_returns.js5279610644editdlrm
payments_sales_returns.js.LICENSE.txt131060644editdlrm
People.js2550644editdlrm
permissions.js2550644editdlrm
pos.js2384480644editdlrm
products.js2550644editdlrm
profile.js81280644editdlrm
profit_and_loss.js1483420644editdlrm
profit_and_loss.js.LICENSE.txt140644editdlrm
providers_report.js56590644editdlrm
purchases.js2540644editdlrm
purchase_report.js5296220644editdlrm
purchase_report.js.LICENSE.txt131060644editdlrm
purchase_return.js2540644editdlrm
quantity_alerts.js31260644editdlrm
quotations.js2550644editdlrm
resources_src_views_app_index_vue.js92930644editdlrm
resources_src_views_app_pages_quotations_index_quotation_vue.js5128300644editdlrm
resources_src_views_app_pages_reports_index_vue.js51140644editdlrm
sales.js2550644editdlrm
sales_report.js5295180644editdlrm
sales_report.js.LICENSE.txt131060644editdlrm
sale_return.js2550644editdlrm
settings.js2550644editdlrm
shipment.js3930290644editdlrm
shipment.js.LICENSE.txt130910644editdlrm
stock_report.js34390644editdlrm
store_adjustment.js117230644editdlrm
store_employee.js514820644editdlrm
store_expense.js57750644editdlrm
store_permission.js887210644editdlrm
store_product.js3685000644editdlrm
store_product.js.LICENSE.txt5640644editdlrm
store_purchase.js270020644editdlrm
store_purchase_return.js274210644editdlrm
store_quotation.js271090644editdlrm
store_sale.js363330644editdlrm
store_sale_return.js271550644editdlrm
store_transfer.js260290644editdlrm
Suppliers.js4014980644editdlrm
Suppliers.js.LICENSE.txt130910644editdlrm
System_settings.js310220644editdlrm
top_customers.js3854440644editdlrm
top_customers.js.LICENSE.txt130910644editdlrm
top_selling_products.js5249250644editdlrm
top_selling_products.js.LICENSE.txt131060644editdlrm
transfers.js2540644editdlrm
units.js103070644editdlrm
Users.js4035060644editdlrm
Users.js.LICENSE.txt130910644editdlrm
users_report.js37530644editdlrm
vue-perfect-scrollbar.js253470644editdlrm
vue-perfect-scrollbar.js.LICENSE.txt750644editdlrm
Warehouses.js103550644editdlrm
warehouse_report.js8195540644editdlrm
warehouse_report.js.LICENSE.txt130910644editdlrm
Edit: /home/techb158/dev.balacoffee.com/public/js/bundle/Brands.js (10394B)
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9188],{46705:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});var n=a(87757),i=a.n(n),s=a(74865),r=a.n(s);function o(t,e,a,n,i,s,r){try{var o=t[s](r),d=o.value}catch(t){return void a(t)}o.done?e(d):Promise.resolve(d).then(n,i)}const d={metaInfo:{title:"Brand"},data:function(){return{isLoading:!0,SubmitProcessing:!1,serverParams:{columnFilters:{},sort:{field:"id",type:"desc"},page:1,perPage:10},selectedIds:[],totalRows:"",search:"",data:new FormData,editmode:!1,brands:[],limit:"10",brand:{id:"",name:"",description:"",image:""}}},computed:{columns:function(){return[{label:this.$t("BrandImage"),field:"image",tdClass:"text-left",thClass:"text-left"},{label:this.$t("BrandName"),field:"name",tdClass:"text-left",thClass:"text-left"},{label:this.$t("BrandDescription"),field:"description",tdClass:"text-left",thClass:"text-left"},{label:this.$t("Action"),field:"actions",html:!0,tdClass:"text-right",thClass:"text-right",sortable:!1}]}},methods:{updateParams:function(t){this.serverParams=Object.assign({},this.serverParams,t)},onPageChange:function(t){var e=t.currentPage;this.serverParams.page!==e&&(this.updateParams({page:e}),this.Get_Brands(e))},onPerPageChange:function(t){var e=t.currentPerPage;this.limit!==e&&(this.limit=e,this.updateParams({page:1,perPage:e}),this.Get_Brands(1))},onSortChange:function(t){this.updateParams({sort:{type:t[0].type,field:t[0].field}}),this.Get_Brands(this.serverParams.page)},selectionChanged:function(t){var e=this,a=t.selectedRows;this.selectedIds=[],a.forEach((function(t,a){e.selectedIds.push(t.id)}))},onSearch:function(t){this.search=t.searchTerm,this.Get_Brands(this.serverParams.page)},getValidationState:function(t){var e=t.dirty,a=t.validated,n=t.valid;return e||a?void 0===n?null:n:null},Submit_Brand:function(){var t=this;this.$refs.Create_brand.validate().then((function(e){e?t.editmode?t.Update_Brand():t.Create_Brand():t.makeToast("danger",t.$t("Please_fill_the_form_correctly"),t.$t("Failed"))}))},makeToast:function(t,e,a){this.$root.$bvToast.toast(e,{title:a,variant:t,solid:!0})},onFileSelected:function(t){var e,a=this;return(e=i().mark((function e(){var n,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.$refs.Image.validate(t);case 2:n=e.sent,s=n.valid,a.brand.image=s?t.target.files[0]:"";case 5:case"end":return e.stop()}}),e)})),function(){var t=this,a=arguments;return new Promise((function(n,i){var s=e.apply(t,a);function r(t){o(s,n,i,r,d,"next",t)}function d(t){o(s,n,i,r,d,"throw",t)}r(void 0)}))})()},New_Brand:function(){this.reset_Form(),this.editmode=!1,this.$bvModal.show("New_brand")},Edit_Brand:function(t){this.Get_Brands(this.serverParams.page),this.reset_Form(),this.brand=t,this.editmode=!0,this.$bvModal.show("New_brand")},Get_Brands:function(t){var e=this;r().start(),r().set(.1),axios.get("brands?page="+t+"&SortField="+this.serverParams.sort.field+"&SortType="+this.serverParams.sort.type+"&search="+this.search+"&limit="+this.limit).then((function(t){e.brands=t.data.brands,e.totalRows=t.data.totalRows,r().done(),e.isLoading=!1})).catch((function(t){r().done(),setTimeout((function(){e.isLoading=!1}),500)}))},Create_Brand:function(){var t=this,e=this;e.SubmitProcessing=!0,e.data.append("name",e.brand.name),e.data.append("description",e.brand.description),e.data.append("image",e.brand.image),axios.post("brands",e.data).then((function(a){e.SubmitProcessing=!1,Fire.$emit("Event_Brand"),t.makeToast("success",t.$t("Create.TitleBrand"),t.$t("Success"))})).catch((function(a){e.SubmitProcessing=!1,t.makeToast("danger",t.$t("InvalidData"),t.$t("Failed"))}))},Update_Brand:function(){var t=this,e=this;e.SubmitProcessing=!0,e.data.append("name",e.brand.name),e.data.append("description",e.brand.description),e.data.append("image",e.brand.image),e.data.append("_method","put"),axios.post("brands/"+e.brand.id,e.data).then((function(a){e.SubmitProcessing=!1,Fire.$emit("Event_Brand"),t.makeToast("success",t.$t("Update.TitleBrand"),t.$t("Success"))})).catch((function(a){e.SubmitProcessing=!1,t.makeToast("danger",t.$t("InvalidData"),t.$t("Failed"))}))},reset_Form:function(){this.brand={id:"",name:"",description:"",image:""},this.data=new FormData},Delete_Brand:function(t){var e=this;this.$swal({title:this.$t("Delete.Title"),text:this.$t("Delete.Text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",cancelButtonText:this.$t("Delete.cancelButtonText"),confirmButtonText:this.$t("Delete.confirmButtonText")}).then((function(a){a.value&&axios.delete("brands/"+t).then((function(){e.$swal(e.$t("Delete.Deleted"),e.$t("Delete.TitleBrand"),"success"),Fire.$emit("Delete_Brand")})).catch((function(){e.$swal(e.$t("Delete.Failed"),e.$t("Delete.Therewassomethingwronge"),"warning")}))}))},delete_by_selected:function(){var t=this;this.$swal({title:this.$t("Delete.Title"),text:this.$t("Delete.Text"),type:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",cancelButtonText:this.$t("Delete.cancelButtonText"),confirmButtonText:this.$t("Delete.confirmButtonText")}).then((function(e){e.value&&(r().start(),r().set(.1),axios.post("brands/delete/by_selection",{selectedIds:t.selectedIds}).then((function(){t.$swal(t.$t("Delete.Deleted"),t.$t("Delete.TitleBrand"),"success"),Fire.$emit("Delete_Brand")})).catch((function(){setTimeout((function(){return r().done()}),500),t.$swal(t.$t("Delete.Failed"),t.$t("Delete.Therewassomethingwronge"),"warning")})))}))}},created:function(){var t=this;this.Get_Brands(1),Fire.$on("Event_Brand",(function(){setTimeout((function(){t.Get_Brands(t.serverParams.page),t.$bvModal.hide("New_brand")}),500)})),Fire.$on("Delete_Brand",(function(){setTimeout((function(){t.Get_Brands(t.serverParams.page)}),500)}))}};const l=(0,a(51900).Z)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main-content"},[a("breadcumb",{attrs:{page:t.$t("Brand"),folder:t.$t("Products")}}),t._v(" "),t.isLoading?a("div",{staticClass:"loading_page spinner spinner-primary mr-3"}):t._e(),t._v(" "),t.isLoading?t._e():a("b-card",{staticClass:"wrapper"},[a("vue-good-table",{attrs:{mode:"remote",columns:t.columns,totalRows:t.totalRows,rows:t.brands,"search-options":{enabled:!0,placeholder:t.$t("Search_this_table")},"select-options":{enabled:!0,clearSelectionText:""},"pagination-options":{enabled:!0,mode:"records",nextLabel:"next",prevLabel:"prev"},styleClass:"table-hover tableOne vgt-table"},on:{"on-page-change":t.onPageChange,"on-per-page-change":t.onPerPageChange,"on-sort-change":t.onSortChange,"on-search":t.onSearch,"on-selected-rows-change":t.selectionChanged},scopedSlots:t._u([{key:"table-row",fn:function(e){return["actions"==e.column.field?a("span",[a("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:"Edit"},on:{click:function(a){return t.Edit_Brand(e.row)}}},[a("i",{staticClass:"i-Edit text-25 text-success"})]),t._v(" "),a("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:"Delete"},on:{click:function(a){return t.Delete_Brand(e.row.id)}}},[a("i",{staticClass:"i-Close-Window text-25 text-danger"})])]):"image"==e.column.field?a("span",[a("b-img",{attrs:{thumbnail:"",height:"50",width:"50",fluid:"",src:"/images/brands/"+e.row.image,alt:"image"}})],1):t._e()]}}],null,!1,545511441)},[a("div",{attrs:{slot:"selected-row-actions"},slot:"selected-row-actions"},[a("button",{staticClass:"btn btn-danger btn-sm",on:{click:function(e){return t.delete_by_selected()}}},[t._v(t._s(t.$t("Del")))])]),t._v(" "),a("div",{staticClass:"mt-2 mb-3",attrs:{slot:"table-actions"},slot:"table-actions"},[a("b-button",{staticClass:"btn-rounded",attrs:{variant:"btn btn-primary btn-icon m-1"},on:{click:function(e){return t.New_Brand()}}},[a("i",{staticClass:"i-Add"}),t._v("\n "+t._s(t.$t("Add"))+"\n ")])],1)])],1),t._v(" "),a("validation-observer",{ref:"Create_brand"},[a("b-modal",{attrs:{"hide-footer":"",size:"md",id:"New_brand",title:t.editmode?t.$t("Edit"):t.$t("Add")}},[a("b-form",{attrs:{enctype:"multipart/form-data"},on:{submit:function(e){return e.preventDefault(),t.Submit_Brand.apply(null,arguments)}}},[a("b-row",[a("b-col",{attrs:{md:"12"}},[a("validation-provider",{attrs:{name:"Brand Name",rules:{required:!0,min:3,max:20}},scopedSlots:t._u([{key:"default",fn:function(e){return[a("b-form-group",{attrs:{label:t.$t("BrandName")+" *"}},[a("b-form-input",{attrs:{placeholder:t.$t("Enter_Name_Brand"),state:t.getValidationState(e),"aria-describedby":"Name-feedback",label:"Name"},model:{value:t.brand.name,callback:function(e){t.$set(t.brand,"name",e)},expression:"brand.name"}}),t._v(" "),a("b-form-invalid-feedback",{attrs:{id:"Name-feedback"}},[t._v(t._s(e.errors[0]))])],1)]}}])})],1),t._v(" "),a("b-col",{attrs:{md:"12"}},[a("validation-provider",{attrs:{name:"Brand Description",rules:{max:30}},scopedSlots:t._u([{key:"default",fn:function(e){return[a("b-form-group",{attrs:{label:t.$t("BrandDescription")}},[a("b-form-textarea",{attrs:{rows:"3",placeholder:t.$t("Enter_Description_Brand"),state:t.getValidationState(e),"aria-describedby":"Description-feedback",label:"Description"},model:{value:t.brand.description,callback:function(e){t.$set(t.brand,"description",e)},expression:"brand.description"}}),t._v(" "),a("b-form-invalid-feedback",{attrs:{id:"Description-feedback"}},[t._v(t._s(e.errors[0]))])],1)]}}])})],1),t._v(" "),a("b-col",{attrs:{md:"12"}},[a("validation-provider",{ref:"Image",attrs:{name:"Image",rules:"mimes:image/*|size:200"},scopedSlots:t._u([{key:"default",fn:function(e){e.validate;var n=e.valid,i=e.errors;return a("b-form-group",{attrs:{label:t.$t("BrandImage")}},[a("input",{class:{"is-invalid":!!i.length},attrs:{state:!i[0]&&(!!n||null),label:"Choose Image",type:"file"},on:{change:t.onFileSelected}}),t._v(" "),a("b-form-invalid-feedback",{attrs:{id:"Image-feedback"}},[t._v(t._s(i[0]))])],1)}}])})],1),t._v(" "),a("b-col",{staticClass:"mt-3",attrs:{md:"12"}},[a("b-button",{attrs:{variant:"primary",type:"submit",disabled:t.SubmitProcessing}},[t._v(t._s(t.$t("submit")))]),t._v(" "),t.SubmitProcessing?t._m(0):t._e()],1)],1)],1)],1)],1)],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"typo__p"},[e("div",{staticClass:"spinner sm spinner-primary mt-3"})])}],!1,null,null,null).exports}}]);