PageSourceSearch

https://joinqatch.com/8840.f256c51717b57157.js

js joinqatch.com collected 2026-09-28 05:50:33 UTC 37,563 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[8840],{3011:($,P,r)=>{r.d(P,{d:()=>S});var l=r(8559),O=r(316),_=r(496);function T(m,c){if(1&m){const d=l.RV6();l.j41(0,"div",1),l.bIt("click",function(){const p=l.eBV(d).$implicit,b=l.XpG();return l.Njj(b.valueChanged(p))}),l.j41(1,"label",2)(2,"input",3),l.mxI("ngModelChange",function(p){const b=l.eBV(d).$implicit;return l.DH7(b.checked,p)||(b.checked=p),l.Njj(p)}),l.k0s(),l.EFF(3),l.nrm(4,"span",4),l.k0s()()}if(2&m){const d=c.$implicit,f=c.index,p=l.XpG();l.R7$(2),l.FCK("id","state-",p._id,"-",f,""),l.FS9("name",p._name),l.Y8G("value",d.value),l.R50("ngModel",d.checked),l.R7$(),l.SpI(" ",d.label?d.label:""," ")}}let S=(()=>{class m{get selected(){return this._selected}set selected(d){this._selected=d}constructor(){this._id=Date.now(),this._selected={},this.states=[],this.onChange=new l.bkB}ngOnInit(){this._name=`${this.states.map(d=>d.value)}`,this._selected=this.states.find(d=>d.checked===d.value),this.onChange.emit(this._selected)}valueChanged(d){this._selected=d,this.onChange.emit(this._selected)}static{this.\u0275fac=function(f){return new(f||m)}}static{this.\u0275cmp=l.VBU({type:m,selectors:[["app-radio-button"]],inputs:{states:"states",selected:"selected"},outputs:{onChange:"onChange"},decls:1,vars:1,consts:[["class","form-check-radio me-2 pointer",3,"click",4,"ngFor","ngForOf"],[1,"form-check-radio","me-2","pointer",3,"click"],[1,"form-check-label","ms-1"],["type","radio",1,"form-check-input",3,"ngModelChange","id","name","value","ngModel"],[1,"form-check-sign"]],template:function(f,p){1&f&&l.DNE(0,T,5,7,"div",0),2&f&&l.Y8G("ngForOf",p.states)},dependencies:[O.Sq,_.me,_.Fm,_.BC,_.vS],styles:[".label[_ngcontent-%COMP%]{cursor:pointer}\n\n/*# sourceMappingURL=radio-button.component.css.map*/"]})}}return m})()},8840:($,P,r)=>{r.r(P),r.d(P,{InventoryModule:()=>bt});var l=r(316),O=r(180),_=r(8981),T=r(7799),S=r(9204),m=r(4398),c=r(7430),d=r(9188),f=r(7957);const p=[{label:"Text Date",filterType:c.RJ.datepicker,filterId:"text_date"},{label:"Price Point",filterType:c.RJ.dropdown,data:[],filterId:"price"},{label:"Availability",filterType:c.RJ.multi_dropdown,data:[],displayKey:"availability",filterKey:"availability_id",filterId:"availability"},{label:"Stylist",filterType:c.RJ.multi_dropdown,data:[],displayKey:"stylist_name",filterKey:"stylist_id",filterId:"stylist"}];var A=r(7683),R=r(6227),j=r(7269),F=r(9844),G=r(3729),V=r(1561),t=r(8559),B=r(565),C=r(5520),y=r(7243),E=r(3664),h=r(7659);const U=()=>({label:"Inventory"}),K=()=>({label:"Stock Check"}),Q=(s,n)=>[s,n];function N(s,n){if(1&s){const e=t.RV6();t.j41(0,"app-filters",6),t.bIt("valueChange",function(){t.eBV(e);const o=t.XpG();return t.Njj(o.onFilterValueChange())}),t.k0s()}if(2&s){const e=t.XpG();t.Y8G("filters",e.filters)("filtered",e.filtered)("isAlwaysCollapsible",!0)("retainValues",e.config.filtersValueRetain)("filterId","sc-stockcheck")}}class k{constructor(n,e,i,o,a,M){var s;this.deviceService=n,this.ngbModal=e,this.stylistsService=i,this.datePipe=o,this.authService=a,this.toastService=M,this.isDesktop=!1,this.filters=JSON.parse(JSON.stringify(p)),this.config={dataKey:"products",page:new A.xf,selection:!1,onDataLoad:()=>{this.config.noContentMessage="No Product found"},columns:(s=this,[{name:"Product Id",sortable:!0,displayKey:"product_id",click:s.openLink.bind(s)},{name:"Image",sortable:!1,displayKey:"image_url",type:d.Us.IMAGE,click:s.openLink.bind(s)},{name:"Name",sortable:!0,displayKey:"product_name",width:180},{name:"Retailer",sortable:!0,displayKey:"retailer_name"},{name:"Brand",sortable:!0,displayKey:"brand_name"},{name:"Availability",sortable:!0,displayKey:"availability",hasEditMode:!0,valueUpdated:s.onAvailabilityUpdate.bind(s),options:f.Od,editViewType:d.TR.DROPDOWN,width:150},{name:"In the queue of ...",sortable:!0,displayKey:"stylist_name",width:180},{name:"Last Stock Checked",sortable:!0,displayKey:"last_stock_check",width:180,getView:s.getLastStockCheckDate.bind(s),type:d.Us.CUSTOM},{name:"Stock",sortable:!1,displayKey:"stock_check_reqd",type:d.Us.CUSTOM,getView:s.getStockCheckView.bind(s),click:s.onStockCheckClick.bind(s)},{name:"Prod. Added Date",sortable:!0,displayKey:"create_date",type:d.Us.TIMESTAMP,width:180}]),contextMenuConfig:{gridHeaderLabel:"Stock check"},noContentMessage:"Apply any filter or sort on table to load the products.",filtersValueRetain:!0,host:c.zE.DASHBOARD},this.filtered={}}ngOnInit(){this.onResize(),this.getFiltersData()}onResize(){this.isDesktop=this.deviceService.isDesktop()}getFiltersData(){var n=this;return(0,S.A)(function*(){const e=yield n.authService.isStylist();n.stylistsService.getFilters(n.filters.filter(i=>i.filterId)).subscribe(({filters:i})=>{n.filters=R.cloneDeep(n.filters.filter(o=>!(e&&"stylist"===o.filterId)).map(o=>(o.filterId&&(o.data=i[o.filterId]),o))),n.config.url="stylist/inventory/sql/queues/stock-check"})})()}onActionClick(n){console.log(n)}onFilterValueChange(){this.viewTableComponent.filters=this.filtered,this.viewTableComponent.setPage({offset:0})}openLink(n){V.Q.openLink(n.affiliate_link)}getStockCheckView(n){return n.stock_check_reqd?'<div title="Check Stock" class="text-danger"><i class="bi bi-x-circle"></i></div>':'<div title="UnCheck Stock" class="text-success"><i class="bi bi-check2"></i></div>'}onStockCheckClick(n){this.stylistsService.toggleStockCheck(n.product_id,{
1clear:!0}).subscribe(e=>{n.stock_check_reqd=!1,n.last_stock_check=e.last_stock_check})}getLastStockCheckDate(n){return`<div class="date">${n.last_stock_check?this.datePipe.transform(n.last_stock_check,F.vQ.DATES.TIMESTAMP_FORMAT):"NA"}</div>`}onAvailabilityUpdate(n,e){(0,G.in)(this.stylistsService,this.toastService,this.viewTableComponent,n,e)}static{this.\u0275fac=function(e){return new(e||k)(t.rXU(B.Kg),t.rXU(C.Bq),t.rXU(y.L9),t.rXU(l.vh),t.rXU(E.u),t.rXU(h.fw))}}static{this.\u0275cmp=t.VBU({type:k,selectors:[["app-stock"]],viewQuery:function(e,i){if(1&e&&t.GBs(d.NV,5),2&e){let o;t.mGM(o=t.lsd())&&(i.viewTableComponent=o.first)}},hostBindings:function(e,i){1&e&&t.bIt("resize",function(a){return i.onResize(a)},!1,t.tSv)},decls:6,vars:8,consts:[[1,"container-fluid","non-transparent-header","px-0"],[3,"items"],[1,"row","g-0","w-100"],["class","w-100 always-collapsible-filter card card-plain mb-0 p-0",3,"filters","filtered","isAlwaysCollapsible","retainValues","filterId","valueChange",4,"ngIf"],[1,"w-100","mt-2","q-page-container","card","card-plain","mb-0","p-0"],[3,"config"],[1,"w-100","always-collapsible-filter","card","card-plain","mb-0","p-0",3,"valueChange","filters","filtered","isAlwaysCollapsible","retainValues","filterId"]],template:function(e,i){1&e&&(t.j41(0,"div",0),t.nrm(1,"uikit-breadcrumb",1),t.j41(2,"div",2),t.DNE(3,N,1,5,"app-filters",3),t.j41(4,"div",4),t.nrm(5,"app-view-table",5),t.k0s()()()),2&e&&(t.R7$(),t.Y8G("items",t.l_i(5,Q,t.lJ4(3,U),t.lJ4(4,K))),t.R7$(2),t.Y8G("ngIf",i.viewTableComponent),t.R7$(2),t.Y8G("config",i.config))},dependencies:[l.bT,c.Z1,d.NV,h.rm],styles:["[_nghost-%COMP%]     select{width:auto!important}"]})}}(0,m.Cg)([(0,j.S)(F.vQ.DEBOUNCE_INTERVAL)],k.prototype,"onFilterValueChange",null);var Y=r(5312),X=r(6863),v=r(519),x=r(2197),g=r(496),L=r(3011),D=r(3903);function z(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",20)(1,"div",21)(2,"label")(3,"input",22),t.mxI("ngModelChange",function(o){t.eBV(e);const a=t.XpG().$implicit;return t.DH7(a.checked,o)||(a.checked=o),t.Njj(o)}),t.k0s(),t.nrm(4,"span",23),t.k0s()(),t.j41(5,"label",24),t.EFF(6),t.k0s()()}if(2&s){const e=t.XpG().$implicit;t.R7$(3),t.R50("ngModel",e.checked),t.R7$(3),t.E5c("",e.product_id," ",e.product_name?" - ":""," ",e.product_name," ")}}function H(s,n){if(1&s){const e=t.RV6();t.j41(0,"a",25),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2);return t.Njj(o.showMore=!0)}),t.j41(1,"b"),t.EFF(2),t.k0s()()}if(2&s){const e=t.XpG(2);t.R7$(2),t.SpI("+",e.selectedProducts.length-4," more")}}function J(s,n){if(1&s){const e=t.RV6();t.j41(0,"a",25),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2);return t.Njj(o.showMore=!1)}),t.j41(1,"b"),t.EFF(2,"show less"),t.k0s()()}}function q(s,n){if(1&s&&(t.qex(0),t.DNE(1,z,7,4,"div",17),t.j41(2,"div",18),t.DNE(3,H,3,1,"a",19)(4,J,3,0,"a",19),t.k0s(),t.bVm()),2&s){const e=n.index,i=t.XpG();t.R7$(),t.Y8G("ngIf",e<4&&!i.showMore||i.showMore),t.R7$(2),t.Y8G("ngIf",4===e&&!i.showMore),t.R7$(),t.Y8G("ngIf",e===i.selectedProducts.length-1&&i.showMore)}}function W(s,n){1&s&&t.nrm(0,"span",26)}let Z=(()=>{class s{constructor(e,i,o){this.activeModal=e,this.stylistsService=i,this.toastService=o,this.showMore=!1,this.addtoQueueTypes=[{label:"Standard",value:"standard",checked:"standard"},{label:"Segment Based",value:"criteria"}],this.selectedRadio={},this.criteriaConfig=(0,v.UA)(this),this.formData={},this.loading=!1,this.close=new t.bkB,this.selectedRadio=this.addtoQueueTypes[0]}ngOnInit(){this.getFormConfig(),this.selectedProducts&&(this.selectedProducts=this.selectedProducts.map(e=>(e.checked=!0,e)))}getFormConfig(){this.stylistsService.getFilters(this.criteriaConfig.filter(e=>e.filterId).map(e=>e)).subscribe(({filters:e})=>{this.criteriaConfig=R.cloneDeep(this.criteriaConfig.map(i=>(i.filterId&&e[i.filterId]&&(i.data=e[i.filterId]),i)))})}onTypeChange(e){this.selectedRadio=e}onClose(){this.activeModal.dismiss("Cross click")}addToQueue(){const e=this.selectedProducts.filter(o=>o.checked).map(o=>o.product_id);this.loading=!0;const i={products:e,text_date:this.formData.text_date};this.selectedRadio.checked===this.addtoQueueTypes[0].value?i.users=this.toArray(this.formData.user):i.segments=this.toArray(this.formData.segment),this.stylistsService.addToUsersQueues(i).subscribe(o=>{o.duplicates&&o.duplicates.length===e.length?o.duplicates.length&&this.toastService.error({message:"Few products hasn't been added to avoid duplicates."}):this.toastService.success({message:"Products has been added to the user(s) queue."}),this.activeModal.close(!0),this.loading=!1},o=>{const a=(0,x.Yf)(o);this.toastService.error({message:a}),this.loading=!1})}isDisabledAddtoQueue(){return!(!this.loading&&this.selectedProducts.find(e=>e.checked)&&this.isSet(this.selectedRadio.checked===this.addtoQueueTypes[0].value?this.formData.user:this.formData.segment))}isSet(e){return e&&e.trim().length>0}toArray(e){return e&&e.split(",")||[]}static{this.\u0275fac=function(i){return new(i||s)(t.rXU(C.Lw),t.rXU(y.L9),t.rXU(h.fw))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-addto-queue"]],outputs:{close:"close"},decls:23,vars:15,consts:[[1,"modal-content"],["title","Add to Queue",3,"close"],[1,"modal-body","p-3"],[1,"d-flex","justify-content-center"],[1,"d-flex","my-2",3,"onChange","states"],[1,"mt-3","mx-auto","always-collapsible-filter",3,"filters","filtered","isAlwaysCollapsible","retainValues","filterId","applyFilterButton","fullSizeForm"],[1,"filters-form","mt-4"],[1,"input-group","form-group-no-border","products-counts","filter-item","d-flex","align-items-center"],[1,"label","text-end",3,"innerText"],[1,"input-group","form-group-no-border","filter-item","d-flex"],[1,"input"],[4,"ngFor","ngForOf"],[1,"modal-footer","py-2"],[1,"d-flex","justify-content-end"],[1,"btn","btn-default","me-2",3,"click","disabled"],[1,"btn","btn-danger",3,"click","disabled"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],["class","d-flex input-group form-group-no-border",4,"ngIf"],[1,"mt-1"],["class","text-start my-auto text-decoration-none cursor-pointer",3,"click",4,"ngIf"],[1,"d-flex","input-group","form-group-no-border"],[1,"form-check","chekbox-wraper","mb-0","mr-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-check-sign"],[1,"text-start","my-auto","max-width"],[1,"text-start","my-auto","text-decoration-none","cursor-pointer",3,"click"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(i,o){1&i&&(t.j41(0,"div",0)(1,"q-modal-header",1),t.bIt("close",function(){return o.onClose()}),t.k0s(),t.j41(2,"div",2)(3,"div",3)(4,"app-radio-button",4),t.bIt("onChange",function(M){return o.onTypeChange(M)}),t.k0s()(),t.nrm(5,"app-filters",5),t.j41(6,"div",6)(7,"div",7),t.nrm(8,"label",8),t.j41(9,"b"),t.EFF(10),t.k0s()()(),t.j41(11,"div",6)(12,"div",9),t.nrm(13,"label",8),t.j41(14,"div",10),t.DNE(15,q,5,3,"ng-container",11),t.k0s()()()(),t.j41(16,"div",12)(17,"div",13)(18,"button",14),t.bIt("click",function(){return o.onClose()}),t.EFF(19," Close "),t.k0s(),t.j41(20,"button",15),t.bIt("click",function(){return o.addToQueue()}),t.DNE(21,W,1,0,"span",16),t.EFF(22," Add to Queue(s) "),t.k0s()()()()),2&i&&(t.R7$(4),t.Y8G("states",o.addtoQueueTypes),t.R7$(),t.Y8G("filters",o.criteriaConfig)("filtered",o.formData)("isAlwaysCollapsible",!1)("retainValues",!1)("filterId","add-to-queue-inventory")("applyFilterButton",!1)("fullSizeForm",!0),t.R7$(3),t.Y8G("innerText","Total Products:"),t.R7$(2),t.JRh(o.selectedProducts.length),t.R7$(3),t.Y8G("innerText"," "),t.R7$(2),t.Y8G("ngForOf",o.selectedProducts),t.R7$(3),t.Y8G("disabled",o.loading),t.R7$(2),t.Y8G("disabled",o.isDisabledAddtoQueue()),t.R7$(),t.Y8G("ngIf",o.loading))},dependencies:[g.Zm,g.BC,g.vS,l.Sq,l.bT,c.Z1,L.d,D.lp],styles:["[_nghost-%COMP%]     app-dropdown ngb-dropdown, [_nghost-%COMP%]     app-remote-dropdown ngb-dropdown{width:calc(100% - 8em)!important}[_nghost-%COMP%]     app-remote-dropdown[disabled=true]{pointer-events:none;opacity:.5}[_nghost-%COMP%]     .c-btn{min-height:35px!important}[_nghost-%COMP%]     .label{flex-basis:8em;text-align:left!important}[_nghost-%COMP%]     button.close{outline:none!important}[_nghost-%COMP%]     .filters-form{width:calc(79% + 8em)!important;margin:auto}[_nghost-%COMP%]     .filters-form input{z-index:2}[_nghost-%COMP%]     .filters-form app-dropdown>div, [_nghost-%COMP%]     .filters-form app-remote-dropdown>div, [_nghost-%COMP%]     .filters-form app-datepicker>div, [_nghost-%COMP%]     .filters-form app-text-input>div{justify-content:flex-start!important}[_nghost-%COMP%]     .filters-form app-checkbox{flex-basis:12em;margin-left:20px}[_nghost-%COMP%]     .filters-form app-checkbox>div{flex-direction:row-reverse}[_nghost-%COMP%]     .filters-form app-checkbox>div>div{width:40px}[_nghost-%COMP%]     .filters-form app-datepicker{width:100%}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker{width:75%}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker>input{width:100%;height:35px!important}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker .w-200px{width:100%!important}[_nghost-%COMP%]     .filters-form ngb-timepicker input{height:35px!important}[_nghost-%COMP%]     .filters-form scheduled-at .ngb-timepicker-section{width:200
1px}[_nghost-%COMP%]     .filters-form .filter-item>label{margin-top:auto;margin-bottom:auto}[_nghost-%COMP%]     .filters-form .filter-item>input{padding:.7em .5em}[_nghost-%COMP%]     .filters-form .filter-item i.close-icon{display:none}[_nghost-%COMP%]     .filters-form .filter-item .w-200px{width:calc(100% - 9.3rem)!important}[_nghost-%COMP%]     .filters-form .filter-item .w-200px, [_nghost-%COMP%]     .filters-form ngb-dropdown, [_nghost-%COMP%]     .filters-form .datepicker>input, [_nghost-%COMP%]     .filters-form ngb-timepicker input, [_nghost-%COMP%]     .filters-form .q-control-size>*{border:1px solid #ccc!important;border-radius:4px!important;box-sizing:border-box;min-height:35px!important;background-color:#f4f3f1!important;box-shadow:0 .1rem .2rem #00000028!important}[_nghost-%COMP%]     .filters-form q-editor .w-200px>textarea, [_nghost-%COMP%]     .filters-form q-editor .grey-border>textarea{border-radius:4px 4px 0 0!important;border-bottom:1px solid #ccc!important}[_nghost-%COMP%]     .filters-form q-editor .w-200px app-input-panel, [_nghost-%COMP%]     .filters-form q-editor .w-200px app-input-panel>.input-panel, [_nghost-%COMP%]     .filters-form q-editor .grey-border app-input-panel, [_nghost-%COMP%]     .filters-form q-editor .grey-border app-input-panel>.input-panel{border-radius:4px!important}[_nghost-%COMP%]     .readonly-view{opacity:.7}@media screen and (min-width: 900px){.max-width[_ngcontent-%COMP%]{max-width:560px}}@media screen and (max-width: 600px){.max-width[_ngcontent-%COMP%]{max-width:200px}}[_nghost-%COMP%]  .modal-body{max-height:60vh;overflow:scroll}[_nghost-%COMP%]  .chekbox-wraper{height:26px;width:23px}[_nghost-%COMP%]  app-filters{width:100%!important}[_nghost-%COMP%]  .filter-item>.input{width:calc(100% - 8em)!important}","[_nghost-%COMP%]  app-datepicker .datepicker{width:calc(100% - 9.3em)!important}"]})}}return s})();function tt(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",18)(1,"div",19)(2,"label")(3,"input",20),t.mxI("ngModelChange",function(o){t.eBV(e);const a=t.XpG().$implicit;return t.DH7(a.checked,o)||(a.checked=o),t.Njj(o)}),t.k0s(),t.nrm(4,"span",21),t.k0s()(),t.j41(5,"label",22),t.EFF(6),t.k0s()()}if(2&s){const e=t.XpG().$implicit;t.R7$(3),t.R50("ngModel",e.checked),t.R7$(3),t.E5c("",e.product_id," ",e.product_name?" - ":""," ",e.product_name," ")}}function et(s,n){if(1&s){const e=t.RV6();t.j41(0,"a",23),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2);return t.Njj(o.showMore=!0)}),t.j41(1,"b"),t.EFF(2),t.k0s()()}if(2&s){const e=t.XpG(2);t.R7$(2),t.SpI("+",e.selectedProducts.length-4," more")}}function it(s,n){if(1&s){const e=t.RV6();t.j41(0,"a",23),t.bIt("click",function(){t.eBV(e);const o=t.XpG(2);return t.Njj(o.showMore=!1)}),t.j41(1,"b"),t.EFF(2,"show less"),t.k0s()()}}function ot(s,n){if(1&s&&(t.qex(0),t.DNE(1,tt,7,4,"div",15),t.j41(2,"div",16),t.DNE(3,et,3,1,"a",17)(4,it,3,0,"a",17),t.k0s(),t.bVm()),2&s){const e=n.index,i=t.XpG();t.R7$(),t.Y8G("ngIf",e<4&&!i.showMore||i.showMore),t.R7$(2),t.Y8G("ngIf",4===e&&!i.showMore),t.R7$(),t.Y8G("ngIf",e===i.selectedProducts.length-1&&i.showMore)}}function nt(s,n){1&s&&t.nrm(0,"span",24)}let st=(()=>{class s{constructor(e,i,o){this.activeModal=e,this.stylistsService=i,this.toastService=o,this.showMore=!1,this.config=[{label:"Collection(s)",filterType:c.RJ.remote_dropdown,singleSelection:!0,data:[],displayKey:"name",filterKey:"collection_id",filterId:"collection",dataKey:"collections",url:"stylist/collections",host:c.zE.DASHBOARD}],this.formData={},this.loading=!1,this.close=new t.bkB}ngOnInit(){this.selectedProducts&&(this.selectedProducts=this.selectedProducts.map(e=>(e.checked=!0,e)))}onClose(){this.activeModal.dismiss("Cross click")}addToCollection(){const e={products:this.selectedProducts.filter(a=>a.checked).map(a=>a.product_id)};this.loading=!0;const i=this.formData.collection;("ADD"===this.action?this.stylistsService.addToCollection(i,e):this.stylistsService.removeFromCollection(i,e)).subscribe(a=>{this.toastService.success({message:a.message}),this.activeModal.close(!0),this.loading=!1},a=>{const M=(0,x.Yf)(a);this.toastService.error({message:M}),this.loading=!1})}isDisabledAddtoCollections(){return!(!this.loading&&this.selectedProducts.find(e=>e.checked)&&this.isSet(this.formData.collection))}isSet(e){return e&&e.trim().length>0}static{this.\u0275fac=function(i){return new(i||s)(t.rXU(C.Lw),t.rXU(y.L9),t.rXU(h.fw))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-addto-collections"]],outputs:{close:"close"},decls:21,vars:17,consts:[[1,"modal-content"],[3,"close","title"],[1,"modal-body","p-3"],[1,"mt-3","always-collapsible-filter",3,"filters","filtered","isAlwaysCollapsible","retainValues","filterId","applyFilterButton","fullSizeForm"],[1,"filters-form","mt-4"],[1,"input-group","form-group-no-border","products-counts","filter-item","d-flex","align-items-center"],[1,"label","text-end",3,"innerText"],[1,"input-group","form-group-no-border","filter-item","d-flex"],[1,"input"],[4,"ngFor","ngForOf"],[1,"modal-footer","py-2"],[1,"d-flex","justify-content-end"],[1,"btn","btn-default","me-2",3,"click","disabled"],[1,"btn","btn-danger",3,"click","disabled"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],["class","d-flex input-group form-group-no-border",4,"ngIf"],[1,"mt-1"],["class","text-start my-auto text-decoration-none cursor-pointer",3,"click",4,"ngIf"],[1,"d-flex","input-group","form-group-no-border"],[1,"form-check","chekbox-wraper","mb-0","mr-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-check-sign"],[1,"text-start","my-auto","max-width"],[1,"text-start","my-auto","text-decoration-none","cursor-pointer",3,"click"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(i,o){1&i&&(t.j41(0,"div",0)(1,"q-modal-header",1),t.bIt("close",function(){return o.onClose()}),t.k0s(),t.j41(2,"div",2),t.nrm(3,"app-filters",3),t.j41(4,"div",4)(5,"div",5),t.nrm(6,"label",6),t.j41(7,"b"),t.EFF(8),t.k0s()()(),t.j41(9,"div",4)(10,"div",7),t.nrm(11,"label",6),t.j41(12,"div",8),t.DNE(13,ot,5,3,"ng-container",9),t.k0s()()()(),t.j41(14,"div",10)(15,"div",11)(16,"button",12),t.bIt("click",function(){return o.onClose()}),t.EFF(17," Close "),t.k0s(),t.j41(18,"button",13),t.bIt("click",function(){return o.addToCollection()}),t.DNE(19,nt,1,0,"span",14),t.EFF(20),t.k0s()()()()),2&i&&(t.R7$(),t.Mz_("title","","ADD"===o.action?"Add to ":"Remove From "," Collection"),t.R7$(2),t.Y8G("filters",o.config)("filtered",o.formData)("isAlwaysCollapsible",!1)("retainValues",!1)("filterId","add-to-collection-inventory")("applyFilterButton",!1)("fullSizeForm",!0),t.R7$(3),t.Y8G("innerText","Total Products:"),t.R7$(2),t.JRh(o.selectedProducts.length),t.R7$(3),t.Y8G("innerText"," "),t.R7$(2),t.Y8G("ngForOf",o.selectedProducts),t.R7$(3),t.Y8G("disabled",o.loading),t.R7$(2),t.Y8G("disabled",o.isDisabledAddtoCollections()),t.R7$(),t.Y8G("ngIf",o.loading),t.R7$(),t.SpI(" ","ADD"===o.action?"Add to Collection":"Remove from Collection"," "))},dependencies:[g.Zm,g.BC,g.vS,l.Sq,l.bT,c.Z1,D.lp],styles:["[_nghost-%COMP%]     app-dropdown ngb-dropdown, [_nghost-%COMP%]     app-remote-dropdown ngb-dropdown{width:calc(100% - 8em)!important}[_nghost-%COMP%]     app-remote-dropdown[disabled=true]{pointer-events:none;opacity:.5}[_nghost-%COMP%]     .c-btn{min-height:35px!important}[_nghost-%COMP%]     .label{flex-basis:8em;text-align:left!important}[_nghost-%COMP%]     button.close{outline:none!important}[_nghost-%COMP%]     .filters-form{width:calc(79% + 8em)!important;margin:auto}[_nghost-%COMP%]     .filters-form input{z-index:2}[_nghost-%COMP%]     .filters-form app-dropdown>div, [_nghost-%COMP%]     .filters-form app-remote-dropdown>div, [_nghost-%COMP%]     .filters-form app-datepicker>div, [_nghost-%COMP%]     .filters-form app-text-input>div{justify-content:flex-start!important}[_nghost-%COMP%]     .filters-form app-checkbox{flex-basis:12em;margin-left:20px}[_nghost-%COMP%]     .filters-form app-checkbox>div{flex-direction:row-reverse}[_nghost-%COMP%]     .filters-form app-checkbox>div>div{width:40px}[_nghost-%COMP%]     .filters-form app-datepicker{width:100%}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker{width:75%}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker>input{width:100%;height:35px!important}[_nghost-%COMP%]     .filters-form app-datepicker .datepicker .w-200px{width:100%!important}[_nghost-%COMP%]     .filters-form ngb-timepicker input{height:35px!important}[_nghost-%COMP%]     .filters-form scheduled-at .ngb-timepicker-section{width:200
1px}[_nghost-%COMP%]     .filters-form .filter-item>label{margin-top:auto;margin-bottom:auto}[_nghost-%COMP%]     .filters-form .filter-item>input{padding:.7em .5em}[_nghost-%COMP%]     .filters-form .filter-item i.close-icon{display:none}[_nghost-%COMP%]     .filters-form .filter-item .w-200px{width:calc(100% - 9.3rem)!important}[_nghost-%COMP%]     .filters-form .filter-item .w-200px, [_nghost-%COMP%]     .filters-form ngb-dropdown, [_nghost-%COMP%]     .filters-form .datepicker>input, [_nghost-%COMP%]     .filters-form ngb-timepicker input, [_nghost-%COMP%]     .filters-form .q-control-size>*{border:1px solid #ccc!important;border-radius:4px!important;box-sizing:border-box;min-height:35px!important;background-color:#f4f3f1!important;box-shadow:0 .1rem .2rem #00000028!important}[_nghost-%COMP%]     .filters-form q-editor .w-200px>textarea, [_nghost-%COMP%]     .filters-form q-editor .grey-border>textarea{border-radius:4px 4px 0 0!important;border-bottom:1px solid #ccc!important}[_nghost-%COMP%]     .filters-form q-editor .w-200px app-input-panel, [_nghost-%COMP%]     .filters-form q-editor .w-200px app-input-panel>.input-panel, [_nghost-%COMP%]     .filters-form q-editor .grey-border app-input-panel, [_nghost-%COMP%]     .filters-form q-editor .grey-border app-input-panel>.input-panel{border-radius:4px!important}[_nghost-%COMP%]     .readonly-view{opacity:.7}@media screen and (min-width: 900px){.max-width[_ngcontent-%COMP%]{max-width:560px}}@media screen and (max-width: 600px){.max-width[_ngcontent-%COMP%]{max-width:200px}}[_nghost-%COMP%]  .modal-body{max-height:60vh;overflow:scroll}[_nghost-%COMP%]  .chekbox-wraper{height:26px;width:23px}[_nghost-%COMP%]  app-filters{width:100%!important}[_nghost-%COMP%]  .filter-item>.input{width:calc(100% - 8em)!important}"]})}}return s})();var u=r(118);const I={age_limit:{label:"Age Limit",type:u.Q0.dropdown,data:v.z$,fieldId:"age_limit_id",displayKey:"age_limit",primaryKey:"age_limit_id"},availability:{label:"Availability",type:u.Q0.dropdown,fieldId:"availability_id",displayKey:"availability",primaryKey:"availability_id"},gender:{label:"Gender",type:u.Q0.dropdown,fieldId:"gender_id",displayKey:"gender",primaryKey:"gender_id"},bucket:{label:"Bucket",type:u.Q0.multi_dropdown,fieldId:"bucket_id",displayKey:"bucket",primaryKey:"bucket_id"},category:{label:"Category",type:u.Q0.dropdown,fieldId:"category_id",displayKey:"category",primaryKey:"category_id"},sizings:{label:"Sizing",type:u.Q0.multi_dropdown,fieldId:"sizing_id",displayKey:"sizing",primaryKey:"sizing_id"},style_group:{label:"Style Group",type:u.Q0.multi_dropdown,fieldId:"style_group_id",displayKey:"style_group",primaryKey:"style_group_id"},favorite:{label:"Favorite",type:u.Q0.tristate_checkbox,fieldId:"favorite"}};var rt=r(3001);function at(s,n){if(1&s&&t.nrm(0,"q-dform",11),2&s){const e=t.XpG();t.Y8G("isNew",!0)("fields",e.formFieldsConfig)}}function lt(s,n){1&s&&t.nrm(0,"span",12)}let dt=(()=>{class s{constructor(e,i,o){this.activeModal=e,this.stylistService=i,this.toastService=o,this.loading=!1,this.filterDataInprogress=!0,this.selectedProducts=[],this.formFieldsConfig=[],this.fieldsData=[],this.close=new t.bkB}ngOnInit(){this.getMasterData()}getMasterData(){this.fieldsData.forEach(e=>{I[e.filterId]&&(I[e.filterId].data=e.data)});for(let e in I)this.formFieldsConfig.push(I[e]);this.filterDataInprogress=!1}saveBatchProduct(){this.loading=!0;const e=this.selectedProducts.map(o=>o.product_id),i={...this.uikitFormComponent.getRawValues(),products:e};this.stylistService.updateProducts(i).subscribe({next:()=>{this.selectedProducts=[],this.activeModal.close(!0)},error:o=>{const a=(0,x.Yf)(o);this.toastService.error({message:a}),this.loading=!1}})}isDisabled(){let e=this.uikitFormComponent?.getRawValues()||{};return!(Object.keys(e)?.length||this.loading)}onClose(){this.activeModal.dismiss("Cross click")}static{this.\u0275fac=function(i){return new(i||s)(t.rXU(C.Lw),t.rXU(y.L9),t.rXU(h.fw))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["batch-product-update"]],viewQuery:function(i,o){if(1&i&&t.GBs(u.q1,5),2&i){let a;t.mGM(a=t.lsd())&&(o.uikitFormComponent=a.first)}},outputs:{close:"close"},decls:13,vars:8,consts:[[1,"modal-content"],[3,"close","title"],[1,"modal-body","p-3"],[1,"filters-form","row","m-0","p-2"],[3,"isNew","fields",4,"ngIf"],[3,"visible"],[1,"modal-footer","py-2"],[1,"d-flex","justify-content-end"],[1,"btn","btn-default","me-2",3,"click","disabled"],[1,"btn","btn-danger",3,"click","disabled"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],[3,"isNew","fields"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(i,o){1&i&&(t.j41(0,"div",0)(1,"q-modal-header",1),t.bIt("close",function(){return o.onClose()}),t.k0s(),t.j41(2,"div",2)(3,"div",3),t.DNE(4,at,1,2,"q-dform",4),t.nrm(5,"app-loader",5),t.k0s()(),t.j41(6,"div",6)(7,"div",7)(8,"button",8),t.bIt("click",function(){return o.onClose()}),t.EFF(9," Close "),t.k0s(),t.j41(10,"button",9),t.bIt("click",function(){return o.saveBatchProduct()}),t.DNE(11,lt,1,0,"span",10),t.EFF(12),t.k0s()()()()),2&i&&(t.R7$(),t.Mz_("title","Update ",(null==o.selectedProducts?null:o.selectedProducts.length)>1?(null==o.selectedProducts?null:o.selectedProducts.length)+" Product(s)":"Product",""),t.R7$(3),t.Y8G("ngIf",!o.filterDataInprogress),t.R7$(),t.Y8G("visible",o.filterDataInprogress),t.R7$(3),t.Y8G("disabled",o.loading),t.R7$(2),t.Y8G("disabled",o.isDisabled()),t.R7$(),t.Y8G("ngIf",o.loading),t.R7$(),t.SpI(" Update ",(null==o.selectedProducts?null:o.selectedProducts.length)>1?(null==o.selectedProducts?null:o.selectedProducts.length)+" Product(s)":"Product"," "))},dependencies:[l.bT,u.q1,rt.V,D.lp],styles:["[_nghost-%COMP%]     .filters-form>.form-row{gap:15px}[_nghost-%COMP%]     .filters-form>.form-row .filter-item>label{text-align:left!important;width:10em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}[_nghost-%COMP%]     .filters-form>.form-row .filter-item>
1.checkbox{width:200px!important}[_nghost-%COMP%]     .filters-form>.form-row .filter-item .w-200px{border:1px solid #ccc!important;border-radius:4px!important;background-color:#f4f3f1!important;box-shadow:0 .1rem .2rem #00000028!important}[_nghost-%COMP%]     .p-paginator{font-size:14px;font-weight:700;padding:0!important}[_nghost-%COMP%]     .p-paginator .p-link svg{width:2rem;height:2rem}[_nghost-%COMP%]     .fields-separator{padding-top:16px;border-top:1px solid #cccccc}",".modal-body[_ngcontent-%COMP%]{overflow:unset!important}"]})}}return s})();var ct=r(3769);const pt=()=>({label:"Inventory"}),mt=()=>({label:"Overview"}),ft=(s,n)=>[s,n];function ut(s,n){if(1&s){const e=t.RV6();t.j41(0,"app-filters",10),t.bIt("valueChange",function(){t.eBV(e);const o=t.XpG();return t.Njj(o.onFilterValueChange())}),t.k0s()}if(2&s){const e=t.XpG();t.Y8G("filters",e.filters)("filtered",e.filtered)("isAlwaysCollapsible",!0)("retainValues",e.config.filtersValueRetain)("filterId","sc-inventory")}}class w extends X.v{constructor(n,e,i,o,a){super(n,e),this.deviceService=n,this.authService=e,this.ngbModal=i,this.stylistsService=o,this.toastService=a,this.filterConfig=v.zn,this.config={url:"stylist/inventory/sql",dataKey:"products",page:new A.xf(100),selection:!0,columns:(0,v.Vc)(this),contextMenuConfig:(0,v.hl)(this),noContentMessage:"No Products found",filtersValueRetain:!0,host:c.zE.DASHBOARD},this.filtered={},this.styleGroups=[],this.copyAffiliateLinkMsg="Copy affiliate link to clipboard",this.config.page.pageNumber=0,this.filters=(0,v.Hu)(this)}ngOnInit(){super.ngOnInit(),this.getMasterData()}getMasterData(){const n=this.filters.filter(e=>e.filterId).map(e=>e);this.stylistsService.getFilters([...n,{filterId:"bucket"},{filterId:"availability"}]).subscribe(({filters:e})=>{this.filters=R.cloneDeep(this.filters.map(i=>(i.filterId&&(i.data=e[i.filterId]||i.data),i))),this.config.columns=this.config.columns.map(i=>("bucket"===i.displayKey&&(i.options=e.bucket),"style_group"===i.displayKey&&(this.styleGroups=e.style_group,i.options=e.style_group),i))})}productIdView(n){return n?.affiliate_link?`<div class="d-flex justify-content-between">\n          <a href="javascript:void()">${n.product_id}</a>\n          <i class="z-2 cursor-pointer py-0 copy-affiliate_link pi pi-copy"  title="${this.copyAffiliateLinkMsg}"></i>\n        </div>`:n.product_id}openLink(n,e){e?.target?.className.includes("copy-affiliate_link")?this.showTooltip(e.target,n.affiliate_link,this.copyAffiliateLinkMsg):V.Q.openLink(n.affiliate_link)}openAddQueuePopup(){if(this.viewTableComponent.selected.length>0){const n=this.ngbModal.open(Z,{centered:!0,scrollable:!0,size:"lg"});n.componentInstance.selectedProducts=this.viewTableComponent.selected,n.componentInstance.close.subscribe(),n.result.then(e=>{!0===e&&(n.componentInstance.selectedProducts=[],this.viewTableComponent.selected=[])},e=>{})}else this.toastService.error({message:"Please select 1 or more products."})}openAddCollectionsPopup(n){if(this.viewTableComponent.selected.length>0){const e=this.ngbModal.open(st,{centered:!0,size:"lg"});e.componentInstance.action=n?"ADD":"REMOVE",e.componentInstance.selectedProducts=this.viewTableComponent.selected,e.componentInstance.close.subscribe(),e.result.then(i=>{!0===i&&(e.componentInstance.selectedProducts=[],this.viewTableComponent.selected=[],this.refreshInventory())},i=>{})}else this.toastService.error({message:"Please select 1 or more products."})}updateProducts(){if(this.viewTableComponent.selected.length>0){const n=this.ngbModal.open(dt,{centered:!0,size:"lg",windowClass:"app-stylists-detail"});n.componentInstance.fieldsData=this.filters,n.componentInstance.selectedProducts=this.viewTableComponent.selected,n.componentInstance.close.subscribe(),n.result.then(e=>{!0===e&&(n.componentInstance.selectedProducts=[],this.viewTableComponent.selected=[],this.refreshInventory())},e=>{})}else this.toastService.error({message:"Please select 1 or more products."})}onFilterValueChange(){this.refreshInventory()}onSearchKeywordsChange(n){this.tags=n,this.refreshInventory()}refreshInventory(){this.viewTableComponent.filters=this.getFilters(),this.viewTableComponent.setPage({offset:0})}getFilters(){let n="";return this.tags&&this.tags.length&&(n=this.tags.map(e=>e.value).join()),{...this.filtered,searchString:n}}onUpdate(n,e,i){(0,G.Lv)(n,this.stylistsService,this.toastService,this.viewTableComponent,e,i,this.getOptions(n))}getFavoriteView(n){return n.favorite?'<div title="Click to remove from favorites" class="text-success"><i class="bi bi-check2"></i></div>':'<div title="Click to Mark Favorite" class="text-danger"><i class="bi bi-x-circle"></i></div>'}getWebOnlyView(n){return n.web_only?'<div  class="text-success"><i class="bi bi-check2"></i></div>':""}onFavoriteClick(n){this.stylistsService.updateProduct(n.product_id,{favorite:!n.favorite}).subscribe(e=>{this.toastService.success({message:`Product has been ${n.favorite?"removed from favorites":"marked favorite"}.`}),this.viewTableComponent.rows.filter(i=>i.product_id===n.product_id).map(i=>{i.favorite=!n.favorite})},e=>{const i=(0,x.Yf)(e);this.toastService.error({message:i})})}productsKey(n){return`${n.product_id} - ${n.product_name}`}getOptions(n){const e=this.filters.find(i=>i.filterId===n);return e?e.data:null}downloadProducts(n){if(this.viewTableComponent.config.page.totalElements>0){const e=Y.c.CSV_FILE_ROWS_LIMIT;if(this.viewTableComponent.config.page.totalElements>e)this.toastService.error({message:`Max ${e} products can be downloaded.`});else{n.loading=!0;const i={limit:e,...this.viewTableComponent.filters};this.stylistsService.downloadFile(`${this.stylistsService.appBaseUrl}/inventory`,i,o=>{n.loading=!1})}}else this.toastService.error({message:"No products available to download."})}static{this.\u0275fac=function(e){return new(e||w)(t.rXU(B.Kg),t.rXU(E.u),t.rXU(C.Bq),t.rXU(y.L9),t.rXU(h.fw))}}static{this.\u0275cmp=t.VBU({type:w,selectors:[["app-inventory"]],viewQuery:function(e,i){if(1&e&&t.GBs(d.NV,5),2&e){let o;t.mGM(o=t.lsd())&&(i.viewTableComponent=o.first)}},features:[t.Vt3],decls:10,vars:11,consts:[[1,"container-fluid","non-transparent-header","px-0"],[3,"items"],[1,"row","g-0","w-100"],[1,"card","card-plain","mb-0","p-0","filter-merged"],["class","w-100 always-collapsible-filter",3,"filters","filtered","isAlwaysCollapsible","retainValues","filterId","valueChange",4,"ngIf"],[1,"form-row","m-0","row","g-0","w-100","always-collapsible-filter"],[1,"col-9","min-w350"],[3,"onChange","config","disabled"],[1,"w-100","mt-2","q-page-container","card","card-plain","mb-0","p-0"],[3,"config","enableDefaultTableBodyHeight"],[1,"w-100","always-collapsible-filter",3,"valueChange","filters","filtered","isAlwaysCollapsible","retainValues","filterId"]],template:function(e,i){1&e&&(t.j41(0,"div",0),t.nrm(1,"uikit-breadcrumb",1),t.j41(2,"div",2)(3,"div",3),t.DNE(4,ut,1,5,"app-filters",4),t.j41(5,"div",5)(6,"div",6)(7,"app-multi-tag-input",7),t.bIt("onChange",function(a){return i.onSearchKeywordsChange(a)}),t.k0s()()()(),t.j41(8,"div",8),t.nrm(9,"app-view-table",9),t.k0s()()()),2&e&&(t.R7$(),t.Y8G("items",t.l_i(8,ft,t.lJ4(6,pt),t.lJ4(7,mt))),t.R7$(3),t.Y8G("ngIf",i.viewTableComponent),t.R7$(3),t.Y8G("config",i.filterConfig)("disabled",null==i.viewTableComponent?null:i.viewTableComponent.loading),t.R7$(2),t.Y8G("config",i.config)("enableDefaultTableBodyHeight",!0))},dependencies:[l.bT,c.Z1,ct.T,d.NV,h.rm],styles:["[_nghost-%COMP%]     .min-w350{min-width:350px}[_nghost-%COMP%]     .min-w170{min-width:170px}[_nghost-%COMP%]     datatable-body{height:calc(100vh - 323px)!important}"]})}}(0,m.Cg)([(0,j.S)(F.vQ.DEBOUNCE_INTERVAL)],w.prototype,"refreshInventory",null);var ht=r(9950),gt=r(4133),_t=r(4939);let bt=(()=>{class s{static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=t.$C({type:s})}static{this.\u0275inj=t.G2t({providers:[h.fw],imports:[g.YN,l.MD,O.k,gt.R,ht.h,_.E,h.rm,_t.ad,T.iI.forChild([{path:"",redirectTo:"overview",pathMatch:"full"},{path:"overview",component:w,data:{title:"Inventory"}},{path:"stock",component:k,data:{title:"Stock Check"}},{path:"collections",loadChildren:()=>Promise.all([r.e(7301),r.e(6842)]).then(r.bind(r,6842)).then(e=>e.CollectionsModule)}])]})}}return s})()}}]);
2//# sourceMappingURL=8840.f256c51717b57157.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.