marketplacepos 5.50.3 → 5.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-ZM7ND6FE.js → chunk-26E54WQH.js} +1 -1
- package/Marketplace/{chunk-DIDUSCV7.js → chunk-3KECTTUV.js} +1 -1
- package/Marketplace/chunk-4XA7JWTB.js +1 -0
- package/Marketplace/{chunk-7VJ22OLT.js → chunk-575TS45M.js} +1 -1
- package/Marketplace/{chunk-EV6TBBSW.js → chunk-75RVMUFO.js} +1 -1
- package/Marketplace/{chunk-7E4ZSLPD.js → chunk-AMQMYSQR.js} +1 -1
- package/Marketplace/{chunk-NGQFZI6A.js → chunk-APQWBZOM.js} +1 -1
- package/Marketplace/{chunk-KKQ32Z72.js → chunk-AVSAALDJ.js} +1 -1
- package/Marketplace/{chunk-HAZ7U3MT.js → chunk-AVTQG66S.js} +1 -1
- package/Marketplace/{chunk-PFP5WMC3.js → chunk-BKVIOCLH.js} +1 -1
- package/Marketplace/{chunk-XYZI7ZXN.js → chunk-BZ7QY7N3.js} +1 -1
- package/Marketplace/{chunk-KDJVMFOK.js → chunk-CHCAQ4NV.js} +1 -1
- package/Marketplace/{chunk-UWKDFRVX.js → chunk-DCMOITWM.js} +1 -1
- package/Marketplace/{chunk-FBXKHJ2G.js → chunk-DOQD3RMB.js} +1 -1
- package/Marketplace/{chunk-RRRPWDKB.js → chunk-DV3BDHBL.js} +1 -1
- package/Marketplace/{chunk-QWEMPIP7.js → chunk-DVJ7VXWL.js} +1 -1
- package/Marketplace/{chunk-YQPAS2RI.js → chunk-DW7R34MP.js} +1 -1
- package/Marketplace/chunk-EXKAFEQL.js +1 -0
- package/Marketplace/{chunk-ZLJBRQ5V.js → chunk-FQM4RKLX.js} +1 -1
- package/Marketplace/{chunk-53ZGHR7J.js → chunk-GYQHWDWX.js} +1 -1
- package/Marketplace/{chunk-XCGXT3P7.js → chunk-HO6XCGRR.js} +1 -1
- package/Marketplace/{chunk-KNE2UYQ2.js → chunk-HPQDUJXF.js} +1 -1
- package/Marketplace/{chunk-HHDJUCIT.js → chunk-ICY32GYN.js} +1 -1
- package/Marketplace/{chunk-PHVEBMTE.js → chunk-ILFG3IYB.js} +1 -1
- package/Marketplace/{chunk-YDNXBOLU.js → chunk-IUJ6UX3L.js} +1 -1
- package/Marketplace/{chunk-2OKZEOBU.js → chunk-J4552BMI.js} +1 -1
- package/Marketplace/{chunk-YEU5TPRD.js → chunk-JUN3HVEV.js} +1 -1
- package/Marketplace/{chunk-JLDXWNDU.js → chunk-KHGTW7IV.js} +1 -1
- package/Marketplace/{chunk-CGDIULPW.js → chunk-KVLHLMO4.js} +1 -1
- package/Marketplace/{chunk-3YUIOGNI.js → chunk-LB276KSA.js} +1 -1
- package/Marketplace/{chunk-JEJHGIUU.js → chunk-MG7B4OWR.js} +1 -1
- package/Marketplace/chunk-MRWGPCR7.js +1 -0
- package/Marketplace/{chunk-MZWP4SZF.js → chunk-N6VPSXF7.js} +2 -2
- package/Marketplace/{chunk-TOPYLZOF.js → chunk-NEB6AMMM.js} +1 -1
- package/Marketplace/{chunk-HMDHDMIC.js → chunk-NKN7T3C3.js} +1 -1
- package/Marketplace/{chunk-VA7NXG7X.js → chunk-NMOQXVWS.js} +1 -1
- package/Marketplace/{chunk-6MUVEZMQ.js → chunk-NUF326RW.js} +1 -1
- package/Marketplace/{chunk-X2WAAZ7G.js → chunk-NX3QFU4A.js} +1 -1
- package/Marketplace/{chunk-QJH7APJQ.js → chunk-OEUA6IL2.js} +1 -1
- package/Marketplace/{chunk-FDVRSAF3.js → chunk-PGQYHHH3.js} +1 -1
- package/Marketplace/{chunk-QZMWXAUJ.js → chunk-Q3Z7EEVP.js} +1 -1
- package/Marketplace/{chunk-XMU7MXAM.js → chunk-QJ7SMXW4.js} +1 -1
- package/Marketplace/{chunk-JG7M73IA.js → chunk-QLFVXMNJ.js} +1 -1
- package/Marketplace/{chunk-FO75JP2L.js → chunk-QPELTSKE.js} +1 -1
- package/Marketplace/{chunk-3PUUKJCQ.js → chunk-QUIZLT5F.js} +1 -1
- package/Marketplace/{chunk-FPJTI4LM.js → chunk-REDQ2L7Y.js} +1 -1
- package/Marketplace/{chunk-CQBHWYUO.js → chunk-SLCKHYT3.js} +1 -1
- package/Marketplace/{chunk-2FB6QJKT.js → chunk-U4ARIHUF.js} +1 -1
- package/Marketplace/{chunk-XYRET5HT.js → chunk-UHWLUO2C.js} +1 -1
- package/Marketplace/{chunk-CBULW22C.js → chunk-UJAA73LE.js} +1 -1
- package/Marketplace/{chunk-N4MYHIMN.js → chunk-UOFJCKS5.js} +1 -1
- package/Marketplace/{chunk-YCKLOFMA.js → chunk-VRD2D2BP.js} +1 -1
- package/Marketplace/{chunk-MYJZFEAZ.js → chunk-WZQRKTBN.js} +1 -1
- package/Marketplace/{chunk-QJU2YGUH.js → chunk-YFR3EI3B.js} +1 -1
- package/Marketplace/{chunk-UMJVPGHV.js → chunk-YMOSVDG5.js} +1 -1
- package/Marketplace/{chunk-FS3VTRY2.js → chunk-YSYA7XCF.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7TBLEURN.js → main-I5THR2C3.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-CFJAZJYY.js +0 -1
- package/Marketplace/chunk-KMNWLBEP.js +0 -1
- package/Marketplace/chunk-S2ZFBPPJ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-3PUUKJCQ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-7KG3DC5J.js";import{a as ae}from"./chunk-ZZYFVEJO.js";import{a as ne}from"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import{a as te}from"./chunk-FPJTI4LM.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as Y}from"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import{c as X}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as M,h as J,m as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as A}from"./chunk-D6JH2KV4.js";import{e as K}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,H as q,q as G}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as w,Nc as s,Oc as L,Pc as F,Qc as O,Rc as B,Sc as U,Tc as Z,Uc as j,Vc as $,Wc as z,_b as I,ac as u,ad as E,cc as g,dc as V,ec as P,fc as x,gc as b,hc as c,ic as l,id as N,jc as d,jd as R,kc as m,mb as k,ob as a,ra as v,rc as D,ud as _,wc as S,ya as h,yc as p,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ce=e=>({"border-bottom-0":e}),pe=e=>({"border-bottom":e});function se(e,o){if(e&1){let i=D();l(0,"img",15),S("click",function(n){h(i);let r=p();return C(r.onZoomImage(n))}),d()}if(e&2){let i=p();c("ngSrc",i.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",7),e&2&&c("fill",!0)}function ue(e,o){if(e&1&&(l(0,"div",10),m(1,"i",16),l(2,"span"),s(3),d()()),e&2){let i=p();a(3),L(i.code)}}function ge(e,o){if(e&1&&(l(0,"div",11),s(1),N(2,"number"),d()),e&2){let i=p();a(),F("",R(2,1,i.totalChannel())," Listing")}}function he(e,o){if(e&1&&(l(0,"div",22),s(1),N(2,"number"),d()),e&2){p();let i=z(7);a(),F(" (",R(2,1,i)," Listing) ")}}function Ce(e,o){if(e&1&&(l(0,"div",25)(1,"div",26),s(2),d(),l(3,"div")(4,"a",27),m(5,"i",28),d()()()),e&2){let i=o.$implicit,t=o.$index,n=p().$implicit;c("ngClass",E(4,pe,t!==(n==null?null:n.Variants.length)-1)),a(2),O(" ",i.ProductName," - ",i.Name," "),a(2),c("href",i.URL,k)}}function _e(e,o){if(e&1&&(l(0,"div",14)(1,"h2",17)(2,"button",18)(3,"div",19),m(4,"img",20),l(5,"span",21),s(6),d(),j(7),u(8,he,3,3,"div",22),d()()(),l(9,"div",23)(10,"div",24),x(11,Ce,6,6,"div",25,V),d()()()),e&2){let i,t=o.$implicit,n=o.$index,r=p();c("ngClass",E(11,ce,r.channels().length-1==n)),a(),c("id","heading"+n+r.id()),a(),I("data-bs-target","#collapse"+n+r.id())("aria-controls","#collapse"+n+r.id()),a(2),c("src",r.getChannelLogo(t.TypeID),k),a(),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),a(),L(t==null?null:t.ChannelName),a();let T=$(t==null||t.Variants==null?null:t.Variants.length);a(),g(T>1&&((i=r.channels())==null?null:i.length)>1?8:-1),a(),c("id","collapse"+n+r.id()),I("aria-labelledby","heading"+n+r.id()),a(2),b(t==null?null:t.Variants)}}var le=(()=>{let o=class o{constructor(){this.biggerPictureService=v(ne),this.totalChannel=_(0),this.imageForZoom=_(void 0),this.title=_(void 0),this.channels=_(void 0),this.id=_(void 0)}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}onZoomImage(t){this.biggerPictureService.openBiggerPicture(t,this.imageForZoom())}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(n,r){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,se,1,2,"img",6)(7,me,1,1,"img",7),d()()(),l(8,"div",8)(9,"h4",9),s(10),d(),u(11,ue,4,1,"div",10),u(12,ge,3,3,"div",11),d()()(),l(13,"div",12)(14,"div",13),x(15,_e,13,13,"div",14,P),d()()()),n&2&&(a(6),g(r.image?6:7),a(4),F(" ",r.title()," "),a(),g(r.code?11:-1),a(),g(r.totalChannel()?12:-1),a(3),b(r.channels()))},dependencies:[H,G,M,Y,X,q,W],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();function fe(e,o){if(e&1&&(l(0,"div",8),m(1,"app-duplicate-product-card",11),d()),e&2){let i=o.$implicit,t=o.$index;a(),c("imageForZoom",i.ImageUrl)("title",i.Name)("code",i.Code)("id",t)("image",i.ThumbnailURL)("channels",i.Channels)("totalChannel",i.Total)}}function ve(e,o){e&1&&(l(0,"div",9),m(1,"app-empty-state"),d())}function xe(e,o){if(e&1){let i=D();l(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),S("next",function(){h(i);let n=p();return C(n.getProducts())})("previous",function(){h(i);let n=p();return C(n.getProducts())})("total",function(){h(i);let n=p();return C(n.getRowCount())}),d()()()}if(e&2){let i=p();a(2),c("filter",i.searchFilter)("totaldata",i.products==null?null:i.products.length)("paginationTotal",i.rowCount)("hasClicked",i.hasClickedRowCount)}}var qe=(()=>{let o=class o{constructor(){this.httpService=v(A),this.productService=v(te),this.searchFilter=new ie,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,r){n&1&&(l(0,"mainpanel",0),S("onSubmit",function(f){return r.onSearch(f)}),l(1,"actions")(2,"a",1),m(3,"i",2),l(4,"span"),s(5,"Table View"),d()()(),l(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),s(10,"Channel"),d(),l(11,"app-channel-options-v2",5),Z("ngModelChange",function(f){return U(r.searchFilter.ListChannelID,f)||(r.searchFilter.ListChannelID=f),f}),d()()()(),l(12,"content")(13,"div",6)(14,"div",7),x(15,fe,2,7,"div",8,P),u(17,ve,2,0,"div",9),d(),u(18,xe,3,4,"div",10),d()()()),n&2&&(a(11),c("multiple",!0),B("ngModel",r.searchFilter.ListChannelID),a(4),b(r.products),a(2),g((r.products==null?null:r.products.length)==0?17:-1),a(),g((r.products==null?null:r.products.length)>0?18:-1))},dependencies:[ee,K,re,M,J,Q,le,oe,ae],encapsulation:2});let e=o;return e})();export{qe as DuplicateSkuComponent};
|
|
1
|
+
import{a as re}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-7KG3DC5J.js";import{a as ae}from"./chunk-ZZYFVEJO.js";import{a as ne}from"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import{a as te}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as Y}from"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import{c as X}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as y}from"./chunk-UPRDDI4K.js";import{A as M,h as J,m as Q}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as A}from"./chunk-D6JH2KV4.js";import{e as K}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as W,B as H,H as q,q as G}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as w,Nc as s,Oc as L,Pc as F,Qc as O,Rc as B,Sc as U,Tc as Z,Uc as j,Vc as $,Wc as z,_b as I,ac as u,ad as E,cc as g,dc as V,ec as P,fc as x,gc as b,hc as c,ic as l,id as N,jc as d,jd as R,kc as m,mb as k,ob as a,ra as v,rc as D,ud as _,wc as S,ya as h,yc as p,za as C}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ce=e=>({"border-bottom-0":e}),pe=e=>({"border-bottom":e});function se(e,o){if(e&1){let i=D();l(0,"img",15),S("click",function(n){h(i);let r=p();return C(r.onZoomImage(n))}),d()}if(e&2){let i=p();c("ngSrc",i.image)("fill",!0)}}function me(e,o){e&1&&m(0,"img",7),e&2&&c("fill",!0)}function ue(e,o){if(e&1&&(l(0,"div",10),m(1,"i",16),l(2,"span"),s(3),d()()),e&2){let i=p();a(3),L(i.code)}}function ge(e,o){if(e&1&&(l(0,"div",11),s(1),N(2,"number"),d()),e&2){let i=p();a(),F("",R(2,1,i.totalChannel())," Listing")}}function he(e,o){if(e&1&&(l(0,"div",22),s(1),N(2,"number"),d()),e&2){p();let i=z(7);a(),F(" (",R(2,1,i)," Listing) ")}}function Ce(e,o){if(e&1&&(l(0,"div",25)(1,"div",26),s(2),d(),l(3,"div")(4,"a",27),m(5,"i",28),d()()()),e&2){let i=o.$implicit,t=o.$index,n=p().$implicit;c("ngClass",E(4,pe,t!==(n==null?null:n.Variants.length)-1)),a(2),O(" ",i.ProductName," - ",i.Name," "),a(2),c("href",i.URL,k)}}function _e(e,o){if(e&1&&(l(0,"div",14)(1,"h2",17)(2,"button",18)(3,"div",19),m(4,"img",20),l(5,"span",21),s(6),d(),j(7),u(8,he,3,3,"div",22),d()()(),l(9,"div",23)(10,"div",24),x(11,Ce,6,6,"div",25,V),d()()()),e&2){let i,t=o.$implicit,n=o.$index,r=p();c("ngClass",E(11,ce,r.channels().length-1==n)),a(),c("id","heading"+n+r.id()),a(),I("data-bs-target","#collapse"+n+r.id())("aria-controls","#collapse"+n+r.id()),a(2),c("src",r.getChannelLogo(t.TypeID),k),a(),c("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),a(),L(t==null?null:t.ChannelName),a();let T=$(t==null||t.Variants==null?null:t.Variants.length);a(),g(T>1&&((i=r.channels())==null?null:i.length)>1?8:-1),a(),c("id","collapse"+n+r.id()),I("aria-labelledby","heading"+n+r.id()),a(2),b(t==null?null:t.Variants)}}var le=(()=>{let o=class o{constructor(){this.biggerPictureService=v(ne),this.totalChannel=_(0),this.imageForZoom=_(void 0),this.title=_(void 0),this.channels=_(void 0),this.id=_(void 0)}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}onZoomImage(t){this.biggerPictureService.openBiggerPicture(t,this.imageForZoom())}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"]],template:function(n,r){n&1&&(l(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),u(6,se,1,2,"img",6)(7,me,1,1,"img",7),d()()(),l(8,"div",8)(9,"h4",9),s(10),d(),u(11,ue,4,1,"div",10),u(12,ge,3,3,"div",11),d()()(),l(13,"div",12)(14,"div",13),x(15,_e,13,13,"div",14,P),d()()()),n&2&&(a(6),g(r.image?6:7),a(4),F(" ",r.title()," "),a(),g(r.code?11:-1),a(),g(r.totalChannel()?12:-1),a(3),b(r.channels()))},dependencies:[H,G,M,Y,X,q,W],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`]});let e=o;return e})();function fe(e,o){if(e&1&&(l(0,"div",8),m(1,"app-duplicate-product-card",11),d()),e&2){let i=o.$implicit,t=o.$index;a(),c("imageForZoom",i.ImageUrl)("title",i.Name)("code",i.Code)("id",t)("image",i.ThumbnailURL)("channels",i.Channels)("totalChannel",i.Total)}}function ve(e,o){e&1&&(l(0,"div",9),m(1,"app-empty-state"),d())}function xe(e,o){if(e&1){let i=D();l(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),S("next",function(){h(i);let n=p();return C(n.getProducts())})("previous",function(){h(i);let n=p();return C(n.getProducts())})("total",function(){h(i);let n=p();return C(n.getRowCount())}),d()()()}if(e&2){let i=p();a(2),c("filter",i.searchFilter)("totaldata",i.products==null?null:i.products.length)("paginationTotal",i.rowCount)("hasClicked",i.hasClickedRowCount)}}var qe=(()=>{let o=class o{constructor(){this.httpService=v(A),this.productService=v(te),this.searchFilter=new ie,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=y.GuidEMpty}getChannelLogo(t){return y.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,r){n&1&&(l(0,"mainpanel",0),S("onSubmit",function(f){return r.onSearch(f)}),l(1,"actions")(2,"a",1),m(3,"i",2),l(4,"span"),s(5,"Table View"),d()()(),l(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),s(10,"Channel"),d(),l(11,"app-channel-options-v2",5),Z("ngModelChange",function(f){return U(r.searchFilter.ListChannelID,f)||(r.searchFilter.ListChannelID=f),f}),d()()()(),l(12,"content")(13,"div",6)(14,"div",7),x(15,fe,2,7,"div",8,P),u(17,ve,2,0,"div",9),d(),u(18,xe,3,4,"div",10),d()()()),n&2&&(a(11),c("multiple",!0),B("ngModel",r.searchFilter.ListChannelID),a(4),b(r.products),a(2),g((r.products==null?null:r.products.length)==0?17:-1),a(),g((r.products==null?null:r.products.length)>0?18:-1))},dependencies:[ee,K,re,M,J,Q,le,oe,ae],encapsulation:2});let e=o;return e})();export{qe as DuplicateSkuComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-RUYX7KTP.js";import{a as $}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as J,b as Q,d as X}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as G}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-RUYX7KTP.js";import{a as $}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as J,b as Q,d as X}from"./chunk-BZWZ64N5.js";import{a as Y}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as K}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as G}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as q,c as V,h as H,m as U,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-D6JH2KV4.js";import{e as z}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as B,y as A}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as T,Nb as E,Nc as l,Oc as f,Pc as v,Rc as g,Sc as c,Tc as u,ac as P,ad as b,cc as M,ec as R,fc as x,gc as N,hc as h,ic as t,id as D,jc as n,kc as C,kd as F,mb as L,ob as r,ra as _,rc as k,wc as y,ya as w,yc as S,za as I}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=a=>({"bg-gradient-warning":a}),ne=()=>["/menu/log/inventory/sync-inventory/detail"],ie=a=>({ID:a});function oe(a,m){if(a&1&&(t(0,"span",19),C(1,"img",20),n(),l(2)),a&2){let o=m.item;r(),h("src",o.Img,L)("alt",o.Name),r(),v(" ",o.Name," ")}}function ae(a,m){if(a&1&&(t(0,"tr",23)(1,"td")(2,"a",25),l(3),D(4,"date"),n()(),t(5,"td"),l(6),n(),t(7,"td"),l(8),n(),t(9,"td"),l(10),n(),t(11,"td"),l(12),n()()),a&2){let o=m.$implicit;h("ngClass",b(11,te,o.ResponseCode==400)),r(2),h("routerLink",W(13,ne))("queryParams",b(14,ie,o.ID)),r(),v(" ",F(4,8,o.Created,"dd MMM yyyy HH:mm")," "),r(3),f(o.channelName),r(2),f(o.Sku),r(2),f(o.Stock),r(2),f(o.ResponseCode)}}function re(a,m){if(a&1){let o=k();t(0,"div",17)(1,"table",21)(2,"thead")(3,"tr",22)(4,"th"),l(5,"Created"),n(),t(6,"th"),l(7,"Channel"),n(),t(8,"th"),l(9,"SKU"),n(),t(10,"th"),l(11,"Stock"),n(),t(12,"th"),l(13,"Response code"),n()()(),t(14,"tbody"),x(15,ae,13,16,"tr",23,R),n()(),t(17,"mat-paginator",24),y("page",function(d){w(o);let e=S();return I(e.changePage(d))}),n()()}if(a&2){let o=S();r(15),N(o.Result),r(2),h("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function le(a,m){a&1&&(t(0,"div",18),C(1,"app-empty-state"),n())}var Ie=(()=>{let m=class m{constructor(){this.http=_(O),this._RawLogService=_(ee),this.authService=_(G),this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(p=>{this.filter=p.Filter,this.ActionTypeList=p.Options.ActionTypeList,this.Get()})}Get(p){p!=null&&(this.filter.Sku=p),this.http.post("api/Inventory/GetLog",this.filter).subscribe(d=>{this._RawLogService.Data=d.hits,this.Result=Array();for(let e of d.hits){let s={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(s)}this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.Get()}};m.\u0275fac=function(d){return new(d||m)},m.\u0275cmp=T({type:m,selectors:[["app-inventory-log"]],decls:32,vars:9,consts:[["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"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"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"]],template:function(d,e){d&1&&(t(0,"mainpanel",0),u("textChange",function(i){return c(e.filter.Sku,i)||(e.filter.Sku=i),i}),y("onSubmit",function(i){return e.Get(i)}),t(1,"actions")(2,"a",1),l(3," Order Inventory Sync Job "),n()(),t(4,"filters")(5,"div",2)(6,"div")(7,"label",3),l(8,"Channel"),n(),t(9,"ng-select",4),u("ngModelChange",function(i){return c(e.filter.ChannelID,i)||(e.filter.ChannelID=i),i}),E(10,oe,3,3,"ng-template",5),n()(),t(11,"div",6)(12,"label",7),l(13,"From/To"),n(),t(14,"div",8)(15,"datepicker",9),u("dateChange",function(i){return c(e.filter.From,i)||(e.filter.From=i),i}),n()(),t(16,"div")(17,"datepicker",10),u("dateChange",function(i){return c(e.filter.To,i)||(e.filter.To=i),i}),n()()(),t(18,"div",6)(19,"label",11),l(20,"Page Number"),n(),t(21,"input",12),u("ngModelChange",function(i){return c(e.filter.PageNumber,i)||(e.filter.PageNumber=i),i}),n()(),t(22,"div",6)(23,"label",11),l(24,"Page Size"),n(),t(25,"input",13),u("ngModelChange",function(i){return c(e.filter.RowCount,i)||(e.filter.RowCount=i),i}),n()()()(),t(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),P(30,re,18,3,"div",17)(31,le,2,0,"div",18),n()()()()()),d&2&&(g("text",e.filter.Sku),r(9),h("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),M((e.Result==null?null:e.Result.length)>0?30:31))},dependencies:[K,z,X,q,V,j,H,U,J,Q,Z,B,$,Y,A],encapsulation:2});let a=m;return a})();export{Ie as InventoryLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Z}from"./chunk-TVEI5B2O.js";import{a as Y}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as U,b as K,d as Q}from"./chunk-BZWZ64N5.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-A6QXXKPR.js";import{b as J}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as V}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as G,c as A,h as q,m as H,o as j}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as z}from"./chunk-D6JH2KV4.js";import{e as B}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{y as R}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as W,Hb as N,Nb as I,Nc as m,Oc as w,Pc as b,Rc as g,Sc as u,Tc as h,ac as f,ad as F,cc as C,ec as v,fc as M,gc as P,hc as s,ic as n,id as O,jc as i,kc as x,kd as k,mb as y,ob as r,ra as S,rc as D,wc as E,ya as L,yc as _,za as T}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var $=()=>["/menu/log/exception/detail"],ee=o=>({ID:o});function te(o,l){if(o&1&&(n(0,"span",17),x(1,"img",18),i(),m(2)),o&2){let t=l.item;r(),s("src",t.Img,y)("alt",t.Name),r(),b(" ",t.Name," ")}}function ne(o,l){if(o&1&&x(0,"img",23),o&2){let t=_().$implicit;s("src",t.Logo,y)}}function ie(o,l){if(o&1&&(n(0,"tr")(1,"td"),f(2,ne,1,1,"img",23),m(3),i(),n(4,"td")(5,"a",24),m(6),i()(),n(7,"td"),m(8),O(9,"date"),i(),n(10,"td")(11,"div"),m(12),i()()()),o&2){let t=l.$implicit;r(2),C(t.Logo?2:-1),r(),b(" ",t.ChannelName," "),r(2),s("routerLink",W(10,$))("queryParams",F(11,ee,t.id)),r(),b(" ",t.number??"N/A"," "),r(2),w(k(9,7,t.date,"dd-MM-yyyy hh:mm:ss")),r(4),w(t.response)}}function oe(o,l){if(o&1){let t=D();n(0,"mat-paginator",25),E("page",function(p){L(t);let e=_(2);return T(e.onPaginationChange(p))}),i()}if(o&2){let t=_(2);s("length",t.pageTotal)("pageSize",t.pageSize)("pageIndex",(t.filter==null?null:t.filter.PageNumber)==0?0:(t.filter==null?null:t.filter.PageNumber)-1)}}function ae(o,l){if(o&1&&(n(0,"div",15)(1,"table",19)(2,"thead")(3,"tr",20)(4,"th",21),m(5,"Channel Name"),i(),n(6,"th",21),m(7,"Number"),i(),n(8,"th",21),m(9,"Date"),i(),n(10,"th"),m(11,"Exception"),i()()(),n(12,"tbody"),M(13,ie,13,13,"tr",null,v),i()(),f(15,oe,1,3,"mat-paginator",22),i()),o&2){let t=_();r(13),P(t.exceptions),r(2),C((t.exceptions==null?null:t.exceptions.length)>0?15:-1)}}function re(o,l){o&1&&(n(0,"div",16),x(1,"app-empty-state"),i())}var ye=(()=>{let l=class l{constructor(){this.http=S(z),this.authService=S(V),this.exceptions=[],this.filter={RowCount:50,PageNumber:1,Number:null,From:null,To:null,ChannelID:null},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(c={}){this.http.post("/api/OrdersLoader/Get",c).subscribe(p=>{this.filter=p.Filter,this.getData()})}getData(c){this.filter.Number=c,this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(p=>{this.exceptions=p.hits.map(e=>({id:e._id,ChannelName:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Name:e._source?.shopId,Logo:e._source?.channelId!=null?this.channelOptions.find(d=>d.ID===e._source?.channelId)?.Img:null,number:e._source?.error?.number,date:e._source["@timestamp_received"],stackTrace:e._source?.error?.stackTrace,response:e._source?.error?.response,message:e._source?.message,requestJSON:e._source?.error?.requestJSON})),this.pageTotal=p.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(c){this.filter.PageNumber=c.pageIndex+1,this.getData()}};l.\u0275fac=function(p){return new(p||l)},l.\u0275cmp=N({type:l,selectors:[["app-exception-log"]],decls:28,vars:8,consts:[["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...",3,"onSubmit"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"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"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","10%"],[3,"length","pageSize","pageIndex"],["alt","Logo",2,"width","18px",3,"src"],[3,"routerLink","queryParams"],[3,"page","length","pageSize","pageIndex"]],template:function(p,e){p&1&&(n(0,"mainpanel",0),E("onSubmit",function(a){return e.getData(a)}),n(1,"filters")(2,"div")(3,"label",1),m(4,"Channel"),i(),n(5,"ng-select",2),h("ngModelChange",function(a){return u(e.filter.ChannelID,a)||(e.filter.ChannelID=a),a}),I(6,te,3,3,"ng-template",3),i()(),n(7,"div",4)(8,"label",5),m(9,"From/To"),i(),n(10,"div",6)(11,"datepicker",7),h("dateChange",function(a){return u(e.filter.From,a)||(e.filter.From=a),a}),i()(),n(12,"div")(13,"datepicker",8),h("dateChange",function(a){return u(e.filter.To,a)||(e.filter.To=a),a}),i()()(),n(14,"div",4)(15,"label",9),m(16,"Page Number"),i(),n(17,"input",10),h("ngModelChange",function(a){return u(e.filter.PageNumber,a)||(e.filter.PageNumber=a),a}),i()(),n(18,"div",4)(19,"label",9),m(20,"Page Size"),i(),n(21,"input",11),h("ngModelChange",function(a){return u(e.filter.RowCount,a)||(e.filter.RowCount=a),a}),i()()(),n(22,"content")(23,"div",12)(24,"div",13)(25,"div",14),f(26,ae,16,1,"div",15)(27,re,2,0,"div",16),i()()()()()),p&2&&(r(5),s("clearable",!0)("items",e.channelOptions),g("ngModel",e.filter.ChannelID),r(6),g("date",e.filter.From),r(2),g("date",e.filter.To),r(4),g("ngModel",e.filter.PageNumber),r(4),g("ngModel",e.filter.RowCount),r(5),C(e.exceptions.length>0?26:27))},dependencies:[J,Q,G,A,j,q,H,U,K,Y,B,Z,X,R],encapsulation:2});let o=l;return o})();export{ye as ExceptionLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as J}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as K}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as H,c as R,h as O,m as j,p as F}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as U}from"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as N,w as W,z as D}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as V,Ia as w,Nc as l,Oc as A,Rc as g,Sc as C,Tc as y,Uc as L,Vc as T,Wc as b,Z as k,ac as S,cc as x,hc as _,ic as i,id as P,jc as t,jd as B,kc as E,ob as c,ra as I,rc as v,wc as M,ya as m,yc as h,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(n,a){if(n&1){let p=v();i(0,"input",30),y("ngModelChange",function(o){m(p);let e=h();return C(e.sku,o)||(e.sku=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.sku)}}function q(n,a){if(n&1){let p=v();i(0,"input",31),y("ngModelChange",function(o){m(p);let e=h();return C(e.itemId,o)||(e.itemId=o),u(o)}),t()}if(n&2){let p=h();g("ngModel",p.itemId)}}function z(n,a){if(n&1&&(i(0,"pre",28),l(1),P(2,"json"),t()),n&2){h();let p=b(35);c(),A(B(2,1,p))}}function Q(n,a){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var pe=(()=>{let a=class a{constructor(){this.httpService=I(U),this.selectedChannel=w(null),this.sku=w(null),this.itemId=w(null),this.searchBy="sku"}initProductLog(){let d={ChannelID:this.selectedChannel()};this.searchBy==="sku"?d.SKU=this.sku():d.ItemID=this.itemId(),this.productLog$=this.httpService.post(K.GetProductApiLog,d).pipe(k(1))}copyToClipboard(d){if(!d)return;let o=typeof d=="string"?d:JSON.stringify(d,null,2);navigator.clipboard.writeText(o),alert("Copied to clipboard!")}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=V({type:a,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product 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"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(o,e){if(o&1){let s=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return m(s),u(e.initProductLog())}),E(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),y("ngModelChange",function(r){return m(s),C(e.selectedChannel,r)||(e.selectedChannel=r),u(r)}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),y("ngModelChange",function(r){return m(s),C(e.searchBy,r)||(e.searchBy=r),u(r)}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),S(33,Y,1,1,"input",18),S(34,q,1,1,"input",19),t()()()(),L(35),P(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),l(42,"Response"),t(),i(43,"button",24),M("click",function(){m(s);let r=b(35);return u(e.copyToClipboard(r))}),l(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),S(48,z,3,3,"pre",28)(49,Q,2,0,"p",29),t()()()()()()()()()}if(o&2){_("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),g("ngModel",e.selectedChannel),c(10),g("ngModel",e.searchBy),_("value","sku"),c(4),g("ngModel",e.searchBy),_("value","itemid"),c(3),x(e.searchBy==="sku"?33:-1),c(),x(e.searchBy==="itemid"?34:-1),c();let s=T(B(36,11,e.productLog$));c(8),_("disabled",!s),c(5),x(s?48:49)}},dependencies:[N,H,R,F,O,j,J,G,W,D],encapsulation:2});let n=a;return n})();export{pe as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as me}from"./chunk-JWDQVXQP.js";import{a as de,b as pe}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-
|
|
1
|
+
import{a as me}from"./chunk-JWDQVXQP.js";import{a as de,b as pe}from"./chunk-K5WSFDNA.js";import{a as ce}from"./chunk-DOQD3RMB.js";import{a as P}from"./chunk-L6CRWJ2O.js";import{a as se}from"./chunk-PV4OJSZI.js";import{a as ae}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as le}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as oe}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as re}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as ne}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as ie}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as Q,B as X,w as J,y as K}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as I,Ia as W,Mc as A,Nc as a,Oc as w,Pc as x,Rc as _,Sc as h,Tc as v,Uc as R,Vc as H,Wc as j,Z as O,_c as U,ac as b,ad as q,cc as V,dc as B,fc as k,gc as z,hc as f,ic as t,id as y,jc as i,jd as E,kc as C,kd as G,mb as D,ob as r,ra as F,rc as M,wc as T,ya as c,yc as g,za as u}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as L,b as N}from"./chunk-66YHNWRR.js";var ue=o=>({"td-cell-hover":o});function Ce(o,m){if(o&1&&C(0,"variants-dropdown",31),o&2){let e=g().$implicit;f("variants",e==null?null:e.Variants)}}function fe(o,m){if(o&1&&C(0,"variant-with-image",32),o&2){let e=g().$implicit;f("variant",e==null?null:e.Variants[0])}}function ge(o,m){if(o&1&&(t(0,"span"),a(1),i()),o&2){let e=g().$implicit;r(),x("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function _e(o,m){if(o&1&&(t(0,"tr")(1,"td")(2,"div",24),C(3,"img",25),y(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div"),C(14,"order-link",29),i(),t(15,"small"),a(16),y(17,"date"),i(),C(18,"br"),t(19,"small"),C(20,"i",30),a(21),i()()(),t(22,"td"),b(23,Ce,1,1,"variants-dropdown",31)(24,fe,1,1,"variant-with-image",32),i(),t(25,"td",33),a(26),y(27,"number"),i(),t(28,"td")(29,"div",28)(30,"div",34)(31,"span"),a(32),i(),b(33,ge,2,1,"span"),i(),t(34,"small"),a(35),i()()()()),o&2){let e=m.$implicit;r(3),f("src",E(4,14,e==null?null:e.MarketType),D)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),r(4),w(e.Outlet),r(3),w(e.ChannelName),r(4),f("order",e),r(2),x(" ",G(17,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),r(5),x(" ",e.Customer," "),r(),A(q(21,ue,(e.Variants==null?null:e.Variants.length)>1)),r(),V((e.Variants==null?null:e.Variants.length)>1?23:24),r(3),w(E(27,19,e.Amount)),r(6),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),r(),V(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?33:-1),r(2),x(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(o,m){if(o&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",22),a(13,"Shipping"),i()()(),t(14,"tbody"),k(15,_e,36,23,"tr",null,B),i()(),t(17,"app-custom-paginator",23),T("next",function(){c(e);let p=g();return u(p.initCompletedOrders())})("previous",function(){c(e);let p=g();return u(p.initCompletedOrders())}),i()()}if(o&2){let e=g(),d=j(0);r(15),z(d),r(2),f("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(o,m){o&1&&(t(0,"div",16),C(1,"app-empty-state"),i())}var Re=(()=>{let m=class m{constructor(){this.orderService=F(P),this.filter=W({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>N(L({},p),{From:d})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=I({type:m,selectors:[["app-completed"]],features:[U([P])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[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","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,l){if(p&1){let s=M();R(0),y(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return c(s),u(l.initCompletedOrders())}),v("textChange",function(n){return c(s),h(l.filter().Number,n)||(l.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),C(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),v("ngModelChange",function(n){return c(s),h(l.filter().ListChannelID,n)||(l.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),v("dateChange",function(n){return c(s),h(l.filter().From,n)||(l.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),v("dateChange",function(n){return c(s),h(l.filter().To,n)||(l.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),v("ngModelChange",function(n){return c(s),h(l.filter().PageNumber,n)||(l.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),v("ngModelChange",function(n){return c(s),h(l.filter().PageSize,n)||(l.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),b(32,he,18,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=H(E(1,8,l.completedOrders$));r(2),_("text",l.filter().Number),r(10),f("multiple",!0),_("ngModel",l.filter().ListChannelID),r(5),_("date",l.filter().From),r(2),_("date",l.filter().To),r(4),_("ngModel",l.filter().PageNumber),r(4),_("ngModel",l.filter().PageSize),r(5),V((s==null?null:s.length)>0?32:33)}},dependencies:[X,re,oe,le,te,Y,ee,Z,$,de,pe,se,ne,ie,ce,ae,J,Q,K,me],encapsulation:2});let o=m;return o})();export{Re as CompletedComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-
|
|
1
|
+
import{a as $,b as ee}from"./chunk-TVEI5B2O.js";import{a as Z}from"./chunk-PV4OJSZI.js";import"./chunk-VG66LDXQ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as Q}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{h as U}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import{c as z}from"./chunk-UPRDDI4K.js";import{A as K,c as j,h as q,m as G,o as J}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as V}from"./chunk-D6JH2KV4.js";import{e as A,g as H}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as F,B as k,y as B}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as L,Nc as r,Oc as f,Pc as y,Rc as s,Sc as g,Tc as u,ac as M,ad as W,cc as E,ec as P,fc as x,gc as T,hc as c,ic as e,id as b,jc as t,jd as N,kc as _,kd as R,mb as O,ob as a,ra as C,rc as I,wc as w,ya as v,yc as S,za as D}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=l=>({ID:l});function ne(l,m){if(l&1&&(e(0,"tr")(1,"td"),r(2),t(),e(3,"td"),_(4,"img",23),t(),e(5,"td"),r(6),t(),e(7,"td",24)(8,"a",25),r(9),b(10,"number"),t()(),e(11,"td"),r(12),t(),e(13,"td"),r(14),b(15,"date"),t()()),l&2){let o=m.$implicit;a(2),f(o._source.ChannelName),a(2),c("src",o.logo,O),a(2),f(o._source.DateRange),a(2),c("queryParams",W(12,te,o._source.ID)),a(),y(" ",N(10,7,o._source.CountOrder)," "),a(3),f(o._source.UserLogin),a(2),y(" ",R(15,9,o._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ie(l,m){if(l&1){let o=I();e(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),t(),e(6,"th",19),r(7,"Type"),t(),e(8,"th",20),r(9,"Download Date Range"),t(),e(10,"th",21),r(11,"Count"),t(),e(12,"th"),r(13,"User Login"),t(),e(14,"th"),r(15,"Created"),t()()(),e(16,"tbody"),x(17,ne,16,14,"tr",null,P),t()(),e(19,"mat-paginator",22),w("page",function(p){v(o);let n=S();return D(n.onPaginationChange(p))}),t()()}if(l&2){let o=S();a(17),T(o.downloadOrders),a(2),c("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function oe(l,m){l&1&&(e(0,"div",15),_(1,"app-empty-state"),t())}var De=(()=>{let m=class m{constructor(){this.http=C(V),this.authService=C(U),this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=z.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[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"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/order/log/detail",3,"queryParams"]],template:function(p,n){p&1&&(e(0,"mainpanel",0),w("onSubmit",function(){return n.getDownloadOrders()}),e(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),t(),e(5,"app-channel-options-v2",2),u("ngModelChange",function(i){return g(n.filter.ChannelID,i)||(n.filter.ChannelID=i),i}),t()(),e(6,"div",3)(7,"label",4),r(8,"From/To"),t(),e(9,"div",5)(10,"datepicker",6),u("dateChange",function(i){return g(n.filter.From,i)||(n.filter.From=i),i}),t()(),e(11,"div")(12,"datepicker",7),u("dateChange",function(i){return g(n.filter.To,i)||(n.filter.To=i),i}),t()()(),e(13,"div",3)(14,"label",8),r(15,"Page Number"),t(),e(16,"input",9),u("ngModelChange",function(i){return g(n.filter.PageNumber,i)||(n.filter.PageNumber=i),i}),t()(),e(17,"div",3)(18,"label",8),r(19,"Page Size"),t(),e(20,"input",10),u("ngModelChange",function(i){return g(n.filter.RowCount,i)||(n.filter.RowCount=i),i}),t()()(),e(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),M(25,ie,20,3,"div",14)(26,oe,2,0,"div",15),t()()()()()),p&2&&(c("hideSearchBox",!0),a(5),s("ngModel",n.filter.ChannelID),a(5),s("date",n.filter.From),a(2),s("date",n.filter.To),a(4),s("ngModel",n.filter.PageNumber),a(4),s("ngModel",n.filter.RowCount),a(5),E((n.downloadOrders==null?null:n.downloadOrders.length)>0?25:26))},dependencies:[k,ee,$,Q,K,j,J,q,G,Z,H,A,X,Y,F,B],encapsulation:2});let l=m;return l})();export{De as DownloadOrderLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-YKKHSYDW.js";import{a as J}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as q}from"./chunk-ZZYFVEJO.js";import{a as z}from"./chunk-DLHIDOS3.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as j}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as b}from"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as Z,h as G,m as H}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as O}from"./chunk-D6JH2KV4.js";import{e as W,g as $}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as R,B as F,w as N}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as U,Ia as D,Nc as a,Oc as g,Rc as T,Sc as P,Tc as B,Uc as A,Z as V,ac as I,cc as k,dc as E,fc as L,gc as K,hc as s,ic as e,id as v,jc as t,jd as y,kc as c,mb as M,ob as l,ra as x,rc as w,wc as h,ya as u,yc as S,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function X(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,M)}}function Y(r,p){r&1&&c(0,"img",17)}function ee(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,X,1,1,"img",16)(4,Y,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var Ce=(()=>{let p=class p{constructor(){this.httpService=x(O),this.biggerPictureService=x(z),this.filter=D({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=b.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(b.GetMultiListingSKU,this.filter()).pipe(V(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),P(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,ee,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),T("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,j,q,$,W,Q,J,Z,G,H,N,R],encapsulation:2});let r=p;return r})();export{Ce as DuplicateSkuV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-DOQD3RMB.js";import{a as M}from"./chunk-L6CRWJ2O.js";import{a as ae}from"./chunk-PV4OJSZI.js";import{a as re}from"./chunk-YKKHSYDW.js";import{a as ne}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as ie}from"./chunk-ZZYFVEJO.js";import{a as te}from"./chunk-27DIE2YS.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import{a as $}from"./chunk-UEXWQT5J.js";import"./chunk-3SCX7IMW.js";import"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-M27MYADT.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as Z}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-NB2H6KA7.js";import"./chunk-UPRDDI4K.js";import{A as Y,c as K,h as Q,m as U,o as X}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import"./chunk-D6JH2KV4.js";import"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{A as G,B as J,w as j,y as q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Hb as D,Ia as W,Nc as a,Oc as w,Rc as C,Sc as f,Tc as g,Uc as k,Vc as A,Wc as z,Z as P,_c as H,ac as F,cc as N,dc as L,fc as B,gc as I,hc as h,ic as e,id as b,jc as t,jd as E,kc as y,kd as R,ob as r,ra as O,rc as v,wc as x,ya as u,yc as S,za as c}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as T,b as V}from"./chunk-66YHNWRR.js";function oe(d,m){if(d&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),y(4,"order-link",26),t(),e(5,"td"),a(6),t(),e(7,"td"),a(8),b(9,"number"),t(),e(10,"td"),a(11),b(12,"date"),t(),e(13,"td"),y(14,"app-channel-logo",27),t()()),d&2){let o=m.$implicit;r(2),w(o.Outlet),r(2),h("order",o),r(2),w(o.Customer),r(2),w(E(9,6,o.Amount)),r(3),w(R(12,8,o.Created,"dd MMM yyyy HH:mm")),r(3),h("typeId",o==null?null:o.TypeID)}}function de(d,m){if(d&1){let o=v();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),t(),e(6,"th",21),a(7,"Order number"),t(),e(8,"th"),a(9,"Customer"),t(),e(10,"th",22),a(11,"Amount"),t(),e(12,"th",23),a(13," Created On "),t(),e(14,"th",24),a(15,"Channel"),t()()(),e(16,"tbody"),B(17,oe,15,11,"tr",null,L),t()(),e(19,"app-custom-paginator",25),x("next",function(){u(o);let p=S();return c(p.initCancelledOrders())})("previous",function(){u(o);let p=S();return c(p.initCancelledOrders())}),t()()}if(d&2){let o=S(),l=z(0);r(17),I(l),r(2),h("filter",o.filter())("totaldata",l==null?null:l.length)("paginationTotal",l==null?null:l.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function me(d,m){d&1&&(e(0,"div",16),y(1,"app-empty-state"),t())}var Pe=(()=>{let m=class m{constructor(){this.orderService=O(M),this.filter=W({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:l=>{this.initFromDate(l)},error:l=>{console.error("Error fetching default date:",l),this.initFromDate(null)}})}initFromDate(l){this.filter.update(p=>V(T({},p),{From:l})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=D({type:m,selectors:[["app-cancelled"]],features:[H([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[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","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(p,n){if(p&1){let s=v();k(0),b(1,"async"),e(2,"mainpanel",0),x("onSubmit",function(){return u(s),c(n.initCancelledOrders())}),g("textChange",function(i){return u(s),f(n.filter().Number,i)||(n.filter().Number=i),c(i)}),e(3,"actions")(4,"a",1),y(5,"i",2),e(6,"span"),a(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),g("ngModelChange",function(i){return u(s),f(n.filter().ListChannelID,i)||(n.filter().ListChannelID=i),c(i)}),t()(),e(13,"div",5)(14,"label",3),a(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),g("dateChange",function(i){return u(s),f(n.filter().From,i)||(n.filter().From=i),c(i)}),t()(),e(18,"div")(19,"datepicker",8),g("dateChange",function(i){return u(s),f(n.filter().To,i)||(n.filter().To=i),c(i)}),t()()(),e(20,"div",5)(21,"label",9),a(22,"Page Number"),t(),e(23,"input",10),g("ngModelChange",function(i){return u(s),f(n.filter().PageNumber,i)||(n.filter().PageNumber=i),c(i)}),t()(),e(24,"div",5)(25,"label",9),a(26,"Page Size"),t(),e(27,"input",11),g("ngModelChange",function(i){return u(s),f(n.filter().PageSize,i)||(n.filter().PageSize=i),c(i)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),F(32,de,20,5,"div",15)(33,me,2,0,"div",16),t()()()()()}if(p&2){let s=A(E(1,8,n.cancelledOrders$));r(2),C("text",n.filter().Number),r(10),h("multiple",!0),C("ngModel",n.filter().ListChannelID),r(5),C("date",n.filter().From),r(2),C("date",n.filter().To),r(4),C("ngModel",n.filter().PageNumber),r(4),C("ngModel",n.filter().PageSize),r(5),N((s==null?null:s.length)>0?32:33)}},dependencies:[J,ee,te,ie,Y,K,X,Q,U,ae,$,Z,le,re,ne,j,G,q],encapsulation:2});let d=m;return d})();export{Pe as CancelledComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as it,b as ct}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as rt}from"./chunk-KNE2UYQ2.js";import"./chunk-TQROQOXU.js";import{a as ut}from"./chunk-IQGRGC3E.js";import{a as T}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{d as nt}from"./chunk-BZWZ64N5.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as mt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as ht}from"./chunk-27DIE2YS.js";import{a as ot}from"./chunk-FPJTI4LM.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as et}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X,h as tt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{f as lt,g as st,h as dt,i as pt}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as D}from"./chunk-ZSUWHVKX.js";import{h as Z}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as j,c as z}from"./chunk-NB2H6KA7.js";import{b as F,c as _}from"./chunk-UPRDDI4K.js";import{A as Q,c as Y,h as q,m as K}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as W,e as H}from"./chunk-D6JH2KV4.js";import{d as $}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as y,Hb as U,Ic as O,Nb as A,Nc as w,Pc as V,Rc as E,Sc as N,Tc as R,aa as B,ac as P,ad as I,cc as f,ec as L,fc as G,gc as J,hc as g,ic as h,jc as u,kc as b,ob as r,oc as v,pc as M,ra as C,rc as S,wc as m,ya as l,yc as a,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=o=>[o];function _t(o,c){if(o&1){let t=S();h(0,"button",15),m("click",function(){l(t);let i=a(2);return s(i.onDetachMultipleProduct())}),b(1,"i",16),w(2),u()}if(o&2){let t,e=a(2);r(2),V("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function gt(o,c){if(o&1&&(v(0),P(1,_t,3,1,"button",14),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function Ct(o,c){if(o&1){let t=S();h(0,"button",18),m("click",function(){l(t);let i=a(3);return s(i.onOpenScanDialog())}),b(1,"i",19),w(2," Scan Channel "),u()}}function Pt(o,c){if(o&1&&P(0,Ct,3,0,"button",17),o&2){let t=a(2);f(t.productService.hasSelection(t.products)?-1:0)}}function ft(o,c){if(o&1&&(v(0),P(1,Pt,1,1),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?-1:1)}}function St(o,c){if(o&1){let t=S();h(0,"button",21),m("click",function(){l(t);let i=a(2);return s(i.onScanMultipleProduct())}),b(1,"i",19),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function xt(o,c){if(o&1&&(v(0),P(1,St,3,1,"button",20),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function bt(o,c){if(o&1){let t=S();h(0,"button",23),m("click",function(){l(t);let i=a(2);return s(i.onUploadMultipleProduct())}),b(1,"i",24),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function wt(o,c){if(o&1&&(v(0),P(1,bt,3,1,"button",22),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function yt(o,c){if(o&1){let t=S();h(0,"div",11)(1,"app-product-card",25),m("onUpload",function(){let i=l(t).$implicit,n=a();return s(n.onUploadToMultipleChannel(i))})("onScan",function(){let i=l(t).$implicit,n=a();return s(n.onScanSingleProduct(i))})("onDescEvent",function(){let i=l(t).$index,n=a();return s(n.onOpenDialogVariant(i))})("onCheckBoxChange",function(i){let n=l(t).$implicit;return s(n.selected=i)})("onDetach",function(){let i=l(t).$implicit,n=a();return s(n.onDetachProduct([i]))}),u()()}if(o&2){let t=c.$implicit,e=a();r(),g("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function vt(o,c){o&1&&(h(0,"div",12),b(1,"app-empty-state"),u())}function Mt(o,c){if(o&1){let t=S();h(0,"div",13)(1,"div",26)(2,"app-custom-paginator",27),m("next",function(){l(t);let i=a();return s(i.getProducts())})("previous",function(){l(t);let i=a();return s(i.getProducts())}),u()()()}if(o&2){let t=a();r(2),g("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ie=(()=>{let c=class c{constructor(){this.http=C(H),this.toastr=C(W),this.dialog=C(X),this.productService=C(ot),this.authService=C(Z),this.uploadProductService=C(rt),this.route=C($),this.searchFilter=new at,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=D.ProductScan,this.uploadProductRole=D.ProductUpload,this.detachProductRole=D.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok])}getProducts(){let e={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",e).subscribe(i=>{this.products=i.Data,this.rowCount=i.Total==null?this.searchFilter.RowCount:i.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,i,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let i=this.products[e]?.Variants||[];this.dialog.open(it,{data:{title:this.products[e].Name,variants:i}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty;let i=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok]);this.dialog.open(T,{data:{filter:e,channelOptions:i,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let x=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(x);this.scanSingleProduct(d)})}onScanSingleProduct(e){let i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:i,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID;let p=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(p)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:i=>{if(i)this.toastr.success("Successfully Scan ","Success");else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${n?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,i&&this.getProducts()},error:i=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(e=[]){let i;return e?.length>1&&(i=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(i=e[0].Code),i}onDetachProduct(e){let i=[];e.forEach(n=>{n.Channel=_.assignChannelLogo(n.Channel),i.push(...n.Channel)}),this.dialog.open(ct,{width:"600px",data:[...i]}).afterClosed().pipe(y(n=>_.IsNotEmpty(n)),B(n=>this.productService.detachProduct(n))).subscribe(n=>{this.toastr.success(n.Message,tt.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};c.\u0275fac=function(i){return new(i||c)},c.\u0275cmp=U({type:c,selectors:[["app-in-pos"]],decls:24,vars:21,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["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,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(i,n){if(i&1){let p=S();h(0,"mainpanel",1),m("onSubmit",function(d){return l(p),s(n.searchProduct(d))}),h(1,"actions"),A(2,gt,2,1,"ng-container",2)(3,ft,2,1,"ng-container",2)(4,xt,2,1,"ng-container",2)(5,wt,2,1,"ng-container",2),u(),h(6,"filters")(7,"div")(8,"label",3),w(9,"Category"),u(),h(10,"ng-select",4),m("ngModelChange",function(d){return l(p),s(n.searchFilter.Category=d)}),u()(),h(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),R("ngModelChange",function(d){return l(p),N(n.startDate,d)||(n.startDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u(),h(14,"input",8),R("ngModelChange",function(d){return l(p),N(n.endDate,d)||(n.endDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u()(),b(15,"mat-date-range-picker",null,0),u()(),h(17,"content")(18,"div",9)(19,"div",10),G(20,yt,2,11,"div",11,L),P(22,vt,2,0,"div",12),u(),P(23,Mt,3,5,"div",13),u()()()}if(i&2){let p=O(16);g("headerTitle","In POS ("+n.rowCount+")"),r(2),g("ngxPermissionsOnly",I(13,k,n.detachProductRole)),r(),g("ngxPermissionsOnly",I(15,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(17,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(19,k,n.scanProductRole)),r(5),g("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),r(2),g("rangePicker",p),r(),E("ngModel",n.startDate),r(),E("ngModel",n.endDate),r(6),J(n.products),r(2),f(n.products.length==0?22:-1),r(),f(n.products.length>0?23:-1)}},dependencies:[et,Q,Y,q,K,z,j,nt,lt,st,dt,pt,ut,ht,mt],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}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=c;return o})();export{ie as InPosComponent};
|
|
1
|
+
import{a as it,b as ct}from"./chunk-Z3PLQ27X.js";import"./chunk-VG66LDXQ.js";import{e as rt}from"./chunk-HPQDUJXF.js";import"./chunk-TQROQOXU.js";import{a as ut}from"./chunk-IQGRGC3E.js";import{a as T}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import{d as nt}from"./chunk-BZWZ64N5.js";import{a as at}from"./chunk-7KG3DC5J.js";import{a as mt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as ht}from"./chunk-27DIE2YS.js";import{a as ot}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as et}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{c as X,h as tt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import{f as lt,g as st,h as dt,i as pt}from"./chunk-K4Q33QIR.js";import"./chunk-JRCXHF2X.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as D}from"./chunk-ZSUWHVKX.js";import{h as Z}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import{b as j,c as z}from"./chunk-NB2H6KA7.js";import{b as F,c as _}from"./chunk-UPRDDI4K.js";import{A as Q,c as Y,h as q,m as K}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as W,e as H}from"./chunk-D6JH2KV4.js";import{d as $}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{G as y,Hb as U,Ic as O,Nb as A,Nc as w,Pc as V,Rc as E,Sc as N,Tc as R,aa as B,ac as P,ad as I,cc as f,ec as L,fc as G,gc as J,hc as g,ic as h,jc as u,kc as b,ob as r,oc as v,pc as M,ra as C,rc as S,wc as m,ya as l,yc as a,za as s}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var k=o=>[o];function _t(o,c){if(o&1){let t=S();h(0,"button",15),m("click",function(){l(t);let i=a(2);return s(i.onDetachMultipleProduct())}),b(1,"i",16),w(2),u()}if(o&2){let t,e=a(2);r(2),V("Detach (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function gt(o,c){if(o&1&&(v(0),P(1,_t,3,1,"button",14),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function Ct(o,c){if(o&1){let t=S();h(0,"button",18),m("click",function(){l(t);let i=a(3);return s(i.onOpenScanDialog())}),b(1,"i",19),w(2," Scan Channel "),u()}}function Pt(o,c){if(o&1&&P(0,Ct,3,0,"button",17),o&2){let t=a(2);f(t.productService.hasSelection(t.products)?-1:0)}}function ft(o,c){if(o&1&&(v(0),P(1,Pt,1,1),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?-1:1)}}function St(o,c){if(o&1){let t=S();h(0,"button",21),m("click",function(){l(t);let i=a(2);return s(i.onScanMultipleProduct())}),b(1,"i",19),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Scan (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function xt(o,c){if(o&1&&(v(0),P(1,St,3,1,"button",20),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)&&t.multipeScanChannels.length>0?1:-1)}}function bt(o,c){if(o&1){let t=S();h(0,"button",23),m("click",function(){l(t);let i=a(2);return s(i.onUploadMultipleProduct())}),b(1,"i",24),w(2),u()}if(o&2){let t,e=a(2);r(2),V(" Upload (",(t=e.productService.selectedProduct(e.products))==null?null:t.length,") ")}}function wt(o,c){if(o&1&&(v(0),P(1,bt,3,1,"button",22),M()),o&2){let t=a();r(),f(t.productService.hasSelection(t.products)?1:-1)}}function yt(o,c){if(o&1){let t=S();h(0,"div",11)(1,"app-product-card",25),m("onUpload",function(){let i=l(t).$implicit,n=a();return s(n.onUploadToMultipleChannel(i))})("onScan",function(){let i=l(t).$implicit,n=a();return s(n.onScanSingleProduct(i))})("onDescEvent",function(){let i=l(t).$index,n=a();return s(n.onOpenDialogVariant(i))})("onCheckBoxChange",function(i){let n=l(t).$implicit;return s(n.selected=i)})("onDetach",function(){let i=l(t).$implicit,n=a();return s(n.onDetachProduct([i]))}),u()()}if(o&2){let t=c.$implicit,e=a();r(),g("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",e.productService.getChannelProduct(t))("code",e.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<e.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function vt(o,c){o&1&&(h(0,"div",12),b(1,"app-empty-state"),u())}function Mt(o,c){if(o&1){let t=S();h(0,"div",13)(1,"div",26)(2,"app-custom-paginator",27),m("next",function(){l(t);let i=a();return s(i.getProducts())})("previous",function(){l(t);let i=a();return s(i.getProducts())}),u()()()}if(o&2){let t=a();r(2),g("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ie=(()=>{let c=class c{constructor(){this.http=C(H),this.toastr=C(W),this.dialog=C(X),this.productService=C(ot),this.authService=C(Z),this.uploadProductService=C(rt),this.route=C($),this.searchFilter=new at,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.scanProductRole=D.ProductScan,this.uploadProductRole=D.ProductUpload,this.detachProductRole=D.ProductDetach,this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories=e.Options.Categories,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=e.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok])}getProducts(){let e={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",e).subscribe(i=>{this.products=i.Data,this.rowCount=i.Total==null?this.searchFilter.RowCount:i.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:e,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID,this.searchFilter.ScanFull=n.ScanFull,this.searchFilter.UpdatedProduct=n.UpdatedProduct,this.searchFilter.Async=n.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,i,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(e){let i=this.products[e]?.Variants||[];this.dialog.open(it,{data:{title:this.products[e].Name,variants:i}})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty;let i=this.productService.filterChannelByTypeId(this.channelOptions,[F.Tokopedia,F.Tiktok]);this.dialog.open(T,{data:{filter:e,channelOptions:i,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let x=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(x);this.scanSingleProduct(d)})}onScanSingleProduct(e){let i=JSON.parse(JSON.stringify(this.searchFilter));i.ChannelID=_.GuidEMpty,this.dialog.open(T,{data:{filter:i,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(n=>_.IsNotEmpty(n))).subscribe(n=>{this.searchFilter.ChannelID=n.ChannelID;let p=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(p)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:i=>{if(i)this.toastr.success("Successfully Scan ","Success");else{let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${n?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,i&&this.getProducts()},error:i=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(e=[]){let i;return e?.length>1&&(i=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(i=e[0].Code),i}onDetachProduct(e){let i=[];e.forEach(n=>{n.Channel=_.assignChannelLogo(n.Channel),i.push(...n.Channel)}),this.dialog.open(ct,{width:"600px",data:[...i]}).afterClosed().pipe(y(n=>_.IsNotEmpty(n)),B(n=>this.productService.detachProduct(n))).subscribe(n=>{this.toastr.success(n.Message,tt.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products);this.onDetachProduct(e)}};c.\u0275fac=function(i){return new(i||c)},c.\u0275cmp=U({type:c,selectors:[["app-in-pos"]],decls:24,vars:21,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["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,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(i,n){if(i&1){let p=S();h(0,"mainpanel",1),m("onSubmit",function(d){return l(p),s(n.searchProduct(d))}),h(1,"actions"),A(2,gt,2,1,"ng-container",2)(3,ft,2,1,"ng-container",2)(4,xt,2,1,"ng-container",2)(5,wt,2,1,"ng-container",2),u(),h(6,"filters")(7,"div")(8,"label",3),w(9,"Category"),u(),h(10,"ng-select",4),m("ngModelChange",function(d){return l(p),s(n.searchFilter.Category=d)}),u()(),h(11,"div",5)(12,"mat-date-range-input",6)(13,"input",7),R("ngModelChange",function(d){return l(p),N(n.startDate,d)||(n.startDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u(),h(14,"input",8),R("ngModelChange",function(d){return l(p),N(n.endDate,d)||(n.endDate=d),s(d)}),m("click",function(){l(p);let d=O(16);return s(d.open())}),u()(),b(15,"mat-date-range-picker",null,0),u()(),h(17,"content")(18,"div",9)(19,"div",10),G(20,yt,2,11,"div",11,L),P(22,vt,2,0,"div",12),u(),P(23,Mt,3,5,"div",13),u()()()}if(i&2){let p=O(16);g("headerTitle","In POS ("+n.rowCount+")"),r(2),g("ngxPermissionsOnly",I(13,k,n.detachProductRole)),r(),g("ngxPermissionsOnly",I(15,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(17,k,n.scanProductRole)),r(),g("ngxPermissionsOnly",I(19,k,n.scanProductRole)),r(5),g("clearable",!0)("items",n.Categories)("ngModel",n.searchFilter.Category),r(2),g("rangePicker",p),r(),E("ngModel",n.startDate),r(),E("ngModel",n.endDate),r(6),J(n.products),r(2),f(n.products.length==0?22:-1),r(),f(n.products.length>0?23:-1)}},dependencies:[et,Q,Y,q,K,z,j,nt,lt,st,dt,pt,ut,ht,mt],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}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=c;return o})();export{ie as InPosComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-3PUUKJCQ.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-FPJTI4LM.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-JLDXWNDU.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-2OKZEOBU.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(It,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],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}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=c;return o})();export{Me as NotInPosComponent};
|
|
1
|
+
import{a as bt}from"./chunk-IQGRGC3E.js";import{c as Mt,d as Ft}from"./chunk-TUY6YGYA.js";import"./chunk-76AVMRJU.js";import{a as Pt}from"./chunk-KOQLZV3N.js";import"./chunk-6F37VT6M.js";import{a as ft,b as St}from"./chunk-2EGTHH3W.js";import"./chunk-LR2YCE6M.js";import"./chunk-BKR7YPEW.js";import"./chunk-BZWZ64N5.js";import{a as Ot}from"./chunk-QUIZLT5F.js";import"./chunk-VVNLTDLG.js";import"./chunk-OHAT7WXU.js";import"./chunk-L4EPB2CQ.js";import"./chunk-GNXSEYJF.js";import{a as wt}from"./chunk-7KG3DC5J.js";import{a as xt}from"./chunk-ZZYFVEJO.js";import"./chunk-DLHIDOS3.js";import{a as vt}from"./chunk-27DIE2YS.js";import{a as yt}from"./chunk-REDQ2L7Y.js";import"./chunk-JU4ZP3HI.js";import"./chunk-3T5VLB63.js";import"./chunk-STOW2RQN.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-XTNXL2IY.js";import"./chunk-KOUB5HRK.js";import"./chunk-QETZ5VDX.js";import"./chunk-WIRXMAIF.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import"./chunk-KHGTW7IV.js";import"./chunk-A6QXXKPR.js";import"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as _t}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as mt,b as ht,c as ut,i as Ct,j as gt}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-RM6ZXD3O.js";import"./chunk-R2XKB6UH.js";import"./chunk-RO7WOCSA.js";import"./chunk-3RK6DDJD.js";import"./chunk-UDNUDL5Z.js";import"./chunk-CVHFVFZQ.js";import"./chunk-ZC526ERX.js";import"./chunk-NJNRUDU6.js";import"./chunk-XUDE7VBC.js";import"./chunk-WAZWPRUG.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-JTKEMQZT.js";import{c as pt}from"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as U}from"./chunk-ZSUWHVKX.js";import{h as at}from"./chunk-J4552BMI.js";import"./chunk-X2CTSYKS.js";import"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-AGBJEXIM.js";import{a as nt,b as it,c as ot}from"./chunk-NB2H6KA7.js";import{c as f}from"./chunk-UPRDDI4K.js";import{A as dt,c as lt,h as st,m as ct}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{b as X,e as tt}from"./chunk-D6JH2KV4.js";import{b as et}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{q as Z,w as Q}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as q,G as L,Hb as I,Ia as x,Nb as G,Nc as g,Oc as R,Pc as $,Rc as y,Sc as w,Tc as F,Uc as j,ac as M,ad as b,cc as O,dc as H,ea as W,ec as J,fc as N,gc as V,hc as u,ic as a,id as z,jc as s,jd as Y,kc as T,ob as l,oc as E,pc as k,ra as _,rc as P,wc as S,ya as m,yc as C,za as h}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var Tt=o=>({"bg-gradient-warning":o});function Dt(o,c){if(o&1&&(a(0,"tr",5)(1,"td"),g(2),s(),a(3,"td",6),g(4),s()()),o&2){let n=c.$implicit;u("matTooltip",n.duplicateMessage),l(2),R(n==null?null:n.Name),l(),u("ngClass",b(4,Tt,n.isDuplicate)),l(),R(n!=null&&n.ChannelVariationSKU?n==null?null:n.ChannelVariationSKU:"Not Assigned")}}var It=(()=>{let c=class c{constructor(){this.data=_(ht),this.dialogRef=_(mt),this.variants=x([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},i=[],d=t.filter(p=>f.IsEmpty(p.ChannelVariationSKU));t.filter(p=>f.IsNotEmpty(p.ChannelVariationSKU)).forEach((p,r,K)=>{e[p.ChannelVariationSKU]=K.filter(v=>v.ChannelVariationSKU===p.ChannelVariationSKU)}),Object.keys(e).forEach(p=>{e[p].length>1&&(e[p]=e[p].map((r,K,v)=>{let B=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return v.forEach((D,Nt)=>{D.Name!==r.Name&&(B+=` ${v.length>2?D.Name+(Nt!==v.length-1?",":""):D.Name}`)}),r.duplicateMessage=B,r.isDuplicate=!0,r})),i.push(...e[p])}),i.push(...d),this.variants.set(i)}initModalConfig(){this.modalConfig=new Ct,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,i){e&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),g(6,"Variant"),s(),a(7,"th",4),g(8,"SKU"),s()()(),a(9,"tbody"),N(10,Dt,5,6,"tr",5,H),s()()()()),e&2&&(u("config",i.modalConfig),l(10),V(i.variants()))},dependencies:[gt,pt,Z],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let o=c;return o})();var A=o=>[o],Et=()=>[];function kt(o,c){if(o&1){let n=P();a(0,"button",16),S("click",function(){m(n);let e=C(2);return h(e.openScanDialog())}),T(1,"i",17),g(2," Scan Channel "),s()}}function Rt(o,c){if(o&1&&(E(0),M(1,kt,3,0,"button",15),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?-1:1)}}function Ut(o,c){if(o&1){let n=P();a(0,"button",19),S("click",function(){m(n);let e=C(2);return h(e.onDownloadAllProduct("SELECTED"))}),T(1,"i",20),g(2),s()}if(o&2){let n,t=C(2);l(2),$(" Download (",(n=t.productService.selectedProduct(t.products))==null?null:n.length,") ")}}function At(o,c){if(o&1&&(E(0),M(1,Ut,3,1,"button",18),k()),o&2){let n=C();l(),O(n.productService.hasSelection(n.products)?1:-1)}}function Kt(o,c){if(o&1){let n=P();a(0,"div",12)(1,"app-product-card",21),S("onCheckBoxChange",function(e){let i=m(n).$index,d=C();return h(d.onSelectProduct(e,i))})("onDescEvent",function(){let e=m(n).$index,i=C();return h(i.onShowVariantDetail(e))})("onDownload",function(){let e=m(n).$implicit,i=C();return h(i.onDownloadProduct(e))})("onScan",function(){let e=m(n).$implicit,i=C();return h(i.onScanChannel(e))}),s()()}if(o&2){let n=c.$implicit,t=C();l(),u("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?b(10,A,n==null?null:n.Channel):q(12,Et))("showCheckBox",t.hasDownloadRole())("scanButton",!0)}}function Bt(o,c){o&1&&(a(0,"div",13),T(1,"app-empty-state"),s())}function Lt(o,c){if(o&1){let n=P();a(0,"div",14)(1,"div",22)(2,"app-custom-paginator",23),S("total",function(){m(n);let e=C();return h(e.getRowCount())})("next",function(){m(n);let e=C();return h(e.getProducts())})("previous",function(){m(n);let e=C();return h(e.getProducts())}),s()()()}if(o&2){let n=C();l(2),u("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var Me=(()=>{let c=class c{constructor(){this.http=_(tt),this.dialog=_(ut),this.productService=_(yt),this.toastrService=_(X),this.activateRouter=_(et),this.authService=_(at),this.placeholderService=_(Mt),this.permissionService=_(nt),this.searchFilter=new wt,this.products=[],this.hasClickRowCount=!1,this.scanProductRole=U.ProductScan,this.downloadProductRole=U.ProductDownload,this.hasDownloadRole=x(!0),this.searchPlaceholder=x("Search ..."),this.channelOptions=this.authService.getChannels(),this.permissionService.hasPermission(this.downloadProductRole).then(t=>{this.hasDownloadRole.set(t)})}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.loader$=this.productService.loader(t).pipe(W(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts(),this.initSearchPlaceholder()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts(),this.initSearchPlaceholder()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(Pt,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(L(i=>f.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(It,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku),SearchType:this.searchFilter.SearchType,NumberFilterComparator:this.searchFilter.NumberFilterComparator};this.http.post(rt.GetNotInPosRowCount,t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}};c.\u0275fac=function(e){return new(e||c)},c.\u0275cmp=I({type:c,selectors:[["app-not-in-pos"]],decls:34,vars:21,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit","searchBoxPlaceHolder"],[4,"ngxPermissionsOnly"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(e,i){if(e&1){let d=P();j(0),z(1,"async"),a(2,"mainpanel",0),S("onSubmit",function(r){return m(d),h(i.onSearch(r))}),a(3,"actions"),G(4,Rt,2,1,"ng-container",1)(5,At,2,1,"ng-container",1),s(),a(6,"filters")(7,"div",2)(8,"label",3),g(9,"Channel"),s(),a(10,"app-channel-options-v2",4),F("ngModelChange",function(r){return m(d),w(i.searchFilter.ChannelID,r)||(i.searchFilter.ChannelID=r),h(r)}),s()(),a(11,"div",2)(12,"label",5),g(13,"SKU Assigned"),s(),a(14,"mat-radio-group",6),F("ngModelChange",function(r){return m(d),w(i.searchFilter.HaveSku,r)||(i.searchFilter.HaveSku=r),h(r)}),a(15,"mat-radio-button",7),g(16," All "),s(),a(17,"mat-radio-button",7),g(18," Yes "),s(),a(19,"mat-radio-button",7),g(20," No "),s()()(),a(21,"div",2)(22,"label",5),g(23,"Item ID"),s(),a(24,"input",8),F("ngModelChange",function(r){return m(d),w(i.searchFilter.Item_id,r)||(i.searchFilter.Item_id=r),h(r)}),s()(),a(25,"div")(26,"filter-query-type",9),F("numberFilterComparatorChange",function(r){return m(d),w(i.searchFilter.NumberFilterComparator,r)||(i.searchFilter.NumberFilterComparator=r),h(r)})("searchTypeChange",function(r){return m(d),w(i.searchFilter.SearchType,r)||(i.searchFilter.SearchType=r),h(r)}),s()()(),a(27,"content")(28,"div",10)(29,"div",11),N(30,Kt,2,13,"div",12,J),M(32,Bt,2,0,"div",13),s(),M(33,Lt,3,4,"div",14),s()()()}if(e&2){let d=Y(1,15,i.loader$);l(2),u("searchBoxPlaceHolder",i.searchPlaceholder()),l(2),u("ngxPermissionsOnly",b(17,A,i.scanProductRole)),l(),u("ngxPermissionsOnly",b(19,A,i.downloadProductRole)),l(5),y("ngModel",i.searchFilter.ChannelID),l(4),y("ngModel",i.searchFilter.HaveSku),l(),u("value",0),l(2),u("value",1),l(2),u("value",2),l(5),y("ngModel",i.searchFilter.Item_id),l(2),u("numberFilterComparatorOptions",d==null||d.Options==null?null:d.Options.SearchComparatorTypeOptions),y("numberFilterComparator",i.searchFilter.NumberFilterComparator),u("searchTypeOptions",d==null||d.Options==null?null:d.Options.SearchSKUOnlyOrSKUNameOptions),y("searchType",i.searchFilter.SearchType),l(4),V(i.products),l(2),O(i.products.length==0?32:-1),l(),O((i.products==null?null:i.products.length)>0?33:-1)}},dependencies:[_t,ot,it,Ot,dt,lt,st,ct,ft,St,Ft,bt,vt,xt,Q],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}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=c;return o})();export{Me as NotInPosComponent};
|