marketplacepos 5.27.1 → 5.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/Marketplace/{chunk-FBBV333P.js → chunk-2BQOICNG.js} +1 -1
  2. package/Marketplace/{chunk-J73WANXO.js → chunk-2H6ZWOFG.js} +1 -1
  3. package/Marketplace/{chunk-QPOKPYKN.js → chunk-2RI4B7LO.js} +1 -1
  4. package/Marketplace/{chunk-LFO4SCWH.js → chunk-4BUKVDBU.js} +1 -1
  5. package/Marketplace/{chunk-PFSBYBSC.js → chunk-4JOPLIQJ.js} +1 -1
  6. package/Marketplace/{chunk-VO7GA6OK.js → chunk-6CB4LR3W.js} +1 -1
  7. package/Marketplace/{chunk-KPJODN5E.js → chunk-7UOJBC4V.js} +1 -1
  8. package/Marketplace/{chunk-7K2MZBIS.js → chunk-CIRDMGSF.js} +1 -1
  9. package/Marketplace/{chunk-46R7IHUN.js → chunk-DUUSY6VM.js} +1 -1
  10. package/Marketplace/{chunk-2YMECMSR.js → chunk-DXYJV443.js} +1 -1
  11. package/Marketplace/{chunk-YH6ZV7UM.js → chunk-FOM2CM2O.js} +1 -1
  12. package/Marketplace/{chunk-7MJLGWGO.js → chunk-GBMUF46A.js} +1 -1
  13. package/Marketplace/chunk-GJ74CI7M.js +2 -0
  14. package/Marketplace/{chunk-BH24WP3G.js → chunk-HOQSPMPT.js} +1 -1
  15. package/Marketplace/{chunk-H34Q3GYZ.js → chunk-HUXTG7WF.js} +1 -1
  16. package/Marketplace/{chunk-5MDJ736Z.js → chunk-I2TLXLNK.js} +1 -1
  17. package/Marketplace/{chunk-CBTOH6MR.js → chunk-IDQSVSAG.js} +1 -1
  18. package/Marketplace/{chunk-WX2SZ2RT.js → chunk-J35KGN2V.js} +1 -1
  19. package/Marketplace/{chunk-B5G3NXGZ.js → chunk-L5FWRRHO.js} +1 -1
  20. package/Marketplace/{chunk-W2YE2TMM.js → chunk-MYO55CG2.js} +1 -1
  21. package/Marketplace/{chunk-F56CFYMK.js → chunk-NLVUCMGP.js} +1 -1
  22. package/Marketplace/{chunk-EIVRD47O.js → chunk-POBTFM62.js} +1 -1
  23. package/Marketplace/{chunk-RJQGJK46.js → chunk-R6KGFJJ4.js} +1 -1
  24. package/Marketplace/{chunk-BGVNHOVR.js → chunk-TFGY2CZB.js} +1 -1
  25. package/Marketplace/{chunk-PKLEOUHF.js → chunk-U4LZH7TG.js} +1 -1
  26. package/Marketplace/{chunk-WG37UJWV.js → chunk-UUFP2LR3.js} +1 -1
  27. package/Marketplace/{chunk-YS4NTLQO.js → chunk-UWMOSIYY.js} +1 -1
  28. package/Marketplace/{chunk-SBRCDNLE.js → chunk-V7DEJOKT.js} +1 -1
  29. package/Marketplace/{chunk-5GM7EMCW.js → chunk-VAMLKDPP.js} +1 -1
  30. package/Marketplace/{chunk-LEUYZTMQ.js → chunk-VEZAEJT2.js} +2 -2
  31. package/Marketplace/{chunk-WU6F5N6K.js → chunk-VRAUYPKY.js} +1 -1
  32. package/Marketplace/{chunk-4A32CGYJ.js → chunk-WHPQD3IT.js} +1 -1
  33. package/Marketplace/{chunk-3Q2URG6A.js → chunk-YVBVZE4E.js} +1 -1
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-7O2YU7WU.js → main-LTGHVS57.js} +1 -1
  36. package/package.json +1 -1
  37. package/Marketplace/chunk-W56SA7JQ.js +0 -2
@@ -1 +1 @@
1
- import"./chunk-KPJODN5E.js";import{a as Ue}from"./chunk-7LZ5ZSXM.js";import{a as X}from"./chunk-XHAXYWZ7.js";import{a as Ae,b as We,c as te}from"./chunk-DLNXH2FE.js";import{a as xe}from"./chunk-BVIRHZTZ.js";import{a as $e}from"./chunk-QNKFNW7X.js";import{a as Ne}from"./chunk-7KG3DC5J.js";import{b as Re}from"./chunk-DDHEMRO7.js";import{a as Le}from"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as ke}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as De,b as Oe,c as Ve}from"./chunk-UMNGKENU.js";import{a as Be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as ye,b as Ie,d as we,e as Fe}from"./chunk-CCXKODFV.js";import{j as K}from"./chunk-5GM7EMCW.js";import{b as Pe,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Me,m as Ee,n as Te}from"./chunk-BO4PPSB5.js";import{t as H,u as J}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{a as Ce,b as fe,h as k,m as B,y as L}from"./chunk-BSN7ZAXG.js";import{c as G,e as Se,f as ve}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as he,Cd as N,Da as C,Ea as f,Eb as u,G as Z,Gb as s,Gc as y,Hc as T,Ic as de,Jb as ce,Jc as ee,Ma as Y,Nb as W,Ob as R,Pa as re,Qb as $,Rb as U,Sb as r,Tb as l,Ub as P,Vb as I,Wb as w,Yb as b,Z as q,bc as m,ea as ae,ec as se,gb as S,jb as c,kb as v,mc as Q,nc as p,oc as me,pa as A,pc as x,rc as F,sc as M,sd as _e,ta as D,tc as E,uc as j,ud as z,v as oe,vc as O,vd as ue,xb as le,xc as V,yc as pe,yd as ge}from"./chunk-PQDPS2ID.js";import{a as ne,b as ie}from"./chunk-GNOSNGXM.js";var qe=(n,a)=>({color:n,"font-weight":a});function Ye(n,a){if(n&1&&(r(0,"mat-radio-button",2),p(1),l()),n&2){let i=a.$implicit,o=a.index,e=m();ce(pe(7,qe,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),c(),x("",i.Value," ")}}var Ge=(()=>{let a=class a{constructor(){this.disabled=!1,this.modelChange=new re,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[O],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,t){e&1&&(r(0,"mat-radio-group",0),g("ngModelChange",function(_){return t.change(_)}),u(1,Ye,2,10,"mat-radio-button",1),l()),e&2&&(s("disabled",t.disabled)("ngModel",t.model),c(),s("ngForOf",t.options))},dependencies:[N,z,Ve,De,Oe,L,k,B,J,H],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let n=a;return n})();function Qe(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l()),n&2){let i=a.item;c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," ")}}function et(n,a){if(n&1){let i=b();r(0,"span",6),g("click",function(){C(i);let e=m(),t=e.item,d=e.clear;return f(d(t))}),p(1,"x"),l()}}function tt(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l(),u(4,et,2,0,"span",5)),n&2){let i=a.item,o=m();c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," "),c(),W(o.clearable()?4:-1)}}var Ke=(()=>{let a=class a{constructor(){this.authService=A(K),this.multiple=Y(!1),this.clearable=Y(!0),this.options=this.authService.getChannels(),this.onChange=o=>{}}onChannelChange(o){this.onChange(o)}writeValue(o){this.selectedChannels=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},standalone:!0,features:[j([{provide:Ce,multi:!0,useExisting:a}]),O],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(e,t){e&1&&(r(0,"ng-select",0),E("ngModelChange",function(_){return M(t.selectedChannels,_)||(t.selectedChannels=_),_}),g("ngModelChange",function(_){return t.onChannelChange(_)}),u(1,Qe,4,2,"ng-template",1)(2,tt,5,3,"ng-template",2),l()),e&2&&(s("clearable",t.clearable())("items",t.options),F("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[N,Fe,we,ye,Ie,L,k,B]});let n=a;return n})();var He=n=>[n],nt=n=>({"text-decoration-line-through":n}),it=n=>({"border-bottom":n}),ot=n=>({"bg-gradient-warning":n});function at(n,a){if(n&1){let i=b();I(0),r(1,"div")(2,"label",21),p(3,"Channel"),l(),r(4,"channel-select-options",22),E("ngModelChange",function(e){C(i);let t=m();return M(t.searchFilter.ListChannelID,e)||(t.searchFilter.ListChannelID=e),f(e)}),l()(),r(5,"div",23)(6,"label",24),p(7,"Filter by"),l(),r(8,"lib-radio-options",25),E("modelChange",function(e){C(i);let t=m();return M(t.searchFilter.filterModel,e)||(t.searchFilter.filterModel=e),f(e)}),l()(),w()}if(n&2){let i=m();c(4),s("multiple",!0),F("ngModel",i.searchFilter.ListChannelID),c(4),F("model",i.searchFilter.filterModel),s("options",i.filterTypeOptions)}}function rt(n,a){if(n&1){let i=b();r(0,"button",27),g("click",function(){C(i);let e=m().ngIf,t=m();return f(t.onUpdateItems(e))}),P(1,"i",28),p(2," Update "),l()}}function lt(n,a){if(n&1&&(I(0),r(1,"div",4),u(2,rt,3,0,"button",26),l(),w()),n&2){let i=a.ngIf,o=m();c(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function ct(n,a){if(n&1&&(r(0,"th",15)(1,"div",29),P(2,"img",30),r(3,"div",31),p(4),y(5,"stringLimit"),l()()()),n&2){let i=a.$implicit;c(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),c(),s("src",i==null?null:i.Img,S),c(2),x(" ",de(5,3,i.Name,20)," ")}}function st(n,a){if(n&1){let i=b();r(0,"th")(1,"input",32),E("ngModelChange",function(e){C(i);let t=m();return M(t.checkboxState,e)||(t.checkboxState=e),f(e)}),g("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),l()()}if(n&2){let i=m();c(),F("ngModel",i.checkboxState)}}function mt(n,a){n&1&&(r(0,"th",33)(1,"span"),p(2,"Expected"),l(),r(3,"span",34),p(4,"(POS)"),l()(),r(5,"th",33),p(6,"Channel"),l())}function pt(n,a){if(n&1){let i=b();r(0,"img",47),g("click",function(e){C(i);let t=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,t==null?null:t.ImageUrl))}),l()}if(n&2){let i=m(3).$implicit;se("src",i==null?null:i.ImageUrl,S)}}function dt(n,a){n&1&&P(0,"img",48)}function _t(n,a){if(n&1&&(r(0,"small",46),p(1),l()),n&2){let i=m(3).$implicit;c(),x("(",i==null?null:i.Category,")")}}function ut(n,a){if(n&1&&(I(0),r(1,"td",42),u(2,pt,1,1,"img",43)(3,dt,1,0,"ng-template",null,0,ee),l(),r(5,"td",44)(6,"h5",45),p(7),l(),u(8,_t,2,1,"small",46),l(),w()),n&2){let i=Q(4),o=m().$index,e=m().$implicit,t=m().ngIf;c(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",V(7,it,o+1==t.length)),c(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),c(3),s("rowSpan",e==null?null:e.Variants.length),c(2),me(e==null?null:e.Name),c(),W(e!=null&&e.Category?8:-1)}}function gt(n,a){if(n&1){let i=b();r(0,"td",49)(1,"input",32),E("ngModelChange",function(e){C(i);let t=m().$implicit;return M(t.selected,e)||(t.selected=e),f(e)}),l()()}if(n&2){let i=m().$implicit;c(),F("ngModel",i.selected)}}function ht(n,a){if(n&1){let i=b();I(0),r(1,"td",51),p(2),y(3,"number"),l(),r(4,"td",52),g("click",function(){let e=C(i).$implicit,t=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(t,d,e))}),r(5,"div",53)(6,"div",54),p(7),y(8,"number"),l(),r(9,"a",55),g("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),P(10,"i",40),l()()(),w()}if(n&2){let i=a.$implicit;c(2),x(" ",T(3,4,i.PriceExpected)," "),c(2),s("ngClass",V(8,ot,i.Price!=i.PriceExpected)),c(3),x(" ",T(8,6,i.Price)," "),c(2),s("href",i.Url,S)}}function Ct(n,a){n&1&&(r(0,"td",56),p(1," X "),l(),r(2,"td",56),p(3," X "),l())}function ft(n,a){if(n&1&&(I(0),u(1,ht,11,10,"ng-container",50)(2,Ct,4,0,"ng-template",null,1,ee),w()),n&2){let i=a.$implicit,o=Q(3),e=m().$implicit,t=m(3);c(),s("ngIf",t.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function xt(n,a){if(n&1&&(r(0,"tr"),u(1,ut,9,9,"ng-container",3),r(2,"td",35),p(3),l(),r(4,"td",36)(5,"div",37)(6,"div",38),p(7),l(),r(8,"div",31)(9,"a",39),P(10,"i",40),l()()()(),u(11,gt,2,1,"ng-template",19)(12,ft,4,2,"ng-container",41),l()),n&2){let i=a.$implicit,o=a.$index,e=m(3);c(),s("ngIf",o==0),c(2),x(" ",i==null?null:i.Model," "),c(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),c(2),s("ngClass",V(8,nt,i.Discontinued)),c(),x(" ",i==null?null:i.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),S),c(2),s("ngxPermissionsOnly",V(10,He,e.rolePriceEdit)),c(),s("ngForOf",e.channels())}}function Pt(n,a){if(n&1&&(r(0,"tbody"),$(1,xt,13,12,"tr",null,R),l()),n&2){let i=a.$implicit;c(),U(i.Variants)}}function bt(n,a){if(n&1&&(I(0),$(1,Pt,3,0,"tbody",null,R),w()),n&2){let i=a.ngIf;c(),U(i)}}var xn=(()=>{let a=class a{constructor(o,e,t,d,_,h,Je){this.http=o,this.toastr=e,this.dialog=t,this.productService=d,this.authService=_,this.biggerPictureService=h,this.paginationService=Je,this.infinitePagination=A(te),this.searchFilter=new Ne,this.checkboxState=!1,this.rolePriceEdit=xe.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=le([]),this.filterTypeOptions=[{Key:X.ALL,Value:"All"},{Key:X.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let o=this.searchFilter.ListChannelID,e=[];G.IsEmpty(o)||o?.length==0?e=this.channelOptions:e=this.channelOptions.filter(t=>o.findIndex(d=>d==t.ID)>-1),this.channels.update(()=>e)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ae(o=>{this.searchFilter=o.Filter,this.searchFilter.filterModel=X.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),q(1))}onSelectAllData(){this.data$=this.data$.pipe(oe(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(t=>(t.selected=this.checkboxState,t))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e=ie(ne({},this.searchFilter),{text:o,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let t=e.map(h=>h.ID),_={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(t=>t.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Ue,{data:{title:"Updating Price",selectedItems:e,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(Z(t=>G.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(o)})}openTableDialog(o,e,t){let d=JSON.parse(JSON.stringify(o));this.dialog.open(Ae,{data:{Name:e.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(Z(h=>G.IsNotEmpty(h))).subscribe(h=>{this.updateProductPrice(h,t)})}updateProductPrice(o,e){let t={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(d=>{e.Price=t.Price;let _=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Re,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};a.\u0275fac=function(e){return new(e||a)(v(be),v(Pe),v(Me),v(ke),v(K),v(Be),v($e))},a.\u0275cmp=D({type:a,selectors:[["app-custom-channel-price"]],standalone:!0,features:[j([te]),O],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,t){e&1&&(r(0,"mainpanel",2),g("onSubmit",function(_){return t.onFilter(_)}),r(1,"filters"),u(2,at,9,4,"ng-container",3),y(3,"async"),l(),r(4,"actions")(5,"div",4),u(6,lt,3,1,"ng-container",3),y(7,"async"),r(8,"button",5),g("click",function(){return t.openExportDialog()}),P(9,"i",6),r(10,"span"),p(11,"Export"),l()()()(),r(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),$(21,ct,6,6,"th",15,R),l(),r(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),l()(),r(27,"th",17),p(28,"Variant"),l(),r(29,"th",18),p(30,"SKU"),l(),u(31,st,2,1,"ng-template",19),$(32,mt,7,0,null,null,R),l()(),u(34,bt,3,0,"ng-container",3),y(35,"async"),l(),r(36,"infinite-paginator",20),y(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),l()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),c(2),s("ngIf",T(3,13,t.loader$)),c(4),s("ngIf",T(7,15,t.data$)),c(15),U(t.channels()),c(10),s("ngxPermissionsOnly",V(21,He,t.rolePriceEdit)),c(),U(t.channels()),c(2),s("ngIf",T(35,17,t.data$)),c(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",T(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[N,_e,z,ue,ge,he,Te,Ee,L,fe,k,B,We,Ge,J,H,Le,ve,Se,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let n=a;return n})();export{xn as CustomChannelPriceComponent};
1
+ import"./chunk-7UOJBC4V.js";import{a as Ue}from"./chunk-7LZ5ZSXM.js";import{a as X}from"./chunk-XHAXYWZ7.js";import{a as Ae,b as We,c as te}from"./chunk-DLNXH2FE.js";import{a as xe}from"./chunk-BVIRHZTZ.js";import{a as $e}from"./chunk-QNKFNW7X.js";import{a as Ne}from"./chunk-7KG3DC5J.js";import{b as Re}from"./chunk-DDHEMRO7.js";import{a as Le}from"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as ke}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as De,b as Oe,c as Ve}from"./chunk-UMNGKENU.js";import{a as Be}from"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{a as ye,b as Ie,d as we,e as Fe}from"./chunk-CCXKODFV.js";import{j as K}from"./chunk-VAMLKDPP.js";import{b as Pe,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Me,m as Ee,n as Te}from"./chunk-BO4PPSB5.js";import{t as H,u as J}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{a as Ce,b as fe,h as k,m as B,y as L}from"./chunk-BSN7ZAXG.js";import{c as G,e as Se,f as ve}from"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as he,Cd as N,Da as C,Ea as f,Eb as u,G as Z,Gb as s,Gc as y,Hc as T,Ic as de,Jb as ce,Jc as ee,Ma as Y,Nb as W,Ob as R,Pa as re,Qb as $,Rb as U,Sb as r,Tb as l,Ub as P,Vb as I,Wb as w,Yb as b,Z as q,bc as m,ea as ae,ec as se,gb as S,jb as c,kb as v,mc as Q,nc as p,oc as me,pa as A,pc as x,rc as F,sc as M,sd as _e,ta as D,tc as E,uc as j,ud as z,v as oe,vc as O,vd as ue,xb as le,xc as V,yc as pe,yd as ge}from"./chunk-PQDPS2ID.js";import{a as ne,b as ie}from"./chunk-GNOSNGXM.js";var qe=(n,a)=>({color:n,"font-weight":a});function Ye(n,a){if(n&1&&(r(0,"mat-radio-button",2),p(1),l()),n&2){let i=a.$implicit,o=a.index,e=m();ce(pe(7,qe,e.model==i.Key&&e.activeBold?"#0976b4":"",e.model==i.Key&&e.activeBold?"700":"")),s("disabled",e.exception==i.Value)("matTooltip",e.title.length>0?e.title[o]:"")("value",i.Key)("name",e.name),c(),x("",i.Value," ")}}var Ge=(()=>{let a=class a{constructor(){this.disabled=!1,this.modelChange=new re,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(o){this.modelChange.emit(o)}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},standalone:!0,features:[O],decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(e,t){e&1&&(r(0,"mat-radio-group",0),g("ngModelChange",function(_){return t.change(_)}),u(1,Ye,2,10,"mat-radio-button",1),l()),e&2&&(s("disabled",t.disabled)("ngModel",t.model),c(),s("ngForOf",t.options))},dependencies:[N,z,Ve,De,Oe,L,k,B,J,H],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px;--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]});let n=a;return n})();function Qe(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l()),n&2){let i=a.item;c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," ")}}function et(n,a){if(n&1){let i=b();r(0,"span",6),g("click",function(){C(i);let e=m(),t=e.item,d=e.clear;return f(d(t))}),p(1,"x"),l()}}function tt(n,a){if(n&1&&(r(0,"span",3),P(1,"img",4),l(),r(2,"span"),p(3),l(),u(4,et,2,0,"span",5)),n&2){let i=a.item,o=m();c(),s("src",i==null?null:i.Img,S),c(2),x(" ",i.Name," "),c(),W(o.clearable()?4:-1)}}var Ke=(()=>{let a=class a{constructor(){this.authService=A(K),this.multiple=Y(!1),this.clearable=Y(!0),this.options=this.authService.getChannels(),this.onChange=o=>{}}onChannelChange(o){this.onChange(o)}writeValue(o){this.selectedChannels=o}registerOnChange(o){this.onChange=o}registerOnTouched(o){}setDisabledState(o){}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},standalone:!0,features:[j([{provide:Ce,multi:!0,useExisting:a}]),O],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(e,t){e&1&&(r(0,"ng-select",0),E("ngModelChange",function(_){return M(t.selectedChannels,_)||(t.selectedChannels=_),_}),g("ngModelChange",function(_){return t.onChannelChange(_)}),u(1,Qe,4,2,"ng-template",1)(2,tt,5,3,"ng-template",2),l()),e&2&&(s("clearable",t.clearable())("items",t.options),F("ngModel",t.selectedChannels),s("multiple",t.multiple()))},dependencies:[N,Fe,we,ye,Ie,L,k,B]});let n=a;return n})();var He=n=>[n],nt=n=>({"text-decoration-line-through":n}),it=n=>({"border-bottom":n}),ot=n=>({"bg-gradient-warning":n});function at(n,a){if(n&1){let i=b();I(0),r(1,"div")(2,"label",21),p(3,"Channel"),l(),r(4,"channel-select-options",22),E("ngModelChange",function(e){C(i);let t=m();return M(t.searchFilter.ListChannelID,e)||(t.searchFilter.ListChannelID=e),f(e)}),l()(),r(5,"div",23)(6,"label",24),p(7,"Filter by"),l(),r(8,"lib-radio-options",25),E("modelChange",function(e){C(i);let t=m();return M(t.searchFilter.filterModel,e)||(t.searchFilter.filterModel=e),f(e)}),l()(),w()}if(n&2){let i=m();c(4),s("multiple",!0),F("ngModel",i.searchFilter.ListChannelID),c(4),F("model",i.searchFilter.filterModel),s("options",i.filterTypeOptions)}}function rt(n,a){if(n&1){let i=b();r(0,"button",27),g("click",function(){C(i);let e=m().ngIf,t=m();return f(t.onUpdateItems(e))}),P(1,"i",28),p(2," Update "),l()}}function lt(n,a){if(n&1&&(I(0),r(1,"div",4),u(2,rt,3,0,"button",26),l(),w()),n&2){let i=a.ngIf,o=m();c(2),s("ngIf",o.productService.hasSelectionVariant(i))}}function ct(n,a){if(n&1&&(r(0,"th",15)(1,"div",29),P(2,"img",30),r(3,"div",31),p(4),y(5,"stringLimit"),l()()()),n&2){let i=a.$implicit;c(),s("matTooltip",(i.Name==null?null:i.Name.length)>20?i.Name:""),c(),s("src",i==null?null:i.Img,S),c(2),x(" ",de(5,3,i.Name,20)," ")}}function st(n,a){if(n&1){let i=b();r(0,"th")(1,"input",32),E("ngModelChange",function(e){C(i);let t=m();return M(t.checkboxState,e)||(t.checkboxState=e),f(e)}),g("ngModelChange",function(){C(i);let e=m();return f(e.onSelectAllData())}),l()()}if(n&2){let i=m();c(),F("ngModel",i.checkboxState)}}function mt(n,a){n&1&&(r(0,"th",33)(1,"span"),p(2,"Expected"),l(),r(3,"span",34),p(4,"(POS)"),l()(),r(5,"th",33),p(6,"Channel"),l())}function pt(n,a){if(n&1){let i=b();r(0,"img",47),g("click",function(e){C(i);let t=m(3).$implicit,d=m(2);return f(d.onZoomImage(e,t==null?null:t.ImageUrl))}),l()}if(n&2){let i=m(3).$implicit;se("src",i==null?null:i.ImageUrl,S)}}function dt(n,a){n&1&&P(0,"img",48)}function _t(n,a){if(n&1&&(r(0,"small",46),p(1),l()),n&2){let i=m(3).$implicit;c(),x("(",i==null?null:i.Category,")")}}function ut(n,a){if(n&1&&(I(0),r(1,"td",42),u(2,pt,1,1,"img",43)(3,dt,1,0,"ng-template",null,0,ee),l(),r(5,"td",44)(6,"h5",45),p(7),l(),u(8,_t,2,1,"small",46),l(),w()),n&2){let i=Q(4),o=m().$index,e=m().$implicit,t=m().ngIf;c(),s("rowSpan",e==null?null:e.Variants.length)("ngClass",V(7,it,o+1==t.length)),c(),s("ngIf",e==null?null:e.ImageUrl)("ngIfElse",i),c(3),s("rowSpan",e==null?null:e.Variants.length),c(2),me(e==null?null:e.Name),c(),W(e!=null&&e.Category?8:-1)}}function gt(n,a){if(n&1){let i=b();r(0,"td",49)(1,"input",32),E("ngModelChange",function(e){C(i);let t=m().$implicit;return M(t.selected,e)||(t.selected=e),f(e)}),l()()}if(n&2){let i=m().$implicit;c(),F("ngModel",i.selected)}}function ht(n,a){if(n&1){let i=b();I(0),r(1,"td",51),p(2),y(3,"number"),l(),r(4,"td",52),g("click",function(){let e=C(i).$implicit,t=m(2).$implicit,d=m().$implicit,_=m(2);return f(_.openTableDialog(t,d,e))}),r(5,"div",53)(6,"div",54),p(7),y(8,"number"),l(),r(9,"a",55),g("click",function(e){return C(i),f(e==null?null:e.stopPropagation())}),P(10,"i",40),l()()(),w()}if(n&2){let i=a.$implicit;c(2),x(" ",T(3,4,i.PriceExpected)," "),c(2),s("ngClass",V(8,ot,i.Price!=i.PriceExpected)),c(3),x(" ",T(8,6,i.Price)," "),c(2),s("href",i.Url,S)}}function Ct(n,a){n&1&&(r(0,"td",56),p(1," X "),l(),r(2,"td",56),p(3," X "),l())}function ft(n,a){if(n&1&&(I(0),u(1,ht,11,10,"ng-container",50)(2,Ct,4,0,"ng-template",null,1,ee),w()),n&2){let i=a.$implicit,o=Q(3),e=m().$implicit,t=m(3);c(),s("ngIf",t.getItemFromChannel(e,i.ID))("ngIfElse",o)}}function xt(n,a){if(n&1&&(r(0,"tr"),u(1,ut,9,9,"ng-container",3),r(2,"td",35),p(3),l(),r(4,"td",36)(5,"div",37)(6,"div",38),p(7),l(),r(8,"div",31)(9,"a",39),P(10,"i",40),l()()()(),u(11,gt,2,1,"ng-template",19)(12,ft,4,2,"ng-container",41),l()),n&2){let i=a.$implicit,o=a.$index,e=m(3);c(),s("ngIf",o==0),c(2),x(" ",i==null?null:i.Model," "),c(),s("matTooltip",i.Discontinued?e.discontinuedVariantMsg:""),c(2),s("ngClass",V(8,nt,i.Discontinued)),c(),x(" ",i==null?null:i.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(i==null?null:i.ID),S),c(2),s("ngxPermissionsOnly",V(10,He,e.rolePriceEdit)),c(),s("ngForOf",e.channels())}}function Pt(n,a){if(n&1&&(r(0,"tbody"),$(1,xt,13,12,"tr",null,R),l()),n&2){let i=a.$implicit;c(),U(i.Variants)}}function bt(n,a){if(n&1&&(I(0),$(1,Pt,3,0,"tbody",null,R),w()),n&2){let i=a.ngIf;c(),U(i)}}var xn=(()=>{let a=class a{constructor(o,e,t,d,_,h,Je){this.http=o,this.toastr=e,this.dialog=t,this.productService=d,this.authService=_,this.biggerPictureService=h,this.paginationService=Je,this.infinitePagination=A(te),this.searchFilter=new Ne,this.checkboxState=!1,this.rolePriceEdit=xe.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=le([]),this.filterTypeOptions=[{Key:X.ALL,Value:"All"},{Key:X.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let o=this.searchFilter.ListChannelID,e=[];G.IsEmpty(o)||o?.length==0?e=this.channelOptions:e=this.channelOptions.filter(t=>o.findIndex(d=>d==t.ID)>-1),this.channels.update(()=>e)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(q(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(ae(o=>{this.searchFilter=o.Filter,this.searchFilter.filterModel=X.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),q(1))}onSelectAllData(){this.data$=this.data$.pipe(oe(o=>(o.map(e=>(e.Variants&&(e.Variants=e.Variants.map(t=>(t.selected=this.checkboxState,t))),e)),o)))}onFilter(o){this.searchFilter.text=o;let e=ie(ne({},this.searchFilter),{text:o,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(e)}updatePrice(o){let e=this.productService.selectedVariantProduct(o);if(e.length>0){let t=e.map(h=>h.ID),_={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",_).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+_.ListID.length+" items in "+_.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(o=>(o.selected=!1,o))}getItemFromChannel(o,e){return o.Channel.find(t=>t.ChannelID==e)}onUpdateItems(o){let e=this.productService.selectedVariantProduct(o);this.dialog.open(Ue,{data:{title:"Updating Price",selectedItems:e,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(Z(t=>G.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(o)})}openTableDialog(o,e,t){let d=JSON.parse(JSON.stringify(o));this.dialog.open(Ae,{data:{Name:e.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(Z(h=>G.IsNotEmpty(h))).subscribe(h=>{this.updateProductPrice(h,t)})}updateProductPrice(o,e){let t={ID:o.ChannelID,ChannelItemID:o.ChannelItemID,ChannelVariantID:o.ChannelVariationID,Price:parseFloat(o.Price),VariantID:o.ID,SKU:o.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(d=>{e.Price=t.Price;let _=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${o.ItemName} (${o.VarName}) inventory in ${_.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Re,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(o,e){this.biggerPictureService.openBiggerPicture(o,e)}};a.\u0275fac=function(e){return new(e||a)(v(be),v(Pe),v(Me),v(ke),v(K),v(Be),v($e))},a.\u0275cmp=D({type:a,selectors:[["app-custom-channel-price"]],standalone:!0,features:[j([te]),O],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(e,t){e&1&&(r(0,"mainpanel",2),g("onSubmit",function(_){return t.onFilter(_)}),r(1,"filters"),u(2,at,9,4,"ng-container",3),y(3,"async"),l(),r(4,"actions")(5,"div",4),u(6,lt,3,1,"ng-container",3),y(7,"async"),r(8,"button",5),g("click",function(){return t.openExportDialog()}),P(9,"i",6),r(10,"span"),p(11,"Export"),l()()()(),r(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),$(21,ct,6,6,"th",15,R),l(),r(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),l()(),r(27,"th",17),p(28,"Variant"),l(),r(29,"th",18),p(30,"SKU"),l(),u(31,st,2,1,"ng-template",19),$(32,mt,7,0,null,null,R),l()(),u(34,bt,3,0,"ng-container",3),y(35,"async"),l(),r(36,"infinite-paginator",20),y(37,"async"),g("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),l()()()()()()()),e&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),c(2),s("ngIf",T(3,13,t.loader$)),c(4),s("ngIf",T(7,15,t.data$)),c(15),U(t.channels()),c(10),s("ngxPermissionsOnly",V(21,He,t.rolePriceEdit)),c(),U(t.channels()),c(2),s("ngIf",T(35,17,t.data$)),c(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",T(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[N,_e,z,ue,ge,he,Te,Ee,L,fe,k,B,We,Ge,J,H,Le,ve,Se,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]});let n=a;return n})();export{xn as CustomChannelPriceComponent};
@@ -1,4 +1,4 @@
1
- import{a as Qe,b as j,c as Je}from"./chunk-O434S2MH.js";import"./chunk-B2TH5YJH.js";import{a as Ye,b as Ge,c as Ue,e as je,f as Ke,g as He}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import{f as Le,g as Be,h as Ae,i as $e,j as ze}from"./chunk-FGPSBTFS.js";import{a as Re}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as ke,b as Ne,c as We}from"./chunk-UMNGKENU.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-CCXKODFV.js";import{h as te,j as ie}from"./chunk-5GM7EMCW.js";import{b as Te,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Fe,n as Oe}from"./chunk-BO4PPSB5.js";import{t as Me,u as Ve}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ve,h as ye,m as xe,y as De}from"./chunk-BSN7ZAXG.js";import{b as ee,c as D}from"./chunk-64G3XLI6.js";import{p as Se,r as Ce}from"./chunk-OVEJFFL6.js";import{$b as S,Cd as k,Da as c,Ea as u,Eb as w,Gb as m,Gc as L,Hc as U,Ic as we,Jc as J,Ma as N,Nb as E,Pa as H,Sb as r,Tb as a,Ub as C,Vb as W,Wb as R,Yb as x,Z as Y,aa as se,bc as h,ea as G,ec as me,fc as ce,fd as q,gb as de,hc as ue,ic as he,ja as pe,jb as l,jc as fe,m as le,mc as b,nc as p,oc as F,pa as y,pc as v,rc as P,sc as I,sd as B,ta as V,tc as M,uc as Q,ud as A,v as K,vc as O,vd as $,xb as g,xc as _e,yc as ge,yd as X,zd as Z}from"./chunk-PQDPS2ID.js";import{a as re,b as oe}from"./chunk-GNOSNGXM.js";var et=e=>({"over-due":e});function tt(e,o){if(e&1&&(r(0,"tr",8)(1,"td"),p(2),a(),r(3,"td"),p(4),a(),r(5,"td"),p(6),a(),r(7,"td"),p(8),a()()),e&2){let s=o.$implicit,t=o.index;m("ngClass",_e(5,et,s.Exception)),l(2),F(t+1),l(2),F(s.Number),l(2),F(s.Status),l(2),F(s.Exception)}}function it(e,o){if(e&1&&(W(0),w(1,tt,9,7,"tr",7),R()),e&2){let s,t=h();l(),m("ngForOf",(s=t.downloadResult())==null?null:s.Body)}}function nt(e,o){e&1&&(r(0,"tr",9)(1,"td",10)(2,"div",11),C(3,"i",12),a(),r(4,"h4",13),p(5," There is no order to processed "),a()()())}var qe=(()=>{let o=class o{constructor(){this.downloadResult=N()}ngOnInit(){}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},standalone:!0,features:[O],decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(r(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),C(5,"th",5),r(6,"th"),p(7,"Order Number"),a(),r(8,"th"),p(9,"Status"),a(),r(10,"th"),p(11,"Exception"),a()()(),r(12,"tbody"),w(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,J),a()()()()),n&2){let d,f=b(15);l(13),m("ngIf",((d=i.downloadResult())==null||d.Body==null?null:d.Body.length)>0)("ngIfElse",f)}},dependencies:[k,B,A,$]});let e=o;return e})();var z=(()=>{let o=class o{constructor(){this.httpService=y(be),this.toastr=y(Te),this.datePipe=y(Z)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(G(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):le}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),d=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${d} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?D.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):D.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=D.formatTitleFromDate(new Date(t),new Date(n)),d=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":d+"-"} ${f}`}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=pe({token:o,factory:o.\u0275fac});let e=o;return e})();function at(e,o){if(e&1&&(r(0,"ng-option",13),C(1,"img",14),p(2),a()),e&2){let s=o.$implicit;m("value",s.ID),l(),m("src",s==null?null:s.Img,de),l(),v("",s.Name," ")}}function rt(e,o){if(e&1){let s=x();r(0,"div",8)(1,"div",4)(2,"h5"),p(3,"Type"),a(),r(4,"p",5),p(5,"Select Type want to download"),a()(),r(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),M("ngModelChange",function(n){c(s);let i=h();return I(i.downloadType,n)||(i.downloadType=n),u(n)}),S("ngModelChange",function(){c(s);let n=h();return u(n.onDownloadTypeChange())}),r(10,"mat-radio-button",17),p(11," Orders "),a(),r(12,"mat-radio-button",18),p(13," Disbursement "),a()()()(),r(14,"div",19)(15,"div",20),C(16,"i",21),a(),r(17,"p",22),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let s=h();l(9),P("ngModel",s.downloadType),l(),m("value",!1),l(2),m("value",!0)}}function ot(e,o){e&1&&(r(0,"p",5),p(1," Select Disbursement date "),r(2,"span",23),p(3,"(payment date / order complete date)"),a(),p(4," of the channel you want to download (Max 1 Week). "),a())}function lt(e,o){e&1&&(r(0,"p",5),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(e,o){if(e&1){let s=x();r(0,"div",12)(1,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.startTime,n)||(i.startTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onStartTimeChange())}),a(),r(2,"span",25),p(3,"-"),a(),r(4,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.endTime,n)||(i.endTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onEndTimeChange())}),a()()}if(e&2){let s=h();l(),P("time",s.startTime),l(3),P("time",s.endTime)}}var Xe=(()=>{let o=class o{constructor(){this.reset=N(!1),this.authService=y(ie),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.filterData=new H,q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(K(t=>t?.Model),Y(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=D.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},standalone:!0,features:[Q([z]),O],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),p(5,"Select a Channel"),a(),r(6,"p",5),p(7,"Select Channel want to download order"),a()(),r(8,"div",4)(9,"ng-select",6),M("ngModelChange",function(_){return c(d),I(i.selectedChannelId,_)||(i.selectedChannelId=_),u(_)}),S("ngModelChange",function(){return c(d),u(i.onSelectChannel())}),w(10,at,3,3,"ng-option",7),a()()(),w(11,rt,19,3,"div",8),L(12,"async"),r(13,"div",8)(14,"div",4)(15,"h5"),p(16,"Date Range"),a(),w(17,ot,5,0,"p",5)(18,lt,2,0,"p",5),a(),r(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),M("ngModelChange",function(_){return c(d),I(i.startDate,_)||(i.startDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())}),a(),r(23,"input",11),M("ngModelChange",function(_){return c(d),I(i.endDate,_)||(i.endDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())})("ngModelChange",function(){return c(d),u(i.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,0),a(),w(26,st,5,2,"div",12),a()()()()}if(n&2){let d,f,_=b(25);l(9),m("clearable",!1),P("ngModel",i.selectedChannelId),l(),m("ngForOf",i.channelOptions()),l(),E((d=U(12,9,i.channelDetail$))!=null&&d.ServiceFeeWriteOff&&((d=i.selectedChannel())==null?null:d.TypeID)==i.channelType.Tokopedia?11:-1),l(6),E(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?17:18),l(4),m("rangePicker",_),l(),P("ngModel",i.startDate),l(),P("ngModel",i.endDate),l(3),E(i.showTimePicker()?26:-1)}},dependencies:[k,A,X,Ie,Pe,Ee,We,ke,Ne,De,ve,ye,xe,Je,$e,Ae,ze,Le,Be],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=o;return e})();var T=function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e}(T||{});var pt=(e,o)=>({"over-due-today":e,"over-due":o});function dt(e,o){if(e&1&&(r(0,"th",21),p(1),a()),e&2){let s=h();l(),v(" ",s.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(e,o){if(e&1&&(r(0,"td"),p(1),L(2,"date"),a()),e&2){let s=h().$implicit;l(),v(" ",we(2,1,s.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(e,o){if(e&1&&(r(0,"span"),p(1),a()),e&2){let s=h().$implicit;l(),v(" ",s.ActionString," ")}}function ut(e,o){if(e&1&&(r(0,"li"),p(1),a()),e&2){let s=o.$implicit;l(),v(" ",s," ")}}function ht(e,o){if(e&1&&(r(0,"ul",27),w(1,ut,2,1,"li",22),a()),e&2){let s=h().$implicit;l(),m("ngForOf",s.ActionString)}}function ft(e,o){if(e&1&&(r(0,"span",28),C(1,"i",29),a()),e&2){let s=h().$implicit;ce("title","Delivery : ",s.DeliveryState,`
1
+ import{a as Qe,b as j,c as Je}from"./chunk-O434S2MH.js";import"./chunk-B2TH5YJH.js";import{a as Ye,b as Ge,c as Ue,e as je,f as Ke,g as He}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import{f as Le,g as Be,h as Ae,i as $e,j as ze}from"./chunk-FGPSBTFS.js";import{a as Re}from"./chunk-N32A3EYJ.js";import"./chunk-ADRVUMMW.js";import{a as ke,b as Ne,c as We}from"./chunk-UMNGKENU.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-CCXKODFV.js";import{h as te,j as ie}from"./chunk-VAMLKDPP.js";import{b as Te,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Fe,n as Oe}from"./chunk-BO4PPSB5.js";import{t as Me,u as Ve}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ve,h as ye,m as xe,y as De}from"./chunk-BSN7ZAXG.js";import{b as ee,c as D}from"./chunk-64G3XLI6.js";import{p as Se,r as Ce}from"./chunk-OVEJFFL6.js";import{$b as S,Cd as k,Da as c,Ea as u,Eb as w,Gb as m,Gc as L,Hc as U,Ic as we,Jc as J,Ma as N,Nb as E,Pa as H,Sb as r,Tb as a,Ub as C,Vb as W,Wb as R,Yb as x,Z as Y,aa as se,bc as h,ea as G,ec as me,fc as ce,fd as q,gb as de,hc as ue,ic as he,ja as pe,jb as l,jc as fe,m as le,mc as b,nc as p,oc as F,pa as y,pc as v,rc as P,sc as I,sd as B,ta as V,tc as M,uc as Q,ud as A,v as K,vc as O,vd as $,xb as g,xc as _e,yc as ge,yd as X,zd as Z}from"./chunk-PQDPS2ID.js";import{a as re,b as oe}from"./chunk-GNOSNGXM.js";var et=e=>({"over-due":e});function tt(e,o){if(e&1&&(r(0,"tr",8)(1,"td"),p(2),a(),r(3,"td"),p(4),a(),r(5,"td"),p(6),a(),r(7,"td"),p(8),a()()),e&2){let s=o.$implicit,t=o.index;m("ngClass",_e(5,et,s.Exception)),l(2),F(t+1),l(2),F(s.Number),l(2),F(s.Status),l(2),F(s.Exception)}}function it(e,o){if(e&1&&(W(0),w(1,tt,9,7,"tr",7),R()),e&2){let s,t=h();l(),m("ngForOf",(s=t.downloadResult())==null?null:s.Body)}}function nt(e,o){e&1&&(r(0,"tr",9)(1,"td",10)(2,"div",11),C(3,"i",12),a(),r(4,"h4",13),p(5," There is no order to processed "),a()()())}var qe=(()=>{let o=class o{constructor(){this.downloadResult=N()}ngOnInit(){}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},standalone:!0,features:[O],decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(r(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),C(5,"th",5),r(6,"th"),p(7,"Order Number"),a(),r(8,"th"),p(9,"Status"),a(),r(10,"th"),p(11,"Exception"),a()()(),r(12,"tbody"),w(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,J),a()()()()),n&2){let d,f=b(15);l(13),m("ngIf",((d=i.downloadResult())==null||d.Body==null?null:d.Body.length)>0)("ngIfElse",f)}},dependencies:[k,B,A,$]});let e=o;return e})();var z=(()=>{let o=class o{constructor(){this.httpService=y(be),this.toastr=y(Te),this.datePipe=y(Z)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(G(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):le}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),d=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${d} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?D.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):D.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=D.formatTitleFromDate(new Date(t),new Date(n)),d=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":d+"-"} ${f}`}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=pe({token:o,factory:o.\u0275fac});let e=o;return e})();function at(e,o){if(e&1&&(r(0,"ng-option",13),C(1,"img",14),p(2),a()),e&2){let s=o.$implicit;m("value",s.ID),l(),m("src",s==null?null:s.Img,de),l(),v("",s.Name," ")}}function rt(e,o){if(e&1){let s=x();r(0,"div",8)(1,"div",4)(2,"h5"),p(3,"Type"),a(),r(4,"p",5),p(5,"Select Type want to download"),a()(),r(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),M("ngModelChange",function(n){c(s);let i=h();return I(i.downloadType,n)||(i.downloadType=n),u(n)}),S("ngModelChange",function(){c(s);let n=h();return u(n.onDownloadTypeChange())}),r(10,"mat-radio-button",17),p(11," Orders "),a(),r(12,"mat-radio-button",18),p(13," Disbursement "),a()()()(),r(14,"div",19)(15,"div",20),C(16,"i",21),a(),r(17,"p",22),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let s=h();l(9),P("ngModel",s.downloadType),l(),m("value",!1),l(2),m("value",!0)}}function ot(e,o){e&1&&(r(0,"p",5),p(1," Select Disbursement date "),r(2,"span",23),p(3,"(payment date / order complete date)"),a(),p(4," of the channel you want to download (Max 1 Week). "),a())}function lt(e,o){e&1&&(r(0,"p",5),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(e,o){if(e&1){let s=x();r(0,"div",12)(1,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.startTime,n)||(i.startTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onStartTimeChange())}),a(),r(2,"span",25),p(3,"-"),a(),r(4,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.endTime,n)||(i.endTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onEndTimeChange())}),a()()}if(e&2){let s=h();l(),P("time",s.startTime),l(3),P("time",s.endTime)}}var Xe=(()=>{let o=class o{constructor(){this.reset=N(!1),this.authService=y(ie),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.filterData=new H,q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(K(t=>t?.Model),Y(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=D.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},standalone:!0,features:[Q([z]),O],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),p(5,"Select a Channel"),a(),r(6,"p",5),p(7,"Select Channel want to download order"),a()(),r(8,"div",4)(9,"ng-select",6),M("ngModelChange",function(_){return c(d),I(i.selectedChannelId,_)||(i.selectedChannelId=_),u(_)}),S("ngModelChange",function(){return c(d),u(i.onSelectChannel())}),w(10,at,3,3,"ng-option",7),a()()(),w(11,rt,19,3,"div",8),L(12,"async"),r(13,"div",8)(14,"div",4)(15,"h5"),p(16,"Date Range"),a(),w(17,ot,5,0,"p",5)(18,lt,2,0,"p",5),a(),r(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),M("ngModelChange",function(_){return c(d),I(i.startDate,_)||(i.startDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())}),a(),r(23,"input",11),M("ngModelChange",function(_){return c(d),I(i.endDate,_)||(i.endDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())})("ngModelChange",function(){return c(d),u(i.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,0),a(),w(26,st,5,2,"div",12),a()()()()}if(n&2){let d,f,_=b(25);l(9),m("clearable",!1),P("ngModel",i.selectedChannelId),l(),m("ngForOf",i.channelOptions()),l(),E((d=U(12,9,i.channelDetail$))!=null&&d.ServiceFeeWriteOff&&((d=i.selectedChannel())==null?null:d.TypeID)==i.channelType.Tokopedia?11:-1),l(6),E(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?17:18),l(4),m("rangePicker",_),l(),P("ngModel",i.startDate),l(),P("ngModel",i.endDate),l(3),E(i.showTimePicker()?26:-1)}},dependencies:[k,A,X,Ie,Pe,Ee,We,ke,Ne,De,ve,ye,xe,Je,$e,Ae,ze,Le,Be],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=o;return e})();var T=function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e}(T||{});var pt=(e,o)=>({"over-due-today":e,"over-due":o});function dt(e,o){if(e&1&&(r(0,"th",21),p(1),a()),e&2){let s=h();l(),v(" ",s.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(e,o){if(e&1&&(r(0,"td"),p(1),L(2,"date"),a()),e&2){let s=h().$implicit;l(),v(" ",we(2,1,s.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(e,o){if(e&1&&(r(0,"span"),p(1),a()),e&2){let s=h().$implicit;l(),v(" ",s.ActionString," ")}}function ut(e,o){if(e&1&&(r(0,"li"),p(1),a()),e&2){let s=o.$implicit;l(),v(" ",s," ")}}function ht(e,o){if(e&1&&(r(0,"ul",27),w(1,ut,2,1,"li",22),a()),e&2){let s=h().$implicit;l(),m("ngForOf",s.ActionString)}}function ft(e,o){if(e&1&&(r(0,"span",28),C(1,"i",29),a()),e&2){let s=h().$implicit;ce("title","Delivery : ",s.DeliveryState,`
2
2
  Payment : `,s.PaymentState,"")}}function _t(e,o){if(e&1&&(r(0,"tr")(1,"td"),p(2),a(),r(3,"td"),p(4),a(),w(5,mt,3,4,"td",23),r(6,"td")(7,"span"),p(8),a(),p(9),a(),r(10,"td",24)(11,"span"),p(12),a(),p(13),a(),r(14,"td"),w(15,ct,2,1,"span",23)(16,ht,2,1,"ul",25),a(),r(17,"td"),w(18,ft,2,3,"span",26),a()()),e&2){let s,t=o.$implicit,n=o.index,i=h(2);l(2),F(n+1),l(2),F(t.Number),l(),m("ngIf",((s=i.selectedChannel())==null?null:s.TypeID)!=i.channelType.Shopee&&((s=i.selectedChannel())==null?null:s.TypeID)!==i.channelType.Tiktok),l(3),v("",t.ChannelStatus," - "),l(),v("",t.ChannelStatusDescription," "),l(),m("ngClass",ge(12,pt,(t==null?null:t.Action)==i.actionPreviewOrder.Update,(t==null?null:t.Action)==i.actionPreviewOrder.New))("matTooltip",t.POSStatus==91||t.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),v("",t.POSStatus," - "),l(),v("",t.POSStatusDescription," "),l(2),m("ngIf",t.ActionString.length==1),l(),m("ngIf",t.ActionString.length>1),l(2),m("ngIf",t.ChannelStatus!=99&&t.POSStatus!=99)}}function gt(e,o){if(e&1&&(W(0),w(1,_t,19,15,"tr",22),R()),e&2){let s=h();l(),m("ngForOf",s.displayPreviewData())}}function wt(e,o){e&1&&(r(0,"tr",30)(1,"td",31)(2,"div",32),C(3,"i",33),a(),r(4,"h4",34),p(5," There is no order to processed "),a()()())}var Ze=(()=>{let o=class o{constructor(){this.orderPreview=N(),this.selectedChannel=N(),this.channelType=ee,this.allData=g(0),this.syncData=g(0),this.wrongData=g(0),this.unsyncData=g(0),this.pillStatus=g(T.ALL),this.actionPreviewOrder=j,this.previewStatus=T,this.displayPreviewData=g([]),this.exportOrders=new H,q(()=>{this.orderPreview()&&(this.filterPreviewData(T.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(t){this.pillStatus.update(()=>t),this.displayPreviewData.update(()=>this.filterDataByStatus(t))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(T.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(T.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(T.UNSYNC).length)}filterDataByStatus(t){let n=[];switch(t){case T.ALL:n=this.orderPreview();break;case T.SYNC:n=this.orderPreview().filter(i=>i.Action==j.DoNothing);break;case T.WRONG:n=this.orderPreview().filter(i=>i.Action==j.Update);break;case T.UNSYNC:n=this.orderPreview().filter(i=>i.Action==j.New);break}return n}onExportOrders(){this.exportOrders.emit()}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},standalone:!0,features:[O],decls:41,vars:11,consts:[["EMPTY",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.ALL))}),p(8),a()(),r(9,"li",8)(10,"button",9),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.SYNC))}),p(11),a()(),r(12,"li",8)(13,"button",10),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.WRONG))}),p(14),a()(),r(15,"li",8)(16,"button",11),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.UNSYNC))}),p(17),a()()()(),r(18,"div")(19,"button",12),S("click",function(){return c(d),u(i.onExportOrders())}),C(20,"i",13),r(21,"span"),p(22,"Export"),a()()()()(),r(23,"table",14)(24,"thead",15)(25,"tr"),C(26,"th",16),r(27,"th",17),p(28,"Number"),a(),w(29,dt,2,1,"th",18),r(30,"th",19),p(31,"Channel Status"),a(),r(32,"th",19),p(33,"POS Status"),a(),r(34,"th"),p(35,"Action"),a(),C(36,"th",16),a()(),r(37,"tbody"),w(38,gt,2,1,"ng-container",20)(39,wt,6,0,"ng-template",null,0,J),a()()()()}if(n&2){let d,f,_=b(40);l(7),m("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),v(" All (",i.allData(),") "),l(2),m("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),l(),v(" Existing (",i.syncData(),") "),l(2),m("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),v(" Wrong Status (",i.wrongData(),") "),l(2),m("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),l(),v(" Missing (",i.unsyncData(),") "),l(12),m("ngIf",((d=i.selectedChannel())==null?null:d.TypeID)!=i.channelType.Shopee&&((d=i.selectedChannel())==null?null:d.TypeID)!==i.channelType.Tiktok),l(9),m("ngIf",((f=i.displayPreviewData())==null?null:f.length)>0)("ngIfElse",_)}},dependencies:[k,B,A,$,Z,Ve,Me]});let e=o;return e})();var St=["stepper"];function Ct(e,o){e&1&&(r(0,"a",2),p(1," Download V1 "),a())}function vt(e,o){if(e&1){let s=x();r(0,"div",3)(1,"button",20),S("click",function(){c(s);let n=h();return u(n.onStepperBack())}),p(2," Back "),a(),r(3,"button",21),S("click",function(){c(s);let n=h();return u(n.onNextStep())}),p(4," Next "),a()()}if(e&2){let s=h();l(3),m("disabled",s.disabledNextFilter())}}function yt(e,o){if(e&1){let s=x();r(0,"button",22),S("click",function(){c(s);let n=h();return u(n.onNextStep())}),p(1," Next "),a()}if(e&2){let s=h();m("disabled",s.disabledNextFilter())}}function xt(e,o){if(e&1){let s=x();r(0,"button",23),S("click",function(){c(s);let n=h();return u(n.onNewDownload())}),C(1,"i",24),p(2," New "),a()}}function Dt(e,o){e&1&&(C(0,"i",25),r(1,"span"),p(2,"Filter"),a())}function Tt(e,o){e&1&&(C(0,"i",26),r(1,"span"),p(2,"Preview"),a())}function bt(e,o){if(e&1){let s=x();W(0),r(1,"preview-step",27),S("onExportOrders",function(){c(s);let n=h();return u(n.onExportOrders())}),a(),R()}if(e&2){let s=o.ngIf;l(),m("orderPreview",s)}}function Et(e,o){e&1&&(C(0,"i",28),r(1,"span"),p(2,"Finish"),a())}function Pt(e,o){if(e&1&&(W(0),C(1,"complete-step",29),R()),e&2){let s=o.ngIf;l(),m("downloadResult",s)}}function It(e,o){e&1&&(r(0,"h6"),p(1,"1"),a())}function Mt(e,o){e&1&&(r(0,"h6"),p(1,"2"),a())}function Vt(e,o){e&1&&(r(0,"h6"),p(1,"3"),a())}var Yi=(()=>{let o=class o{constructor(){this.downloadService=y(z),this.orderService=y(Qe),this.productService=y(Re),this.authService=y(ie),this.stepperSelectedIndex=g(0),this.disabledNextFilter=g(!0),this.isResetFilter=g(!1),this.pageTitle=g("Download to POS"),this.cacheKey=g(D.GuidEMpty)}onFilterChange(t){this.filter=t,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>D.IsEmpty(this.filter?.channelId)||!D.isValidDate(this.filter.startDate)||!D.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let t=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${t?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};D.IsNotEmpty(this.filter.startTime)&&(t=oe(re({},t),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(t).pipe(G(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),K(n=>n.Data),Y(1))}onExportOrders(){let t={ID:this.filter.channelId,From:this.filter.startDate?JSON.stringify(this.filter.startDate):null,To:this.filter.endDate?JSON.stringify(this.filter.endDate):null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(t,n).subscribe()}onDownload(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(se(n=>(t.ListPreview=n,this.downloadService.getDownloadOrder(t))),G(()=>{this.onStepperNext()}),Y(1))}setPageTitle(t){this.pageTitle.update(()=>`
3
3
  ${t} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
4
4
  `)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!0),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&ue(St,5),n&2){let d;he(d=fe())&&(i.stepper=d.first)}},standalone:!0,features:[Q([z,{provide:Ye,useValue:{displayDefaultIndicatorType:!1}}]),O],decls:27,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],["routerLink","/menu/Order/Download/V1",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","reset"],["state","preview",3,"editable","completed"],[4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"],[3,"downloadResult"]],template:function(n,i){if(n&1){let d=x();r(0,"mainpanel",1)(1,"actions"),w(2,Ct,2,0,"a",2)(3,vt,5,1,"div",3)(4,yt,2,1,"button",4)(5,xt,3,0,"button",5),a(),r(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),M("selectedIndexChange",function(_){return c(d),I(i.stepperSelectedIndex,_)||(i.stepperSelectedIndex=_),u(_)}),r(13,"mat-step",11),w(14,Dt,3,0,"ng-template",12),r(15,"filter-step",13),S("onFilterChange",function(_){return c(d),u(i.onFilterChange(_))}),a()(),r(16,"mat-step",14),w(17,Tt,3,0,"ng-template",12)(18,bt,2,1,"ng-container",15),L(19,"async"),a(),r(20,"mat-step",16),w(21,Et,3,0,"ng-template",12)(22,Pt,2,1,"ng-container",15),L(23,"async"),a(),w(24,It,2,0,"ng-template",17)(25,Mt,2,0,"ng-template",18)(26,Vt,2,0,"ng-template",19),a()()()()()()()}if(n&2){let d=b(12);m("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),l(2),E(i.stepperSelectedIndex()==0?2:-1),l(),E(i.stepperSelectedIndex()==1?3:-1),l(),E(i.stepperSelectedIndex()==0?4:-1),l(),E(i.stepperSelectedIndex()==2?5:-1),l(6),me("ngClass","last-edited-step-"+d.selectedIndex),P("selectedIndex",i.stepperSelectedIndex),l(2),m("completed",!1)("editable",i.stepperSelectedIndex()!=2),l(2),m("reset",i.isResetFilter()),l(),m("editable",i.stepperSelectedIndex()!=2)("completed",!1),l(2),m("ngIf",U(19,17,i.orderPreview$)),l(4),m("ngIf",U(23,19,i.downloadPreview$))}},dependencies:[k,B,$,X,qe,Xe,Ze,He,je,Ge,Ke,Ue,Oe,Fe,Ce,Se],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
@@ -1,4 +1,4 @@
1
- import{h as u}from"./chunk-5GM7EMCW.js";import{b as h,e as g}from"./chunk-E3NPUJ23.js";import{ja as l,oa as c}from"./chunk-PQDPS2ID.js";var v=(()=>{let a=class a{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(n=>(n.VariantID=e.ID,n))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(u.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,n=e.length>0;if(!n&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),n&&s){let o=`<li>${this.generateSuccessMessage(t.length)}</li>`,m=this.generateErrorMessage(r,e),p=`<ol>${o} ${m}</ol>`;this.toastrService.warning(p,"Warning",{enableHtml:!0})}if(n&&!s){let o=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(o,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
1
+ import{h as u}from"./chunk-VAMLKDPP.js";import{b as h,e as g}from"./chunk-E3NPUJ23.js";import{ja as l,oa as c}from"./chunk-PQDPS2ID.js";var v=(()=>{let a=class a{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(n=>(n.VariantID=e.ID,n))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(u.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,n=e.length>0;if(!n&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),n&&s){let o=`<li>${this.generateSuccessMessage(t.length)}</li>`,m=this.generateErrorMessage(r,e),p=`<ol>${o} ${m}</ol>`;this.toastrService.warning(p,"Warning",{enableHtml:!0})}if(n&&!s){let o=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(o,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
2
2
  <div>
3
3
  <span class="fw-bold">Successfully</span> updated ${r} variants in 1 channels
4
4
  </div>
@@ -1 +1 @@
1
- import{b as u}from"./chunk-N3TTJVBG.js";import{a as f}from"./chunk-RJQGJK46.js";import"./chunk-5GM7EMCW.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as d}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import{n as c,r as m}from"./chunk-OVEJFFL6.js";import{Cd as n,Ub as a,ka as r,ta as s,ua as i}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-CBTOH6MR.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
1
+ import{b as u}from"./chunk-N3TTJVBG.js";import{a as f}from"./chunk-R6KGFJJ4.js";import"./chunk-VAMLKDPP.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as d}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import{n as c,r as m}from"./chunk-OVEJFFL6.js";import{Cd as n,Ub as a,ka as r,ta as s,ua as i}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-IDQSVSAG.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-RENQ3YZH.js";import{b as le}from"./chunk-LB6JFX4H.js";import{a as pe,b as me}from"./chunk-WT6W7RAQ.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-CCXKODFV.js";import{j as Z}from"./chunk-5GM7EMCW.js";import{e as Y}from"./chunk-E3NPUJ23.js";import{m as ae,n as oe}from"./chunk-BO4PPSB5.js";import{h as G,m as K,y as Q}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-64G3XLI6.js";import{$b as x,Ad as H,Cd as U,Da as P,Ea as R,Eb as u,Gb as h,Gc as c,Hc as d,Ic as J,Nb as B,Ob as T,Qb as $,Rb as F,Sb as a,Tb as o,Ub as f,Yb as j,Z as D,aa as w,bc as y,g as I,gb as v,ja as E,jb as p,nc as s,oc as C,pa as g,pc as b,rc as O,sc as q,ta as N,tc as z,uc as A,v as M,vc as V,yd as W,zd as k}from"./chunk-PQDPS2ID.js";import{a as S}from"./chunk-GNOSNGXM.js";var L=(()=>{let t=class t{constructor(){this.httpService=g(Y),this._pageination=new I({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(w(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=S(S({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=E({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),f(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,v)("alt",l.Name),p(),b(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),f(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td"),s(6),c(7,"json"),o(),a(8,"td"),s(9),c(10,"json"),o(),a(11,"td"),s(12),c(13,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,v),p(2),b(" ",l.ChannelName," "),p(2),C(d(7,5,l.Request)),p(3),C(d(10,7,l.Response)),p(3),C(J(13,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=j();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),$(13,de,14,12,"tr",null,T),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),x("page",function(e){P(l);let r=y();return R(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=y();p(13),F((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),f(1,"app-empty-state"),o())}var ze=(()=>{let t=class t{constructor(){this.channelLogService=g(L),this.authService=g(Z),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(M(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=X.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=N({type:t,selectors:[["app-channel-log"]],standalone:!0,features:[A([L]),V],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),x("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),z("ngModelChange",function(_){return q(r.channelID,_)||(r.channelID=_),_}),u(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,he,21,13,"div",8),c(13,"async"),u(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),O("ngModel",r.channelID),p(6),B(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[U,W,H,k,oe,ae,re,me,pe,le,ie,ne,ee,te,Q,G,K]});let i=t;return i})();export{ze as a};
1
+ import{a as re}from"./chunk-RENQ3YZH.js";import{b as le}from"./chunk-LB6JFX4H.js";import{a as pe,b as me}from"./chunk-WT6W7RAQ.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-CCXKODFV.js";import{j as Z}from"./chunk-VAMLKDPP.js";import{e as Y}from"./chunk-E3NPUJ23.js";import{m as ae,n as oe}from"./chunk-BO4PPSB5.js";import{h as G,m as K,y as Q}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-64G3XLI6.js";import{$b as x,Ad as H,Cd as U,Da as P,Ea as R,Eb as u,Gb as h,Gc as c,Hc as d,Ic as J,Nb as B,Ob as T,Qb as $,Rb as F,Sb as a,Tb as o,Ub as f,Yb as j,Z as D,aa as w,bc as y,g as I,gb as v,ja as E,jb as p,nc as s,oc as C,pa as g,pc as b,rc as O,sc as q,ta as N,tc as z,uc as A,v as M,vc as V,yd as W,zd as k}from"./chunk-PQDPS2ID.js";import{a as S}from"./chunk-GNOSNGXM.js";var L=(()=>{let t=class t{constructor(){this.httpService=g(Y),this._pageination=new I({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(w(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=S(S({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=E({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),f(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,v)("alt",l.Name),p(),b(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),f(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td"),s(6),c(7,"json"),o(),a(8,"td"),s(9),c(10,"json"),o(),a(11,"td"),s(12),c(13,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,v),p(2),b(" ",l.ChannelName," "),p(2),C(d(7,5,l.Request)),p(3),C(d(10,7,l.Response)),p(3),C(J(13,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=j();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),$(13,de,14,12,"tr",null,T),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),x("page",function(e){P(l);let r=y();return R(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=y();p(13),F((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),f(1,"app-empty-state"),o())}var ze=(()=>{let t=class t{constructor(){this.channelLogService=g(L),this.authService=g(Z),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(M(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=X.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=N({type:t,selectors:[["app-channel-log"]],standalone:!0,features:[A([L]),V],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),x("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),z("ngModelChange",function(_){return q(r.channelID,_)||(r.channelID=_),_}),u(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,he,21,13,"div",8),c(13,"async"),u(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),O("ngModel",r.channelID),p(6),B(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[U,W,H,k,oe,ae,re,me,pe,le,ie,ne,ee,te,Q,G,K]});let i=t;return i})();export{ze as a};
@@ -1 +1 @@
1
- import{b as se}from"./chunk-PD4CUVAW.js";import{c as ae}from"./chunk-UMNGKENU.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-CCXKODFV.js";import{j as X}from"./chunk-5GM7EMCW.js";import{b as q,e as Q}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as oe,n as re}from"./chunk-BO4PPSB5.js";import{t as ie,u as ne}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{h as H,m as z,y as J}from"./chunk-BSN7ZAXG.js";import{b as d,c as G}from"./chunk-64G3XLI6.js";import{r as y}from"./chunk-OVEJFFL6.js";import{$b as E,Cd as b,Da as x,Ea as N,Eb as g,Gb as m,Gc as _,Hc as v,Sb as r,Tb as a,Ub as W,Vb as I,Wb as T,Yb as w,Z as M,aa as K,bc as h,ea as V,gb as B,jb as l,ka as f,kb as S,nc as c,oc as C,pc as R,q as F,rc as O,sc as P,ta as j,tc as D,ua as u,ud as $,v as L,vd as k,yd as A}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";function pe(n,t){if(n&1&&(r(0,"span",13),W(1,"img",14),a(),r(2,"span"),c(3),a()),n&2){let s=t.item;l(),m("src",s.Img,B)("alt",s.Name),l(2),R(" ",s.Name," ")}}function de(n,t){if(n&1){let s=w();I(0),r(1,"a",15),E("click",function(){let e=x(s).ngIf,o=h();return N(o.submitLogistics(e))}),c(2,"Submit"),a(),T()}}function ge(n,t){if(n&1){let s=w();I(0),r(1,"ng-select",16),D("ngModelChange",function(e){x(s);let o=h().$implicit;return P(o.ProductSKU,e)||(o.ProductSKU=e),N(e)}),a(),T()}if(n&2){let s=t.ngIf,i=h().$implicit;l(),O("ngModel",i.ProductSKU),m("items",s)}}function he(n,t){if(n&1&&(r(0,"tr")(1,"td"),c(2),a(),r(3,"td"),c(4),a(),r(5,"td"),c(6),a(),r(7,"td"),g(8,ge,2,2,"ng-container",4),_(9,"async"),a()()),n&2){let s=t.$implicit,i=h();l(2),C(s.Name),l(2),C(s.Service),l(2),C(s.TypeString),l(2),m("ngIf",v(9,4,i.logisticOptions$))}}var ce=(()=>{let t=class t{constructor(i,e,o){this.http=i,this.toastr=e,this.authService=o,this.filter={ChannelID:""},this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let i=[d.WooCommerce,d.Lazada,d.Shopify,d.Plugo,d.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(i.forEach(o=>{e.TypeID===o&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(i){this.clonedLogisticServices$.pipe(L(e=>i.map(o=>(e.findIndex(p=>p.Name===o.Name&&p.ProductSKU==o.ProductSKU)==-1&&(o.IsChange=!0),o))),K(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(L(i=>i.map(e=>(e.ProductSKU=G.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),V(i=>{let e=JSON.parse(JSON.stringify(i));this.clonedLogisticServices$=F(e)}),M(1))}iniTitle(){let i=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}};t.\u0275fac=function(e){return new(e||t)(S(Q),S(q),S(X))},t.\u0275cmp=j({type:t,selectors:[["app-logistic"]],decls:29,vars:11,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,o){e&1&&(r(0,"mainpanel",0),E("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),c(4,"Select a Channel"),a(),r(5,"ng-select",2),D("ngModelChange",function(p){return P(o.filter.ChannelID,p)||(o.filter.ChannelID=p),p}),g(6,pe,4,3,"ng-template",3),a()()(),r(7,"actions"),g(8,de,3,0,"ng-container",4),_(9,"async"),a(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),c(19,"Logistic"),a(),r(20,"th"),c(21,"Service"),a(),r(22,"th"),c(23,"Type"),a(),r(24,"th"),c(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,he,10,6,"tr",12),_(28,"async"),a()()()()()()()()),e&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),l(5),m("clearable",!1)("items",o.channelOptions),O("ngModel",o.filter.ChannelID),l(3),m("ngIf",v(9,7,o.logisticServices$)),l(19),m("ngForOf",v(28,9,o.logisticServices$)))},dependencies:[$,k,H,z,oe,ee,Y,Z,ie,A]});let n=t;return n})();var fe=[{path:"",component:ce}],me=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u({type:t}),t.\u0275inj=f({imports:[b,y.forChild(fe)]});let n=t;return n})();var ke=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u({type:t}),t.\u0275inj=f({imports:[b,y,me,J,re,te,se,ae,ne]});let n=t;return n})();export{ke as LogisticModule};
1
+ import{b as se}from"./chunk-PD4CUVAW.js";import{c as ae}from"./chunk-UMNGKENU.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-CCXKODFV.js";import{j as X}from"./chunk-VAMLKDPP.js";import{b as q,e as Q}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as oe,n as re}from"./chunk-BO4PPSB5.js";import{t as ie,u as ne}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{h as H,m as z,y as J}from"./chunk-BSN7ZAXG.js";import{b as d,c as G}from"./chunk-64G3XLI6.js";import{r as y}from"./chunk-OVEJFFL6.js";import{$b as E,Cd as b,Da as x,Ea as N,Eb as g,Gb as m,Gc as _,Hc as v,Sb as r,Tb as a,Ub as W,Vb as I,Wb as T,Yb as w,Z as M,aa as K,bc as h,ea as V,gb as B,jb as l,ka as f,kb as S,nc as c,oc as C,pc as R,q as F,rc as O,sc as P,ta as j,tc as D,ua as u,ud as $,v as L,vd as k,yd as A}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";function pe(n,t){if(n&1&&(r(0,"span",13),W(1,"img",14),a(),r(2,"span"),c(3),a()),n&2){let s=t.item;l(),m("src",s.Img,B)("alt",s.Name),l(2),R(" ",s.Name," ")}}function de(n,t){if(n&1){let s=w();I(0),r(1,"a",15),E("click",function(){let e=x(s).ngIf,o=h();return N(o.submitLogistics(e))}),c(2,"Submit"),a(),T()}}function ge(n,t){if(n&1){let s=w();I(0),r(1,"ng-select",16),D("ngModelChange",function(e){x(s);let o=h().$implicit;return P(o.ProductSKU,e)||(o.ProductSKU=e),N(e)}),a(),T()}if(n&2){let s=t.ngIf,i=h().$implicit;l(),O("ngModel",i.ProductSKU),m("items",s)}}function he(n,t){if(n&1&&(r(0,"tr")(1,"td"),c(2),a(),r(3,"td"),c(4),a(),r(5,"td"),c(6),a(),r(7,"td"),g(8,ge,2,2,"ng-container",4),_(9,"async"),a()()),n&2){let s=t.$implicit,i=h();l(2),C(s.Name),l(2),C(s.Service),l(2),C(s.TypeString),l(2),m("ngIf",v(9,4,i.logisticOptions$))}}var ce=(()=>{let t=class t{constructor(i,e,o){this.http=i,this.toastr=e,this.authService=o,this.filter={ChannelID:""},this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let i=[d.WooCommerce,d.Lazada,d.Shopify,d.Plugo,d.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(i.forEach(o=>{e.TypeID===o&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.filter=i.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(i){this.clonedLogisticServices$.pipe(L(e=>i.map(o=>(e.findIndex(p=>p.Name===o.Name&&p.ProductSKU==o.ProductSKU)==-1&&(o.IsChange=!0),o))),K(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(L(i=>i.map(e=>(e.ProductSKU=G.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),V(i=>{let e=JSON.parse(JSON.stringify(i));this.clonedLogisticServices$=F(e)}),M(1))}iniTitle(){let i=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=i?i.Name:null}};t.\u0275fac=function(e){return new(e||t)(S(Q),S(q),S(X))},t.\u0275cmp=j({type:t,selectors:[["app-logistic"]],decls:29,vars:11,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,o){e&1&&(r(0,"mainpanel",0),E("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",1),c(4,"Select a Channel"),a(),r(5,"ng-select",2),D("ngModelChange",function(p){return P(o.filter.ChannelID,p)||(o.filter.ChannelID=p),p}),g(6,pe,4,3,"ng-template",3),a()()(),r(7,"actions"),g(8,de,3,0,"ng-container",4),_(9,"async"),a(),r(10,"content")(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr",11)(18,"th"),c(19,"Logistic"),a(),r(20,"th"),c(21,"Service"),a(),r(22,"th"),c(23,"Type"),a(),r(24,"th"),c(25,"Logistic Service"),a()()(),r(26,"tbody"),g(27,he,10,6,"tr",12),_(28,"async"),a()()()()()()()()),e&2&&(m("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),l(5),m("clearable",!1)("items",o.channelOptions),O("ngModel",o.filter.ChannelID),l(3),m("ngIf",v(9,7,o.logisticServices$)),l(19),m("ngForOf",v(28,9,o.logisticServices$)))},dependencies:[$,k,H,z,oe,ee,Y,Z,ie,A]});let n=t;return n})();var fe=[{path:"",component:ce}],me=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u({type:t}),t.\u0275inj=f({imports:[b,y.forChild(fe)]});let n=t;return n})();var ke=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u({type:t}),t.\u0275inj=f({imports:[b,y,me,J,re,te,se,ae,ne]});let n=t;return n})();export{ke as LogisticModule};
@@ -1 +1 @@
1
- import{a as he}from"./chunk-DLNXH2FE.js";import{a as oe}from"./chunk-BVIRHZTZ.js";import{a as fe}from"./chunk-N6IHFFFZ.js";import{a as xe,b as Ce}from"./chunk-PD4CUVAW.js";import{c as ue}from"./chunk-ADRVUMMW.js";import{a as ge}from"./chunk-XFTUE2ST.js";import{g as de}from"./chunk-HCDKYABV.js";import{j as ce}from"./chunk-5GM7EMCW.js";import{d as pe,g as se}from"./chunk-BO4PPSB5.js";import{t as _e,u as me}from"./chunk-HUUFOAKH.js";import{b as ee,h as te,m as ne,y as ie}from"./chunk-BSN7ZAXG.js";import{c as re,e as le,f as ae}from"./chunk-64G3XLI6.js";import{$b as T,Bd as J,Cd as Q,Da as g,Ea as u,Eb as p,Gb as m,Gc as $,Hc as j,Ic as q,Jc as w,Ma as B,Nb as v,Ob as E,Pa as U,Qb as M,Rb as V,Sb as c,Tb as _,Ub as I,Vb as C,Wb as f,Xb as R,Yb as h,bc as r,ca as z,ec as H,f as W,gb as S,jb as a,kb as P,mc as b,nc as s,oc as k,pc as y,rc as O,sc as D,sd as K,ta as A,tc as N,ud as X,vc as Z,vd as Y,xc as x,xd as G}from"./chunk-PQDPS2ID.js";var L=e=>[e],Te=e=>({"text-decoration-line-through":e}),be=e=>({"ms-10":e}),ye=e=>({"text-danger":e}),Se=e=>({"bg-gradient-warning":e});function ve(e,l){if(e&1){let n=h();c(0,"mat-slide-toggle",13),T("toggleChange",function(){g(n);let t=r();return t.toggleStatus=!t.toggleStatus,u(t.onToggle())}),c(1,"small",14),s(2),_()()}if(e&2){let n=r();a(2),y(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Ie(e,l){if(e&1){let n=h();c(0,"th")(1,"input",16),N("ngModelChange",function(t){g(n);let o=r(2);return D(o.checkboxState,t)||(o.checkboxState=t),u(t)}),T("ngModelChange",function(){g(n);let t=r(2);return u(t.onCheckboxStateChange())}),_()()}if(e&2){let n=r(2);a(),O("ngModel",n.checkboxState)}}function we(e,l){if(e&1&&(p(0,Ie,2,1,"ng-template",15),c(1,"th",11),s(2,"POS"),_()),e&2){let n=r();m("ngxPermissionsOnly",x(1,L,n.rolePriceEdit))}}function Fe(e,l){if(e&1&&(C(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),s(6),$(7,"stringLimit"),_()()()(),f()),e&2){let n=l.$implicit;a(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),a(),m("src",n==null?null:n.Img,S),a(2),y(" ",q(7,3,n.Name,20)," ")}}function Pe(e,l){e&1&&R(0)}function Ee(e,l){if(e&1&&(C(0),p(1,Pe,1,0,"ng-container",33),f()),e&2){r();let n=b(7);a(),m("ngTemplateOutlet",n)}}function Me(e,l){e&1&&R(0)}function Ve(e,l){if(e&1&&p(0,Me,1,0,"ng-container",33),e&2){r(2);let n=b(7);m("ngTemplateOutlet",n)}}function ke(e,l){if(e&1&&p(0,Ve,1,1,"ng-template",15),e&2){let n=r(4);m("ngxPermissionsOnly",x(1,L,n.rolePriceEdit))}}function Oe(e,l){if(e&1){let n=h();C(0),c(1,"input",34),N("ngModelChange",function(t){g(n);let o=r(4).$implicit;return D(o.selected,t)||(o.selected=t),u(t)}),T("ngModelChange",function(){g(n);let t=r(4).$implicit,o=r();return u(o.onCheckboxStateProduct(t.ID))}),_(),f()}if(e&2){let n=r(4).$implicit;a(),O("ngModel",n.selected),m("disabled",!(n!=null&&n.Category))}}function De(e,l){if(e&1&&p(0,Oe,2,2,"ng-container",22),e&2){let n=r(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function Ne(e,l){if(e&1){let n=h();C(0),c(1,"img",35),T("click",function(t){g(n);let o=r(3).$implicit,d=r();return u(d.onZoomImage(t,o==null?null:o.ImageUrl))}),_(),f()}if(e&2){let n=r(3).$implicit;a(),H("src",n==null?null:n.ThumbnailUrl,S)}}function $e(e,l){e&1&&I(0,"img",36)}function Be(e,l){if(e&1&&(C(0),c(1,"td",28)(2,"div",29),p(3,Ee,2,1,"ng-container",30)(4,ke,1,3,"ng-template",null,0,w)(6,De,1,1,"ng-template",null,1,w),c(8,"div",26),p(9,Ne,2,1,"ng-container",30)(10,$e,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),s(14),_(),c(15,"small",32),s(16),_()(),f()),e&2){let n=b(5),i=b(11),t=r(2).$implicit,o=r();a(),m("rowSpan",t==null?null:t.Variants.length),a(2),m("ngIf",o.table=="inventory")("ngIfElse",n),a(5),m("ngClass",x(10,be,(t==null||t.Variants==null?null:t.Variants.length)<=1)),a(),m("ngIf",t==null?null:t.ThumbnailUrl)("ngIfElse",i),a(3),m("rowSpan",t==null?null:t.Variants.length),a(2),k(t==null?null:t.Name),a(),m("ngClass",x(12,ye,!(t!=null&&t.Category))),a(),y("(",t!=null&&t.Category?t==null?null:t.Category:"Not Found In POS",")")}}function Ue(e,l){if(e&1&&(c(0,"a",27),I(1,"i",37),_()),e&2){let n=r().$implicit,i=r(2);m("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S)}}function Re(e,l){if(e&1){let n=h();c(0,"input",40),N("ngModelChange",function(t){g(n);let o=r(3).$implicit;return D(o.selected,t)||(o.selected=t),u(t)}),_()}if(e&2){let n=r(3).$implicit,i=r().$implicit;O("ngModel",n.selected),m("disabled",!(i!=null&&i.Category))}}function je(e,l){if(e&1&&(c(0,"td",38),p(1,Re,1,2,"input",39),_()),e&2){let n=r(2).$implicit,i=r(2);a(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Le(e,l){if(e&1&&(p(0,je,2,1,"ng-template",15),c(1,"td",24),s(2),$(3,"number"),_()),e&2){let n=r().$implicit,i=r(2);m("ngxPermissionsOnly",x(4,L,i.rolePriceEdit)),a(2),k(j(3,2,i.printPOS(n)))}}function We(e,l){if(e&1){let n=h();C(0),c(1,"td",41),T("click",function(){g(n);let t=r().$implicit,o=r().$implicit,d=r().$implicit,F=r();return u(F.openTableDialog(d.Name,o,t.ID,d.ChannelItemID))}),c(2,"div",29)(3,"div",42),s(4),$(5,"number"),_(),c(6,"a",43),T("click",function(t){return g(n),u(t==null?null:t.stopPropagation())}),I(7,"i",37),_()()(),f()}if(e&2){let n=l.$implicit,i=r(2).$implicit,t=r(2);a(),m("ngClass",x(5,Se,t.printPOS(i)!=t.printItem(n)&&t.hiddenIPOSInventory()==!1)),a(3),y(" ",j(5,3,t.printItem(n))," "),a(2),m("href",n.Url,S)}}function ze(e,l){e&1&&(c(0,"td",44)(1,"div",29)(2,"span"),s(3,"X"),_()()())}function Ae(e,l){if(e&1&&p(0,We,8,7,"ng-container",30)(1,ze,4,0,"ng-template",null,3,w),e&2){let n=l.$implicit,i=b(2),t=r().$implicit,o=r(2);m("ngIf",o.getItemFromChannel(t,n))("ngIfElse",i)}}function He(e,l){if(e&1&&(c(0,"tr"),p(1,Be,17,14,"ng-container",22),c(2,"td",23),s(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),s(7),_(),c(8,"div",21),p(9,Ue,2,1,"a",27),_()()(),p(10,Le,4,6),M(11,Ae,3,2,null,null,E),_()),e&2){let n=l.$implicit,i=l.$index,t=r().$implicit,o=r();a(),m("ngIf",i==0),a(2),k(n==null?null:n.Model),a(2),m("matTooltip",n.Discontinued?o.discontinuedVariantMsg:""),a(),m("ngClass",x(7,Te,n.Discontinued)),a(),y(" ",n.Code," "),a(2),v(t.Category?9:-1),a(),v(o.hiddenIPOSInventory()==!1?10:-1),a(),V(o.channel)}}function Ze(e,l){if(e&1&&(c(0,"tbody"),M(1,He,13,9,"tr",null,E),_()),e&2){let n=l.$implicit;a(),V(n.Variants)}}var bt=(()=>{let l=class l{constructor(i,t,o){this.dialog=i,this.biggerPictureService=t,this.authService=o,this.showProductToggle=!1,this.multiwarehouse=B(!1),this.hiddenIPOSInventory=B(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=oe.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new U,this.destroy$=new W,this.toggle=new U,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let t=this.data.filter(o=>o.ID==i);t.length>0&&(t=t.map(o=>(o.Variants=o.Variants.map(d=>(d.selected=o.selected,d)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t)),i))}getItemFromChannel(i,t){return i.Channel.find(d=>re.IsNotEmpty(t.LocationID)?d.LocationID==t.LocationID:d.ChannelID==t.ID)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,t,o,d){this.dialog.open(he,{data:{Name:i,Variant:t,ChannelID:o,Table:this.table,ChannelItemID:d}}).afterClosed().pipe(z(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,t){this.biggerPictureService.openBiggerPicture(i,t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(t){return new(t||l)(P(pe),P(ge),P(ce))},l.\u0275cmp=A({type:l,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[Z],decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(t,o){t&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),s(7,"Product"),_(),p(8,ve,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),s(10,"Variant"),_(),c(11,"th",11),s(12,"SKU"),_(),p(13,we,3,3)(14,Fe,8,6,"ng-container",12),_()(),M(15,Ze,3,0,"tbody",null,E),_()()),t&2&&(a(8),v(o.showProductToggle?8:-1),a(5),v(o.hiddenIPOSInventory()==!1?13:-1),a(),m("ngForOf",o.channel),a(),V(o.data))},dependencies:[Q,K,X,Y,G,J,ie,ee,te,ne,Ce,xe,se,de,ue,ae,le,me,_e,fe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let e=l;return e})();export{bt as a};
1
+ import{a as he}from"./chunk-DLNXH2FE.js";import{a as oe}from"./chunk-BVIRHZTZ.js";import{a as fe}from"./chunk-N6IHFFFZ.js";import{a as xe,b as Ce}from"./chunk-PD4CUVAW.js";import{c as ue}from"./chunk-ADRVUMMW.js";import{a as ge}from"./chunk-XFTUE2ST.js";import{g as de}from"./chunk-HCDKYABV.js";import{j as ce}from"./chunk-VAMLKDPP.js";import{d as pe,g as se}from"./chunk-BO4PPSB5.js";import{t as _e,u as me}from"./chunk-HUUFOAKH.js";import{b as ee,h as te,m as ne,y as ie}from"./chunk-BSN7ZAXG.js";import{c as re,e as le,f as ae}from"./chunk-64G3XLI6.js";import{$b as T,Bd as J,Cd as Q,Da as g,Ea as u,Eb as p,Gb as m,Gc as $,Hc as j,Ic as q,Jc as w,Ma as B,Nb as v,Ob as E,Pa as U,Qb as M,Rb as V,Sb as c,Tb as _,Ub as I,Vb as C,Wb as f,Xb as R,Yb as h,bc as r,ca as z,ec as H,f as W,gb as S,jb as a,kb as P,mc as b,nc as s,oc as k,pc as y,rc as O,sc as D,sd as K,ta as A,tc as N,ud as X,vc as Z,vd as Y,xc as x,xd as G}from"./chunk-PQDPS2ID.js";var L=e=>[e],Te=e=>({"text-decoration-line-through":e}),be=e=>({"ms-10":e}),ye=e=>({"text-danger":e}),Se=e=>({"bg-gradient-warning":e});function ve(e,l){if(e&1){let n=h();c(0,"mat-slide-toggle",13),T("toggleChange",function(){g(n);let t=r();return t.toggleStatus=!t.toggleStatus,u(t.onToggle())}),c(1,"small",14),s(2),_()()}if(e&2){let n=r();a(2),y(" ",n.productToggleTitle?n.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Ie(e,l){if(e&1){let n=h();c(0,"th")(1,"input",16),N("ngModelChange",function(t){g(n);let o=r(2);return D(o.checkboxState,t)||(o.checkboxState=t),u(t)}),T("ngModelChange",function(){g(n);let t=r(2);return u(t.onCheckboxStateChange())}),_()()}if(e&2){let n=r(2);a(),O("ngModel",n.checkboxState)}}function we(e,l){if(e&1&&(p(0,Ie,2,1,"ng-template",15),c(1,"th",11),s(2,"POS"),_()),e&2){let n=r();m("ngxPermissionsOnly",x(1,L,n.rolePriceEdit))}}function Fe(e,l){if(e&1&&(C(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),s(6),$(7,"stringLimit"),_()()()(),f()),e&2){let n=l.$implicit;a(3),m("matTooltip",(n.Name==null?null:n.Name.length)>20?n.Name:""),a(),m("src",n==null?null:n.Img,S),a(2),y(" ",q(7,3,n.Name,20)," ")}}function Pe(e,l){e&1&&R(0)}function Ee(e,l){if(e&1&&(C(0),p(1,Pe,1,0,"ng-container",33),f()),e&2){r();let n=b(7);a(),m("ngTemplateOutlet",n)}}function Me(e,l){e&1&&R(0)}function Ve(e,l){if(e&1&&p(0,Me,1,0,"ng-container",33),e&2){r(2);let n=b(7);m("ngTemplateOutlet",n)}}function ke(e,l){if(e&1&&p(0,Ve,1,1,"ng-template",15),e&2){let n=r(4);m("ngxPermissionsOnly",x(1,L,n.rolePriceEdit))}}function Oe(e,l){if(e&1){let n=h();C(0),c(1,"input",34),N("ngModelChange",function(t){g(n);let o=r(4).$implicit;return D(o.selected,t)||(o.selected=t),u(t)}),T("ngModelChange",function(){g(n);let t=r(4).$implicit,o=r();return u(o.onCheckboxStateProduct(t.ID))}),_(),f()}if(e&2){let n=r(4).$implicit;a(),O("ngModel",n.selected),m("disabled",!(n!=null&&n.Category))}}function De(e,l){if(e&1&&p(0,Oe,2,2,"ng-container",22),e&2){let n=r(3).$implicit;m("ngIf",(n==null||n.Variants==null?null:n.Variants.length)>1)}}function Ne(e,l){if(e&1){let n=h();C(0),c(1,"img",35),T("click",function(t){g(n);let o=r(3).$implicit,d=r();return u(d.onZoomImage(t,o==null?null:o.ImageUrl))}),_(),f()}if(e&2){let n=r(3).$implicit;a(),H("src",n==null?null:n.ThumbnailUrl,S)}}function $e(e,l){e&1&&I(0,"img",36)}function Be(e,l){if(e&1&&(C(0),c(1,"td",28)(2,"div",29),p(3,Ee,2,1,"ng-container",30)(4,ke,1,3,"ng-template",null,0,w)(6,De,1,1,"ng-template",null,1,w),c(8,"div",26),p(9,Ne,2,1,"ng-container",30)(10,$e,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),s(14),_(),c(15,"small",32),s(16),_()(),f()),e&2){let n=b(5),i=b(11),t=r(2).$implicit,o=r();a(),m("rowSpan",t==null?null:t.Variants.length),a(2),m("ngIf",o.table=="inventory")("ngIfElse",n),a(5),m("ngClass",x(10,be,(t==null||t.Variants==null?null:t.Variants.length)<=1)),a(),m("ngIf",t==null?null:t.ThumbnailUrl)("ngIfElse",i),a(3),m("rowSpan",t==null?null:t.Variants.length),a(2),k(t==null?null:t.Name),a(),m("ngClass",x(12,ye,!(t!=null&&t.Category))),a(),y("(",t!=null&&t.Category?t==null?null:t.Category:"Not Found In POS",")")}}function Ue(e,l){if(e&1&&(c(0,"a",27),I(1,"i",37),_()),e&2){let n=r().$implicit,i=r(2);m("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),S)}}function Re(e,l){if(e&1){let n=h();c(0,"input",40),N("ngModelChange",function(t){g(n);let o=r(3).$implicit;return D(o.selected,t)||(o.selected=t),u(t)}),_()}if(e&2){let n=r(3).$implicit,i=r().$implicit;O("ngModel",n.selected),m("disabled",!(i!=null&&i.Category))}}function je(e,l){if(e&1&&(c(0,"td",38),p(1,Re,1,2,"input",39),_()),e&2){let n=r(2).$implicit,i=r(2);a(),m("ngIf",i.printPOS(n)>=0||i.table=="price")}}function Le(e,l){if(e&1&&(p(0,je,2,1,"ng-template",15),c(1,"td",24),s(2),$(3,"number"),_()),e&2){let n=r().$implicit,i=r(2);m("ngxPermissionsOnly",x(4,L,i.rolePriceEdit)),a(2),k(j(3,2,i.printPOS(n)))}}function We(e,l){if(e&1){let n=h();C(0),c(1,"td",41),T("click",function(){g(n);let t=r().$implicit,o=r().$implicit,d=r().$implicit,F=r();return u(F.openTableDialog(d.Name,o,t.ID,d.ChannelItemID))}),c(2,"div",29)(3,"div",42),s(4),$(5,"number"),_(),c(6,"a",43),T("click",function(t){return g(n),u(t==null?null:t.stopPropagation())}),I(7,"i",37),_()()(),f()}if(e&2){let n=l.$implicit,i=r(2).$implicit,t=r(2);a(),m("ngClass",x(5,Se,t.printPOS(i)!=t.printItem(n)&&t.hiddenIPOSInventory()==!1)),a(3),y(" ",j(5,3,t.printItem(n))," "),a(2),m("href",n.Url,S)}}function ze(e,l){e&1&&(c(0,"td",44)(1,"div",29)(2,"span"),s(3,"X"),_()()())}function Ae(e,l){if(e&1&&p(0,We,8,7,"ng-container",30)(1,ze,4,0,"ng-template",null,3,w),e&2){let n=l.$implicit,i=b(2),t=r().$implicit,o=r(2);m("ngIf",o.getItemFromChannel(t,n))("ngIfElse",i)}}function He(e,l){if(e&1&&(c(0,"tr"),p(1,Be,17,14,"ng-container",22),c(2,"td",23),s(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),s(7),_(),c(8,"div",21),p(9,Ue,2,1,"a",27),_()()(),p(10,Le,4,6),M(11,Ae,3,2,null,null,E),_()),e&2){let n=l.$implicit,i=l.$index,t=r().$implicit,o=r();a(),m("ngIf",i==0),a(2),k(n==null?null:n.Model),a(2),m("matTooltip",n.Discontinued?o.discontinuedVariantMsg:""),a(),m("ngClass",x(7,Te,n.Discontinued)),a(),y(" ",n.Code," "),a(2),v(t.Category?9:-1),a(),v(o.hiddenIPOSInventory()==!1?10:-1),a(),V(o.channel)}}function Ze(e,l){if(e&1&&(c(0,"tbody"),M(1,He,13,9,"tr",null,E),_()),e&2){let n=l.$implicit;a(),V(n.Variants)}}var bt=(()=>{let l=class l{constructor(i,t,o){this.dialog=i,this.biggerPictureService=t,this.authService=o,this.showProductToggle=!1,this.multiwarehouse=B(!1),this.hiddenIPOSInventory=B(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=oe.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new U,this.destroy$=new W,this.toggle=new U,this.hostName=this.authService.getDomain()}ngOnInit(){this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}onCheckboxStateProduct(i){let t=this.data.filter(o=>o.ID==i);t.length>0&&(t=t.map(o=>(o.Variants=o.Variants.map(d=>(d.selected=o.selected,d)),o)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t)),i))}getItemFromChannel(i,t){return i.Channel.find(d=>re.IsNotEmpty(t.LocationID)?d.LocationID==t.LocationID:d.ChannelID==t.ID)}printItem(i){if(this.table=="inventory")return i.Inventory;if(this.table=="price")return i.Price}openTableDialog(i,t,o,d){this.dialog.open(he,{data:{Name:i,Variant:t,ChannelID:o,Table:this.table,ChannelItemID:d}}).afterClosed().pipe(z(this.destroy$)).subscribe(F=>{F!=null&&this.onSubmit.emit(F)})}printPOS(i){return this.table=="inventory"?i.Inventory?i.Inventory:0:this.table=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,t){this.biggerPictureService.openBiggerPicture(i,t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};l.\u0275fac=function(t){return new(t||l)(P(pe),P(ge),P(ce))},l.\u0275cmp=A({type:l,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[Z],decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0","pointer","cell-hover",3,"click","ngClass"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(t,o){t&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),s(7,"Product"),_(),p(8,ve,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),s(10,"Variant"),_(),c(11,"th",11),s(12,"SKU"),_(),p(13,we,3,3)(14,Fe,8,6,"ng-container",12),_()(),M(15,Ze,3,0,"tbody",null,E),_()()),t&2&&(a(8),v(o.showProductToggle?8:-1),a(5),v(o.hiddenIPOSInventory()==!1?13:-1),a(),m("ngForOf",o.channel),a(),V(o.data))},dependencies:[Q,K,X,Y,G,J,ie,ee,te,ne,Ce,xe,se,de,ue,ae,le,me,_e,fe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let e=l;return e})();export{bt as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-5JOW2QWK.js";import{a as P}from"./chunk-IUKHWWDP.js";import{a as C}from"./chunk-6YZFSP2B.js";import{b as O}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import{c as M}from"./chunk-UMNGKENU.js";import{a as m}from"./chunk-RJQGJK46.js";import{a as h}from"./chunk-PNVJ62RQ.js";import"./chunk-FMV4LYKN.js";import"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{e as s}from"./chunk-CCXKODFV.js";import"./chunk-5GM7EMCW.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as u}from"./chunk-BO4PPSB5.js";import{u as f}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as g}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import{n as l,r as a}from"./chunk-OVEJFFL6.js";import{Cd as i,Ub as c,ka as e,ta as d,ua as r}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-5MDJ736Z.js").then(o=>o.StatusModule),canActivate:[m]},{path:"download",loadChildren:()=>import("./chunk-BGVNHOVR.js").then(o=>o.DownloadModule),canActivate:[m]},{path:"upload",loadComponent:()=>import("./chunk-SBRCDNLE.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
1
+ import{a as b}from"./chunk-5JOW2QWK.js";import{a as P}from"./chunk-IUKHWWDP.js";import{a as C}from"./chunk-6YZFSP2B.js";import{b as O}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import{c as M}from"./chunk-UMNGKENU.js";import{a as m}from"./chunk-R6KGFJJ4.js";import{a as h}from"./chunk-PNVJ62RQ.js";import"./chunk-FMV4LYKN.js";import"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{e as s}from"./chunk-CCXKODFV.js";import"./chunk-VAMLKDPP.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as u}from"./chunk-BO4PPSB5.js";import{u as f}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as g}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import{n as l,r as a}from"./chunk-OVEJFFL6.js";import{Cd as i,Ub as c,ka as e,ta as d,ua as r}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-I2TLXLNK.js").then(o=>o.StatusModule),canActivate:[m]},{path:"download",loadChildren:()=>import("./chunk-TFGY2CZB.js").then(o=>o.DownloadModule),canActivate:[m]},{path:"upload",loadComponent:()=>import("./chunk-V7DEJOKT.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-CCXKODFV.js";import{a as ge,j as be}from"./chunk-5GM7EMCW.js";import{b as fe,e as S}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{c as te,h as ne,i as ie,k as oe,m as re,n as ae,s as se,t as de,u as ce,v as le,y as me}from"./chunk-BSN7ZAXG.js";import{a as w,c as ue,d as he,f as xe}from"./chunk-64G3XLI6.js";import{m as y,o as v,r as j}from"./chunk-OVEJFFL6.js";import{$b as u,Cd as ee,Da as b,Ea as _,Eb as f,Gb as p,Gc as Q,Hc as K,Jc as $,Kb as U,Sb as i,Tb as r,Ub as l,Vb as k,Wb as E,Yb as z,Z as F,bc as g,gb as M,hc as W,ic as q,ja as R,jb as c,jc as H,ka as A,kb as m,mc as P,nc as a,oc as C,pc as B,qc as Y,rc as I,sc as L,sd as J,ta as x,tc as T,ua as N,ud as D,vd as X,yc as G,yd as Z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),p("href",d.href,M),c(),p("src",d.imgSrc,M),c(),p("href",d.href,M),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),p("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),p("src",d.img,M)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),p("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),p("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),p("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),p("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),p("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),p("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),p("ngIf",e.browser!="edge"),c(),p("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY},{title:"Plugo",img:w.PLUGONEW}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(v),m(fe),m(Ce),m(be),m(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),p("newsList",K(6,5,s.news$)),c(3),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),p("href",s.changelogUrl,M),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
1
+ import{a as pe}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-CCXKODFV.js";import{a as ge,j as be}from"./chunk-VAMLKDPP.js";import{b as fe,e as S}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{c as te,h as ne,i as ie,k as oe,m as re,n as ae,s as se,t as de,u as ce,v as le,y as me}from"./chunk-BSN7ZAXG.js";import{a as w,c as ue,d as he,f as xe}from"./chunk-64G3XLI6.js";import{m as y,o as v,r as j}from"./chunk-OVEJFFL6.js";import{$b as u,Cd as ee,Da as b,Ea as _,Eb as f,Gb as p,Gc as Q,Hc as K,Jc as $,Kb as U,Sb as i,Tb as r,Ub as l,Vb as k,Wb as E,Yb as z,Z as F,bc as g,gb as M,hc as W,ic as q,ja as R,jb as c,jc as H,ka as A,kb as m,mc as P,nc as a,oc as C,pc as B,qc as Y,rc as I,sc as L,sd as J,ta as x,tc as T,ua as N,ud as D,vd as X,yc as G,yd as Z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),p("href",d.href,M),c(),p("src",d.imgSrc,M),c(),p("href",d.href,M),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),p("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),p("src",d.img,M)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),p("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),p("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),p("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),p("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),p("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),p("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),p("ngIf",e.browser!="edge"),c(),p("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY},{title:"Plugo",img:w.PLUGONEW}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(v),m(fe),m(Ce),m(be),m(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),p("newsList",K(6,5,s.news$)),c(3),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),p("href",s.changelogUrl,M),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};