marketplacepos 5.38.3 → 5.38.5
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/{chunk-7POQ3C3K.js → chunk-2TKPU2N4.js} +1 -1
- package/Marketplace/{chunk-S6WP72HC.js → chunk-2WJSVVRH.js} +1 -1
- package/Marketplace/{chunk-3PJZW7HF.js → chunk-3DTDXKFQ.js} +1 -1
- package/Marketplace/{chunk-XYZPGDD2.js → chunk-5UFM4R4N.js} +1 -1
- package/Marketplace/{chunk-KVKFKGDQ.js → chunk-5V2G4JZI.js} +1 -1
- package/Marketplace/{chunk-AHACTT37.js → chunk-7C76K4Q5.js} +1 -1
- package/Marketplace/{chunk-AVI5X2TT.js → chunk-A7JDRCKV.js} +1 -1
- package/Marketplace/{chunk-CZUJNA5G.js → chunk-AFZJSPWS.js} +1 -1
- package/Marketplace/{chunk-NEXCPJGQ.js → chunk-BMAYZLH7.js} +1 -1
- package/Marketplace/{chunk-G6T2QL55.js → chunk-CNWJBMIQ.js} +1 -1
- package/Marketplace/{chunk-CBHXQUMA.js → chunk-ESWJCZZP.js} +1 -1
- package/Marketplace/{chunk-VOXQUD5E.js → chunk-GH55WYGY.js} +1 -1
- package/Marketplace/{chunk-7CDZNNWL.js → chunk-HO5MJE26.js} +1 -1
- package/Marketplace/{chunk-LRHLOGXM.js → chunk-J7TJEZXH.js} +1 -1
- package/Marketplace/{chunk-F7NU25EB.js → chunk-K2UZHZCJ.js} +1 -1
- package/Marketplace/{chunk-4AOCYXXV.js → chunk-KOM5ZICH.js} +1 -1
- package/Marketplace/{chunk-B5LX5TOF.js → chunk-LW76SQFU.js} +1 -1
- package/Marketplace/{chunk-ZYWCWZDR.js → chunk-N7YYFKGG.js} +1 -1
- package/Marketplace/{chunk-HAUNYMEG.js → chunk-OKLT6GH5.js} +1 -1
- package/Marketplace/{chunk-WFEOCQ7B.js → chunk-ONI2IMCW.js} +1 -1
- package/Marketplace/{chunk-Z3KIQHIK.js → chunk-OTYDLADB.js} +1 -1
- package/Marketplace/{chunk-JIBVE3DE.js → chunk-OWSO46ZD.js} +1 -1
- package/Marketplace/{chunk-K5ZBGZ47.js → chunk-RGTAWKII.js} +1 -1
- package/Marketplace/{chunk-W3X2KRUQ.js → chunk-RY2ZOZ3A.js} +1 -1
- package/Marketplace/{chunk-HLBD2ZRF.js → chunk-T5BCWPOW.js} +1 -1
- package/Marketplace/{chunk-PG3IYBPX.js → chunk-UNM4PZPP.js} +1 -1
- package/Marketplace/{chunk-ZS3HQV2S.js → chunk-UWAJCC5U.js} +1 -1
- package/Marketplace/{chunk-OOJNZDBG.js → chunk-VMAJA64B.js} +1 -1
- package/Marketplace/{chunk-4FI4YSVV.js → chunk-VSXHWRNT.js} +2 -2
- package/Marketplace/{chunk-5RI4KPF6.js → chunk-WBKPCUZ2.js} +1 -1
- package/Marketplace/{chunk-VSJIQ3SX.js → chunk-WK577OZB.js} +1 -1
- package/Marketplace/{chunk-ZHN24KZM.js → chunk-XIUYKYPU.js} +1 -1
- package/Marketplace/{chunk-OJVDCT5U.js → chunk-XJLNBLYY.js} +2 -2
- package/Marketplace/{chunk-UPZ35RUO.js → chunk-YT4PFZ7J.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-TARO2A2O.js → main-KYXOLZYL.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O}from"./chunk-UBMI3NQH.js";import{a as P}from"./chunk-J3P46Z53.js";import{a as M}from"./chunk-4ASUM4N5.js";import{b as h}from"./chunk-CVQMAWML.js";import"./chunk-LEHTNMIE.js";import{c as f}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-UBMI3NQH.js";import{a as P}from"./chunk-J3P46Z53.js";import{a as M}from"./chunk-4ASUM4N5.js";import{b as h}from"./chunk-CVQMAWML.js";import"./chunk-LEHTNMIE.js";import{c as f}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a}from"./chunk-K2UZHZCJ.js";import{a as C}from"./chunk-62PFQNHJ.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as u}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import"./chunk-3DTDXKFQ.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{n as g}from"./chunk-ITTRZMEX.js";import{s}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{y as l}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{F as c,J as i,n as r}from"./chunk-GPEVUTDI.js";import{Eb as p,Fb as e,ic as d,ka as n}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var x=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-products"]],standalone:!1,decls:1,vars:0,template:function(o,y){o&1&&d(0,"router-outlet")},dependencies:[c],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return t})();var w=[{path:"",component:x,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-WK577OZB.js").then(t=>t.StatusModule),canActivate:[a]},{path:"download",loadChildren:()=>import("./chunk-OKLT6GH5.js").then(t=>t.DownloadModule),canActivate:[a]},{path:"upload",loadComponent:()=>import("./chunk-HO5MJE26.js").then(t=>t.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[a]}]}],_=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,i.forChild(w)]})}}return t})();var V=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e({type:t})}static{this.\u0275inj=n({imports:[r,l,i,_,s,g,u,h,M,f,C,P,O]})}}return t})();export{V as ProductModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie}from"./chunk-ZD5LURJS.js";import{a as ae,b as le}from"./chunk-3NDNZO2L.js";import"./chunk-PUJ4JVT2.js";import"./chunk-LLZSSV5A.js";import"./chunk-CRC6ZWYT.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as oe,b as re}from"./chunk-CVQMAWML.js";import"./chunk-LEHTNMIE.js";import"./chunk-CH2MLZU7.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as Q}from"./chunk-
|
|
1
|
+
import{a as ie}from"./chunk-ZD5LURJS.js";import{a as ae,b as le}from"./chunk-3NDNZO2L.js";import"./chunk-PUJ4JVT2.js";import"./chunk-LLZSSV5A.js";import"./chunk-CRC6ZWYT.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as oe,b as re}from"./chunk-CVQMAWML.js";import"./chunk-LEHTNMIE.js";import"./chunk-CH2MLZU7.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as Q}from"./chunk-3DTDXKFQ.js";import{e as K}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as te,n as ne}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as j,h as q,m as G,o as H,y as Y}from"./chunk-DPLEMBB4.js";import{c as J}from"./chunk-PXB4YEY3.js";import{H as A,J as U,f as W,g as F,k as B,m as k,n as z}from"./chunk-GPEVUTDI.js";import{$c as V,Dc as P,Eb as M,Ec as l,Fc as S,Gc as y,Ic as c,Jc as u,Kb as w,Kc as h,Qc as I,Wb as m,Zc as L,_c as N,ad as R,gc as t,hc as n,ic as C,jc as T,kc as x,mc as O,ob as b,qb as r,rc as E,sc as v,wb as D,ya as p,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var de=a=>({ID:a});function me(a,f){if(a&1&&(t(0,"span",17),C(1,"img",18),n(),l(2)),a&2){let e=f.item;r(),m("src",e.Img,b)("alt",e.Name),r(),y(" ",e.Name," ")}}function pe(a,f){if(a&1&&(t(0,"tr")(1,"td"),l(2),n(),t(3,"td"),C(4,"img",28),n(),t(5,"td"),l(6),n(),t(7,"td",29)(8,"a",30),l(9),L(10,"number"),n()(),t(11,"td"),l(12),n(),t(13,"td"),l(14),L(15,"date"),n()()),a&2){let e=f.$implicit;r(2),S(e._source.ChannelName),r(2),m("src",e.logo,b),r(2),S(e._source.DateRange),r(2),m("queryParams",I(12,de,e._source.ID)),r(),y(" ",N(10,7,e._source.CountOrder)," "),r(3),S(e._source.UserLogin),r(2),y(" ",V(15,9,e._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function se(a,f){if(a&1){let e=O();T(0),t(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),n(),t(7,"th",23),l(8,"Type"),n(),t(9,"th",24),l(10,"Download Date Range"),n(),t(11,"th",25),l(12,"Count"),n(),t(13,"th"),l(14,"User Login"),n(),t(15,"th"),l(16,"Created"),n()()(),t(17,"tbody"),w(18,pe,16,14,"tr",26),n()(),t(19,"mat-paginator",27),E("page",function(i){p(e);let d=v();return s(d.onPaginationChange(i))}),n()(),x()}if(a&2){let e=v();r(18),m("ngForOf",e.downloadOrders),r(),m("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function ge(a,f){a&1&&(t(0,"div",31),C(1,"app-empty-state"),n())}var Ie=(()=>{class a{constructor(e,g){this.http=e,this.authService=g,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(g){return new(g||a)(D(K),D(Q))}}static{this.\u0275cmp=M({type:a,selectors:[["app-download-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(g,i){if(g&1){let d=O();t(0,"mainpanel",1),E("onSubmit",function(){return p(d),s(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),n(),t(5,"ng-select",3),h("ngModelChange",function(o){return p(d),u(i.filter.ChannelID,o)||(i.filter.ChannelID=o),s(o)}),w(6,me,3,3,"ng-template",4),n()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),n(),t(10,"div",7)(11,"datepicker",8),h("dateChange",function(o){return p(d),u(i.filter.From,o)||(i.filter.From=o),s(o)}),n()(),t(12,"div")(13,"datepicker",9),h("dateChange",function(o){return p(d),u(i.filter.To,o)||(i.filter.To=o),s(o)}),n()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),n(),t(17,"input",11),h("ngModelChange",function(o){return p(d),u(i.filter.PageNumber,o)||(i.filter.PageNumber=o),s(o)}),n()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),n(),t(21,"input",12),h("ngModelChange",function(o){return p(d),u(i.filter.RowCount,o)||(i.filter.RowCount=o),s(o)}),n()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),w(26,se,20,4,"ng-container",16)(27,ge,2,0,"ng-template",null,0,R),n()()()()()}if(g&2){let d=P(28);m("hideSearchBox",!0),r(5),m("clearable",!0)("items",i.channelOptions),c("ngModel",i.filter.ChannelID),r(6),c("date",i.filter.From),r(2),c("date",i.filter.To),r(4),c("ngModel",i.filter.PageNumber),r(4),c("ngModel",i.filter.RowCount),r(5),m("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,re,oe,ne,te,ee,$,X,Z,Y,j,H,q,G,le,ae,U,A,ie],encapsulation:2})}}return a})();export{Ie as DownloadOrderLogComponent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as te}from"./chunk-BUFEIJAI.js";import{a as $e,b as ge,c as ze,d as Ge,e as me,f as Ke,g as Ae,h as Ve,i as q,j as Se,k as E}from"./chunk-V5WYSCVT.js";import{b as fe,c as ee,d as Je}from"./chunk-PXB4YEY3.js";import{G as He,L as qe,n as Fe,o as Ue,p as We}from"./chunk-GPEVUTDI.js";import{F as Oe,Fb as W,G as je,La as F,O as ue,T as Ne,Va as U,Z as de,aa as _,ba as he,bd as Be,c as g,cd as Le,ea as K,f as Y,gd as V,j as Re,ja as k,k as _e,ka as B,ma as T,n as z,o as Q,oa as h,p as x,pa as L,q as G,qa as Me,ua as pe,v as D,w as xe}from"./chunk-T5ONJF63.js";import{a as le,i as b}from"./chunk-K2H6WANG.js";var Ze={production:!0,version:"5.38.
|
|
1
|
+
import{e as te}from"./chunk-BUFEIJAI.js";import{a as $e,b as ge,c as ze,d as Ge,e as me,f as Ke,g as Ae,h as Ve,i as q,j as Se,k as E}from"./chunk-V5WYSCVT.js";import{b as fe,c as ee,d as Je}from"./chunk-PXB4YEY3.js";import{G as He,L as qe,n as Fe,o as Ue,p as We}from"./chunk-GPEVUTDI.js";import{F as Oe,Fb as W,G as je,La as F,O as ue,T as Ne,Va as U,Z as de,aa as _,ba as he,bd as Be,c as g,cd as Le,ea as K,f as Y,gd as V,j as Re,ja as k,k as _e,ka as B,ma as T,n as z,o as Q,oa as h,p as x,pa as L,q as G,qa as Me,ua as pe,v as D,w as xe}from"./chunk-T5ONJF63.js";import{a as le,i as b}from"./chunk-K2H6WANG.js";var Ze={production:!0,version:"5.38.5",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var Xe=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.DetachVariant="/api/product/DetachVariant"}}return t})();var St="firebase",vt="11.10.0";q(St,vt,"app");var H=new Be("ANGULARFIRE2_VERSION");var Ye=(t,a)=>{let e=a?[a]:Ve(),n=[];return e.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{n.includes(i)||n.push(i)})}),n},ve=function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t}(ve||{}),Dn=V()&&typeof Zone<"u"?ve.WARN:ve.SILENT;var ne=class{zone;delegate;constructor(a,e=_e){this.zone=a,this.delegate=e}now(){return this.delegate.now()}schedule(a,e,n){let r=this.zone,o=function(i){r?r.runGuarded(()=>{a.apply(this,[i])}):a.apply(this,[i])};return this.delegate.schedule(o,e,n)}},we=(()=>{class t{outsideAngular;insideAngular;constructor(){let e=L(F);this.outsideAngular=e.runOutsideAngular(()=>new ne(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new ne(typeof Zone>"u"?void 0:Zone.current,Re))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var kt=new Map,It={activated:!1,tokenObservers:[]},bt={initialized:!1,enabled:!1};function C(t){return kt.get(t)||Object.assign({},It)}function nt(){return bt}var Tt="https://content-firebaseappcheck.googleapis.com/v1";var yt="exchangeDebugToken",Qe={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Un=24*60*60*1e3;var be=class{constructor(a,e,n,r,o){if(this.operation=a,this.retryPolicy=e,this.getWaitDuration=n,this.lowerBound=r,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=r,r>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(a){return b(this,null,function*(){this.stop();try{this.pending=new ge,this.pending.promise.catch(e=>{}),yield Et(this.getNextRun(a)),this.pending.resolve(),yield this.pending.promise,this.pending=new ge,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(a){if(a)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Et(t){return new Promise(a=>{setTimeout(a,t)})}var Ct={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},j=new Ge("appCheck","AppCheck",Ct);function rt(t){if(!C(t).activated)throw j.create("use-before-activation",{appName:t.name})}function ot(n,r){return b(this,arguments,function*({url:t,body:a},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let s={method:"POST",body:JSON.stringify(a),headers:o},l;try{l=yield fetch(t,s)}catch(f){throw j.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw j.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw j.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw j.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function it(t,a){let{projectId:e,appId:n,apiKey:r}=t.options;return{url:`${Tt}/projects/${e}/apps/${n}:${yt}?key=${r}`,body:{debug_token:a}}}var Pt="firebase-app-check-database",Dt=1,Te="firebase-app-check-store";var re=null;function Rt(){return re||(re=new Promise((t,a)=>{try{let e=indexedDB.open(Pt,Dt);e.onsuccess=n=>{t(n.target.result)},e.onerror=n=>{var r;a(j.create("storage-open",{originalErrorMessage:(r=n.target.error)===null||r===void 0?void 0:r.message}))},e.onupgradeneeded=n=>{let r=n.target.result;switch(n.oldVersion){case 0:r.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(e){a(j.create("storage-open",{originalErrorMessage:e?.message}))}}),re)}function _t(t,a){return xt(Ot(t),a)}function xt(t,a){return b(this,null,function*(){let n=(yield Rt()).transaction(Te,"readwrite"),o=n.objectStore(Te).put({compositeKey:t,value:a});return new Promise((i,s)=>{o.onsuccess=l=>{i()},n.onerror=l=>{var c;s(j.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Ot(t){return`${t.options.appId}-${t.name}`}var J=new Ke("@firebase/app-check");function ke(t,a){return ze()?_t(t,a).catch(e=>{J.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function at(){return nt().enabled}function st(){return b(this,null,function*(){let t=nt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
2
2
|
Can't get debug token in production mode.
|
|
3
3
|
`)})}var jt={error:"UNKNOWN_ERROR"};function Nt(t){return $e.encodeString(JSON.stringify(t),!1)}function ye(t,a=!1,e=!1){return b(this,null,function*(){let n=t.app;rt(n);let r=C(n),o=r.token,i;if(o&&!Z(o)&&(r.token=void 0,o=void 0),!o){let c=yield r.cachedTokenPromise;c&&(Z(c)?o=c:yield ke(n,void 0))}if(!a&&o&&Z(o))return{token:o.token};let s=!1;if(at())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=ot(it(n,yield st()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),s=!0);let c=yield r.exchangeTokenPromise;return yield ke(n,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),Ie(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),s=!0),o=yield C(n).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),i=c}let l;return o?i?Z(o)?l={token:o.token,internalError:i}:l=Ie(i):(l={token:o.token},r.token=o,yield ke(n,o)):l=Ie(i),s&&Ft(n,l),l})}function Mt(t){return b(this,null,function*(){let a=t.app;rt(a);let{provider:e}=C(a);if(at()){let n=yield st(),{token:r}=yield ot(it(a,n),t.heartbeatServiceProvider);return{token:r}}else{let{token:n}=yield e.getToken();return{token:n}}})}function Bt(t,a,e,n){let{app:r}=t,o=C(r),i={next:e,error:n,type:a};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&Z(o.token)){let s=o.token;Promise.resolve().then(()=>{e({token:s.token}),et(t)}).catch(()=>{})}o.cachedTokenPromise.then(()=>et(t))}function ct(t,a){let e=C(t),n=e.tokenObservers.filter(r=>r.next!==a);n.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=n}function et(t){let{app:a}=t,e=C(a),n=e.tokenRefresher;n||(n=Lt(t),e.tokenRefresher=n),!n.isRunning()&&e.isTokenAutoRefreshEnabled&&n.start()}function Lt(t){let{app:a}=t;return new be(()=>b(null,null,function*(){let e=C(a),n;if(e.token?n=yield ye(t,!0):n=yield ye(t),n.error)throw n.error;if(n.internalError)throw n.internalError}),()=>!0,()=>{let e=C(a);if(e.token){let n=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,r=e.token.expireTimeMillis-5*60*1e3;return n=Math.min(n,r),Math.max(0,n-Date.now())}else return 0},Qe.RETRIAL_MIN_WAIT,Qe.RETRIAL_MAX_WAIT)}function Ft(t,a){let e=C(t).tokenObservers;for(let n of e)try{n.type==="EXTERNAL"&&a.error!=null?n.error(a.error):n.next(a)}catch{}}function Z(t){return t.expireTimeMillis-Date.now()>0}function Ie(t){return{token:Nt(jt),error:t}}var Ee=class{constructor(a,e){this.app=a,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:a}=C(this.app);for(let e of a)ct(this.app,e.next);return Promise.resolve()}};function Ut(t,a){return new Ee(t,a)}function Wt(t){return{getToken:a=>ye(t,a),getLimitedUseToken:()=>Mt(t),addTokenListener:a=>Bt(t,"INTERNAL",a),removeTokenListener:a=>ct(t.app,a)}}var Ht="@firebase/app-check",$t="0.10.1";var zt="app-check",tt="app-check-internal";function Gt(){Ae(new me(zt,t=>{let a=t.getProvider("app").getImmediate(),e=t.getProvider("heartbeat");return Ut(a,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,a,e)=>{t.getProvider(tt).initialize()})),Ae(new me(tt,t=>{let a=t.getProvider("app-check").getImmediate();return Wt(a)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(Ht,$t)}Gt();var Kt="app-check";var oe=class{constructor(){return Ye(Kt)}};var Vt=["localhost","0.0.0.0","127.0.0.1"],tr=typeof window<"u"&&Vt.includes(window.location.hostname);var y=function(t){return t.USER="user",t.CHANNELS="channels",t.AUTHORIZATION="Authorization",t.INTERCOM="Intercom",t}(y||{});var lt=(()=>{class t{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let r=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(r)),s=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(s));return l.header=o,l}catch{return!1}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Zt="firebase",Xt="11.10.0";E.registerVersion(Zt,Xt,"app-compat");var Yt=["ngOnDestroy"],dt=(t,a,e,n={})=>new Proxy(t,{get:(r,o)=>e.runOutsideAngular(()=>{if(t[o])return n?.spy?.get&&n.spy.get(o,t[o]),t[o];if(Yt.indexOf(o)>-1)return()=>{};let i=a.toPromise().then(s=>{let l=s?.[o];return typeof l=="function"?l.bind(s):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(s,l)=>i[l],apply:(s,l,c)=>i.then(d=>{let u=d?.(...c);return n?.spy?.apply&&n.spy.apply(o,c,u),u})})})});var ie=class{constructor(a){return a}},ae=new T("angularfire2.app.options"),se=new T("angularfire2.app.name");function Ce(t,a,e){let n=typeof e=="string"&&e||"[DEFAULT]",r=typeof e=="object"&&e||{};r.name=r.name||n;let i=E.apps.filter(s=>s&&s.name===r.name)[0]||a.runOutsideAngular(()=>E.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let s=!!module.hot;Qt("error",`${i.name} Firebase App already initialized with different options${s?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ie(i)}var Qt=(t,...a)=>{V()&&typeof console<"u"&&console[t](...a)},en={provide:ie,useFactory:Ce,deps:[ae,F,[new Me,se]]},Jo=(()=>{class t{static initializeApp(e,n){return{ngModule:t,providers:[{provide:ae,useValue:e},{provide:se,useValue:n}]}}constructor(e){E.registerVersion("angularfire",H.full,"core"),E.registerVersion("angularfire",H.full,"app-compat"),E.registerVersion("angular",Le.full,e.toString())}static \u0275fac=function(n){return new(n||t)(h(U))};static \u0275mod=W({type:t});static \u0275inj=B({providers:[en]})}return t})();function ht(t,a,e,n,r){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(s=>s[0]===t)||[];if(o)return tn(r,i)||(ut("error",`${a} was already initialized on the ${e} Firebase App with different settings.${nn?" You may need to reload as Firebase is not HMR aware.":""}`),ut("warn",{is:r,was:i})),o;{let s=n();return globalThis.\u0275AngularfireInstanceCache.push([t,s,r]),s}}function tn(t,a){try{return t.toString()===a.toString()}catch{return t===a}}var nn=typeof module<"u"&&!!module.hot,ut=(t,...a)=>{V()&&typeof console<"u"&&console[t](...a)};globalThis.\u0275AngularfireInstanceCache||=[];var rn=new T("angularfire2.auth.use-emulator"),on=new T("angularfire2.auth.settings"),an=new T("angularfire2.auth.tenant-id"),sn=new T("angularfire2.auth.langugage-code"),cn=new T("angularfire2.auth.use-device-language"),ln=new T("angularfire.auth.persistence"),un=(t,a,e,n,r,o,i,s)=>ht(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=a.runOutsideAngular(()=>t.auth());if(e&&l.useEmulator(...e),n&&(l.tenantId=n),l.languageCode=r,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return s&&l.setPersistence(s),l},[e,n,r,o,i,s]),Pe=(()=>{class t{injector=L(pe);authState;idToken;user;idTokenResult;credential;constructor(e,n,r,o,i,s,l,c,d,u,p,f){let $=new Y,N=G(void 0).pipe(z(i.outsideAngular),_(()=>o.runOutsideAngular(()=>import("./chunk-IIJMZKPL.js"))),D(()=>Ce(e,o,n)),D(P=>un(P,o,s,c,d,u,l,p)),de({bufferSize:1,refCount:!1}));if(We(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=G(null);else{N.pipe(Ne()).subscribe();let P=N.pipe(_(A=>A.getRedirectResult().then(R=>R,()=>null)),qe(this.injector),de({bufferSize:1,refCount:!1})),X=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(M=>R.next(M),M=>R.error(M),()=>R.complete()))})))),ce=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(M=>R.next(M),M=>R.error(M),()=>R.complete()))}))));this.authState=P.pipe(he(X),Q(i.outsideAngular),z(i.insideAngular)),this.user=P.pipe(he(ce),Q(i.outsideAngular),z(i.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):G(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):G(null))),this.credential=Oe(P,$,this.authState.pipe(je(A=>!A))).pipe(D(A=>A?.user?A:null),Q(i.outsideAngular),z(i.insideAngular))}return dt(this,N,o,{spy:{apply:(P,X,ce)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ce.then(A=>$.next(A))}}})}static \u0275fac=function(n){return new(n||t)(h(ae),h(se,8),h(U),h(F),h(we),h(rn,8),h(on,8),h(an,8),h(sn,8),h(cn,8),h(ln,8),h(oe,8))};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),di=(()=>{class t{constructor(){E.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(n){return new(n||t)};static \u0275mod=W({type:t});static \u0275inj=B({providers:[Pe]})}return t})();function m(t,a,e,n){return new Promise((r,o)=>{t||o("IndexedDB not available");let i=t.open(a,e),s;i.onsuccess=l=>{s=i.result,r(s)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof n=="function"&&(i.onupgradeneeded=l=>{n(l,s)})})}function pt(t,a,e,n,r){if(!t)return;let o=t.open(a,e);o.onupgradeneeded=i=>{let s=i.target.result;n.forEach(c=>{if(!s.objectStoreNames.contains(c.store)){let d=s.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=r&&r();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](s,o.transaction)}),s.close()},o.onsuccess=i=>{i.target.result.close()}}function hn(t,a,e){if(!t||!a||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(n=>{try{let r=a+1,o=indexedDB.open(t,r);o.onupgradeneeded=i=>{let s=i.target.result;s.deleteObjectStore(e),s.close(),console.log("onupgradeneeded"),n.next(!0),n.complete()},o.onerror=i=>n.error(i)}catch(r){n.error(r)}})}function pn(t,a){return t.objectStoreNames.contains(a)}function I(t,a,e){t||e("You need to use the openDatabase function to create a database before you query it!"),pn(t,a)||e(`objectStore does not exists: ${a}`)}function v(t,a){let e=t.transaction(a.storeName,a.dbMode);return e.onerror=a.error,e.onabort=a.abort,e}function w(t,a,e,n){return{storeName:a,dbMode:t,error:r=>{e(r)},abort:r=>{e(r)}}}var S=function(t){return t.readonly="readonly",t.readwrite="readwrite",t}(S||{}),ft=new T(null),De=(()=>{class t{constructor(e,n){if(this.dbConfig=e,this.platformId=n,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ue(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,pt(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(r=>{r.version!==e.version&&(this.dbConfig.version=r.version)}))}createObjectStore(e,n){let r=[e];pt(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,r,n)}add(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=v(i,w(S.readwrite,e,d=>o.error(d))).objectStore(e),c=r?l.add(n,r):l.add(n);c.onsuccess=d=>b(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,n){let r=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=v(s,w(S.readwrite,e,o,i)).objectStore(e),d=n.map(u=>new Promise((p,f)=>{let $=u.key;delete u.key;let N=$?c.add(u,$):c.add(u);N.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(s=>i(s))});return x(r)}bulkDelete(e,n){let r=n.map(o=>new Promise((i,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=v(l,w(S.readwrite,e,s,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(u=>{i(u)})}}).catch(l=>s(l))}));return x(Promise.all(r))}getByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=v(o,w(S.readonly,e,r.error)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result),r.complete()},l.onerror=c=>{r.error(c)}}).catch(o=>r.error(o))})}bulkGet(e,n){let r=n.map(o=>this.getByKey(e,o));return new g(o=>{xe(r).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,c=>r.error(c));let l=v(o,w(S.readonly,e,r.error,r.next)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result)}}).catch(o=>r.error(o))})}getByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{I(i,e,u=>o.error(u));let d=v(i,w(S.readonly,e,o.error)).objectStore(e).index(n).get(r);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{I(r,e,l=>n.error(l));let s=v(r,w(S.readonly,e,n.error,n.next)).objectStore(e).getAll();s.onerror=l=>{n.error(l)},s.onsuccess=({target:{result:l}})=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}update(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,c=>r.error(c));let s=v(o,w(S.readwrite,e,c=>r.error(c))).objectStore(e),l=s.put(n);l.onsuccess=c=>b(this,null,function*(){let d=c.target.result,u=s.get(d);u.onsuccess=p=>{r.next(p.target.result),r.complete()}})}).catch(o=>r.error(o))})}delete(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,l=>r.error(l));let i=v(o,w(S.readwrite,e,l=>r.error(l)));i.objectStore(e).delete(n),i.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(l=>{r.next(l),r.complete()})}}).catch(o=>r.error(o))})}deleteByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,l=>r.error(l));let i=v(o,w(S.readwrite,e,l=>r.error(l))),s=i.objectStore(e);i.oncomplete=()=>{r.next(!0),r.complete()},s.delete(n)}).catch(o=>r.error(o))})}clear(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{I(r,e,s=>n.error(s));let o=v(r,w(S.readwrite,e,s=>n.error(s)));o.objectStore(e).clear(),o.oncomplete=()=>{n.next(!0),n.complete()}}).catch(r=>n.error(r))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>b(this,null,function*(){yield n.close();let r=this.indexedDB.deleteDatabase(this.dbConfig.name);r.onsuccess=()=>{e.next(!0),e.complete()},r.onerror=o=>e.error(o),r.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(n=>e.error(n))})}openCursor(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,c=>r.error(c));let s=v(o,w(S.readonly,e,r.error)).objectStore(e),l=n===void 0?s.openCursor():s.openCursor(n);l.onsuccess=c=>{r.next(c),r.complete()}}).catch(o=>r.error(o))})}openCursorByIndex(e,n,r,o=S.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{I(s,e,p=>{i.error(p)});let u=v(s,w(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{i.next(p)}}).catch(s=>i.error(s)),i}getAllByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{I(s,e,p=>i.error(p));let u=v(s,w(S.readonly,e,i.error)).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}getAllKeysByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{I(s,e,p=>i.error(p));let u=v(s,w(S.readonly,e,i.error)).objectStore(e).index(n).openKeyCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}count(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{I(o,e,c=>r.error(c));let l=v(o,w(S.readonly,e,r.error)).objectStore(e).count(n);l.onerror=c=>r.error(c),l.onsuccess=c=>{r.next(c.target.result),r.complete()}}).catch(o=>r.error(o))})}countByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{I(i,e,u=>o.error(u));let d=v(i,w(S.readonly,e,o.error)).objectStore(e).index(n).count(r);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return hn(this.dbConfig.name,++this.dbConfig.version,e)}}return t.\u0275fac=function(e){return new(e||t)(h(ft),h(U))},t.\u0275prov=k({token:t,factory:t.\u0275fac}),t})(),vi=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[De,{provide:ft,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=W({type:t}),t.\u0275inj=B({imports:[[Fe]]}),t})();var gt=(()=>{class t{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let r=this.getKey(n);return this.db.add(this.DATABASE,e,r).pipe(D(o=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case fe.Lazada:n="Lazada";break;case fe.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(n){return new(n||t)(h(De))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mt=(()=>{class t{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=le(le({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ee.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var At=(()=>{class t{constructor(){this.httpService=L(te)}refreshToken(){return this.httpService.get(Xe.RefreshToken).pipe(K(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(y.USER,n)}getUser(){let e=localStorage.getItem(y.USER);return e?JSON.parse(e):null}saveChannelsToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(y.CHANNELS,n)}getChannels(){let e=localStorage.getItem(y.CHANNELS);return e?JSON.parse(e):[]}clearStorage(){localStorage.removeItem(y.USER),localStorage.removeItem(y.CHANNELS)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Fi=(()=>{class t{constructor(e,n,r,o,i,s,l,c){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=o,this.localDataService=i,this.router=s,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(K(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Ze.news).pipe(D(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new Se;return r.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(r)).pipe(D(o=>o.credential),D(o=>o.idToken),_(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:n}))),K(o=>{this.setLocalStorage(o,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(y.AUTHORIZATION,JSON.stringify({Host:n,username:r})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(y.USER);if(ee.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),n=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return n<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(y.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(n){return new(n||t)(h(te),h(lt),h(Pe),h(Je),h(gt),h(He),h(mt),h(At))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Ze as a,y as b,lt as c,Jo as d,di as e,vi as f,gt as g,Xe as h,At as i,Fi as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ke,b as G,c as He}from"./chunk-DP3Z5OLA.js";import"./chunk-3SDQ2PXY.js";import{a as $e,b as ze,c as Ye,e as Ge,f as Ue,g as je}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import"./chunk-UDOCTVWA.js";import"./chunk-GBD4FIF3.js";import{i as We,j as Re,k as Le,l as Be,m as Ae}from"./chunk-CRC6ZWYT.js";import{a as Ne}from"./chunk-EGTYAIU5.js";import"./chunk-6ALHX2I4.js";import{a as Fe,b as Oe,c as ke}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-MNFHFW3E.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-Q2OEJFVT.js";import{c as Te,d as be,e as Ee}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{h as Z,j as ee}from"./chunk-3PJZW7HF.js";import{b as xe,e as De}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as Me,n as Ve}from"./chunk-ITTRZMEX.js";import{r as Pe,s as Ie}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as Se,h as Ce,m as ve,y as ye}from"./chunk-DPLEMBB4.js";import{b as X,c as x}from"./chunk-PXB4YEY3.js";import{H as we,J as ge,d as R,f as L,g as B,j as J,k as q,n as F}from"./chunk-GPEVUTDI.js";import{$c as _e,Ac as ue,Dc as T,Eb as M,Ec as l,Fc as V,Gc as C,Ic as E,Jc as P,Ka as j,Kb as w,Kc as I,Na as O,Oc as K,Qa as _,Qc as he,Rc as fe,Wb as d,Z as $,Zc as W,_c as Y,aa as oe,ad as H,bc as b,ea as z,gc as a,hc as r,ic as S,ja as le,jc as k,kc as N,m as ae,mc as y,ob as pe,pa as v,qb as o,qd as Q,rc as g,sc as u,v as U,vc as se,wc as de,ya as m,yc as me,za as c,zc as ce}from"./chunk-T5ONJF63.js";import{a as ne,b as re}from"./chunk-K2H6WANG.js";var Xe=t=>({"over-due":t});function Ze(t,s){if(t&1&&(a(0,"tr",8)(1,"td"),l(2),r(),a(3,"td"),l(4),r(),a(5,"td"),l(6),r(),a(7,"td"),l(8),r()()),t&2){let e=s.$implicit,n=s.index;d("ngClass",he(5,Xe,e.Exception)),o(2),V(n+1),o(2),V(e.Number),o(2),V(e.Status),o(2),V(e.Exception)}}function et(t,s){if(t&1&&(k(0),w(1,Ze,9,7,"tr",7),N()),t&2){let e,n=u();o(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function tt(t,s){t&1&&(a(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),r(),a(4,"h4",13),l(5," There is no order to processed "),r()()())}var Qe=(()=>{class t{constructor(){this.downloadResult=O()}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(a(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),S(5,"th",5),a(6,"th"),l(7,"Order Number"),r(),a(8,"th"),l(9,"Status"),r(),a(10,"th"),l(11,"Exception"),r()()(),a(12,"tbody"),w(13,et,2,1,"ng-container",6)(14,tt,6,0,"ng-template",null,0,H),r()()()()),n&2){let p,h=T(15);o(13),d("ngIf",((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0)("ngIfElse",h)}},dependencies:[F,R,L,B],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(De),this.toastr=v(xe),this.datePipe=v(q)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(z(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):ae}toastrEmptyPreview(e){let n=this.datePipe.transform(e.From,"dd MMM yyyy"),i=this.datePipe.transform(e.To,"dd MMM yyyy"),p=e.TimeFrom?e.TimeFrom:"",h=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${h}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?x.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(e,n){let i=x.formatTitleFromDate(new Date(e),new Date(n)),p=this.datePipe.transform(e,i),h=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${h}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac})}}return t})();function it(t,s){if(t&1&&(a(0,"ng-option",13),S(1,"img",14),l(2),r()),t&2){let e=s.$implicit;d("value",e.ID),o(),d("src",e==null?null:e.Img,pe),o(),C("",e.Name," ")}}function nt(t,s){if(t&1){let e=y();a(0,"div",8)(1,"div",4)(2,"h5"),l(3,"Type"),r(),a(4,"p",5),l(5,"Select Type want to download"),r()(),a(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),I("ngModelChange",function(i){m(e);let p=u();return P(p.downloadType,i)||(p.downloadType=i),c(i)}),g("ngModelChange",function(){m(e);let i=u();return c(i.onDownloadTypeChange())}),a(10,"mat-radio-button",17),l(11," Orders "),r(),a(12,"mat-radio-button",18),l(13," Disbursement "),r()()()(),a(14,"div",19)(15,"div",20),S(16,"i",21),r(),a(17,"p",22),l(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(t&2){let e=u();o(9),E("ngModel",e.downloadType),o(),d("value",!1),o(2),d("value",!0)}}function rt(t,s){t&1&&(a(0,"p",5),l(1," Select Disbursement date "),a(2,"span",23),l(3,"(payment date / order complete date)"),r(),l(4," of the channel you want to download (Max 1 Week). "),r())}function at(t,s){t&1&&(a(0,"p",5),l(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function ot(t,s){if(t&1){let e=y();a(0,"div",12)(1,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.startTime,i)||(p.startTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onStartTimeChange())}),r(),a(2,"span",25),l(3,"-"),r(),a(4,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.endTime,i)||(p.endTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onEndTimeChange())}),r()()}if(t&2){let e=u();o(),E("time",e.startTime),o(3),E("time",e.endTime)}}var Je=(()=>{class t{constructor(){this.reset=O(!1),this.authService=v(ee),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,this.selectedChannel=_(null),this.showTimePicker=_(!1),this.startDate=_(null),this.endDate=_(null),this.startTime=_("00:00"),this.endTime=_("23:59"),this.filterData=new j,Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(U(e=>e?.Model),$(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},features:[K([A])],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),l(5,"Select a Channel"),r(),a(6,"p",5),l(7,"Select Channel want to download order"),r()(),a(8,"div",4)(9,"ng-select",6),I("ngModelChange",function(f){return m(p),P(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),g("ngModelChange",function(){return m(p),c(i.onSelectChannel())}),w(10,it,3,3,"ng-option",7),r()()(),w(11,nt,19,3,"div",8),W(12,"async"),a(13,"div",8)(14,"div",4)(15,"h5"),l(16,"Date Range"),r(),w(17,rt,5,0,"p",5)(18,at,2,0,"p",5),r(),a(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),I("ngModelChange",function(f){return m(p),P(i.startDate,f)||(i.startDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())}),r(),a(23,"input",11),I("ngModelChange",function(f){return m(p),P(i.endDate,f)||(i.endDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(p),c(i.onFilterDateChange())}),r()(),S(24,"mat-date-range-picker",null,0),r(),w(26,ot,5,2,"div",12),r()()()()}if(n&2){let p,h,f=T(25);o(9),d("clearable",!1),E("ngModel",i.selectedChannelId),o(),d("ngForOf",i.channelOptions()),o(),b((p=Y(12,9,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?11:-1),o(6),b(i.downloadType()&&((h=i.selectedChannel())==null?null:h.TypeID)==i.channelType.Tokopedia?17:18),o(4),d("rangePicker",f),o(),E("ngModel",i.startDate),o(),E("ngModel",i.endDate),o(3),b(i.showTimePicker()?26:-1)}},dependencies:[F,L,J,Ee,be,Te,ke,Fe,Oe,ye,Se,Ce,ve,He,Be,We,Ae,Re,Le],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]})}}return t})();var D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var lt=(t,s)=>({"over-due-today":t,"over-due":s});function pt(t,s){if(t&1&&(a(0,"th",21),l(1),r()),t&2){let e=u();o(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function st(t,s){if(t&1&&(a(0,"td"),l(1),W(2,"date"),r()),t&2){let e=u().$implicit;o(),C(" ",_e(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function dt(t,s){if(t&1&&(a(0,"span"),l(1),r()),t&2){let e=u().$implicit;o(),C(" ",e.ActionString," ")}}function mt(t,s){if(t&1&&(a(0,"li"),l(1),r()),t&2){let e=s.$implicit;o(),C(" ",e," ")}}function ct(t,s){if(t&1&&(a(0,"ul",27),w(1,mt,2,1,"li",22),r()),t&2){let e=u().$implicit;o(),d("ngForOf",e.ActionString)}}function ut(t,s){if(t&1&&(a(0,"span",28),S(1,"i",29),r()),t&2){let e=u().$implicit;de("title","Delivery : ",e.DeliveryState,`
|
|
1
|
+
import{a as Ke,b as G,c as He}from"./chunk-DP3Z5OLA.js";import"./chunk-3SDQ2PXY.js";import{a as $e,b as ze,c as Ye,e as Ge,f as Ue,g as je}from"./chunk-IYYVZ6B6.js";import"./chunk-RVYGL22E.js";import"./chunk-UDOCTVWA.js";import"./chunk-GBD4FIF3.js";import{i as We,j as Re,k as Le,l as Be,m as Ae}from"./chunk-CRC6ZWYT.js";import{a as Ne}from"./chunk-EGTYAIU5.js";import"./chunk-6ALHX2I4.js";import{a as Fe,b as Oe,c as ke}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-MNFHFW3E.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-Q2OEJFVT.js";import{c as Te,d as be,e as Ee}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{h as Z,j as ee}from"./chunk-3DTDXKFQ.js";import{b as xe,e as De}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as Me,n as Ve}from"./chunk-ITTRZMEX.js";import{r as Pe,s as Ie}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as Se,h as Ce,m as ve,y as ye}from"./chunk-DPLEMBB4.js";import{b as X,c as x}from"./chunk-PXB4YEY3.js";import{H as we,J as ge,d as R,f as L,g as B,j as J,k as q,n as F}from"./chunk-GPEVUTDI.js";import{$c as _e,Ac as ue,Dc as T,Eb as M,Ec as l,Fc as V,Gc as C,Ic as E,Jc as P,Ka as j,Kb as w,Kc as I,Na as O,Oc as K,Qa as _,Qc as he,Rc as fe,Wb as d,Z as $,Zc as W,_c as Y,aa as oe,ad as H,bc as b,ea as z,gc as a,hc as r,ic as S,ja as le,jc as k,kc as N,m as ae,mc as y,ob as pe,pa as v,qb as o,qd as Q,rc as g,sc as u,v as U,vc as se,wc as de,ya as m,yc as me,za as c,zc as ce}from"./chunk-T5ONJF63.js";import{a as ne,b as re}from"./chunk-K2H6WANG.js";var Xe=t=>({"over-due":t});function Ze(t,s){if(t&1&&(a(0,"tr",8)(1,"td"),l(2),r(),a(3,"td"),l(4),r(),a(5,"td"),l(6),r(),a(7,"td"),l(8),r()()),t&2){let e=s.$implicit,n=s.index;d("ngClass",he(5,Xe,e.Exception)),o(2),V(n+1),o(2),V(e.Number),o(2),V(e.Status),o(2),V(e.Exception)}}function et(t,s){if(t&1&&(k(0),w(1,Ze,9,7,"tr",7),N()),t&2){let e,n=u();o(),d("ngForOf",(e=n.downloadResult())==null?null:e.Body)}}function tt(t,s){t&1&&(a(0,"tr",9)(1,"td",10)(2,"div",11),S(3,"i",12),r(),a(4,"h4",13),l(5," There is no order to processed "),r()()())}var Qe=(()=>{class t{constructor(){this.downloadResult=O()}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(a(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),S(5,"th",5),a(6,"th"),l(7,"Order Number"),r(),a(8,"th"),l(9,"Status"),r(),a(10,"th"),l(11,"Exception"),r()()(),a(12,"tbody"),w(13,et,2,1,"ng-container",6)(14,tt,6,0,"ng-template",null,0,H),r()()()()),n&2){let p,h=T(15);o(13),d("ngIf",((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0)("ngIfElse",h)}},dependencies:[F,R,L,B],encapsulation:2})}}return t})();var A=(()=>{class t{constructor(){this.httpService=v(De),this.toastr=v(xe),this.datePipe=v(q)}gerChannelDetailById(e){return this.httpService.post(Z.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(Z.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(Z.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(z(n=>{n.Data?.length===0&&this.toastrEmptyPreview(e)})):ae}toastrEmptyPreview(e){let n=this.datePipe.transform(e.From,"dd MMM yyyy"),i=this.datePipe.transform(e.To,"dd MMM yyyy"),p=e.TimeFrom?e.TimeFrom:"",h=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${h}!`,"No Orders!")}validateDatePreview(e){let n=!0;return e.downloadType==!0?x.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(e,n){let i=x.formatTitleFromDate(new Date(e),new Date(n)),p=this.datePipe.transform(e,i),h=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${h}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac})}}return t})();function it(t,s){if(t&1&&(a(0,"ng-option",13),S(1,"img",14),l(2),r()),t&2){let e=s.$implicit;d("value",e.ID),o(),d("src",e==null?null:e.Img,pe),o(),C("",e.Name," ")}}function nt(t,s){if(t&1){let e=y();a(0,"div",8)(1,"div",4)(2,"h5"),l(3,"Type"),r(),a(4,"p",5),l(5,"Select Type want to download"),r()(),a(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),I("ngModelChange",function(i){m(e);let p=u();return P(p.downloadType,i)||(p.downloadType=i),c(i)}),g("ngModelChange",function(){m(e);let i=u();return c(i.onDownloadTypeChange())}),a(10,"mat-radio-button",17),l(11," Orders "),r(),a(12,"mat-radio-button",18),l(13," Disbursement "),r()()()(),a(14,"div",19)(15,"div",20),S(16,"i",21),r(),a(17,"p",22),l(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),r()()()()}if(t&2){let e=u();o(9),E("ngModel",e.downloadType),o(),d("value",!1),o(2),d("value",!0)}}function rt(t,s){t&1&&(a(0,"p",5),l(1," Select Disbursement date "),a(2,"span",23),l(3,"(payment date / order complete date)"),r(),l(4," of the channel you want to download (Max 1 Week). "),r())}function at(t,s){t&1&&(a(0,"p",5),l(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),r())}function ot(t,s){if(t&1){let e=y();a(0,"div",12)(1,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.startTime,i)||(p.startTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onStartTimeChange())}),r(),a(2,"span",25),l(3,"-"),r(),a(4,"app-timepicker",24),I("timeChange",function(i){m(e);let p=u();return P(p.endTime,i)||(p.endTime=i),c(i)}),g("timeChange",function(){m(e);let i=u();return c(i.onEndTimeChange())}),r()()}if(t&2){let e=u();o(),E("time",e.startTime),o(3),E("time",e.endTime)}}var Je=(()=>{class t{constructor(){this.reset=O(!1),this.authService=v(ee),this.downloadService=v(A),this.downloadType=_(!1),this.selectedChannelId=_(null),this.channelOptions=_(this.authService.getChannels()),this.channelType=X,this.selectedChannel=_(null),this.showTimePicker=_(!1),this.startDate=_(null),this.endDate=_(null),this.startTime=_("00:00"),this.endTime=_("23:59"),this.filterData=new j,Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(U(e=>e?.Model),$(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},features:[K([A])],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),l(5,"Select a Channel"),r(),a(6,"p",5),l(7,"Select Channel want to download order"),r()(),a(8,"div",4)(9,"ng-select",6),I("ngModelChange",function(f){return m(p),P(i.selectedChannelId,f)||(i.selectedChannelId=f),c(f)}),g("ngModelChange",function(){return m(p),c(i.onSelectChannel())}),w(10,it,3,3,"ng-option",7),r()()(),w(11,nt,19,3,"div",8),W(12,"async"),a(13,"div",8)(14,"div",4)(15,"h5"),l(16,"Date Range"),r(),w(17,rt,5,0,"p",5)(18,at,2,0,"p",5),r(),a(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),I("ngModelChange",function(f){return m(p),P(i.startDate,f)||(i.startDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())}),r(),a(23,"input",11),I("ngModelChange",function(f){return m(p),P(i.endDate,f)||(i.endDate=f),c(f)}),g("click",function(){m(p);let f=T(25);return c(f.open())})("ngModelChange",function(){return m(p),c(i.onFilterDateChange())}),r()(),S(24,"mat-date-range-picker",null,0),r(),w(26,ot,5,2,"div",12),r()()()()}if(n&2){let p,h,f=T(25);o(9),d("clearable",!1),E("ngModel",i.selectedChannelId),o(),d("ngForOf",i.channelOptions()),o(),b((p=Y(12,9,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?11:-1),o(6),b(i.downloadType()&&((h=i.selectedChannel())==null?null:h.TypeID)==i.channelType.Tokopedia?17:18),o(4),d("rangePicker",f),o(),E("ngModel",i.startDate),o(),E("ngModel",i.endDate),o(3),b(i.showTimePicker()?26:-1)}},dependencies:[F,L,J,Ee,be,Te,ke,Fe,Oe,ye,Se,Ce,ve,He,Be,We,Ae,Re,Le],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]})}}return t})();var D=function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t}(D||{});var lt=(t,s)=>({"over-due-today":t,"over-due":s});function pt(t,s){if(t&1&&(a(0,"th",21),l(1),r()),t&2){let e=u();o(),C(" ",e.selectedChannel()?"Created Date":"Last Status Update"," ")}}function st(t,s){if(t&1&&(a(0,"td"),l(1),W(2,"date"),r()),t&2){let e=u().$implicit;o(),C(" ",_e(2,1,e.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function dt(t,s){if(t&1&&(a(0,"span"),l(1),r()),t&2){let e=u().$implicit;o(),C(" ",e.ActionString," ")}}function mt(t,s){if(t&1&&(a(0,"li"),l(1),r()),t&2){let e=s.$implicit;o(),C(" ",e," ")}}function ct(t,s){if(t&1&&(a(0,"ul",27),w(1,mt,2,1,"li",22),r()),t&2){let e=u().$implicit;o(),d("ngForOf",e.ActionString)}}function ut(t,s){if(t&1&&(a(0,"span",28),S(1,"i",29),r()),t&2){let e=u().$implicit;de("title","Delivery : ",e.DeliveryState,`
|
|
2
2
|
Payment : `,e.PaymentState,"")}}function ht(t,s){if(t&1&&(a(0,"tr")(1,"td"),l(2),r(),a(3,"td"),l(4),r(),w(5,st,3,4,"td",23),a(6,"td")(7,"span"),l(8),r(),l(9),r(),a(10,"td",24)(11,"span"),l(12),r(),l(13),r(),a(14,"td"),w(15,dt,2,1,"span",23)(16,ct,2,1,"ul",25),r(),a(17,"td"),w(18,ut,2,3,"span",26),r()()),t&2){let e,n=s.$implicit,i=s.index,p=u(2);o(2),V(i+1),o(2),V(n.Number),o(),d("ngIf",((e=p.selectedChannel())==null?null:e.TypeID)!=p.channelType.Shopee&&((e=p.selectedChannel())==null?null:e.TypeID)!==p.channelType.Tiktok),o(3),C("",n.ChannelStatus," - "),o(),C("",n.ChannelStatusDescription," "),o(),d("ngClass",fe(12,lt,(n==null?null:n.Action)==p.actionPreviewOrder.Update,(n==null?null:n.Action)==p.actionPreviewOrder.New))("matTooltip",n.POSStatus==91||n.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),o(2),C("",n.POSStatus," - "),o(),C("",n.POSStatusDescription," "),o(2),d("ngIf",n.ActionString.length==1),o(),d("ngIf",n.ActionString.length>1),o(2),d("ngIf",n.ChannelStatus!=99&&n.POSStatus!=99)}}function ft(t,s){if(t&1&&(k(0),w(1,ht,19,15,"tr",22),N()),t&2){let e=u();o(),d("ngForOf",e.displayPreviewData())}}function _t(t,s){t&1&&(a(0,"tr",30)(1,"td",31)(2,"div",32),S(3,"i",33),r(),a(4,"h4",34),l(5," There is no order to processed "),r()()())}var qe=(()=>{class t{constructor(){this.orderPreview=O(),this.selectedChannel=O(),this.channelType=X,this.allData=_(0),this.syncData=_(0),this.wrongData=_(0),this.unsyncData=_(0),this.pillStatus=_(D.ALL),this.actionPreviewOrder=G,this.previewStatus=D,this.displayPreviewData=_([]),this.exportOrders=new j,Q(()=>{this.orderPreview()&&(this.filterPreviewData(D.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(D.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(D.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(D.UNSYNC).length)}filterDataByStatus(e){let n=[];switch(e){case D.ALL:n=this.orderPreview();break;case D.SYNC:n=this.orderPreview().filter(i=>i.Action==G.DoNothing);break;case D.WRONG:n=this.orderPreview().filter(i=>i.Action==G.Update);break;case D.UNSYNC:n=this.orderPreview().filter(i=>i.Action==G.New);break}return n}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:41,vars:11,consts:[["EMPTY",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1){let p=y();a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.ALL))}),l(8),r()(),a(9,"li",8)(10,"button",9),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.SYNC))}),l(11),r()(),a(12,"li",8)(13,"button",10),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.WRONG))}),l(14),r()(),a(15,"li",8)(16,"button",11),g("click",function(){return m(p),c(i.filterPreviewData(i.previewStatus.UNSYNC))}),l(17),r()()()(),a(18,"div")(19,"button",12),g("click",function(){return m(p),c(i.onExportOrders())}),S(20,"i",13),a(21,"span"),l(22,"Export"),r()()()()(),a(23,"table",14)(24,"thead",15)(25,"tr"),S(26,"th",16),a(27,"th",17),l(28,"Number"),r(),w(29,pt,2,1,"th",18),a(30,"th",19),l(31,"Channel Status"),r(),a(32,"th",19),l(33,"POS Status"),r(),a(34,"th"),l(35,"Action"),r(),S(36,"th",16),r()(),a(37,"tbody"),w(38,ft,2,1,"ng-container",20)(39,_t,6,0,"ng-template",null,0,H),r()()()()}if(n&2){let p,h,f=T(40);o(7),d("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),o(),C(" All (",i.allData(),") "),o(2),d("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),o(),C(" Existing (",i.syncData(),") "),o(2),d("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),o(),C(" Wrong Status (",i.wrongData(),") "),o(2),d("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),o(),C(" Missing (",i.unsyncData(),") "),o(12),d("ngIf",((p=i.selectedChannel())==null?null:p.TypeID)!=i.channelType.Shopee&&((p=i.selectedChannel())==null?null:p.TypeID)!==i.channelType.Tiktok),o(9),d("ngIf",((h=i.displayPreviewData())==null?null:h.length)>0)("ngIfElse",f)}},dependencies:[F,R,L,B,q,Ie,Pe],encapsulation:2})}}return t})();var wt=["stepper"];function gt(t,s){t&1&&(a(0,"a",2),l(1," Download V1 "),r())}function St(t,s){if(t&1){let e=y();a(0,"div",3)(1,"button",20),g("click",function(){m(e);let i=u();return c(i.onStepperBack())}),l(2," Back "),r(),a(3,"button",21),g("click",function(){m(e);let i=u();return c(i.onNextStep())}),l(4," Next "),r()()}if(t&2){let e=u();o(3),d("disabled",e.disabledNextFilter())}}function Ct(t,s){if(t&1){let e=y();a(0,"button",22),g("click",function(){m(e);let i=u();return c(i.onNextStep())}),l(1," Next "),r()}if(t&2){let e=u();d("disabled",e.disabledNextFilter())}}function vt(t,s){if(t&1){let e=y();a(0,"button",23),g("click",function(){m(e);let i=u();return c(i.onNewDownload())}),S(1,"i",24),l(2," New "),r()}}function yt(t,s){t&1&&(S(0,"i",25),a(1,"span"),l(2,"Filter"),r())}function xt(t,s){t&1&&(S(0,"i",26),a(1,"span"),l(2,"Preview"),r())}function Dt(t,s){if(t&1){let e=y();k(0),a(1,"preview-step",27),g("onExportOrders",function(){m(e);let i=u();return c(i.onExportOrders())}),r(),N()}if(t&2){let e=s.ngIf;o(),d("orderPreview",e)}}function Tt(t,s){t&1&&(S(0,"i",28),a(1,"span"),l(2,"Finish"),r())}function bt(t,s){if(t&1&&(k(0),S(1,"complete-step",29),N()),t&2){let e=s.ngIf;o(),d("downloadResult",e)}}function Et(t,s){t&1&&(a(0,"h6"),l(1,"1"),r())}function Pt(t,s){t&1&&(a(0,"h6"),l(1,"2"),r())}function It(t,s){t&1&&(a(0,"h6"),l(1,"3"),r())}var $i=(()=>{class t{constructor(){this.downloadService=v(A),this.orderService=v(Ke),this.productService=v(Ne),this.authService=v(ee),this.stepperSelectedIndex=_(0),this.disabledNextFilter=_(!0),this.isResetFilter=_(!1),this.pageTitle=_("Download to POS"),this.cacheKey=_(x.GuidEMpty)}onFilterChange(e){this.filter=e,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let e=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${e?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let e={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(e=re(ne({},e),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(e).pipe(z(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),U(n=>n.Data),$(1))}onExportOrders(){let e={ID:this.filter.channelId,From:this.filter.startDate?JSON.stringify(this.filter.startDate):null,To:this.filter.endDate?JSON.stringify(this.filter.endDate):null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(e,n).subscribe()}onDownload(){let e={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(oe(n=>(e.ListPreview=n,this.downloadService.getDownloadOrder(e))),z(()=>{this.onStepperNext()}),$(1))}setPageTitle(e){this.pageTitle.update(()=>`
|
|
3
3
|
${e} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
4
4
|
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!0),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&me(wt,5),n&2){let p;ce(p=ue())&&(i.stepper=p.first)}},features:[K([A,{provide:$e,useValue:{displayDefaultIndicatorType:!1}}])],decls:27,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],["routerLink","/menu/Order/Download/V1",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","reset"],["state","preview",3,"editable","completed"],[4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"],[3,"downloadResult"]],template:function(n,i){if(n&1){let p=y();a(0,"mainpanel",1)(1,"actions"),w(2,gt,2,0,"a",2)(3,St,5,1,"div",3)(4,Ct,2,1,"button",4)(5,vt,3,0,"button",5),r(),a(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),I("selectedIndexChange",function(f){return m(p),P(i.stepperSelectedIndex,f)||(i.stepperSelectedIndex=f),c(f)}),a(13,"mat-step",11),w(14,yt,3,0,"ng-template",12),a(15,"filter-step",13),g("onFilterChange",function(f){return m(p),c(i.onFilterChange(f))}),r()(),a(16,"mat-step",14),w(17,xt,3,0,"ng-template",12)(18,Dt,2,1,"ng-container",15),W(19,"async"),r(),a(20,"mat-step",16),w(21,Tt,3,0,"ng-template",12)(22,bt,2,1,"ng-container",15),W(23,"async"),r(),w(24,Et,2,0,"ng-template",17)(25,Pt,2,0,"ng-template",18)(26,It,2,0,"ng-template",19),r()()()()()()()}if(n&2){let p=T(12);d("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),o(2),b(i.stepperSelectedIndex()==0?2:-1),o(),b(i.stepperSelectedIndex()==1?3:-1),o(),b(i.stepperSelectedIndex()==0?4:-1),o(),b(i.stepperSelectedIndex()==2?5:-1),o(6),se("ngClass","last-edited-step-"+p.selectedIndex),E("selectedIndex",i.stepperSelectedIndex),o(2),d("completed",!1)("editable",i.stepperSelectedIndex()!=2),o(2),d("reset",i.isResetFilter()),o(),d("editable",i.stepperSelectedIndex()!=2)("completed",!1),o(2),d("ngIf",Y(19,17,i.orderPreview$)),o(4),d("ngIf",Y(23,19,i.downloadPreview$))}},dependencies:[F,R,B,J,Qe,Je,qe,je,Ge,ze,Ue,Ye,Ve,Me,ge,we],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-RGTAWKII.js";import{e as G}from"./chunk-6IAGGRZN.js";import{h as H}from"./chunk-3DTDXKFQ.js";import{b as j,e as F}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{m as J,n as U}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as D,h as I,m as R,y as k}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as T,l as W,n as B}from"./chunk-GPEVUTDI.js";import{Eb as w,Ec as n,Gc as N,Ic as u,Jc as g,Kb as b,Kc as f,Lc as E,Mc as V,Nc as P,Qa as h,Wb as M,Z as S,Zc as C,_c as v,bc as L,gc as e,hc as t,ic as y,mc as O,pa as c,qb as l,rc as x,sc as A,ya as p,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function z(i,q){if(i&1&&(e(0,"pre"),n(1),C(2,"json"),t()),i&2){A();let d=P(25);l(),N(" ",d?v(2,1,d):"",`
|
|
2
2
|
`)}}function K(i,q){i&1&&(e(0,"p",20),n(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class i{constructor(){this.httpService=c(F),this.toastr=c(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}static{this.\u0275fac=function(m){return new(m||i)}}static{this.\u0275cmp=w({type:i,selectors:[["app-order-api-log"]],decls:38,vars:8,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"text-center","my-12","text-muted"]],template:function(m,r){if(m&1){let a=O();e(0,"mainpanel",0)(1,"actions")(2,"button",1),x("click",function(){return p(a),s(r.fetchLog())}),y(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(o){return p(a),g(r.selectedChannel,o)||(r.selectedChannel=o),s(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Order Number"),t(),e(21,"p",8),n(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),f("ngModelChange",function(o){return p(a),g(r.orderNumber,o)||(r.orderNumber=o),s(o)}),t()()()()(),E(25),C(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),n(32,"Response"),t()(),e(33,"div",17)(34,"div",18)(35,"div",19),b(36,z,3,3,"pre")(37,K,2,0,"p",20),t()()()()()()()()()}if(m&2){M("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),u("ngModel",r.selectedChannel),l(8),u("ngModel",r.orderNumber),l();let a=V(v(26,5,r.orderLog$));l(11),L(a?36:37)}},dependencies:[B,T,W,U,J,G,k,D,I,R,Y],encapsulation:2})}}return i})();export{ce as OrderApiLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-
|
|
1
|
+
import{a as X}from"./chunk-GH55WYGY.js";import{a as Q}from"./chunk-OAS72QB2.js";import{c as Y,d as D}from"./chunk-UIM3W5B7.js";import"./chunk-BVIRHZTZ.js";import{b as K}from"./chunk-3LQNSF7T.js";import"./chunk-YXFTLQ5M.js";import"./chunk-OLSC6KHB.js";import"./chunk-7TWBIV3T.js";import{a as J}from"./chunk-EGTYAIU5.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as $}from"./chunk-3DTDXKFQ.js";import{b as G,e as W}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as H,m as q,n as z}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as B,h as O,m as U,o as j,y as k}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{g as R,j as L,m as x,n as A}from"./chunk-GPEVUTDI.js";import{Eb as N,Ec as g,G as V,Ic as S,Jc as v,Kb as f,Kc as y,Oc as E,Wb as u,Z as T,Zc as _,_c as C,ea as F,gc as a,hc as p,ic as I,mc as b,pa as M,qb as d,rc as P,sc as o,wb as h,ya as s,za as l}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function Z(r,w){if(r&1){let e=b();a(0,"button",15),P("click",function(){s(e);let t=o().ngIf,n=o(2);return l(n.onUpdateItems(t))}),I(1,"i",16),g(2," Update "),p()}}function ee(r,w){if(r&1&&(a(0,"div"),f(1,Z,3,0,"button",14),p()),r&2){let e=w.ngIf,i=o(2);d(),u("ngIf",i.productService.hasSelectionVariant(e))}}function te(r,w){if(r&1){let e=b();a(0,"mainpanel",1),P("onSubmit",function(t){s(e);let n=o();return l(n.onSearch(t))}),a(1,"actions")(2,"div",2),f(3,ee,2,1,"div",3),_(4,"async"),a(5,"button",4),P("click",function(){s(e);let t=o();return l(t.openExportDialog())}),I(6,"i",5),a(7,"span"),g(8,"Export"),p()()()(),a(9,"filters")(10,"div")(11,"label",6),g(12,"Page Number"),p(),a(13,"input",7),y("ngModelChange",function(t){s(e);let n=o();return v(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),l(t)}),p()(),a(14,"div",8)(15,"label",6),g(16,"Page Size"),p(),a(17,"input",7),y("ngModelChange",function(t){s(e);let n=o();return v(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),l(t)}),p()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),_(23,"async"),P("onToggle",function(t){s(e);let n=o();return l(n.onShowDifferencePrice(t))})("onSubmit",function(t){s(e);let n=o();return l(n.updatePriceByVariant(t))}),p(),a(24,"infinite-paginator",13),_(25,"async"),P("onNextPage",function(){s(e);let t=o();return l(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){s(e);let t=o();return l(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){s(e);let t=o();return l(t.infinitePagination.getRowCount(t.searchFilter))}),p()()()()()()}if(r&2){let e=o();u("textButton","Search"),d(3),u("ngIf",C(4,14,e.data$)),d(10),S("ngModel",e.searchFilter.PageNumber),d(4),S("ngModel",e.searchFilter.RowCount),d(5),u("showProductToggle",!0)("data",C(23,16,e.data$))("channel",e.channelOptions)("hiddenIPOSInventory",!1),d(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",C(25,18,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}var be=(()=>{class r{constructor(e,i,t,n,m,c){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=m,this.decimalPipe=c,this.infinitePagination=M(D),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),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.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(F(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter=e.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(e){this.searchFilter.filterModel=1,e&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(e){this.searchFilter.text=e,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let n=i.map(c=>({ID:c.ID,Code:c.Code,Price:c.UnitPrice}));var t=this.channelOptions.filter(c=>c.selected).map(c=>c.ID);let m={ListChannelID:t,ListPrice:n};this.http.post("/api/Price/UpdateChannel",m).subscribe(c=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+m.ListPrice.length+" items in "+m.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(e){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post("/api/Price/UpdatePriceByID",i).subscribe(t=>{let n=this.productService.findChannelById(i.ID,this.channelOptions),m=i.Price?this.decimalPipe.transform(i.Price):i.Price;this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") price in "+n.Name+" to "+m,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Q,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(V(t=>t!==void 0)).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openExportDialog(){this.dialog.open(K,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(i){return new(i||r)(h(W),h(G),h(H),h(J),h($),h(x))}}static{this.\u0275cmp=N({type:r,selectors:[["app-price-pos-channel"]],features:[E([D,x])],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["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"]],template:function(i,t){i&1&&(f(0,te,26,20,"mainpanel",0),_(1,"async")),i&2&&u("ngIf",C(1,1,t.loader$))},dependencies:[A,R,L,k,B,j,O,U,Y,z,q,X],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return r})();export{be as PricePosChannelComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5XVUQWLZ.js";import"./chunk-77IUCPIQ.js";import{a as ye,b as ge}from"./chunk-OE2JYQHN.js";import"./chunk-PUJ4JVT2.js";import"./chunk-LLZSSV5A.js";import"./chunk-CRC6ZWYT.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as R}from"./chunk-F7NU25EB.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import"./chunk-3PJZW7HF.js";import{e as he}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as w,n as ue}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{y as fe}from"./chunk-DPLEMBB4.js";import{c as d}from"./chunk-PXB4YEY3.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-GPEVUTDI.js";import{Eb as T,Ec as p,Fb as Z,Fc as j,Gc as J,Ic as y,Jc as g,Kb as h,Kc as C,Na as V,Pc as re,Uc as oe,Wb as m,Z as Q,Zc as k,_b as $,_c as B,bc as H,cc as ee,ea as z,ec as te,fc as ie,gc as r,hc as a,ic as v,ja as q,ka as X,lc as ne,oa as Y,ob as G,pd as U,qb as l,rc as b,sc as u,vc as K,wb as f}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ye,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ge,fe,ue,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
|
|
1
|
+
import{a as _}from"./chunk-5XVUQWLZ.js";import"./chunk-77IUCPIQ.js";import{a as ye,b as ge}from"./chunk-OE2JYQHN.js";import"./chunk-PUJ4JVT2.js";import"./chunk-LLZSSV5A.js";import"./chunk-CRC6ZWYT.js";import"./chunk-LOJPRXKZ.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as R}from"./chunk-K2UZHZCJ.js";import"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import"./chunk-3DTDXKFQ.js";import{e as he}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{m as w,n as ue}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{y as fe}from"./chunk-DPLEMBB4.js";import{c as d}from"./chunk-PXB4YEY3.js";import{F as pe,H as de,J as ce,f as ae,g as F,j as le,k as P,m as me,n as se}from"./chunk-GPEVUTDI.js";import{Eb as T,Ec as p,Fb as Z,Fc as j,Gc as J,Ic as y,Jc as g,Kb as h,Kc as C,Na as V,Pc as re,Uc as oe,Wb as m,Z as Q,Zc as k,_b as $,_c as B,bc as H,cc as ee,ea as z,ec as te,fc as ie,gc as r,hc as a,ic as v,ja as q,ka as X,lc as ne,oa as Y,ob as G,pd as U,qb as l,rc as b,sc as u,vc as K,wb as f}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var Ce=(()=>{class n{constructor(){this.reportTabs=[{Title:"1.Create Order",Url:"/menu/sync-log/order/sync-order"},{Title:"2.Convert Order To Invoice",Url:"/menu/sync-log/order/convert-to-invoice"},{Title:"3.Create Invoice",Url:"/menu/sync-log/order/invoice"},{Title:"4.Create Outbound Logistic",Url:"/menu/sync-log/order/delivery"},{Title:"5.Add Payment",Url:"/menu/sync-log/order/payment"},{Title:"6.Void Invoice",Url:"/menu/sync-log/order/void-invoice"},{Title:"All",Url:"/menu/sync-log/order/all"}]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-order"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(r(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),a()()(),v(4,"router-outlet")),i&2&&(l(3),m("Tabs",t.reportTabs))},dependencies:[ye,pe],styles:[".dropdown[_ngcontent-%COMP%] .dropdown-menu.report.show[_ngcontent-%COMP%]{top:100%!important;transform:none!important;z-index:10000;cursor:pointer;right:-50%}"]})}}return n})();var S=class{};var I=(()=>{class n{constructor(e){this.http=e}GetLoader(){return this.http.post("/api/Report/GetLoader",{})}GetSyncOrder(e){return new Promise((i,t)=>{this.http.post("/api/Report/Salesorder",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/CreateInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncVoidInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/Void",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncConvertInvoice(e){return new Promise((i,t)=>{this.http.post("/api/Report/ConvertToInvoice",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncDelivery(e){return new Promise((i,t)=>{this.http.post("/api/Report/Delivery",JSON.stringify(e)).subscribe(s=>{i(s)})})}GetSyncPayment(e){return new Promise((i,t)=>{this.http.post("/api/Report/Payment",JSON.stringify(e)).subscribe(s=>{i(s)})})}getAllReport(e){return this.http.post("/api/Report/all",JSON.stringify(e))}static{this.\u0275fac=function(i){return new(i||n)(Y(he))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var O=function(n){return n[n.OK=200]="OK",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.CONFLICT=409]="CONFLICT",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n}(O||{});var De=()=>["/menu/log/order"],Ee=(n,c,e,i,t)=>({responseCode:n,From:c,to:e,actionType:i,ChannelID:t});function Oe(n,c){if(n&1&&(r(0,"th",6)(1,"div",7)(2,"h4"),p(3),a(),r(4,"small",8),p(5),a()()()),n&2){let e=c.$implicit,i=u();l(3),j(e),l(),$(i.getTextBgColor(e)),l(),j(i.getHeaderStatusDesc(e))}}function Re(n,c){if(n&1&&(r(0,"a",12),p(1),k(2,"number"),a()),n&2){let e=u().$implicit,i=u().$implicit,t=u();m("routerLink",re(5,De))("queryParams",oe(6,Ee,e.Key,t.fromQueryParam,t.toQueryParam,t.type,i.ChannelID)),l(),J(" ",B(2,3,e.Value)," ")}}function Le(n,c){n&1&&(r(0,"span",13),p(1,"-"),a())}function xe(n,c){if(n&1&&(r(0,"td",11),h(1,Re,3,12,"a",12)(2,Le,2,0,"span",13),a()),n&2){let e=c.$implicit;l(),H(e.Value?1:2)}}function Me(n,c){if(n&1&&(r(0,"tr")(1,"td")(2,"a",9),v(3,"img",10),a()(),r(4,"td")(5,"div")(6,"a",9),p(7),a()(),r(8,"div"),p(9),a()(),te(10,xe,3,1,"td",11,ee),a()),n&2){let e=c.$implicit,i=u();l(2),K("href",e.Url,G),l(),m("src",i.getChannelLogo(e.Type),G),l(3),K("href",e.Url,G),l(),j(e.Name),l(2),j(e.Url),l(),ie(e.list)}}function ke(n,c){if(n&1&&(r(0,"td",11)(1,"div",17),p(2),k(3,"number"),a()()),n&2){let e=c.$implicit;l(2),J(" ",B(3,1,e.total)," ")}}function Be(n,c){if(n&1&&(r(0,"tfoot")(1,"tr")(2,"td",14)(3,"div",15),p(4,"Total"),a()(),h(5,ke,4,3,"td",16),a()()),n&2){let e=u();l(5),m("ngForOf",e.logsCalculation())}}var D=(()=>{class n{constructor(){this.header=V(),this.result=V(),this.orderedHeader=U(()=>this.header().sort((e,i)=>e-i)),this.logsOrdered=U(()=>{let e=this.result();return e=e.map(i=>(this.orderedHeader().forEach(t=>{i.list.findIndex(o=>o.Key===t)===-1&&i.list.push({Key:t,Value:0}),i.list.sort((o,A)=>o.Key-A.Key)}),i)),e}),this.logsCalculation=U(()=>{let e=this.concatStatusCode(),i=[];return this.orderedHeader().forEach(t=>{let o=e.filter(A=>A.Key===t).reduce((A,we)=>A+we.Value,0);i.push({status:t,total:o})}),i}),this.type=null,this.headerStatus=O,this.listCalculationStatusCode=[]}set from(e){e&&(this.fromQueryParam=new Date(e).toJSON().toString())}set to(e){e&&(this.toQueryParam=new Date(e).toJSON().toString())}getHeaderStatusDesc(e){let i=null;switch(e){case O.BAD_REQUEST:i="BAD REQUEST";break;case O.CONFLICT:i="CONFLICT";break;case O.INTERNAL_SERVER_ERROR:i="INTERNAL SERVER ERROR";break;case O.NOT_FOUND:i="NOT FOUND";break;default:i="OK";break}return i}getTextBgColor(e){let i=null;switch(e){case O.OK:i="bg-success";break;case O.INTERNAL_SERVER_ERROR:i="bg-danger";break;default:i="bg-warning";break}return i}getChannelLogo(e){return d.getChannelLogoByTypeId(e)}concatStatusCode(){return this.logsOrdered().map(e=>e.list).reduce((e,i)=>[...e,...i],[])}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-table-report"]],inputs:{header:[1,"header"],result:[1,"result"],from:"from",to:"to",type:"type"},standalone:!1,decls:10,vars:3,consts:[[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","0%"],[2,"width","5%"],["class","text-start","style","width: 10%",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"text-start",2,"width","10%"],[1,"d-block"],[1,"text-white","p-1","rounded","response-desc"],["target","_blank",3,"href"],[2,"width","24px","height","24px",3,"src"],[1,"text-start"],[1,"h3","text-primary","fw-bold","ms-1",3,"routerLink","queryParams"],[1,"h3","fw-bold","ms-1"],["colspan","2"],[1,"text-center","h3","fw-bold"],["class","text-start",4,"ngFor","ngForOf"],[1,"d-inline-block","h3","text-primary","fw-bold","ms-1"]],template:function(i,t){i&1&&(r(0,"table",0)(1,"thead",1)(2,"tr"),v(3,"th",2),r(4,"th",3),p(5,"Channel"),a(),h(6,Oe,6,4,"th",4),a()(),r(7,"tbody"),h(8,Me,12,5,"tr",5),a(),h(9,Be,6,1,"tfoot"),a()),i&2&&(l(6),m("ngForOf",t.orderedHeader()),l(2),m("ngForOf",t.logsOrdered()),l(),H(t.logsCalculation().length>0?9:-1))},dependencies:[ae,de,me],styles:[".response-desc[_ngcontent-%COMP%]{font-size:12px}"]})}}return n})();function Ne(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",0)}}var ve=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.pageTitle="New Order";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`New Order (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-sales-order"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.getChannelLogs()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ne,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function We(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Te=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,We,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ae(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",3)}}var _e=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S;let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Shipped (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncDelivery(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-delivery"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"filterDate"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div",1)(3,"label",2),p(4,"From/To"),a(),r(5,"div",3)(6,"datepicker",4),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",5),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",6),h(11,Ae,3,5,"div",7),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function je(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",4)}}var Se=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Completed";let t=new Date;this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Completed (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-payment"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,je,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function Ge(n,c){n&1&&ne(0)}function Ue(n,c){if(n&1&&(r(0,"div",8)(1,"div",9),v(2,"app-table-report",10),a()()),n&2){let e=c.ngIf,i=u();l(2),m("result",e.Body)("header",e.Header)("from",i.filter==null?null:i.filter.From)("to",i.filter==null?null:i.filter.To)}}var be=(()=>{class n{constructor(e,i){this.reportOrderService=e,this.datePipe=i,this.filter=new S}ngOnInit(){this.initFilter(),this.initLoader()}initFilter(){let e=new Date;this.minDate=d.addDays(e,6),this.filter.From=e,this.filter.To=e,this.updatePageTitle()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.pageTitle=`All (${e==null?"":i+"-"} ${t})`}initLoader(){this.pageLoader$=this.reportOrderService.GetLoader().pipe(z(e=>{this.filter=e,this.updatePageTitle(),this.initData()}))}initData(){this.reportData$=this.reportOrderService.getAllReport(this.filter).pipe(Q())}onFilter(){this.updatePageTitle(),this.initData()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-all"]],standalone:!1,decls:15,vars:10,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[4,"ngIf"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ge,1,0,"ng-container",6),k(12,"async"),h(13,Ue,3,4,"div",7),k(14,"async"),a()()()),i&2&&(m("headerTitle",t.pageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",B(12,6,t.pageLoader$)),l(2),m("ngIf",B(14,8,t.reportData$)))},dependencies:[F,w,_,D,le],encapsulation:2})}}return n})();function Ve(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Fe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Convert Sales Order To Invoice";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Convert Sales Order To Invoice (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-convert-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,Ve,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();function He(n,c){if(n&1&&(r(0,"div",7)(1,"div",8),v(2,"app-table-report",9),a()()),n&2){let e=u();l(2),m("result",e.result)("header",e.header)("from",e.filter.From)("to",e.filter.To)("type",1)}}var Pe=(()=>{class n{constructor(e,i){this.http=e,this.datePipe=i,this.filter=new S,this.PageTitle="Ready to Ship";let t=new Date;this.maxDate=t,this.minDate=d.addDays(t,6),this.filter.From=t,this.filter.To=t,this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=d.formatTitleFromDate(this.filter.From,this.filter.To),i=this.datePipe.transform(this.filter.From,e),t=this.datePipe.transform(this.filter.To,"dd MMM yyyy");this.PageTitle=`Ready to Ship (${e==null?"":i+"-"} ${t})`}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter=e,this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter).then(e=>{this.header=e.Header,this.result=e.Body})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(i){return new(i||n)(f(I),f(P))}}static{this.\u0275cmp=T({type:n,selectors:[["app-void-invoice"]],standalone:!1,decls:12,vars:5,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],["class","row mt-4",4,"ngIf"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(i,t){i&1&&(r(0,"mainpanel",0),b("onSubmit",function(){return t.onFilter()}),r(1,"filters")(2,"div")(3,"label",1),p(4,"From/To"),a(),r(5,"div",2)(6,"datepicker",3),C("dateChange",function(o){return g(t.filter.From,o)||(t.filter.From=o),o}),a()(),r(7,"div")(8,"datepicker",4),C("dateChange",function(o){return g(t.filter.To,o)||(t.filter.To=o),o}),a()()()(),r(9,"content")(10,"div",5),h(11,He,3,5,"div",6),a()()()),i&2&&(m("headerTitle",t.PageTitle)("hideSearchBox",!0),l(6),y("date",t.filter.From),l(2),y("date",t.filter.To),l(3),m("ngIf",t.result))},dependencies:[F,w,_,D],encapsulation:2})}}return n})();var Ke=[{path:"",component:Ce,children:[{path:"",redirectTo:"all",pathMatch:"full"},{path:"sync-order",component:ve,canActivate:[R],data:{title:"Sync Order"}},{path:"convert-to-invoice",component:Fe,canActivate:[R],data:{title:"Sync Convert to Invoice"}},{path:"invoice",component:Te,canActivate:[R],data:{title:"Sync Invoice"}},{path:"delivery",component:_e,canActivate:[R],data:{title:"Sync Delivery"}},{path:"payment",component:Se,canActivate:[R],data:{title:"Sync Payment"}},{path:"void-invoice",component:Pe,canActivate:[R],data:{title:"Sync void invoice"}},{path:"all",component:be,canActivate:[R],data:{title:"All Report"}}]}],Gt=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Z({type:n})}static{this.\u0275inj=X({imports:[se,ge,fe,ue,_,ce.forChild(Ke)]})}}return n})();export{Gt as OrderModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as f}from"./chunk-OE2JYQHN.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as h,b as f}from"./chunk-OE2JYQHN.js";import{a as i}from"./chunk-K2UZHZCJ.js";import"./chunk-3DTDXKFQ.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import"./chunk-PXB4YEY3.js";import{F as C,J as n,n as o}from"./chunk-GPEVUTDI.js";import{Eb as l,Fb as c,Wb as s,gc as u,hc as d,ic as r,ka as p,qb as m}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var v=(()=>{class e{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"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,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(t,P){t&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),d()()(),r(4,"router-outlet")),t&2&&(m(3),s("Tabs",P.priceTabs))},dependencies:[o,f,h,n,C],encapsulation:2})}}return e})();var M=[{path:"",component:v,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-7C76K4Q5.js").then(e=>e.PricePosChannelComponent)},canActivate:[i],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-UNM4PZPP.js").then(e=>e.CustomChannelPriceComponent)},canActivate:[i],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-ONI2IMCW.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[i],data:{title:"Price Single Channel Comparison"}}]}],j=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=c({type:e})}static{this.\u0275inj=p({imports:[o,n.forChild(M)]})}}return e})();export{j as PriceRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-7477X7LJ.js";import{a as h,b as y}from"./chunk-OE2JYQHN.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-7477X7LJ.js";import{a as h,b as y}from"./chunk-OE2JYQHN.js";import{a as r}from"./chunk-K2UZHZCJ.js";import"./chunk-3DTDXKFQ.js";import"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import"./chunk-PXB4YEY3.js";import{F as v,J as o,n}from"./chunk-GPEVUTDI.js";import{Eb as l,Fb as s,Oc as f,Wb as u,gc as c,hc as d,ic as i,ka as m,qb as p}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-OWSO46ZD.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-T5BCWPOW.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-YT4PFZ7J.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as g}from"./chunk-
|
|
1
|
+
import{h as g}from"./chunk-3DTDXKFQ.js";import{b as l,e as h}from"./chunk-BUFEIJAI.js";import{ja as c,oa as o}from"./chunk-T5ONJF63.js";var S=(()=>{class n{constructor(r,t){this.toastrService=r,this.http=t}refreshInventory(r){let t=r.map(e=>e.Channel.map(a=>(a.VariantID=e.ID,a))).reduce((e,s)=>(e=e.concat(s),e),[]).map(e=>({ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID,VariantID:e.VariantID,ChannelVariationID:e.ChannelVariationID}));return this.http.post(g.RefreshInventory,t)}showToastrUpdateInventory(r,t,e){let s=t.length>0,a=e.length>0;if(!a&&s&&this.toastrService.success(`${this.generateSuccessMessage(t.length)}`,"Success",{enableHtml:!0}),a&&s){let i=`<li>${this.generateSuccessMessage(t.length)}</li>`,u=this.generateErrorMessage(r,e),m=`<ol>${i} ${u}</ol>`;this.toastrService.warning(m,"Warning",{enableHtml:!0})}if(a&&!s){let i=`<ol>${this.generateErrorMessage(r,e)}</ol>`;this.toastrService.error(i,"Error",{enableHtml:!0})}}generateSuccessMessage(r){return`
|
|
2
2
|
<div>
|
|
3
3
|
<span class="fw-bold">Successfully</span> updated ${r} variants in 1 channels
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as r,i as C}from"./chunk-
|
|
1
|
+
import{h as r,i as C}from"./chunk-3DTDXKFQ.js";import{b as l,e as S}from"./chunk-BUFEIJAI.js";import{b as a,c as u}from"./chunk-PXB4YEY3.js";import{aa as p,ea as h,ja as c,oa as o,v as s}from"./chunk-T5ONJF63.js";var y=(()=>{class i{constructor(e,t,n){this.httpService=e,this.toastr=t,this.tokenService=n}saveChannel(e){return this.httpService.post("/api/Channel/SubmitChannel",e).pipe(p(t=>this.tokenService.refreshToken().pipe(s(n=>t))))}getLastSync(e){return this.httpService.get(`${r.ChannelGetLastSyncByID}/?ID=${e}`)}getChannel(e){return this.httpService.post(r.GetChannel,e)}getChannelLoader(){return this.httpService.get(r.GetChannelLoader)}testShopID(e){return this.httpService.post(r.TestShopID,e).pipe(h(t=>{this.showTostrSuccessTestShopID(t)}))}updateChannelIndex(e){return this.httpService.post(r.UpdateChannelIndex,e)}deleteChannel(e){return this.httpService.post(r.DeleteChannel,e)}mapChannelImage(e){return e.map(t=>(t.img=u.getChannelLogoByTypeId(t.TypeID),t))}showTostrSuccessTestShopID(e){let t="";for(var n in e)t+=n+" : "+e[n]+"<br/>";this.toastr.success(t,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}getRegisterByOutletName(e){return this.httpService.post(r.GetRegisterByOutletName,{Outlet:e})}getChannelRowCount(e){return this.httpService.post(r.GetChannelRowCount,e).pipe(s(t=>t.Count))}getChannelWarehouse(e){return this.httpService.get(`${r.GetChannelWarehouse}/?ChannelID=${e}`)}unSynchronizedWarehouse(e){return this.httpService.delete(`${r.UnSynchronizedWarehouse}?ID=${e}`)}authorizedChannel(e){let t=this.getApiAuthorize(e);return this.httpService.post(`/api/${t}`,null).pipe(h(n=>{window.open(n.Url,"_blank")}))}getApiAuthorize(e){let t;switch(e){case a.Shopee:t="ChannelAuthorization/ShopeeV2_URL";break;case a.Tiktok:t="ChannelAuthorization/Tiktok_URL";break;case a.Lazada:t="ChannelAuthorization/Lazada_URL";break}return t}static{this.\u0275fac=function(t){return new(t||i)(o(S),o(l),o(C))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{y as a};
|