marketplacepos 3.6.4 → 3.7.1
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.
- package/Marketplace/3rdpartylicenses.txt +62 -62
- package/Marketplace/{chunk-ZO24DBCC.js → chunk-27MFG2V3.js} +1 -1
- package/Marketplace/{chunk-PJIKFDGL.js → chunk-3IE75VB2.js} +1 -1
- package/Marketplace/{chunk-YDJHEKKE.js → chunk-3TBUXGN2.js} +1 -1
- package/Marketplace/chunk-3XIO5MXN.js +1 -0
- package/Marketplace/chunk-3Z7G7454.js +4 -0
- package/Marketplace/{chunk-BVNI7M43.js → chunk-6JZXM3Z4.js} +1 -1
- package/Marketplace/chunk-6TDCWPXI.js +2 -0
- package/Marketplace/chunk-AMNHDM4A.js +2 -0
- package/Marketplace/{chunk-UGPHFJAX.js → chunk-AWF36NII.js} +1 -1
- package/Marketplace/chunk-AZ6WKDZE.js +2 -0
- package/Marketplace/{chunk-HCXIXQ3P.js → chunk-BAHS6OIP.js} +5 -5
- package/Marketplace/{chunk-NP4NUU26.js → chunk-BQZT7VC6.js} +1 -1
- package/Marketplace/chunk-BRQEPBAV.js +39 -0
- package/Marketplace/chunk-BVOYXTEO.js +1 -0
- package/Marketplace/{chunk-YW4ETQW2.js → chunk-C5OKI7IN.js} +1 -1
- package/Marketplace/{chunk-EX7JS5XV.js → chunk-C6CRAPMP.js} +1 -1
- package/Marketplace/{chunk-AYVVAF2D.js → chunk-CEIPUO3T.js} +1 -1
- package/Marketplace/{chunk-WRPFY7PU.js → chunk-DQ556KMX.js} +2 -2
- package/Marketplace/chunk-E5IYLHFK.js +1 -0
- package/Marketplace/{chunk-XLVT5MIX.js → chunk-EAPYNH2I.js} +1 -1
- package/Marketplace/{chunk-JTPNWUC5.js → chunk-EB34X6M5.js} +1 -1
- package/Marketplace/{chunk-C6EE6UMS.js → chunk-EDYL25D7.js} +1 -1
- package/Marketplace/{chunk-WDFNDY2L.js → chunk-F46K5N6V.js} +1 -1
- package/Marketplace/{chunk-O4JO5HBG.js → chunk-F66WSMGF.js} +1 -1
- package/Marketplace/chunk-FHTEX4VI.js +1 -0
- package/Marketplace/{chunk-N5JT3L3P.js → chunk-HNFHD5DZ.js} +1 -1
- package/Marketplace/chunk-IXKXSEUO.js +5 -0
- package/Marketplace/{chunk-TKFPKCG2.js → chunk-JJJFKCNJ.js} +1 -1
- package/Marketplace/{chunk-4XO4E2OI.js → chunk-K4EYVQBL.js} +1 -1
- package/Marketplace/{chunk-5W3D75EL.js → chunk-LZWVYHLU.js} +1 -1
- package/Marketplace/{chunk-FOXV7BI2.js → chunk-NGBU7BOS.js} +1 -1
- package/Marketplace/{chunk-2TNMBZG6.js → chunk-NMVME7V7.js} +1 -1
- package/Marketplace/{chunk-U7J6Y2ZR.js → chunk-P6UO6DX3.js} +1 -1
- package/Marketplace/{chunk-XRYND57F.js → chunk-P7VJZQDH.js} +1 -1
- package/Marketplace/{chunk-EZPFNEBG.js → chunk-PEA3QZNR.js} +1 -1
- package/Marketplace/chunk-PFWK7DXX.js +1 -0
- package/Marketplace/{chunk-LRJDQQMW.js → chunk-PPMANECT.js} +1 -1
- package/Marketplace/chunk-Q3PNFN2P.js +1 -0
- package/Marketplace/chunk-QBGUD5XV.js +1 -0
- package/Marketplace/chunk-QK6IV4IN.js +1 -0
- package/Marketplace/{chunk-TGTYAI7P.js → chunk-RW3P47SS.js} +1 -1
- package/Marketplace/chunk-S4OY7WNR.js +1 -0
- package/Marketplace/{chunk-J6FCA2GC.js → chunk-SFRVPZY5.js} +1 -1
- package/Marketplace/chunk-SHE2HRK4.js +1 -0
- package/Marketplace/{chunk-PO44ILHG.js → chunk-SXEG2MLM.js} +1 -1
- package/Marketplace/{chunk-THMRV5XU.js → chunk-SZYLETKI.js} +1 -1
- package/Marketplace/{chunk-ULL6P5FP.js → chunk-T62ZNA2E.js} +1 -1
- package/Marketplace/chunk-UFDVDRIL.js +1 -0
- package/Marketplace/{chunk-Q2GGNFJX.js → chunk-UJUFXSVW.js} +1 -1
- package/Marketplace/{chunk-4EAH4CVW.js → chunk-URMO6FUH.js} +1 -1
- package/Marketplace/chunk-UWM3HFZE.js +1 -0
- package/Marketplace/{chunk-M7SI7KCP.js → chunk-V4TOR5C3.js} +1 -1
- package/Marketplace/{chunk-CC7AXJ62.js → chunk-VFVGT6W3.js} +1 -1
- package/Marketplace/{chunk-5437ABT5.js → chunk-VQFVU45K.js} +1 -1
- package/Marketplace/chunk-WCDKR3FP.js +1 -0
- package/Marketplace/{chunk-7IYEHG7N.js → chunk-WJEQNHXJ.js} +1 -1
- package/Marketplace/chunk-XA3H6AG7.js +3 -0
- package/Marketplace/{chunk-URMIO2PO.js → chunk-XQLF7ESA.js} +1 -1
- package/Marketplace/{chunk-TM72OVCB.js → chunk-Y5KDY32S.js} +1 -1
- package/Marketplace/{chunk-CSPU7H6P.js → chunk-YBKLOXGJ.js} +1 -1
- package/Marketplace/chunk-YZ2MT7MV.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-RAPO7M6B.js +1 -0
- package/Marketplace/{styles-5ZLA5BQS.css → styles-BYB6Q4RC.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4JJEXEXD.js +0 -1
- package/Marketplace/chunk-6CMIQC4Z.js +0 -39
- package/Marketplace/chunk-6JF7QYRS.js +0 -2
- package/Marketplace/chunk-7W5OCB74.js +0 -1
- package/Marketplace/chunk-ART3IBLH.js +0 -1
- package/Marketplace/chunk-AUQYI2EA.js +0 -1
- package/Marketplace/chunk-BWTDHNZV.js +0 -1
- package/Marketplace/chunk-C2A52LSM.js +0 -2
- package/Marketplace/chunk-D5NWJJ3K.js +0 -1
- package/Marketplace/chunk-F5TBMY3G.js +0 -1
- package/Marketplace/chunk-G7VXQRNU.js +0 -1
- package/Marketplace/chunk-GGUUOJBM.js +0 -4
- package/Marketplace/chunk-GOLQA2OV.js +0 -1
- package/Marketplace/chunk-IYJYQNSW.js +0 -1
- package/Marketplace/chunk-MWEX4KT3.js +0 -5
- package/Marketplace/chunk-N4KAWMLG.js +0 -1
- package/Marketplace/chunk-PJ55JADV.js +0 -1
- package/Marketplace/chunk-TRPWLPXX.js +0 -1
- package/Marketplace/chunk-UIXUUR3M.js +0 -1
- package/Marketplace/chunk-WAQZNQJA.js +0 -2
- package/Marketplace/chunk-WEPTPOTB.js +0 -1
- package/Marketplace/chunk-XB6JTMTF.js +0 -1
- package/Marketplace/chunk-XGU6OKNN.js +0 -1
- package/Marketplace/chunk-XKSSZDF5.js +0 -1
- package/Marketplace/chunk-YSP6AH3T.js +0 -1
- package/Marketplace/chunk-YZSU7OTN.js +0 -3
- package/Marketplace/main-C2ZAIPC7.js +0 -1
- /package/Marketplace/{chunk-72YRW3ZC.js → chunk-JC2XATFG.js} +0 -0
- /package/Marketplace/{chunk-UTOILVIA.js → chunk-RMAUQHGQ.js} +0 -0
- /package/Marketplace/{chunk-NDVNSHV5.js → chunk-VNDEHKWX.js} +0 -0
- /package/Marketplace/{polyfills-HPRX66LM.js → polyfills-IC53TUFL.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-RMAUQHGQ.js";import{a as O,b as xe,c as Se,d as ve,e as Pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-BAHS6OIP.js";import{a as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-Q3PNFN2P.js";import{b as Je}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-SZYLETKI.js";import{a as He,b as Ye}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-T62ZNA2E.js";import{a as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-VNDEHKWX.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-BQZT7VC6.js";import{a as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-WCDKR3FP.js";import{a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-IXKXSEUO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-LZWVYHLU.js";import{a as Ue,b as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-EDYL25D7.js";import{e as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3Z7G7454.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-P6UO6DX3.js";import{b as z,e as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-NGBU7BOS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-F66WSMGF.js";import{b as _e,c as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UJUFXSVW.js";import{a as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-C5OKI7IN.js";import{a as ze,b as Ge,c as Ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-F46K5N6V.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-SXEG2MLM.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3TBUXGN2.js";import{a as Oe,c as $e,d as Le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-CEIPUO3T.js";import{a as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-PEA3QZNR.js";import{B as H,C as Re,q as ue,r as Ae,u as J}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-AMNHDM4A.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-SFRVPZY5.js";import{b as ce,c as se,h as N,k,m as pe,u as me,v as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-V4TOR5C3.js";import{c as E}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UFDVDRIL.js";import{$a as S,B as M,Cb as v,Db as P,Eb as re,Fa as l,Ga as b,Hc as Me,Ja as Ee,Lb as W,Lc as le,Oa as s,Q as te,Ua as d,X as $,Xb as L,Za as r,Zb as A,_a as c,_b as R,aa as ne,ab as w,bb as T,bc as U,db as x,ea as F,ec as B,fa as ie,fc as j,hb as u,ja as _,jb as p,ka as h,mb as ae,ob as Q,pb as m,q as X,qb as V,rb as I,sb as oe,ub as Fe,wb as y,za as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3IE75VB2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-JC2XATFG.js";function st(i,o){if(i&1){let t=x();r(0,"button",19),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",20),m(2," Scan Channel "),c()}}function pt(i,o){if(i&1){let t=x();r(0,"button",21),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.onUpdateItems(n))}),S(1,"i",22),m(2," Update "),c()}}function mt(i,o){if(i&1&&(r(0,"div"),d(1,st,3,0,"button",17)(2,pt,3,0,"button",18),c()),i&2){let t=o.ngIf,e=p(2);l(1),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function dt(i,o){if(i&1){let t=x();r(0,"div",23)(1,"app-table",24),u("onToggle",function(n){_(t);let a=p(2);return h(a.onShowDifferencePrice(n))})("onSubmit",function(n){_(t);let a=p(2);return h(a.updatePriceByVariant(n))}),v(2,"async"),c()()}if(i&2){let t=p().ngIf,e=p();l(1),s("showProductToggle",!0)("data",P(2,4,e.paginationService.data$))("channel",e.channelOptions)("filter",t.Filter)}}function _t(i,o){if(i&1){let t=x();r(0,"span",25),u("click",function(){_(t);let n=p(2);return h(n.getRowCount())}),r(1,"i",26),m(2,"?"),c()()}}function ht(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t))}}function ut(i,o){if(i&1){let t=x();r(0,"a",27),u("click",function(){_(t);let n=p(2);return h(n.onNextPage())}),S(1,"i",28),m(2," Next"),c()}}function gt(i,o){if(i&1){let t=x();r(0,"a",29),u("click",function(){_(t);let n=p(2);return h(n.onLastPage())}),S(1,"i",30),m(2," Last"),c()}}function Ct(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("onSubmit",function(n){_(t);let a=p();return h(a.onSearch(n))}),r(1,"actions")(2,"div",2),d(3,mt,3,2,"div",3),v(4,"async"),c()(),r(5,"filters")(6,"div")(7,"label",4),m(8,"Page Number"),c(),r(9,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(10,"div",6)(11,"label",4),m(12,"Page Size"),c(),r(13,"input",5),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),r(14,"content")(15,"div",7)(16,"div",8),d(17,dt,3,6,"div",9),v(18,"async"),c(),r(19,"div",10)(20,"div",11)(21,"div",12),m(22),v(23,"number"),v(24,"async"),d(25,_t,3,0,"span",13)(26,ht,3,3,"span",3),v(27,"async"),m(28),c()(),r(29,"div",14),d(30,ut,3,0,"a",15)(31,gt,3,0,"a",16),c()()()()()}if(i&2){let t=p(),e;s("pageData",t.pageData)("textButton","Search"),l(3),s("ngIf",P(4,12,t.paginationService.data$)),l(6),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(4),s("ngIf",P(18,14,t.paginationService.data$)),l(5),I(" Showing 1 - ",P(23,16,(e=P(24,18,t.paginationService.data$))==null?null:e.length)," of "),l(3),s("ngIf",t.paginationService.hideCount),l(1),s("ngIf",!t.paginationService.hideCount&&P(27,20,t.allDataCount$)),l(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),l(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}var nt=(()=>{let o=class o{constructor(e,n,a,g,C,f){this.http=e,this.toastr=n,this.dialog=a,this.paginationService=g,this.productService=C,this.authService=f,this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.filterOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.getDataAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe($(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.paginationService.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.paginationService.reloadPagination(this.searchFilter)}openScanDialog(){this.searchFilter.ChannelID=E.GuidEMpty;let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>E.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct,this.searchFilter.Async=a.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.initPageLoader(),this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}})}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let g=n.map(f=>({ID:f.ID,Code:f.Code,Price:f.UnitPrice}));var a=this.channelOptions.filter(f=>f.selected).map(f=>f.ID);let C={ListChannelID:a,ListPrice:g};this.http.post("/api/Price/UpdateChannel",C).subscribe(f=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+C.ListPrice.length+" items in "+C.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let n={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",n).subscribe(a=>{let g=this.productService.findChannelById(n.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+g.Name+" to "+n.Price,"Success"),this.paginationService.reloadPagination(this.searchFilter)})}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>a!==void 0)).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/api/${this.rowCountAPI}`,{})}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Z),b(Y),b(K))},o.\u0275cmp=F({type:o,selectors:[["app-price-pos-channel"]],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"pageData","textButton","onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-md-12",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"showProductToggle","data","channel","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Ct,32,22,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[R,se,pe,N,k,H,ve,U,B],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();function ft(i,o){if(i&1&&(r(0,"mat-radio-button",3),m(1),c()),i&2){let t=o.$implicit,e=o.index,n=p();s("value",t.Key)("name",n.name)("title",n.tooltipsText[e]?n.tooltipsText[e]:""),l(1),I(" ",t.Value,"")}}var xt=i=>({"border-0 rounded":i}),be=(()=>{let o=class o{constructor(){this.modelChange=new Ee,this.border=!1,this.tooltipsText=[]}change(e){this.modelChange.emit(e)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["radio-options"]],inputs:{model:"model",options:"options",border:"border",name:"name",tooltipsText:"tooltipsText"},outputs:{modelChange:"modelChange"},standalone:!0,features:[Fe],decls:3,vars:5,consts:[[1,"form-control","h-100","rounded-1",3,"ngClass"],[3,"ngModel","ngModelChange"],["class","me-5","data-toggle","tooltip","data-placement","right",3,"value","name","title",4,"ngFor","ngForOf"],["data-toggle","tooltip","data-placement","right",1,"me-5",3,"value","name","title"]],template:function(n,a){n&1&&(r(0,"div",0)(1,"mat-radio-group",1),u("ngModelChange",function(C){return a.change(C)}),d(2,ft,2,4,"mat-radio-button",2),c()()),n&2&&(s("ngClass",y(3,xt,a.border==!1)),l(1),s("ngModel",a.model),l(1),s("ngForOf",a.options))},dependencies:[j,L,A,Ke,ze,Ge,me,N,k],styles:[".mat-radio-label{margin-top:auto;margin-bottom:auto}"]});let i=o;return i})();function yt(i,o){if(i&1){let t=x();w(0),r(1,"div")(2,"label",23),m(3,"Filter by"),c(),r(4,"radio-options",24),u("modelChange",function(n){_(t);let a=p();return h(a.filterType=n)}),c()(),T()}if(i&2){let t=p();l(4),s("model",t.filterType)("options",t.filterTypeOptions)("border",!0)}}function wt(i,o){if(i&1){let t=x();r(0,"button",27),u("click",function(){_(t);let n=p().ngIf,a=p();return h(a.onUpdateItems(n))}),S(1,"i",28),m(2," Update "),c()}}function Tt(i,o){if(i&1&&(w(0),r(1,"div",25),d(2,wt,3,0,"button",26),c(),T()),i&2){let t=o.ngIf,e=p();l(2),s("ngIf",e.productService.hasSelectionVariant(t))}}function Dt(i,o){if(i&1&&(r(0,"th",29)(1,"div",30),S(2,"img",31),r(3,"div",32),m(4),v(5,"stringLimit"),c()()()),i&2){let t=o.$implicit;l(1),s("matTooltip",(t.Name==null?null:t.Name.length)>20?t.Name:""),l(1),s("src",t==null?null:t.logo,D),l(2),oe("",re(5,4,t.Name,20),"",(t.Name==null?null:t.Name.length)>20?"...":"","")}}function Vt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",33),u("ngModelChange",function(n){_(t);let a=p();return h(a.checkboxState=n)})("ngModelChange",function(){_(t);let n=p();return h(n.onSelectAllData())}),c()()}if(i&2){let t=p();l(1),s("ngModel",t.checkboxState)}}function Et(i,o){i&1&&(w(0),r(1,"th",34)(2,"span"),m(3,"Expected"),c(),r(4,"span",35),m(5,"(POS)"),c()(),r(6,"th",34),m(7," Channel "),c(),T())}function Ft(i,o){if(i&1){let t=x();r(0,"img",46),u("click",function(n){_(t);let a=p(3).$implicit,g=p(2);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t==null?null:t.ImageUrl,D)}}function Mt(i,o){i&1&&S(0,"img",47)}var Nt=i=>({"border-bottom":i});function kt(i,o){if(i&1&&(w(0),r(1,"td",41),d(2,Ft,1,1,"img",42)(3,Mt,1,0,"ng-template",null,43,W),c(),r(5,"td",44)(6,"h5",45),m(7),c(),S(8,"br"),r(9,"small"),m(10),c()(),T()),i&2){let t=Q(4),e=p().index,n=p().$implicit,a=p().ngIf;l(1),s("rowSpan",n==null?null:n.Variants.length)("ngClass",y(7,Nt,e+1==a.length)),l(1),s("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),l(3),s("rowSpan",n==null?null:n.Variants.length),l(2),V(n==null?null:n.Name),l(3),I("(",n==null?null:n.Category,")")}}function Ot(i,o){if(i&1){let t=x();r(0,"td",48)(1,"input",33),u("ngModelChange",function(n){_(t);let a=p().$implicit;return h(a.selected=n)}),c()()}if(i&2){let t=p().$implicit;l(1),s("ngModel",t.selected)}}var $t=i=>({"bg-gradient-warning":i});function Lt(i,o){if(i&1){let t=x();w(0),r(1,"td",51),m(2),v(3,"number"),c(),r(4,"td",52),u("click",function(){let a=_(t).$implicit,g=p(2).$implicit,C=p().$implicit,f=p(2);return h(f.openTableDialog(g,C,a))}),r(5,"span",53),m(6),v(7,"number"),c(),r(8,"a",54),u("click",function(n){return n==null?null:n.stopPropagation()}),S(9,"i",40),c()(),T()}if(i&2){let t=o.$implicit;l(2),I(" ",P(3,4,t.PriceExpected)," "),l(2),s("ngClass",y(8,$t,t.Price!=t.PriceExpected)),l(2),I(" ",P(7,6,t.Price)," "),l(2),s("href",t.Url,D)}}function At(i,o){i&1&&(r(0,"td",55),m(1,"X"),c(),r(2,"td",55),m(3,"X"),c())}function Rt(i,o){if(i&1&&(w(0),d(1,Lt,10,10,"ng-container",49)(2,At,4,0,"ng-template",null,50,W),T()),i&2){let t=o.$implicit,e=Q(3),n=p().$implicit,a=p(3);l(1),s("ngIf",a.getItemFromChannel(n,t.ID))("ngIfElse",e)}}var Ut=i=>({"text-decoration-line-through":i}),it=i=>[i];function Bt(i,o){if(i&1&&(r(0,"tr"),d(1,kt,11,9,"ng-container",1),r(2,"td",36),m(3),c(),r(4,"td",37)(5,"span",38),m(6),c(),r(7,"span",32)(8,"a",39),S(9,"i",40),c()()(),d(10,Ot,2,1,"ng-template",14)(11,Rt,4,2,"ng-container",15),c()),i&2){let t=o.$implicit,e=o.index,n=p(3);l(1),s("ngIf",e==0),l(2),V(t==null?null:t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(1),s("ngClass",y(8,Ut,t.isDiscontinued)),l(1),V(t==null?null:t.Code),l(2),s("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D),l(2),s("ngxPermissionsOnly",y(10,it,n.rolePriceEdit)),l(1),s("ngForOf",n.channelOptions)}}function jt(i,o){if(i&1&&(r(0,"tbody"),d(1,Bt,12,12,"tr",15),c()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function zt(i,o){if(i&1&&(w(0),d(1,jt,2,1,"tbody",15),T()),i&2){let t=o.ngIf;l(1),s("ngForOf",t)}}function Gt(i,o){if(i&1){let t=x();r(0,"span",56),u("click",function(){_(t);let n=p();return h(n.getRowCount())}),r(1,"i",57),m(2,"?"),c()()}}function Kt(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t))}}function Jt(i,o){if(i&1){let t=x();r(0,"a",58),u("click",function(){_(t);let n=p();return h(n.onNextPage())}),S(1,"i",59),m(2," Next"),c()}}function Ht(i,o){if(i&1){let t=x();r(0,"a",60),u("click",function(){_(t);let n=p();return h(n.onLastPage())}),S(1,"i",61),m(2," Last"),c()}}var at=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.authService=C,this.biggerPictureService=f,this.paginationService=Ie,this.searchFilter=new je,this.checkboxState=!1,this.rolePriceEdit=de.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.filterTypeOptions=[{Key:O.ALL,Value:"All"},{Key:O.DIFFERENCE,Value:"Difference"}],this.filterType=O.ALL,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()}initPagination(){this.paginationService.fetchDataEndpoint="Price/GetOutletPrice",this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.paginationService.data$.pipe(X(e=>(e=e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.isDiscontinued=a.Discontinued=="Yes",a))),n)),e)),te(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe($(e=>{this.searchFilter=e.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{}).pipe($(e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}))}getRowCount(){this.paginationService.hideCount=!1,this.totalData$=this.http.post(`/api/${this.rowCountAPI}`,{})}onSelectAllData(){this.data$=this.data$.pipe(X(e=>(e.map(n=>(n.Variants&&(n.Variants=n.Variants.map(a=>(a.selected=this.checkboxState,a))),n)),e)))}onFilter(e){let n={text:e,filterModel:this.filterType,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount};this.paginationService.reloadPagination(n)}updatePrice(e){let n=this.productService.selectedVariantProduct(e);if(n.length>0){let a=n.map(f=>f.ID),C={ListChannelID:this.channelOptions.filter(f=>f.selected).map(f=>f.ID),ListID:a};this.http.post("/api/Price/UpdateChannelOutletPrice",C).subscribe({next:f=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+C.ListID.length+" items in "+C.ListChannelID.length+" channels","Success")},error:f=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,n){return e.Channel.find(a=>a.ChannelID==n)}onUpdateItems(e){let n=this.productService.selectedVariantProduct(e);this.dialog.open(fe,{data:{selectedItems:n,channels:this.channelOptions},width:"600px"}).afterClosed().pipe(M(a=>E.IsNotEmpty(a))).subscribe(a=>{this.channelOptions=a,this.updatePrice(e)})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:a?.ChannelID,Table:"price",ChannelItemID:a?.ChannelItemID}}).afterClosed().pipe(M(f=>E.IsNotEmpty(f))).subscribe(f=>{this.updateProductPrice(f,a)})}updateProductPrice(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{n.Price=a.Price;let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success")})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(z),b(J),b(Y),b(K),b(Ce),b(Z))},o.\u0275cmp=F({type:o,selectors:[["app-custom-channel-price"]],decls:41,vars:30,consts:[["headerTitle","Price Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[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","class","w-100","class","text-center border-bottom-0 border text-uppercase",4,"ngFor","ngForOf"],["scope","col","colspan","2",1,"text-center","w-20"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"ngxPermissionsOnly"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"fw-bold","mb-2"],["name","filterModel",3,"model","options","border","modelChange"],[1,"d-flex"],["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"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["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,"ngModel","ngModelChange"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-start","border-bottom",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-center","border-bottom",3,"rowSpan"],[1,"mb-0","item-name"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["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"],["elseCol",""],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"ngClass","click"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","border","text-end",2,"color","red"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){if(n&1&&(r(0,"mainpanel",0),u("onSubmit",function(C){return a.onFilter(C)}),r(1,"filters"),d(2,yt,5,3,"ng-container",1),v(3,"async"),c(),r(4,"actions"),d(5,Tt,3,1,"ng-container",1),v(6,"async"),c(),r(7,"content")(8,"div",2)(9,"div",3)(10,"div",4)(11,"div",5)(12,"table",6)(13,"thead",7)(14,"tr",8),S(15,"th",9),d(16,Dt,6,7,"th",10),c(),r(17,"tr")(18,"th",11),m(19,"Product"),c(),r(20,"th",12),m(21,"Variant"),c(),r(22,"th",13),m(23,"SKU"),c(),d(24,Vt,2,1,"ng-template",14)(25,Et,8,0,"ng-container",15),c()(),d(26,zt,2,1,"ng-container",1),v(27,"async"),c()()()(),r(28,"div",16)(29,"div",17)(30,"div",18),m(31),v(32,"number"),v(33,"async"),d(34,Gt,3,0,"span",19)(35,Kt,3,3,"span",1),v(36,"async"),m(37),c()(),r(38,"div",20),d(39,Jt,3,0,"a",21)(40,Ht,3,0,"a",22),c()()()()()),n&2){let g;s("pageData",a.pageData)("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),l(2),s("ngIf",P(3,16,a.loader$)),l(3),s("ngIf",P(6,18,a.data$)),l(11),s("ngForOf",a.channelOptions),l(8),s("ngxPermissionsOnly",y(28,it,a.rolePriceEdit)),l(1),s("ngForOf",a.channelOptions),l(1),s("ngIf",P(27,20,a.data$)),l(5),I(" Showing 1 - ",P(32,22,(g=P(33,24,a.paginationService.data$))==null?null:g.length)," of "),l(3),s("ngIf",a.paginationService.hideCount),l(1),s("ngIf",!a.paginationService.hideCount&&P(36,26,a.totalData$)),l(2),I(" records ~ ",a.paginationService.footerPageNumber," Page "),l(2),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage),l(1),s("ngIf",a.paginationService.disableNextButton&&!a.paginationService.goToLastPage)}},dependencies:[L,A,R,ce,N,k,H,ue,be,_e,U,B,Se],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 i=o;return i})();function Yt(i,o){if(i&1&&(r(0,"span",8),S(1,"img",9),c(),m(2)),i&2){let t=o.item;l(1),s("src",t==null?null:t.logo,D),l(1),I(" ",t.Name," ")}}function Zt(i,o){if(i&1){let t=x();r(0,"button",13),u("click",function(){_(t);let n=p(3);return h(n.openScanDialog())}),S(1,"i",14),m(2," Scan Channel "),c()}}function qt(i,o){if(i&1){let t=x();r(0,"button",15),u("click",function(){_(t);let n=p().ngIf,a=p(2);return h(a.updateStock(n))}),S(1,"i",16),m(2," Update "),c()}}function Xt(i,o){if(i&1&&(r(0,"actions")(1,"div",10)(2,"div"),d(3,Zt,3,0,"button",11)(4,qt,3,0,"button",12),c()()()),i&2){let t=o.ngIf,e=p(2);l(3),s("ngIf",!e.productService.hasSelectionVariant(t)),l(1),s("ngIf",e.productService.hasSelectionVariant(t))}}function Qt(i,o){if(i&1){let t=x();r(0,"th")(1,"input",37),u("change",function(n){_(t);let a=p().ngIf,g=p(2);return h(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Wt(i,o){if(i&1){let t=x();r(0,"input",57),u("ngModelChange",function(n){_(t);let a=p(4).$implicit;return h(a.selected=n)})("ngModelChange",function(){_(t);let n=p(4).$implicit,a=p(3);return h(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=p(4).$implicit;s("ngModel",t.selected)}}function en(i,o){if(i&1&&d(0,Wt,1,1,"input",56),i&2){let t=p(2).$implicit,e=p().$implicit;s("ngIf",t.Inventory>=0||e.Variants.length>1)}}function tn(i,o){if(i&1){let t=x();r(0,"img",58),u("click",function(n){_(t);let a=p(3).$implicit,g=p(3);return h(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c()}if(i&2){let t=p(3).$implicit;ae("src",t.ThumbnailUrl,D)}}function nn(i,o){i&1&&S(0,"img",59)}function an(i,o){if(i&1&&(w(0),S(1,"br"),r(2,"small"),m(3),c(),T()),i&2){let t=p(3).$implicit;l(3),I("(",t.Category,")")}}var De=i=>[i];function on(i,o){if(i&1&&(w(0),r(1,"td",50)(2,"div",51),d(3,en,1,1,"ng-template",25)(4,tn,1,1,"img",52)(5,nn,1,0,"ng-template",null,53,W),c()(),r(7,"td",54)(8,"span",55),m(9),c(),d(10,an,4,1,"ng-container",7),c(),T()),i&2){let t=Q(6),e=p(2).$implicit,n=p(3);l(1),s("rowSpan",e.Variants.length),l(2),s("ngxPermissionsOnly",y(7,De,n.rolePriceEdit)),l(1),s("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),s("rowSpan",e.Variants.length),l(2),V(e.Name),l(1),s("ngIf",(e==null?null:e.CategoryID)!==null&&(e==null?null:e.CategoryID)!=n.guidEmpty)}}function rn(i,o){if(i&1){let t=x();r(0,"input",62),u("ngModelChange",function(n){_(t);let a=p(2).$implicit;return h(a.selected=n)}),c()}if(i&2){let t=p(2).$implicit;s("ngModel",t.selected)}}function ln(i,o){if(i&1&&(r(0,"td",60),d(1,rn,1,1,"input",61),c()),i&2){let t=p().$implicit;l(1),s("ngIf",t.Inventory>=0)}}function cn(i,o){i&1&&(r(0,"div",63),m(1,"Not Found"),c())}function sn(i,o){if(i&1&&(r(0,"div"),m(1),v(2,"number"),c()),i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.UnitPrice),"")}}function pn(i,o){if(i&1&&(w(0),r(1,"div",64)(2,"a",45),S(3,"i",65),c()(),T()),i&2){let t=p().$implicit,e=p(4);l(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function mn(i,o){if(i&1){let t=x();r(0,"div",66),u("click",function(){_(t);let n=p().$implicit,a=p().$implicit,g=p(2).ngIf,C=p();return h(C.openTableDialog(n,a,g))}),m(1),v(2,"number"),c()}if(i&2){let t=p().$implicit;l(1),I(" ",P(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}var dn=i=>({"text-decoration-line-through":i}),_n=i=>({"bg-gradient-warning":i});function hn(i,o){if(i&1){let t=x();r(0,"tr"),d(1,on,11,9,"ng-container",7),r(2,"td",23),m(3),c(),r(4,"td",38)(5,"span",39),m(6),c()(),d(7,ln,2,1,"ng-template",25),r(8,"td",26)(9,"div",40),d(10,cn,2,0,"div",41)(11,sn,3,3,"div",7)(12,pn,4,1,"ng-container",7),c()(),r(13,"td",42)(14,"div",40),d(15,mn,3,3,"div",43),r(16,"div",44)(17,"a",45),S(18,"i",46),c()()()(),r(19,"td")(20,"div",47)(21,"div",48),u("click",function(){let a=_(t).$implicit,g=p(4);return h(g.refreshPrice(a))}),S(22,"i",49),c()()()()}if(i&2){let t=o.$implicit,e=o.index,n=p(4);l(1),s("ngIf",e==0),l(2),V(t.Model),l(1),s("matTooltip",t.isDiscontinued?n.discontinuedVariantMsg:""),l(1),s("ngClass",y(12,dn,t.isDiscontinued)),l(1),I(" ",t.Code," "),l(1),s("ngxPermissionsOnly",y(14,De,n.rolePriceEdit)),l(3),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)!=null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngIf",(t.Channel[0]==null?null:t.Channel[0].Description)==null),l(1),s("ngClass",y(16,_n,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),s("ngIf",t.Channel.length>0),l(2),s("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function un(i,o){if(i&1&&(w(0),d(1,hn,23,18,"tr",31),T()),i&2){let t=o.$implicit;l(1),s("ngForOf",t.Variants)}}function gn(i,o){if(i&1){let t=x();r(0,"span",66),u("click",function(){_(t);let n=p(3);return h(n.getRowCount())}),r(1,"i",67),m(2,"?"),c()()}}function Cn(i,o){if(i&1&&(r(0,"span"),m(1),v(2,"number"),c()),i&2){let t=o.ngIf;l(1),V(P(2,1,t.Total))}}function fn(i,o){if(i&1){let t=x();r(0,"a",71),u("click",function(){_(t);let n=p(4);return h(n.onNextPage())}),S(1,"i",72),m(2," Next"),c()}}function xn(i,o){if(i&1){let t=x();r(0,"a",73),u("click",function(){_(t);let n=p(4);return h(n.onLastPage())}),S(1,"i",74),m(2," Last"),c()}}function Sn(i,o){if(i&1&&(r(0,"div",68),d(1,fn,3,0,"a",69)(2,xn,3,0,"a",70),c()),i&2){let t=p(3);l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),l(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function vn(i,o){if(i&1){let t=x();r(0,"content")(1,"div",17)(2,"div",18)(3,"table",19)(4,"thead",20)(5,"tr")(6,"th",21),m(7," Product "),r(8,"div")(9,"mat-slide-toggle",22),u("ngModelChange",function(n){_(t);let a=p(2);return h(a.toggleDifferentInventory=n)})("toggleChange",function(){_(t);let n=p(2);return h(n.onToggleDifferentInventory())}),r(10,"small",2),m(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",23),m(13,"Variant"),c(),r(14,"th",24),m(15,"SKU"),c(),d(16,Qt,2,0,"ng-template",25),r(17,"th",26),m(18,"POS"),c(),r(19,"th",26)(20,"div",27),S(21,"img",28),r(22,"span",29),m(23),v(24,"stringLimit"),c()()(),S(25,"th",30),c()(),r(26,"tbody"),d(27,un,2,1,"ng-container",31),c()(),r(28,"div",32)(29,"div",33)(30,"div",34),m(31),v(32,"number"),d(33,gn,3,0,"span",35)(34,Cn,3,3,"span",7),v(35,"async"),m(36),c()(),d(37,Sn,3,2,"div",36),c()()()()}if(i&2){let t=o.ngIf,e=p(2);l(9),s("ngModel",e.toggleDifferentInventory),l(7),s("ngxPermissionsOnly",y(19,De,e.rolePriceEdit)),l(4),s("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(1),s("src",e.selectedChannel==null?null:e.selectedChannel.logo,D),l(2),oe(" ",re(24,12,e.selectedChannel==null?null:e.selectedChannel.Name,20),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?"...":""," "),l(4),s("ngForOf",t),l(4),I(" Showing 1 - ",P(32,15,t==null?null:t.length)," of "),l(2),s("ngIf",e.paginationService.hideCount),l(1),s("ngIf",P(35,17,!e.paginationService.hideCount&&e.allDataCount$)),l(2),I(" records ~ ",e.paginationService.footerPageNumber," Page "),l(1),s("ngIf",t.length>0)}}function Pn(i,o){if(i&1){let t=x();r(0,"mainpanel",1),u("textChange",function(n){_(t);let a=p();return h(a.searchFilter.text=n)})("onSubmit",function(){_(t);let n=p();return h(n.onSearch())}),r(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),c(),r(5,"ng-select",3),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.ChannelID=n)}),d(6,Yt,3,2,"ng-template",4),c()(),r(7,"div",5)(8,"label",2),m(9,"Page Number"),c(),r(10,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.PageNumber=n)}),c()(),r(11,"div",5)(12,"label",2),m(13,"Page Size"),c(),r(14,"input",6),u("ngModelChange",function(n){_(t);let a=p();return h(a.searchFilter.RowCount=n)}),c()()(),d(15,Xt,5,2,"actions",7),v(16,"async"),d(17,vn,38,21,"content",7),v(18,"async"),c()}if(i&2){let t=p();s("headerTitle",t.pageTitle)("text",t.searchFilter.text),l(5),s("clearable",!1)("items",t.channelOptions)("ngModel",t.searchFilter.ChannelID),l(5),s("ngModel",t.searchFilter.PageNumber),l(4),s("ngModel",t.searchFilter.RowCount),l(1),s("ngIf",P(16,9,t.data$)),l(2),s("ngIf",P(18,11,t.data$))}}var ot=(()=>{let o=class o{constructor(e,n,a,g,C,f,Ie,Ve){this.http=e,this.paginationService=n,this.toastr=a,this.dialog=g,this.productService=C,this.biggerPictureService=f,this.inventoryService=Ie,this.authService=Ve,this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.allDataCountEndpoint="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=de.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.guidEmpty=E.GuidEMpty,this.hostName=this.authService.getDomain(),this.data$=this.paginationService.data$.pipe(te(1),X(ct=>ct.map(ee=>(ee.Variants&&(ee.Variants=ee.Variants.map(ye=>(ye.isDiscontinued=ye.Discontinued=="Yes",ye))),ee)))),this.channelOptions=Ve.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=O.ALL,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=O.ALL:this.searchFilter.filterModel=O.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=E.GuidEMpty,this.dialog.open(ge,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(M(n=>E.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAll()})}scanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(),this.toastr.success(`Successfully scanned from ${e?.Name}`,"Success"))})}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list.length>0||e.failure_list.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}onLastPage(){this.http.post(`/API/${this.allDataCountEndpoint}`,this.searchFilter).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Total)}})}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(xe,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(M(f=>E.IsNotEmpty(f))).subscribe(f=>{this.updateItemAfterDialog(f,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${C.Name} to ${a.Price}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(n){return new(n||o)(b(G),b(Z),b(z),b(J),b(Y),b(Ce),b(Pe),b(K))},o.\u0275cmp=F({type:o,selectors:[["app-price-single-channel"]],decls:2,vars:3,consts:[[3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[3,"headerTitle","text","textChange","onSubmit"],[1,"fw-bold"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"mt-5"],["type","number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModel","ngModelChange","toggleChange"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["matTooltipPosition","above",1,"d-inline-block",3,"matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","checkbox",1,"me-3",3,"change"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[3,"ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],[1,"text-end",3,"ngClass"],["style","cursor: pointer;",3,"click",4,"ngIf"],[1,"ms-2","pb-1"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-lg","fa-external-link-alt"],[1,"ps-0","d-flex","justify-content-center","align-items-center","pb-1"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-2"],[1,"fas","external-link-custom","fa-external-link-alt"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,a){n&1&&(d(0,Pn,19,13,"mainpanel",0),v(1,"async")),n&2&&s("ngIf",P(1,1,a.loader$))},dependencies:[L,A,R,se,pe,ce,N,k,H,$e,Oe,He,ue,_e,U,B,Se],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"]});let i=o;return i})();var rt=(()=>{let o=class o{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=F({type:o,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,a){n&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),S(3,"nav-tab",2),c()()(),S(4,"router-outlet")),n&2&&(l(3),s("Tabs",a.priceTabs))},dependencies:[Ue,Me]});let i=o;return i})();var bn=[{path:"",component:rt,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",component:nt,canActivate:[he],data:{title:"Global Price Comparison"}},{path:"OutletPrice",component:at,canActivate:[he],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",component:ot,canActivate:[he],data:{title:"Price Single Channel Comparison"}}]}],lt=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({imports:[j,le.forChild(bn)]});let i=o;return i})();var Li=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=ie({type:o}),o.\u0275inj=ne({providers:[Pe],imports:[j,me,Be,Re,le,Le,lt,Ne,Ye,Je,Ae,be,ve,ke.forChild()]});let i=o;return i})();export{Li as PriceModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-GGUUOJBM.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-U7J6Y2ZR.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-O4JO5HBG.js";import{a as re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-NDVNSHV5.js";import{b as B,e as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-FOXV7BI2.js";import{a as ae,c as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-Q2GGNFJX.js";import{d as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-AYVVAF2D.js";import{c as G,h as Q,i as $,j as W,k as J,l as K,o as Z,p as ee,q as te,r as ne,u as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-M7SI7KCP.js";import{c as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-F5TBMY3G.js";import{$ as z,$a as m,Ba as A,Fa as l,Ga as c,Gc as S,Hb as j,Ib as R,Ic as _,Kb as F,Lb as Y,Lc as E,Oa as p,Ua as C,Xb as q,Za as n,_a as o,_b as U,aa as O,ab as T,bb as N,db as k,ea as x,fa as P,fc as H,hb as g,ic as X,ja as u,jb as f,ka as h,ob as w,pb as a,qb as v,sb as D,xb as V,za as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-72YRW3ZC.js";var me=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code})}addChannelLazada(){let t={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",t).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),o(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),o()(),n(17,"button",9),g("click",function(){return s.addChannelLazada()}),m(18,"i",10),a(19," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.code))}});let r=i;return r})();var pe=(()=>{let i=class i{constructor(){}getBrowserName(){let t=window.navigator.userAgent.toLowerCase();switch(!0){case(t.indexOf("edge")>-1||t.indexOf("edg")>-1):return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}};i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=z({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ve=["subdomainEl"];function Ce(r,i){if(r&1){let d=k();T(0),n(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),a(6,"Sign in"),o(),n(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),m(11,"i",26),o(),n(12,"input",27,28),g("ngModelChange",function(e){u(d);let s=f();return h(s.subdomain=e)}),o()()(),n(14,"select",29),g("ngModelChange",function(e){u(d);let s=f();return h(s.domain=e)}),n(15,"option",30),a(16,".dealpos.co.id"),o(),n(17,"option",31),a(18,".dealpos.net"),o(),n(19,"option",32),a(20,".dealpos.com"),o(),n(21,"option",33),a(22,".dealpos.app"),o()()()(),n(23,"div",34)(24,"button",35),g("click",function(){u(d);let e=f();return h(e.onNextState())}),a(25," Next "),o()()()()(),N()}if(r&2){let d=f();l(12),p("ngModel",d.subdomain),l(2),p("ngModel",d.domain)}}function we(r,i){r&1&&(n(0,"p"),a(1," Username is required "),o())}function ye(r,i){if(r&1&&(n(0,"div",59),C(1,we,2,0,"p",60),o()),r&2){f();let d=w(13);l(1),p("ngIf",d.errors.required)}}var Se=(r,i)=>({"fa-eye":r,"fa-eye-slash":i});function Me(r,i){if(r&1){let d=k();n(0,"i",61),g("click",function(){u(d);let e=f(2);return h(e.hideShowPassword())}),o()}if(r&2){let d=f(2);p("ngClass",V(1,Se,d.passwordIcon=="eye-off",d.passwordIcon=="eye"))}}function Oe(r,i){r&1&&(n(0,"p"),a(1," Password is required "),o())}function Pe(r,i){if(r&1&&(n(0,"div",59),C(1,Oe,2,0,"p",60),o()),r&2){f();let d=w(19);l(1),p("ngIf",d.errors.required)}}function ke(r,i){if(r&1){let d=k();n(0,"div",18)(1,"div",19)(2,"div",36)(3,"h2",21),a(4,"Sign in"),o(),n(5,"div",37),a(6," to "),n(7,"h6",38),a(8),o(),n(9,"i",39),g("click",function(){u(d);let e=f();return h(e.onEditDomain())}),o()()(),n(10,"form",40)(11,"div",41)(12,"input",42,43),g("ngModelChange",function(e){u(d);let s=f();return h(s.username=e)}),o(),n(14,"label",44),a(15,"Username"),o(),C(16,ye,2,1,"div",45),o(),n(17,"div",46)(18,"input",47,48),g("ngModelChange",function(e){u(d);let s=f();return h(s.password=e)}),o(),n(20,"label",49),a(21,"Password"),o(),C(22,Me,1,4,"i",50)(23,Pe,2,1,"div",45),o(),n(24,"div",51)(25,"a",52),a(26,"Forgot Password?"),o()(),n(27,"div",53)(28,"button",54),g("click",function(){u(d);let e=f();return h(e.onLogin())}),a(29," Log in "),o()(),n(30,"div",55),m(31,"hr"),n(32,"span",56),a(33,"or"),o(),m(34,"hr"),o(),n(35,"div")(36,"button",57),g("click",function(e){u(d);let s=f();return h(s.onLoginByGoogle(e))}),m(37,"i",58),a(38," Sign In with Google "),o()()()()()}if(r&2){let d=w(13),t=w(19),e=f();l(8),D(" (",e.subdomain,"",e.domain,") "),l(4),p("ngModel",e.username),l(4),p("ngIf",d.invalid&&(d.dirty||d.touched)),l(2),p("type",e.passwordType)("ngModel",e.password),l(4),p("ngIf",e.password!=""&&e.browser!="edge"),l(1),p("ngIf",t.invalid&&(t.dirty||t.touched)),l(2),p("href","https://"+e.subdomain+e.domain+"/ForgotPassword",L)}}var ge=(()=>{let i=class i{constructor(t,e,s,b,be,xe){this._router=t,this.elementRef=e,this.toastr=s,this.checkBrowser=b,this.authService=be,this.ngxPermission=xe,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let t=JSON.parse(localStorage.getItem("Authorization"));if(t){this.username=t?.username,this.subdomain=t?.Host?.split(".")[0];let e=t?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(oe.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let t=this.subdomain.indexOf(".dealpos");t!=-1&&(this.subdomain=this.subdomain.substring(0,t))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let t={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(t).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(t){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(t,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(t){this.ngxPermission.hasPermission([re.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):t?.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==="eye-off"?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}};i.\u0275fac=function(e){return new(e||i)(c(_),c(A),c(B),c(pe),c(de),c(ae))},i.\u0275cmp=x({type:i,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&R(ve,5),e&2){let b;j(b=F())&&(s.subdomainEl=b.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1687829600/APP/New_Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","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-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,s){if(e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),a(4," DealPOS Omnichannel "),o(),m(5,"img",4),o(),n(6,"div",5)(7,"h1",6),a(8," DealPOS Omnichannel "),o(),C(9,Ce,26,2,"ng-container",7)(10,ke,39,9,"ng-template",null,8,Y),o(),n(12,"div",9)(13,"p",10),a(14,"Powered by :"),o(),n(15,"a",11),m(16,"img",12),o(),m(17,"br"),n(18,"a",13),a(19,"Version 3.6.4"),o()()()(),n(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),a(24,"Powered by :"),o(),n(25,"a",11),m(26,"img",12),o()(),n(27,"div",17)(28,"a",13),a(29,"Version 3.6.4"),o()()()()),e&2){let b=w(11);l(5),p("width",350)("height",273),l(4),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",b),l(7),p("width",130)("height",73),l(10),p("width",130)("height",73)}},dependencies:[q,U,K,ee,te,G,Z,Q,$,ne,J,W,X],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});let r=i;return r})();var fe=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code},e="/api/ChannelAdd/ShopeeV2";this.http.post(e,t).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),o(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),o()(),n(17,"button",9),g("click",function(){return s.addShopee()}),m(18,"i",10),a(19," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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 r=i;return r})();var ue=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code,this.state=t.state})}addChannelTiktok(){let t={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",t).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),o(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),o()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),o()(),n(21,"button",9),g("click",function(){return s.addChannelTiktok()}),m(22,"i",10),a(23," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.code),l(4),v(s.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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 r=i;return r})();var Ee=[{path:"",component:ge,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:fe,data:{title:"Success"}},{path:"tiktok",component:ue,data:{title:"Success"}},{path:"lazada",component:me,data:{title:"Success"}}],he=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=P({type:i}),i.\u0275inj=O({imports:[E.forChild(Ee),E]});let r=i;return r})();var st=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=P({type:i}),i.\u0275inj=O({imports:[H,ie,he,le,se]});let r=i;return r})();export{st as LoginModule};
|
|
1
|
+
import{a as re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-VNDEHKWX.js";import{e as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3Z7G7454.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-P6UO6DX3.js";import{b as B,e as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-NGBU7BOS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-F66WSMGF.js";import{a as ae,c as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UJUFXSVW.js";import{d as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-CEIPUO3T.js";import{c as G,h as Q,i as $,j as W,k as J,l as K,o as Z,p as ee,q as te,r as ne,u as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-V4TOR5C3.js";import{c as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UFDVDRIL.js";import{$ as z,$a as m,Ba as A,Fa as l,Ga as c,Gc as S,Hb as j,Ib as R,Ic as _,Kb as F,Lb as Y,Lc as E,Oa as p,Ua as C,Xb as q,Za as n,_a as o,_b as U,aa as O,ab as T,bb as N,db as k,ea as x,fa as P,fc as H,hb as g,ic as X,ja as u,jb as f,ka as h,ob as w,pb as a,qb as v,sb as D,xb as V,za as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3IE75VB2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-JC2XATFG.js";var me=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code})}addChannelLazada(){let t={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",t).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),o(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),o()(),n(17,"button",9),g("click",function(){return s.addChannelLazada()}),m(18,"i",10),a(19," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.code))}});let r=i;return r})();var pe=(()=>{let i=class i{constructor(){}getBrowserName(){let t=window.navigator.userAgent.toLowerCase();switch(!0){case(t.indexOf("edge")>-1||t.indexOf("edg")>-1):return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}};i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=z({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ve=["subdomainEl"];function Ce(r,i){if(r&1){let d=k();T(0),n(1,"div",18)(2,"div",19)(3,"form")(4,"div",20)(5,"h2",21),a(6,"Sign in"),o(),n(7,"div",22)(8,"div",23)(9,"div",24)(10,"span",25),m(11,"i",26),o(),n(12,"input",27,28),g("ngModelChange",function(e){u(d);let s=f();return h(s.subdomain=e)}),o()()(),n(14,"select",29),g("ngModelChange",function(e){u(d);let s=f();return h(s.domain=e)}),n(15,"option",30),a(16,".dealpos.co.id"),o(),n(17,"option",31),a(18,".dealpos.net"),o(),n(19,"option",32),a(20,".dealpos.com"),o(),n(21,"option",33),a(22,".dealpos.app"),o()()()(),n(23,"div",34)(24,"button",35),g("click",function(){u(d);let e=f();return h(e.onNextState())}),a(25," Next "),o()()()()(),N()}if(r&2){let d=f();l(12),p("ngModel",d.subdomain),l(2),p("ngModel",d.domain)}}function we(r,i){r&1&&(n(0,"p"),a(1," Username is required "),o())}function ye(r,i){if(r&1&&(n(0,"div",59),C(1,we,2,0,"p",60),o()),r&2){f();let d=w(13);l(1),p("ngIf",d.errors.required)}}var Se=(r,i)=>({"fa-eye":r,"fa-eye-slash":i});function Me(r,i){if(r&1){let d=k();n(0,"i",61),g("click",function(){u(d);let e=f(2);return h(e.hideShowPassword())}),o()}if(r&2){let d=f(2);p("ngClass",V(1,Se,d.passwordIcon=="eye-off",d.passwordIcon=="eye"))}}function Oe(r,i){r&1&&(n(0,"p"),a(1," Password is required "),o())}function Pe(r,i){if(r&1&&(n(0,"div",59),C(1,Oe,2,0,"p",60),o()),r&2){f();let d=w(19);l(1),p("ngIf",d.errors.required)}}function ke(r,i){if(r&1){let d=k();n(0,"div",18)(1,"div",19)(2,"div",36)(3,"h2",21),a(4,"Sign in"),o(),n(5,"div",37),a(6," to "),n(7,"h6",38),a(8),o(),n(9,"i",39),g("click",function(){u(d);let e=f();return h(e.onEditDomain())}),o()()(),n(10,"form",40)(11,"div",41)(12,"input",42,43),g("ngModelChange",function(e){u(d);let s=f();return h(s.username=e)}),o(),n(14,"label",44),a(15,"Username"),o(),C(16,ye,2,1,"div",45),o(),n(17,"div",46)(18,"input",47,48),g("ngModelChange",function(e){u(d);let s=f();return h(s.password=e)}),o(),n(20,"label",49),a(21,"Password"),o(),C(22,Me,1,4,"i",50)(23,Pe,2,1,"div",45),o(),n(24,"div",51)(25,"a",52),a(26,"Forgot Password?"),o()(),n(27,"div",53)(28,"button",54),g("click",function(){u(d);let e=f();return h(e.onLogin())}),a(29," Log in "),o()(),n(30,"div",55),m(31,"hr"),n(32,"span",56),a(33,"or"),o(),m(34,"hr"),o(),n(35,"div")(36,"button",57),g("click",function(e){u(d);let s=f();return h(s.onLoginByGoogle(e))}),m(37,"i",58),a(38," Sign In with Google "),o()()()()()}if(r&2){let d=w(13),t=w(19),e=f();l(8),D(" (",e.subdomain,"",e.domain,") "),l(4),p("ngModel",e.username),l(4),p("ngIf",d.invalid&&(d.dirty||d.touched)),l(2),p("type",e.passwordType)("ngModel",e.password),l(4),p("ngIf",e.password!=""&&e.browser!="edge"),l(1),p("ngIf",t.invalid&&(t.dirty||t.touched)),l(2),p("href","https://"+e.subdomain+e.domain+"/ForgotPassword",L)}}var ge=(()=>{let i=class i{constructor(t,e,s,b,be,xe){this._router=t,this.elementRef=e,this.toastr=s,this.checkBrowser=b,this.authService=be,this.ngxPermission=xe,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="eye-off"}ngOnInit(){this.initLogin(),this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let t=JSON.parse(localStorage.getItem("Authorization"));if(t){this.username=t?.username,this.subdomain=t?.Host?.split(".")[0];let e=t?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(oe.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let t=this.subdomain.indexOf(".dealpos");t!=-1&&(this.subdomain=this.subdomain.substring(0,t))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let t={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(t).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(t){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(t,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(t){this.ngxPermission.hasPermission([re.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):t?.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==="eye-off"?"eye":"eye-off"}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}};i.\u0275fac=function(e){return new(e||i)(c(_),c(A),c(B),c(pe),c(de),c(ae))},i.\u0275cmp=x({type:i,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&R(ve,5),e&2){let b;j(b=F())&&(s.subdomainEl=b.first)}},decls:30,vars:8,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["ngSrc","https://res.cloudinary.com/pos/image/upload/v1687829600/APP/New_Omnichannel.png","alt","integration-image",1,"img-fluid",3,"width","height"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[4,"ngIf","ngIfElse"],["USR_PASS",""],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-8","me-3"],["target","_blank","href","https://www.dealpos.com"],["ngSrc","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid",3,"width","height"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-8","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"card"],[1,"card-body","p-8"],[1,"card-title"],[1,"fw-normal","font-xl","robotoslab"],[1,"d-flex","align-items-center","mt-6"],[1,"mt-7","w-75","rounded-end-0"],[1,"input-group","mb-3"],["id","basic-addon1",1,"input-group-text","border-end-0","rounded-start"],[1,"fa-solid","fa-cloud"],["type","text","required","","name","subdomain","id","inputHost","placeholder","Store Address",1,"form-control","text-start","subdomain-input","border-start-0",2,"padding-left","0px",3,"ngModel","ngModelChange"],["subdomainEl",""],["name","domainOption",1,"form-select","form-control","border-start-0","mt-4","rounded-end","rounded-start-0","domain-option",3,"ngModel","ngModelChange"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100","mt-10"],["name","next","data-cy","next","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"card-title","d-flex","align-items-center"],[1,"pt-2","ms-2"],[1,"fw-bold","me-2","robotoslab","d-inline-block","text-primary"],[1,"fa-solid","fa-edit","link-primary","fs-5","pointer",3,"click"],[1,"mt-10"],[1,"form-label-group"],["autofocus","","type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["usernameCtrl","ngModel"],["for","inputUsername",1,"text-start"],["class","text-danger",4,"ngIf"],[1,"form-label-group","mb-5","mb-sm-1"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passwordCtrl","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"text-end","mt-3"],[3,"href"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","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-primary","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"]],template:function(e,s){if(e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),a(4," DealPOS Omnichannel "),o(),m(5,"img",4),o(),n(6,"div",5)(7,"h1",6),a(8," DealPOS Omnichannel "),o(),C(9,Ce,26,2,"ng-container",7)(10,ke,39,9,"ng-template",null,8,Y),o(),n(12,"div",9)(13,"p",10),a(14,"Powered by :"),o(),n(15,"a",11),m(16,"img",12),o(),m(17,"br"),n(18,"a",13),a(19,"Version 3.7.1"),o()()()(),n(20,"footer",14)(21,"div",15)(22,"div",16)(23,"p",10),a(24,"Powered by :"),o(),n(25,"a",11),m(26,"img",12),o()(),n(27,"div",17)(28,"a",13),a(29,"Version 3.7.1"),o()()()()),e&2){let b=w(11);l(5),p("width",350)("height",273),l(4),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",b),l(7),p("width",130)("height",73),l(10),p("width",130)("height",73)}},dependencies:[q,U,K,ee,te,G,Z,Q,$,ne,J,W,X],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}"]});let r=i;return r})();var fe=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code},e="/api/ChannelAdd/ShopeeV2";this.http.post(e,t).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),o(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),o()(),n(17,"button",9),g("click",function(){return s.addShopee()}),m(18,"i",10),a(19," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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 r=i;return r})();var ue=(()=>{let i=class i{constructor(t,e,s){this.route=t,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code,this.state=t.state})}addChannelTiktok(){let t={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",t).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(e){return new(e||i)(c(S),c(y),c(_))},i.\u0275cmp=x({type:i,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&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"i",5),n(6,"div",6),a(7,"Success !"),o()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),o(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),o(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),o()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),o()(),n(21,"button",9),g("click",function(){return s.addChannelTiktok()}),m(22,"i",10),a(23," Add to my Channel"),o()()()()()()),e&2&&(l(16),v(s.code),l(4),v(s.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;-moz-transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}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%]{border:1px solid var(--bs-primary)}.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}.domain-option[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df;width:10rem}.subdomain-input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-color:#c8d3df}.form-select[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important;box-shadow:none!important}.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 r=i;return r})();var Ee=[{path:"",component:ge,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:fe,data:{title:"Success"}},{path:"tiktok",component:ue,data:{title:"Success"}},{path:"lazada",component:me,data:{title:"Success"}}],he=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=P({type:i}),i.\u0275inj=O({imports:[E.forChild(Ee),E]});let r=i;return r})();var st=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=P({type:i}),i.\u0275inj=O({imports:[H,ie,he,le,se]});let r=i;return r})();export{st as LoginModule};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{b as S,e as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-NGBU7BOS.js";import{c as d}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UFDVDRIL.js";import{$ as f,E as c,X as o,ca as p,o as i}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3IE75VB2.js";var D=(()=>{let r=class r{constructor(e,t){this.httpService=e,this.toastrService=t}loader(e=d.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=d.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(a=>n.TypeID==a)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(a=>{this.showToastrSuccessUploadSingle(a,e[0])}),c(a=>(this.showToastErrorUploadSingle(a,e[0]),i(()=>new Error(a)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(a=>{this.showToastrUploadMultiple(a.Message)}),c(a=>(this.showToastrUploadMultiple(a.error?.Message),i(()=>new Error(a)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(a=>{this.showToastrUploadMultiple(a)}),c(a=>(this.showToastrUploadMultiple(a.error?.Message),i(()=>new Error(a)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,t,n,a=!1){let s={ID:e,ScanFull:t,UpdatedProduct:n,Async:a};return this.httpService.post("/api/product/ScanOptimized",s)}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return e.Variants.map(n=>n.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(a=>{t=[...t,a.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(s=>{n=[...n,...s.Channel]});let a;if(!n||n.length==0)a=t;else{let s=[];a=t.filter(l=>(s=n.filter(u=>u.ChannelID==l.ID),s.length!==e.length))}return a}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(a=>a.selected):""]}),t}getChannelProduct(e){let t=e.Variants,n=[];for(let a of t)if(a.Channel!=null)for(let s of a.Channel)n.filter(l=>l.ChannelID==s.ChannelID).length==0&&n.push(s);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){if(n){let a=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`
|
|
2
|
+
${a+s} found in ${t.Name} </br>
|
|
3
|
+
(${s} In POS + ${a} Not In Pos)
|
|
4
|
+
`,"Scan Complete!",{enableHtml:!0})}else{let a=e.InChannel?e.InChannel.Product:0;this.toastrService.success(`${a} product updates in ${t.Name} </br>
|
|
5
|
+
since ${e.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}}checkProductHasScanButton(e,t){let n;return e.map(a=>(a.Channel=this.getChannelProduct(a),n=this.filterUnselectedChannel([a],t),a.hasScan=n.length>0,a))}checkProductHasUploadBtn(e,t){let n;return e.map(a=>(a.Channel=this.getChannelProduct(a),n=this.filterUnselectedChannel([a],t),a.hasUpload=n.length>0,a))}showToastrUploadMultiple(e=[]){let t=[],n=[],a=this.getResponseList(e);if(e.forEach(s=>{typeof s?.Response=="string"?n=[...n,a.length>1?this.setHtmlli(s.Response):this.setHtmlli(s.Response,!1)]:(s?.Response?.Success.forEach(l=>{t=[...t,a.length>1?this.setHtmlli(`Product ${l} was <b>successfully</b> uploaded to ${s.Name}`):this.setHtmlli(`Product ${l} was <b>successfully</b> uploaded to ${s.Name}`,!1)]}),s?.Response.Fail.forEach(l=>{n=[...n,a.length>1?this.setHtmlli(l):this.setHtmlli(l,!1)]}))}),n.length>0&&t.length>0){let s=[...t,...n];this.toastrService.warning(this.concatMessage(s),"Warning!",{enableHtml:!0})}else t.length>0&&n.length==0?this.toastrService.success(this.concatMessage(t),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(n),"Error",{enableHtml:!0})}setHtmlli(e,t=!0){return t?`<li>${e}</li>`:e}getResponseList(e){let t=[];return e.forEach(n=>{typeof n?.Response=="string"?t=[...t,n.Response]:(n?.Response?.Success.forEach(a=>{t=[...t,n.Name]}),n?.Response.Fail.forEach(a=>{t=[...t,a]}))}),t}concatMessage(e=[]){let t="";return e.forEach(n=>{t+=n}),e.length>1?`<ol>${t}</ol>`:t}showToastrSuccessUploadSingle(e,t){let n=e.filter(l=>l.Status==!1),a=e.filter(l=>l.Status==!0),s=this.generateToastrMessage(n,a,t);this.toastrService.success(s.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,t){let n=e?.error?.Message.filter(l=>l.Status==!1),a=e?.error?.Message.filter(l=>l.Status==!0),s=this.generateToastrMessage(n,a,t);s.status=="WARNING"?this.toastrService.warning(s.message,"Warning!",{enableHtml:!0}):this.toastrService.error(s.message,`Error - ${e.status}`,{enableHtml:!0})}generateToastrMessage(e,t,n){let a="",s,l=[...e,...t];if(e.length==0&&t.length>0)s="SUCCESS",a=this.createSuccessResponse(t,n);else if(e.length>0&&t.length==0)s="ERROR",a=this.createErrResponse(e,n);else{s="WARNING";let u=this.createSuccessResponse(t,n),g=this.createErrResponse(e,n);a=`${u} ${g}`}return l.length>1&&(a=`<ol>${a}</ol>`),{status:s,message:a}}createErrResponse(e,t){let n="";return e.length>1?e.forEach((a,s)=>{n+=`<li>${a.Response}</li>`}):e.length==1&&(n+=`${e[0].Response}`),n}createSuccessResponse(e,t){let n="";return e.length>1?e.forEach((a,s)=>{n+=`<li>Product ${t.Name} was <b>successfully</b> uploaded to ${a.Name}</li>`}):e.length==1&&(n+=`Product ${t.Name} was <b>successfully</b> uploaded to ${e[0].Name}`),n}};r.\u0275fac=function(t){return new(t||r)(p(C),p(S))},r.\u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"});let h=r;return h})();export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.
|
|
1
|
+
import{a as P}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-EAPYNH2I.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-NGBU7BOS.js";import{B as C,C as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-AMNHDM4A.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-SFRVPZY5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-V4TOR5C3.js";import{Cb as s,Db as m,Eb as v,Fa as a,Ga as c,Gc as M,Jc as L,Lc as A,Oa as u,Q as f,Ua as g,Za as t,_a as i,_b as x,bc as E,cc as _,dc as D,ea as h,ec as R,fc as b,pb as n,q as y,qb as p,rb as S,ub as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3IE75VB2.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-JC2XATFG.js";function j(d,l){if(d&1&&(t(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),n(6,"General"),i()(),t(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",10)(18,"div",11)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),s(24,"number"),i()()()(),t(25,"div",10)(26,"div",11)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),n(37,"Request"),i()(),t(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),n(42),s(43,"json"),i()()()()()(),t(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),n(48,"Response"),i()(),t(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),n(53),s(54,"json"),i()()()()()()()()),d&2){let e=l.ngIf;a(15),p(v(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),S("",v(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),p(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode),a(11),p(m(43,11,e==null||e._source==null||e._source.log==null?null:e._source.log.req)),a(11),p(m(54,13,e==null||e._source==null||e._source.log==null?null:e._source.log.res))}}var J=(()=>{let l=class l{constructor(r,o){this.inventoryAsyncServiceLog=r,this.activatedRoute=o}ngOnInit(){let r=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(r?.ID)}initInventoryLog(r){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(r).pipe(y(o=>(o.hits[0].DurationInSecond=parseInt(o.hits[0]._source?.Duration)/1e3,o?.hits[0])),f(1))}};l.\u0275fac=function(o){return new(o||l)(c(P),c(M))},l.\u0275cmp=h({type:l,selectors:[["app-inventory-async-detail"]],standalone:!0,features:[I],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory-async",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,w){o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),g(5,j,55,15,"div",2),s(6,"async"),i()()),o&2&&(u("headerTitle","Sync Inventory Async")("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),u("ngIf",m(6,4,w.inventoryLog$)))},dependencies:[b,x,E,D,R,_,B,C,A,L]});let d=l;return d})();export{J as InventoryAsyncDetailComponent};
|