marketplacepos 5.33.7 → 5.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +134 -8
- package/Marketplace/chunk-23MIIDCT.js +2 -0
- package/Marketplace/chunk-2NECQ3RY.js +2 -0
- package/Marketplace/chunk-2NNAGGBO.js +1 -0
- package/Marketplace/chunk-2UUIV6C6.js +5 -0
- package/Marketplace/chunk-3ENIRM66.js +5 -0
- package/Marketplace/chunk-3NMGN7IE.js +2 -0
- package/Marketplace/chunk-3RK6DDJD.js +0 -0
- package/Marketplace/chunk-4BGF3NRH.js +3 -0
- package/Marketplace/chunk-4JRXTPAH.js +1 -0
- package/Marketplace/chunk-4RAOUTR2.js +5 -0
- package/Marketplace/chunk-4W7MIJDZ.js +1 -0
- package/Marketplace/chunk-52GRE6TF.js +2 -0
- package/Marketplace/chunk-5BTJTFLF.js +1 -0
- package/Marketplace/chunk-5UHZLNDT.js +1 -0
- package/Marketplace/chunk-5WNSX64O.js +1 -0
- package/Marketplace/chunk-5Z63CRGG.js +2 -0
- package/Marketplace/chunk-67USXWWF.js +1 -0
- package/Marketplace/chunk-6A4PYMCJ.js +1 -0
- package/Marketplace/chunk-6HVHZ3HN.js +1 -0
- package/Marketplace/chunk-72FE5Z4G.js +1 -0
- package/Marketplace/chunk-77IUCPIQ.js +1 -0
- package/Marketplace/chunk-7M4RYU7S.js +1 -0
- package/Marketplace/chunk-A7DI24YW.js +1 -0
- package/Marketplace/chunk-A7OUQFDG.js +1 -0
- package/Marketplace/chunk-AFMNWVBL.js +1 -0
- package/Marketplace/chunk-AI4XRCAL.js +1 -0
- package/Marketplace/chunk-AKJ4I7KF.js +3 -0
- package/Marketplace/chunk-ARIW575T.js +1 -0
- package/Marketplace/chunk-B6POIFQM.js +2 -0
- package/Marketplace/chunk-BQF5RWPV.js +2 -0
- package/Marketplace/chunk-BSATGCWC.js +2 -0
- package/Marketplace/chunk-C5XCTKZE.js +1 -0
- package/Marketplace/chunk-CYE5UD3J.js +5 -0
- package/Marketplace/chunk-DG3PIXFJ.js +1 -0
- package/Marketplace/chunk-E24BKGBJ.js +2 -0
- package/Marketplace/chunk-EIQCOZF5.js +7 -0
- package/Marketplace/chunk-EQ2ZKEVE.js +2 -0
- package/Marketplace/chunk-EQD3IUMF.js +1 -0
- package/Marketplace/chunk-EXFL3GUX.js +7 -0
- package/Marketplace/chunk-G43OSTZO.js +447 -0
- package/Marketplace/chunk-GA6G4Z77.js +15 -0
- package/Marketplace/chunk-GPIRHHPK.js +1 -0
- package/Marketplace/chunk-GYCAKLC6.js +1 -0
- package/Marketplace/chunk-HA5WIDED.js +1 -0
- package/Marketplace/chunk-HCQAPBYU.js +1 -0
- package/Marketplace/chunk-HI5IBYKT.js +1 -0
- package/Marketplace/chunk-HPS3WVU5.js +2 -0
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/chunk-IVX7QWP7.js +1 -0
- package/Marketplace/chunk-JP37GIKN.js +153 -0
- package/Marketplace/chunk-JSPVOV7M.js +1 -0
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/chunk-K5CKXDIJ.js +2 -0
- package/Marketplace/chunk-K5XRGNWG.js +1 -0
- package/Marketplace/chunk-K7B23YKD.js +1 -0
- package/Marketplace/chunk-KRF4H3V6.js +1 -0
- package/Marketplace/chunk-KVZLHAO2.js +1 -0
- package/Marketplace/chunk-L6W6BJ3T.js +1 -0
- package/Marketplace/chunk-MA6JA5OR.js +93 -0
- package/Marketplace/chunk-MFPHDR5E.js +8 -0
- package/Marketplace/chunk-MS4AQ6UA.js +0 -0
- package/Marketplace/chunk-NHCDFSJ3.js +1 -0
- package/Marketplace/chunk-OBN6RKRH.js +2 -0
- package/Marketplace/chunk-OM7KOQLP.js +2 -0
- package/Marketplace/chunk-ONK4P7TL.js +1 -0
- package/Marketplace/chunk-ORPJLSXE.js +2 -0
- package/Marketplace/chunk-OS53H77X.js +193 -0
- package/Marketplace/chunk-OSQRMWJL.js +1 -0
- package/Marketplace/chunk-OVYL7SOO.js +4 -0
- package/Marketplace/chunk-OZ5LRIS3.js +1 -0
- package/Marketplace/chunk-PF4F4EAR.js +1 -0
- package/Marketplace/chunk-QA5IF5NA.js +1 -0
- package/Marketplace/chunk-QBCQRDML.js +1 -0
- package/Marketplace/chunk-QM6YBW4M.js +1525 -0
- package/Marketplace/chunk-R5IDWUP6.js +1 -0
- package/Marketplace/chunk-R6B6DIG3.js +1 -0
- package/Marketplace/chunk-RNWWVG3M.js +2 -0
- package/Marketplace/chunk-SD7UKXTX.js +1 -0
- package/Marketplace/chunk-SDUUFQUI.js +1 -0
- package/Marketplace/chunk-T7KM2WP6.js +1 -0
- package/Marketplace/chunk-TAMPHFXZ.js +1 -0
- package/Marketplace/chunk-TJG4JC6V.js +1181 -0
- package/Marketplace/chunk-TTAS23MO.js +2 -0
- package/Marketplace/chunk-TWEQ54JW.js +316 -0
- package/Marketplace/chunk-TY4H2W6F.js +2 -0
- package/Marketplace/chunk-TY7ZWITQ.js +1 -0
- package/Marketplace/chunk-TYHYQW6K.js +1 -0
- package/Marketplace/chunk-U3DTDPXT.js +1 -0
- package/Marketplace/chunk-U72SVWV5.js +1 -0
- package/Marketplace/chunk-ULOZVW2M.js +1 -0
- package/Marketplace/chunk-UOAYF4SW.js +5 -0
- package/Marketplace/chunk-V5WYSCVT.js +21 -0
- package/Marketplace/chunk-VAPIXIJ3.js +3 -0
- package/Marketplace/chunk-VKJAFLQ6.js +5 -0
- package/Marketplace/chunk-VOISFPEM.js +10 -0
- package/Marketplace/chunk-VUOTF3QO.js +1 -0
- package/Marketplace/{chunk-LUY3WZJE.js → chunk-VYKDVKG3.js} +3 -3
- package/Marketplace/chunk-W6T7TOHE.js +1 -0
- package/Marketplace/chunk-WMO2ROK4.js +1 -0
- package/Marketplace/{chunk-DVSSWF73.js → chunk-WNAVUGZ4.js} +3 -3
- package/Marketplace/{chunk-MEZONX3R.js → chunk-WQ6TZ4KW.js} +2 -2
- package/Marketplace/chunk-WYOXUN3H.js +2 -0
- package/Marketplace/chunk-X2LEVILZ.js +2 -0
- package/Marketplace/chunk-XJZCXXLP.js +2 -0
- package/Marketplace/chunk-XOT2SZPE.js +4 -0
- package/Marketplace/chunk-XR4JKTPA.js +1 -0
- package/Marketplace/chunk-YQSHLQDX.js +2 -0
- package/Marketplace/chunk-YYT4FHFC.js +1 -0
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-QED4DWNH.js +1 -0
- package/Marketplace/polyfills-BUUDEW7V.js +2 -0
- package/Marketplace/prerendered-routes.json +3 -0
- package/Marketplace/scripts-BTEOQWVQ.js +5 -0
- package/Marketplace/styles-6IZYQNTO.css +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-3FKDH5RG.js +0 -1
- package/Marketplace/chunk-3JZYRZT3.js +0 -2
- package/Marketplace/chunk-3LR4RLA6.js +0 -1
- package/Marketplace/chunk-46AOM3SM.js +0 -149
- package/Marketplace/chunk-47DMD3UG.js +0 -1
- package/Marketplace/chunk-47JAK757.js +0 -5
- package/Marketplace/chunk-4LFFAE2I.js +0 -1
- package/Marketplace/chunk-4LJDBY23.js +0 -1
- package/Marketplace/chunk-5JOW2QWK.js +0 -1
- package/Marketplace/chunk-5VEPYUMQ.js +0 -2
- package/Marketplace/chunk-6BNB4T6D.js +0 -1
- package/Marketplace/chunk-6U6JR5K6.js +0 -1
- package/Marketplace/chunk-6WBLOQ4O.js +0 -1
- package/Marketplace/chunk-6XIV3N7A.js +0 -93
- package/Marketplace/chunk-76GDTOVJ.js +0 -1
- package/Marketplace/chunk-76IZKTSD.js +0 -1
- package/Marketplace/chunk-7LZ5ZSXM.js +0 -1
- package/Marketplace/chunk-7XUSMPAA.js +0 -1
- package/Marketplace/chunk-ADRVUMMW.js +0 -1
- package/Marketplace/chunk-AP5VEP3X.js +0 -5
- package/Marketplace/chunk-B2TH5YJH.js +0 -1142
- package/Marketplace/chunk-BO4PPSB5.js +0 -2
- package/Marketplace/chunk-BQ7NR3ET.js +0 -1
- package/Marketplace/chunk-BSLGEXE4.js +0 -1494
- package/Marketplace/chunk-BSN7ZAXG.js +0 -1
- package/Marketplace/chunk-CCXKODFV.js +0 -2
- package/Marketplace/chunk-CGF5H6YA.js +0 -1
- package/Marketplace/chunk-D7ZPHL4I.js +0 -1
- package/Marketplace/chunk-DGTMJB7Z.js +0 -1
- package/Marketplace/chunk-E3NPUJ23.js +0 -1
- package/Marketplace/chunk-E4C642KN.js +0 -1
- package/Marketplace/chunk-E5GGIVK7.js +0 -1
- package/Marketplace/chunk-ECGLNS5H.js +0 -8
- package/Marketplace/chunk-EISLDGIF.js +0 -1
- package/Marketplace/chunk-F4WIW6HA.js +0 -1
- package/Marketplace/chunk-F5Y65N3B.js +0 -1
- package/Marketplace/chunk-FGPSBTFS.js +0 -3
- package/Marketplace/chunk-FMV4LYKN.js +0 -1
- package/Marketplace/chunk-FT77MFQN.js +0 -1
- package/Marketplace/chunk-GCKSYCMI.js +0 -5
- package/Marketplace/chunk-GNOSNGXM.js +0 -1
- package/Marketplace/chunk-GUYZJ4TX.js +0 -4
- package/Marketplace/chunk-HCDKYABV.js +0 -4
- package/Marketplace/chunk-HKDNDD2G.js +0 -1
- package/Marketplace/chunk-HUUFOAKH.js +0 -1
- package/Marketplace/chunk-HXJF7C6Q.js +0 -1
- package/Marketplace/chunk-IJYSJN63.js +0 -443
- package/Marketplace/chunk-ILVEM7H5.js +0 -1
- package/Marketplace/chunk-J5D7PMX5.js +0 -2
- package/Marketplace/chunk-JBFISOFM.js +0 -1
- package/Marketplace/chunk-JJFCQ6V3.js +0 -1
- package/Marketplace/chunk-JXTGH22T.js +0 -1
- package/Marketplace/chunk-JYYVBBNN.js +0 -1
- package/Marketplace/chunk-KAEUZC2Y.js +0 -1
- package/Marketplace/chunk-KCDL7SWP.js +0 -7
- package/Marketplace/chunk-KOWWF75X.js +0 -1
- package/Marketplace/chunk-LHMSPWGJ.js +0 -1
- package/Marketplace/chunk-MY4B7K3R.js +0 -4
- package/Marketplace/chunk-N6IHFFFZ.js +0 -1
- package/Marketplace/chunk-O434S2MH.js +0 -2
- package/Marketplace/chunk-O4CRP4WO.js +0 -1
- package/Marketplace/chunk-O4ZSBRQO.js +0 -1
- package/Marketplace/chunk-O6EVUHF3.js +0 -1
- package/Marketplace/chunk-OSA3WANL.js +0 -1
- package/Marketplace/chunk-OULUJ2IO.js +0 -189
- package/Marketplace/chunk-OVEJFFL6.js +0 -2
- package/Marketplace/chunk-P5UOWO2P.js +0 -1
- package/Marketplace/chunk-PD4CUVAW.js +0 -1
- package/Marketplace/chunk-PQDPS2ID.js +0 -7
- package/Marketplace/chunk-QGVD6MF4.js +0 -1
- package/Marketplace/chunk-QP6O4KGV.js +0 -1
- package/Marketplace/chunk-RENQ3YZH.js +0 -1
- package/Marketplace/chunk-RXWNRL3O.js +0 -1
- package/Marketplace/chunk-S2Z3ZGU7.js +0 -1
- package/Marketplace/chunk-SW7GE4R3.js +0 -10
- package/Marketplace/chunk-TPGBOTD4.js +0 -1
- package/Marketplace/chunk-TTLK2HTY.js +0 -1
- package/Marketplace/chunk-TVJVDA5Y.js +0 -1
- package/Marketplace/chunk-UDFZKU5J.js +0 -1
- package/Marketplace/chunk-UMNGKENU.js +0 -1
- package/Marketplace/chunk-URCHO4IV.js +0 -1
- package/Marketplace/chunk-VUVYEGEO.js +0 -1
- package/Marketplace/chunk-WT6W7RAQ.js +0 -1
- package/Marketplace/chunk-X2TVRY2Z.js +0 -1
- package/Marketplace/chunk-X5Q6FPWS.js +0 -315
- package/Marketplace/chunk-XJE5DG3A.js +0 -1
- package/Marketplace/chunk-XR6LJHZU.js +0 -5
- package/Marketplace/chunk-Y6MN6HLH.js +0 -1
- package/Marketplace/chunk-YKJ34DPH.js +0 -1
- package/Marketplace/chunk-YYWSBXIP.js +0 -1
- package/Marketplace/chunk-ZQWAIH5X.js +0 -7
- package/Marketplace/chunk-ZYFF443B.js +0 -1
- package/Marketplace/main-5MBYKGSM.js +0 -1
- package/Marketplace/polyfills-MH5IBZ74.js +0 -2
- package/Marketplace/scripts-TB7H6DN4.js +0 -5
- package/Marketplace/styles-VNC3CHFK.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Be}from"./chunk-76IZKTSD.js";import{a as X}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import{a as Z}from"./chunk-RENQ3YZH.js";import{a as ke,b as Ve}from"./chunk-X2TVRY2Z.js";import"./chunk-MY4B7K3R.js";import"./chunk-P5UOWO2P.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as Q,b as We}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import{a as B}from"./chunk-TTLK2HTY.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as me,b as pe,d as ce,e as Ne}from"./chunk-CCXKODFV.js";import{j as de}from"./chunk-GUYZJ4TX.js";import{e as M}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as R,n as Oe}from"./chunk-BO4PPSB5.js";import{t as Pe,u as Le}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as oe,h as ae,m as le,o as se,t as Te,u as De,y as Me,z as Re}from"./chunk-BSN7ZAXG.js";import{c as W}from"./chunk-47DMD3UG.js";import{m as A,n as Ee,p as L,r as fe}from"./chunk-OVEJFFL6.js";import{$b as I,Ad as j,Cd as he,Da as g,Ea as h,Eb as v,Gb as c,Gc as _,Hc as O,Ic as E,Jc as Y,Kb as we,Sb as t,Tb as i,Ub as P,Vb as q,Wb as G,Yb as N,Z as be,bc as y,ea as xe,gb as z,ja as ue,jb as l,ka as ne,kb as f,mc as U,nc as n,oa as ye,oc as p,pc as V,rc as C,sc as S,sd as ge,ta as w,tc as b,ua as re,ud as K,v as Se,vd as T,wc as J,xc as F,yd as Ie,zd as D}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ae=(()=>{let o=class o{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}};o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=w({type:o,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(a,e){a&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),P(3,"nav-tab",2),i()()(),P(4,"router-outlet")),a&2&&(l(3),c("Tabs",e.ObjectlogTabs))},dependencies:[Ee,ke]});let r=o;return r})();var $=(()=>{let o=class o{constructor(){}get Data(){return this._Data}set Data(d){this._Data=d}Fill(d){return this._Data.find(a=>a._id==d)}};o.\u0275fac=function(a){return new(a||o)},o.\u0275prov=ue({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();var it=()=>["/menu/log/order/detail-user"],nt=r=>({ID:r}),rt=r=>({"bg-warning":r});function ot(r,o){if(r&1&&(t(0,"span",22),P(1,"img",23),i(),n(2)),r&2){let s=o.item;l(),c("src",s.Img,z)("alt",s.Name),l(),V(" ",s.Name," ")}}function at(r,o){r&1&&(t(0,"th",27)(1,"span",33),n(2," Response Body Warning "),i()())}function lt(r,o){r&1&&(t(0,"th")(1,"span",33),n(2," Number Override "),i()())}function st(r,o){if(r&1&&(t(0,"td",27)(1,"span",36),n(2),i()()),r&2){let s=y().$implicit;l(),c("ngClass",F(2,rt,s.responseBodyWarning!=null)),l(),p(s.responseBodyWarning)}}function dt(r,o){if(r&1&&(t(0,"td"),n(1),i()),r&2){let s=y().$implicit;l(),V(" ",s.ResponseBodyWarningReference," ")}}function mt(r,o){if(r&1&&(t(0,"tr")(1,"td")(2,"a",34),n(3),_(4,"date"),i()(),t(5,"td"),n(6),i(),t(7,"td"),n(8),i(),t(9,"td"),n(10),i(),t(11,"td",27)(12,"span",35),n(13),i()(),v(14,st,3,4,"td",29)(15,dt,2,1,"td",30),i()),r&2){let s=o.$implicit,d=y(2);l(2),c("routerLink",J(14,it))("queryParams",F(15,nt,s.ID)),l(),V(" ",E(4,11,s.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),p(s.MarketTypeString),l(2),p(s.POSActionTypeString),l(2),p(s.Number),l(2),we(s.ResponseCode===200||s.ResponseCode===202?"bg-success":"bg-warning"),l(),V(" ",s.ResponseCode," "),l(),c("ngIf",d.responseBodyWarningVisible),l(),c("ngIf",d.responseBodyWarningVisible)}}function pt(r,o){if(r&1){let s=N();q(0),t(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),n(6,"Date"),i(),t(7,"th"),n(8,"Channel"),i(),t(9,"th"),n(10,"Actions"),i(),t(11,"th"),n(12,"Number"),i(),t(13,"th",27)(14,"span",28),n(15," Response Code "),i()(),v(16,at,3,0,"th",29)(17,lt,3,0,"th",30),i()(),t(18,"tbody"),v(19,mt,16,17,"tr",31),i()(),t(20,"mat-paginator",32),I("page",function(a){g(s);let e=y();return h(e.changePage(a))}),i()(),G()}if(r&2){let s=y();l(16),c("ngIf",s.responseBodyWarningVisible),l(),c("ngIf",s.responseBodyWarningVisible),l(2),c("ngForOf",s.Result),l(),c("length",s.paginationTotal)("pageSize",s.paginationPageSize)("pageIndex",(s.filter==null?null:s.filter.PageNumber)==0?0:(s.filter==null?null:s.filter.PageNumber)-1)}}function ct(r,o){r&1&&(t(0,"div",37),P(1,"app-empty-state"),i())}var He=(()=>{let o=class o{constructor(d,a,e,u){this.http=d,this._RawLogService=a,this.route=e,this.authService=u,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(d=>{this.responseCode=d.responseCode,this.responseCode!=null?this.Load(d):this.Load()})}Load(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("/api/Orders/Get",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let u={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(u)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};o.\u0275fac=function(a){return new(a||o)(f(M),f($),f(A),f(de))},o.\u0275cmp=w({type:o,selectors:[["app-order"]],decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[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"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let u=N();t(0,"mainpanel",1),b("textChange",function(m){return g(u),S(e.Number,m)||(e.Number=m),h(m)}),I("onSubmit",function(m){return g(u),h(e.Get(m))}),t(1,"filters")(2,"div")(3,"label",2),n(4,"Channel"),i(),t(5,"ng-select",3),b("ngModelChange",function(m){return g(u),S(e.filter.ChannelID,m)||(e.filter.ChannelID=m),h(m)}),v(6,ot,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",2),n(9,"Action"),i(),t(10,"ng-select",6),b("ngModelChange",function(m){return g(u),S(e.filter.ActionType,m)||(e.filter.ActionType=m),h(m)}),i()(),t(11,"div",5)(12,"label",7),n(13,"From/To"),i(),t(14,"div",8)(15,"datepicker",9),b("dateChange",function(m){return g(u),S(e.filter.From,m)||(e.filter.From=m),h(m)}),i()(),t(16,"div")(17,"datepicker",10),b("dateChange",function(m){return g(u),S(e.filter.To,m)||(e.filter.To=m),h(m)}),i()()(),t(18,"div",5)(19,"label",11),n(20,"Response Code"),i(),t(21,"input",12),b("ngModelChange",function(m){return g(u),S(e.filter.StatusCode,m)||(e.filter.StatusCode=m),h(m)}),i()(),t(22,"div",5)(23,"label",11),n(24,"Response Body Warning"),i(),t(25,"input",13),b("ngModelChange",function(m){return g(u),S(e.filter.responseBodyWarning,m)||(e.filter.responseBodyWarning=m),h(m)}),i(),t(26,"datalist",14),P(27,"option",15),i()(),t(28,"div",5)(29,"label",11),n(30,"Page Number"),i(),t(31,"input",16),b("ngModelChange",function(m){return g(u),S(e.filter.PageNumber,m)||(e.filter.PageNumber=m),h(m)}),i()(),t(32,"div",5)(33,"label",11),n(34,"Page Size"),i(),t(35,"input",17),b("ngModelChange",function(m){return g(u),S(e.filter.RowCount,m)||(e.filter.RowCount=m),h(m)}),i()()(),t(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),v(40,pt,21,6,"ng-container",21)(41,ct,2,0,"ng-template",null,0,Y),i()()()()()}if(a&2){let u=U(42);C("text",e.Number),l(5),c("clearable",!0)("items",e.channelOptions),C("ngModel",e.filter.ChannelID),l(5),c("clearable",!0)("items",e.ActionTypeList),C("ngModel",e.filter.ActionType),l(5),C("date",e.filter.From),l(2),C("date",e.filter.To),l(4),C("ngModel",e.filter.StatusCode),l(4),C("ngModel",e.filter.responseBodyWarning),l(6),C("ngModel",e.filter.PageNumber),l(4),C("ngModel",e.filter.RowCount),l(5),c("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",u)}},dependencies:[ge,K,T,Te,De,oe,se,ae,le,L,R,Q,ce,me,pe,X,Z,Pe,D]});let r=o;return r})();var ut=r=>({"bg-gradient-warning":r}),gt=()=>["/menu/log/inventory/sync-inventory/detail"],ht=r=>({ID:r});function ft(r,o){if(r&1&&(t(0,"span",19),P(1,"img",20),i(),n(2)),r&2){let s=o.item;l(),c("src",s.Img,z)("alt",s.Name),l(),V(" ",s.Name," ")}}function vt(r,o){if(r&1&&(t(0,"tr",26)(1,"td")(2,"a",27),n(3),_(4,"date"),i()(),t(5,"td"),n(6),i(),t(7,"td"),n(8),i(),t(9,"td"),n(10),i(),t(11,"td"),n(12),i()()),r&2){let s=o.$implicit;c("ngClass",F(11,ut,s.ResponseCode==400)),l(2),c("routerLink",J(13,gt))("queryParams",F(14,ht,s.ID)),l(),V(" ",E(4,8,s.Created,"dd MMM yyyy HH:mm")," "),l(3),p(s.channelName),l(2),p(s.Sku),l(2),p(s.Stock),l(2),p(s.ResponseCode)}}function yt(r,o){if(r&1){let s=N();q(0),t(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),n(6,"Created"),i(),t(7,"th"),n(8,"Channel"),i(),t(9,"th"),n(10,"SKU"),i(),t(11,"th"),n(12,"Stock"),i(),t(13,"th"),n(14,"Response code"),i()()(),t(15,"tbody"),v(16,vt,13,16,"tr",24),i()(),t(17,"mat-paginator",25),I("page",function(a){g(s);let e=y();return h(e.changePage(a))}),i()(),G()}if(r&2){let s=y();l(16),c("ngForOf",s.Result),l(),c("length",s.paginationTotal)("pageSize",s.paginationPageSize)("pageIndex",(s.filter==null?null:s.filter.PageNumber)==0?0:(s.filter==null?null:s.filter.PageNumber)-1)}}function _t(r,o){r&1&&(t(0,"div",28),P(1,"app-empty-state"),i())}var ze=(()=>{let o=class o{constructor(d,a,e){this.http=d,this._RawLogService=a,this.authService=e,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(d=>{this.filter=d.Filter,this.ActionTypeList=d.Options.ActionTypeList,this.Get()})}Get(d){d!=null&&(this.filter.Sku=d),this.http.post("api/Inventory/GetLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let u={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(u)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};o.\u0275fac=function(a){return new(a||o)(f(M),f($),f(de))},o.\u0275cmp=w({type:o,selectors:[["app-inventory-log"]],decls:33,vars:10,consts:[["EMPTY_STATE",""],["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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let u=N();t(0,"mainpanel",1),b("textChange",function(m){return g(u),S(e.filter.Sku,m)||(e.filter.Sku=m),h(m)}),I("onSubmit",function(m){return g(u),h(e.Get(m))}),t(1,"actions")(2,"a",2),n(3," Order Inventory Sync Job "),i()(),t(4,"filters")(5,"div",3)(6,"div")(7,"label",4),n(8,"Channel"),i(),t(9,"ng-select",5),b("ngModelChange",function(m){return g(u),S(e.filter.ChannelID,m)||(e.filter.ChannelID=m),h(m)}),v(10,ft,3,3,"ng-template",6),i()(),t(11,"div",7)(12,"label",8),n(13,"From/To"),i(),t(14,"div",9)(15,"datepicker",10),b("dateChange",function(m){return g(u),S(e.filter.From,m)||(e.filter.From=m),h(m)}),i()(),t(16,"div")(17,"datepicker",11),b("dateChange",function(m){return g(u),S(e.filter.To,m)||(e.filter.To=m),h(m)}),i()()(),t(18,"div",7)(19,"label",12),n(20,"Page Number"),i(),t(21,"input",13),b("ngModelChange",function(m){return g(u),S(e.filter.PageNumber,m)||(e.filter.PageNumber=m),h(m)}),i()(),t(22,"div",7)(23,"label",12),n(24,"Page Size"),i(),t(25,"input",14),b("ngModelChange",function(m){return g(u),S(e.filter.RowCount,m)||(e.filter.RowCount=m),h(m)}),i()()()(),t(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),v(30,yt,18,4,"ng-container",18)(31,_t,2,0,"ng-template",null,0,Y),i()()()()()}if(a&2){let u=U(32);C("text",e.filter.Sku),l(9),c("clearable",!0)("items",e.channelOptions),C("ngModel",e.filter.ChannelID),l(6),C("date",e.filter.From),l(2),C("date",e.filter.To),l(4),C("ngModel",e.filter.PageNumber),l(4),C("ngModel",e.filter.RowCount),l(5),c("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",u)}},dependencies:[ge,K,T,oe,se,ae,le,L,R,Q,ce,me,pe,X,Z,D]});let r=o;return r})();var Ct=()=>["/menu/log/rawlog/detail"],St=r=>({ID:r});function bt(r,o){if(r&1&&(t(0,"span",17),P(1,"img",18),i(),n(2)),r&2){let s=o.item;l(),c("src",s.Img,z)("alt",s.Name),l(),V(" ",s.Name," ")}}function xt(r,o){if(r&1&&(t(0,"tr")(1,"td")(2,"a",25),n(3),_(4,"date"),i()(),t(5,"td"),n(6),i(),t(7,"td"),n(8),i(),t(9,"td"),n(10),i()()),r&2){let s=o.$implicit;l(2),c("routerLink",J(9,Ct))("queryParams",F(10,St,s.id)),l(),V(" ",E(4,6,s.Created,"dd MMM yyyy HH:mm:ss")," "),l(3),p(s.type),l(2),p(s.number),l(2),p(s.message)}}function wt(r,o){if(r&1){let s=N();q(0),t(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),n(6,"Date"),i(),t(7,"th"),n(8,"Type"),i(),t(9,"th"),n(10,"Number"),i(),t(11,"th"),n(12,"Message"),i()()(),t(13,"tbody"),v(14,xt,11,12,"tr",23),i()(),t(15,"mat-paginator",24),I("page",function(a){g(s);let e=y();return h(e.changePage(a))}),i()(),G()}if(r&2){let s=y();l(14),c("ngForOf",s.Result),l(),c("length",s.paginationTotal)("pageSize",s.paginationPageSize)("pageIndex",(s.filter==null?null:s.filter.PageNumber)==0?0:(s.filter==null?null:s.filter.PageNumber)-1)}}function It(r,o){r&1&&(t(0,"div",26),P(1,"app-empty-state"),i())}var Ue=(()=>{let o=class o{constructor(d,a,e){this.http=d,this._RawLogService=a,this.authService=e,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(d={}){this.http.post("/api/OrdersLoader/Get",d).subscribe(a=>{this.filter=a.Filter,this.ActionTypeList=a.Options.ActionTypeList,this.Get()})}Get(d){this.filter.Number=d,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(a=>{this._RawLogService.Data=a.hits,this.Result=Array();for(let e of a.hits){let u={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(u)}this.paginationTotal=a.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(d){this.filter.PageNumber=d.pageIndex+1,this.Get()}};o.\u0275fac=function(a){return new(a||o)(f(M),f($),f(de))},o.\u0275cmp=w({type:o,selectors:[["app-raw-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[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"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1){let u=N();t(0,"mainpanel",1),b("textChange",function(m){return g(u),S(e.filter.Number,m)||(e.filter.Number=m),h(m)}),I("onSubmit",function(m){return g(u),h(e.Get(m))}),t(1,"filters")(2,"div")(3,"label",2),n(4,"Channel"),i(),t(5,"ng-select",3),b("ngModelChange",function(m){return g(u),S(e.filter.ChannelID,m)||(e.filter.ChannelID=m),h(m)}),v(6,bt,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",6),n(9,"From/To"),i(),t(10,"div",7)(11,"datepicker",8),b("dateChange",function(m){return g(u),S(e.filter.From,m)||(e.filter.From=m),h(m)}),i()(),t(12,"div")(13,"datepicker",9),b("dateChange",function(m){return g(u),S(e.filter.To,m)||(e.filter.To=m),h(m)}),i()()(),t(14,"div",5)(15,"label",10),n(16,"Page Number"),i(),t(17,"input",11),b("ngModelChange",function(m){return g(u),S(e.filter.PageNumber,m)||(e.filter.PageNumber=m),h(m)}),i()(),t(18,"div",5)(19,"label",10),n(20,"Page Size"),i(),t(21,"input",12),b("ngModelChange",function(m){return g(u),S(e.filter.RowCount,m)||(e.filter.RowCount=m),h(m)}),i()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),v(26,wt,16,4,"ng-container",16)(27,It,2,0,"ng-template",null,0,Y),i()()()()()}if(a&2){let u=U(28);C("text",e.filter.Number),l(5),c("clearable",!0)("items",e.channelOptions),C("ngModel",e.filter.ChannelID),l(6),C("date",e.filter.From),l(2),C("date",e.filter.To),l(4),C("ngModel",e.filter.PageNumber),l(4),C("ngModel",e.filter.RowCount),l(5),c("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",u)}},dependencies:[K,T,oe,se,ae,le,L,R,Q,ce,me,pe,X,Z,D]});let r=o;return r})();function Et(r,o){if(r&1&&(t(0,"div",9)(1,"div",10)(2,"label"),n(3,"Process Code"),i(),t(4,"div")(5,"span"),n(6),i()()()()),r&2){let s=y();l(6),p(s.ProcessedCode)}}function Tt(r,o){if(r&1){let s=N();t(0,"a",16),I("click",function(){g(s);let a=y();return h(a.Retry())}),n(1,"Retry"),i()}}var Je=(()=>{let o=class o{constructor(d,a){this.route=d,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var d={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",d).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var d={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",d).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=W.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=W.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}};o.\u0275fac=function(a){return new(a||o)(f(A),f(M))},o.\u0275cmp=w({type:o,selectors:[["app-raw-detail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),n(11,"General"),i()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),n(17,"Date"),i(),t(18,"div")(19,"span"),n(20),_(21,"date"),i()()()(),t(22,"div",9)(23,"div",10)(24,"label"),n(25,"Number"),i(),t(26,"div")(27,"span"),n(28),i()()()(),t(29,"div",9)(30,"div",10)(31,"label"),n(32,"Type"),i(),t(33,"div")(34,"span"),n(35),i()()()(),t(36,"div",9)(37,"div",10)(38,"label"),n(39,"Response Code"),i(),t(40,"div")(41,"span"),n(42),i()()()(),t(43,"div",9)(44,"div",10)(45,"label"),n(46,"ShopID"),i(),t(47,"div")(48,"span"),n(49),i()()()(),v(50,Et,7,1,"div",11),t(51,"div",9)(52,"div",10)(53,"label"),n(54,"Action"),i(),t(55,"div")(56,"span"),n(57),i()()()()()()()()(),t(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),n(63,"Request"),i()(),t(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),n(68),_(69,"json"),i()()(),t(70,"actions",14),v(71,Tt,2,0,"a",15),i()()()(),t(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),n(76,"Response"),i()(),t(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),n(81),_(82,"json"),i()()()()()()()()()()),a&2&&(c("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),p(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),p(e.Number),l(7),p(e.MarketTypeString),l(7),p(e.ResponseCode),l(7),p(e.shopId),l(),c("ngIf",e.ProcessedCode!=null),l(7),p(e.POSActionTypeString),l(11),p(O(69,17,e.request)),l(3),c("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),p(O(82,19,e.response)))},dependencies:[T,L,R,j,D]});let r=o;return r})();function Dt(r,o){if(r&1&&(t(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),n(4,"General"),i()(),t(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),n(10,"Date"),i(),t(11,"div")(12,"span"),n(13),_(14,"date"),i()()()(),t(15,"div",6)(16,"div",12)(17,"label"),n(18,"SKU"),i(),t(19,"div")(20,"span"),n(21),i()()()(),t(22,"div",6)(23,"div",12)(24,"label"),n(25,"Channel"),i(),t(26,"div")(27,"span"),n(28),i()()()(),t(29,"div",6)(30,"div",12)(31,"label"),n(32,"Response Code"),i(),t(33,"div")(34,"span"),n(35),i()()()()()()()()),r&2){let s=y();l(13),p(E(14,4,s.data.Created,"dd MMM yyyy")),l(8),p(s.data.Sku),l(7),p(s.data.ChannelName),l(7),p(s.data.ResponseCode)}}var Ye=(()=>{let o=class o{constructor(d,a,e){this.route=d,this.http=a,this._RawLogService=e,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(u=>{this.ID=u.ID,this.Load()})}ngOnInit(){}Load(){var d={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",d).subscribe(a=>{this.data.Created=a.hits[0]._source["@timestamp_received"],this.data.Sku=a.hits[0]._source.log.sku,this.data.ChannelName=a.hits[0]._source.log.channelName,this.data.ResponseCode=a.hits[0]._source.log.responseCode,this.request=W.IsNotEmpty(a.hits[0]?._source.log?.request)?JSON.parse(a.hits[0]?._source?.log?.request):"",this.response=a.hits[0]._source.log.response})}};o.\u0275fac=function(a){return new(a||o)(f(A),f(M),f($))},o.\u0275cmp=w({type:o,selectors:[["app-inventory-detail"]],decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(a,e){a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3),v(7,Dt,36,7,"div",4),i(),t(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),n(13,"Request"),i()(),t(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),n(18),_(19,"json"),i()()()()()(),t(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),n(24,"Response"),i()(),t(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),n(29),i()()()()()()()()()()),a&2&&(c("hideSearchBox",!0)("hideSearchDropdown",!0),l(7),c("ngIf",e.data),l(11),p(O(19,5,e.request)),l(11),p(e.response))},dependencies:[T,L,R,j,D]});let r=o;return r})();function Mt(r,o){if(r&1&&(t(0,"div",9)(1,"div",10)(2,"label"),n(3,"Process Code"),i(),t(4,"div")(5,"span"),n(6),i()()()()),r&2){let s=y();l(6),p(s.ProcessedCode)}}function Rt(r,o){if(r&1){let s=N();t(0,"a",16),I("click",function(){g(s);let a=y();return h(a.Retry())}),n(1,"Retry"),i()}}var Ke=(()=>{let o=class o{constructor(d,a){this.route=d,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var d={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",d).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var d={ID:this.ID};this.http.post("/api/Orders/GetDetailChannelWebhook",d).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=W.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=W.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}};o.\u0275fac=function(a){return new(a||o)(f(A),f(M))},o.\u0275cmp=w({type:o,selectors:[["app-orderdetail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),n(11,"General"),i()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),n(17,"Date"),i(),t(18,"div")(19,"span"),n(20),_(21,"date"),i()()()(),t(22,"div",9)(23,"div",10)(24,"label"),n(25,"Number"),i(),t(26,"div")(27,"span"),n(28),i()()()(),t(29,"div",9)(30,"div",10)(31,"label"),n(32,"Type"),i(),t(33,"div")(34,"span"),n(35),i()()()(),t(36,"div",9)(37,"div",10)(38,"label"),n(39,"Response Code"),i(),t(40,"div")(41,"span"),n(42),i()()()(),t(43,"div",9)(44,"div",10)(45,"label"),n(46,"ShopID"),i(),t(47,"div")(48,"span"),n(49),i()()()(),v(50,Mt,7,1,"div",11),t(51,"div",9)(52,"div",10)(53,"label"),n(54,"Action"),i(),t(55,"div")(56,"span"),n(57),i()()()()()()()()(),t(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),n(63,"Request"),i()(),t(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),n(68),_(69,"json"),i()()(),t(70,"actions",14),v(71,Rt,2,0,"a",15),i()()()(),t(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),n(76,"Response"),i()(),t(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),n(81),_(82,"json"),i()()()()()()()()()()),a&2&&(c("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),p(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),p(e.Number),l(7),p(e.MarketTypeString),l(7),p(e.ResponseCode),l(7),p(e.shopId),l(),c("ngIf",e.ProcessedCode!=null),l(7),p(e.POSActionTypeString),l(11),p(O(69,17,e.request)),l(3),c("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),p(O(82,19,e.response)))},dependencies:[T,L,R,j,D]});let r=o;return r})();var Nt=()=>["/menu/log/exception/detail"],Pt=r=>({ID:r});function Lt(r,o){if(r&1&&(t(0,"tr")(1,"td",12),P(2,"img",13),i(),t(3,"td"),n(4),_(5,"date"),i(),t(6,"td")(7,"a",14),n(8),i()(),t(9,"td")(10,"div",15),n(11),i(),t(12,"div"),n(13),i()()()),r&2){let s=o.$implicit;l(2),c("src",s.logo,z),l(2),p(E(5,7,s.date,"dd-MM-yyyy hh:mm:ss")),l(3),c("routerLink",J(10,Nt))("queryParams",F(11,Pt,s.id)),l(),V(" ",s.number," "),l(3),p(s.message),l(2),p(s.stackTrace)}}function Ot(r,o){if(r&1){let s=N();q(0),t(1,"mat-paginator",16),I("page",function(a){g(s);let e=y(2);return h(e.onPaginationChange(a))}),i(),G()}if(r&2){let s=y(2);l(),c("length",s.pageTotal)("pageSize",s.pageSize)("pageIndex",(s.filter==null?null:s.filter.PageNumber)==0?0:(s.filter==null?null:s.filter.PageNumber)-1)}}function kt(r,o){if(r&1&&(q(0),t(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),n(6,"Channel"),i(),t(7,"th",9),n(8,"Date"),i(),t(9,"th"),n(10,"Number"),i(),t(11,"th"),n(12,"Exception"),i()()(),t(13,"tbody"),v(14,Lt,14,13,"tr",10),i()(),v(15,Ot,2,3,"ng-container",11),i(),G()),r&2){let s=y();l(14),c("ngForOf",s.exceptions),l(),c("ngIf",(s.exceptions==null?null:s.exceptions.length)>0)}}function Vt(r,o){r&1&&(t(0,"div",17),P(1,"app-empty-state"),i())}var Ze=(()=>{let o=class o{constructor(d){this.http=d,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(d=>{this.exceptions=d.hits.map(a=>({id:a._id,logo:W.getChannelLogoByName(a._source.error?.Type),number:a._source.error.number,date:a._source["@timestamp_received"],stackTrace:a._source.error.stackTrace,message:a._source.message,requestJSON:a._source?.error?.requestJSON})),this.pageTotal=d.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getData()}};o.\u0275fac=function(a){return new(a||o)(f(M))},o.\u0275cmp=w({type:o,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(a,e){if(a&1&&(t(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),v(5,kt,16,2,"ng-container",5)(6,Vt,2,0,"ng-template",null,0,Y),i()()()()()),a&2){let u=U(7);l(5),c("ngIf",e.exceptions.length>0)("ngIfElse",u)}},dependencies:[K,T,L,R,Q,Z,D]});let r=o;return r})();var Qe=(()=>{let o=class o{constructor(d){this.httpService=d}getExceptionDetail(d){return this.httpService.post("/api/Orders/GetDetailException",{ID:d}).pipe(Se(e=>e?.hits[0]?._source))}};o.\u0275fac=function(a){return new(a||o)(ye(M))},o.\u0275prov=ue({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();function Bt(r,o){if(r&1&&(t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),n(6,"General"),i()(),t(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),n(12,"Date"),i(),t(13,"div")(14,"span"),n(15),_(16,"date"),i()()()(),t(17,"div",9)(18,"div",10)(19,"label"),n(20,"Number"),i(),t(21,"div")(22,"span"),n(23),i()()()(),t(24,"div",9)(25,"div",10)(26,"label"),n(27,"Type"),i(),t(28,"div")(29,"span"),n(30),i()()()(),t(31,"div",9)(32,"div",10)(33,"label"),n(34,"ShopID"),i(),t(35,"div")(36,"span"),n(37),i()()()()()()()()(),t(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),n(43,"Request"),i()(),t(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),n(48),_(49,"json"),i()()()()()(),t(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),n(54,"Exception"),i()(),t(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),n(59),i(),t(60,"pre"),n(61),i()()()()()()()()),r&2){let s=o.ngIf;l(15),p(E(16,7,s["@timestamp"],"dd MMM yyyy HH:mm:ss")),l(8),p(s==null||s.error==null?null:s.error.number),l(7),p(s==null||s.error==null?null:s.error.Type),l(7),p(s==null?null:s.shopId),l(11),p(O(49,10,s==null||s.error==null?null:s.error.requestJSON)),l(11),p(s==null?null:s.message),l(2),p(s==null||s.error==null?null:s.error.stackTrace)}}var Xe=(()=>{let o=class o{constructor(d,a){this.activatedRoute=d,this.exceptionService=a,this.invoiceNumber=""}ngOnInit(){let d=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(d?.ID)}getExceptionDetail(d){this.exceptionDetail$=this.exceptionService.getExceptionDetail(d).pipe(xe(a=>{this.invoiceNumber=a?.error?.number}),be(1))}};o.\u0275fac=function(a){return new(a||o)(f(A),f(Qe))},o.\u0275cmp=w({type:o,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(a,e){a&1&&(t(0,"mainpanel",0)(1,"content"),v(2,Bt,62,12,"div",1),_(3,"async"),i()()),a&2&&(c("headerTitle","Order #"+e.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),c("ngIf",O(3,4,e.exceptionDetail$)))},dependencies:[T,R,Ie,j,D]});let r=o;return r})();function At(r,o){if(r&1&&(t(0,"div",9)(1,"div",10)(2,"label"),n(3,"Process Code"),i(),t(4,"div")(5,"span"),n(6),i()()()()),r&2){let s=y();l(6),p(s.ProcessedCode)}}function Ft(r,o){if(r&1){let s=N();t(0,"a",16),I("click",function(){g(s);let a=y();return h(a.Retry())}),n(1,"Retry"),i()}}var $e=(()=>{let o=class o{constructor(d,a){this.route=d,this.http=a,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var d={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",d).subscribe(a=>{alert(JSON.stringify(a))})}Load(){var d={ID:this.ID};this.http.post("/api/Orders/GetDetailSyncOrder",d).subscribe(a=>{for(let e of a.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=W.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=W.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}};o.\u0275fac=function(a){return new(a||o)(f(A),f(M))},o.\u0275cmp=w({type:o,selectors:[["app-orderdetail-user"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(a,e){a&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),n(11,"General"),i()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),n(17,"Date"),i(),t(18,"div")(19,"span"),n(20),_(21,"date"),i()()()(),t(22,"div",9)(23,"div",10)(24,"label"),n(25,"Number"),i(),t(26,"div")(27,"span"),n(28),i()()()(),t(29,"div",9)(30,"div",10)(31,"label"),n(32,"Type"),i(),t(33,"div")(34,"span"),n(35),i()()()(),t(36,"div",9)(37,"div",10)(38,"label"),n(39,"Response Code"),i(),t(40,"div")(41,"span"),n(42),i()()()(),t(43,"div",9)(44,"div",10)(45,"label"),n(46,"ShopID"),i(),t(47,"div")(48,"span"),n(49),i()()()(),v(50,At,7,1,"div",11),t(51,"div",9)(52,"div",10)(53,"label"),n(54,"Action"),i(),t(55,"div")(56,"span"),n(57),i()()()()()()()()(),t(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),n(63,"Request"),i()(),t(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),n(68),_(69,"json"),i()()(),t(70,"actions",14),v(71,Ft,2,0,"a",15),i()()()(),t(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),n(76,"Response"),i()(),t(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),n(81),_(82,"json"),i()()()()()()()()()()),a&2&&(c("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),l(20),p(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),l(8),p(e.Number),l(7),p(e.MarketTypeString),l(7),p(e.ResponseCode),l(7),p(e.shopId),l(),c("ngIf",e.ProcessedCode!=null),l(7),p(e.POSActionTypeString),l(11),p(O(69,17,e.request)),l(3),c("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),l(10),p(O(82,19,e.response)))},dependencies:[T,L,R,j,D]});let r=o;return r})();var jt=[{path:"",component:Ae,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:He,canActivate:[B],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:ze,canActivate:[B],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:Ue,canActivate:[B],data:{title:"Raw Log"}},{path:"rawlog/detail",component:Je,canActivate:[B],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:Ye,canActivate:[B],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:Ke,canActivate:[B],data:{title:"Order Details"}},{path:"order/detail-user",component:$e,canActivate:[B],data:{title:"Order User Details"}},{path:"exception",component:Ze,canActivate:[B],data:{title:"Exception Log"}},{path:"exception/detail",component:Xe,canActivate:[B],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-QGVD6MF4.js").then(r=>r.InventoryAsyncLogComponent),canActivate:[B],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-KAEUZC2Y.js").then(r=>r.InventoryAsyncDetailComponent),canActivate:[B],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-JYYVBBNN.js").then(r=>r.ChannelLogComponent)},canActivate:[B],data:{title:"Authorization Log"}}]}],et=(()=>{let o=class o{};o.\u0275fac=function(a){return new(a||o)},o.\u0275mod=re({type:o}),o.\u0275inj=ne({imports:[he,fe.forChild(jt)]});let r=o;return r})();var tt=(()=>{let o=class o{};o.\u0275fac=function(a){return new(a||o)},o.\u0275mod=re({type:o}),o.\u0275inj=ne({});let r=o;return r})();var on=(()=>{let o=class o{};o.\u0275fac=function(a){return new(a||o)},o.\u0275mod=re({type:o}),o.\u0275inj=ne({imports:[he,Me,Re,et,fe,Oe,tt,We,Ne,Ve,X,Le,Be]});let r=o;return r})();export{on as LogsModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$b as m,Bd as T,Cd as I,Da as P,Ea as C,Eb as _,Gb as p,Gc as u,Hc as d,Ma as v,Pa as s,Sb as a,Tb as l,Ub as c,Yb as w,bc as g,jb as n,nc as o,oc as x,pc as y,qc as k,ta as b,vc as S,vd as N}from"./chunk-PQDPS2ID.js";function E(t,i){if(t&1){let f=w();a(0,"span",10),m("click",function(){P(f);let r=g();return C(r.onShowTotal())}),a(1,"i",11),o(2,"?"),l()()}}function V(t,i){if(t&1&&(a(0,"span"),o(1),u(2,"number"),l()),t&2){let f=g();n(),x(d(2,1,f.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.nextButtonAlwaysVisible=v(!1),this.next=new s,this.filterChange=new s,this.previous=new s,this.total=new s,this.hasClicked=!1}onShowTotal(){this.total.emit()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.filterChange.emit(this.filter),this.previous.emit()}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.filterChange.emit(this.filter),this.next.emit()}};i.\u0275fac=function(r){return new(r||i)},i.\u0275cmp=b({type:i,selectors:[["app-custom-paginator"]],inputs:{nextButtonAlwaysVisible:[1,"nextButtonAlwaysVisible"],filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{next:"next",filterChange:"filterChange",previous:"previous",total:"total"},standalone:!0,features:[S],decls:16,vars:11,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(r,e){r&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),o(3),u(4,"number"),u(5,"number"),_(6,E,3,0,"span",3)(7,V,3,3,"span",4),o(8),l()(),a(9,"div",5)(10,"a",6),m("click",function(){return e.onPreviousPage()}),c(11,"i",7),o(12," Prev"),l(),a(13,"a",8),m("click",function(){return e.onNextPage()}),c(14,"i",9),o(15," Next"),l()()()),r&2&&(n(3),k(" Showing ",d(4,7,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",d(5,9,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),n(3),p("ngIf",!e.hasClicked),n(),p("ngIf",e.hasClicked),n(),y(" records ~ ",e.filter.PageNumber," Page "),n(2),p("hidden",e.filter.PageNumber==1),n(3),p("hidden",(e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize)&&!e.nextButtonAlwaysVisible()))},dependencies:[I,N,T]});let t=i;return t})();export{O as a};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{b as S,e as g}from"./chunk-E3NPUJ23.js";import{c as o}from"./chunk-47DMD3UG.js";import{J as h,ea as i,ja as f,oa as d,r as c}from"./chunk-PQDPS2ID.js";var y=(()=>{let l=class l{constructor(e,t){this.httpService=e,this.toastrService=t}loader(e=o.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=o.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(a=>t.findIndex(s=>a.TypeID==s)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}detachProduct(e){return this.httpService.post("/api/product/Detach",e)}uploadSingleProduct(e,t){let a={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",a).pipe(i(s=>{this.showToastrSuccessUploadSingle(s,e[0])}),h(s=>(this.showToastErrorUploadSingle(s,e[0]),c(()=>new Error(s)))))}uploadMultipleProduct(e,t){let a={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",a).pipe(i(s=>{this.showToastrUploadMultiple(s.Message)}),h(s=>(this.showToastrUploadMultiple(s.error?.Message),c(()=>new Error(s)))))}uploadNotInChannel(e,t){let a={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",a).pipe(i(s=>{this.showToastrUploadMultiple(s)}),h(s=>(this.showToastrUploadMultiple(s.error?.Message),c(()=>new Error(s)))))}scanSingle(e,t){let a={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",a)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,t,a,s=!1){let n={ID:e,ScanFull:t,UpdatedProduct:a,Async:s};return this.httpService.post("/api/product/ScanOptimized",n)}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return(e.Variants||[]).map(s=>s.Code)}downloadMultipleProduct(e){let t=e.map(a=>({ChannelItemID:a.ChannelItemID,ChannelID:a.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(i(a=>{this.toastrService.success(`${a.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(i(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(a=>{a.Variants.forEach(s=>{t=[...t,s.Code]})}),t}filterUnselectedChannel(e,t){let a=[];e.forEach(n=>{a=[...a,...n.Channel]});let s;if(!a||a.length==0)s=t;else{let n=[];s=t.filter(r=>(n=a.filter(p=>p.ChannelID==r.ID),n.length!==e.length))}return s}findChannelById(e,t){return t.find(a=>a.ID==e)}sortChannel(e=[]){return e.sort((t,a)=>t.TypeID<a.TypeID?1:t.TypeID===a.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(a=>{t=[...t,...a.Variants!=null?a.Variants.filter(s=>s.selected):""]}),t}getChannelProduct(e){let t=e.Variants||[],a=[];for(let s of t)if(s.Channel!=null)for(let n of s.Channel)a.filter(r=>r.ChannelID==n.ChannelID).length==0&&a.push(n);return this.sortChannel(a)}successToastrScanAllProduct(e,t,a){let s=e.InChannel?e?.InChannel?.Product:0,n=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,r=o.IsNotEmpty(e.LastUpdate)?o.convertToReadableDate(e.LastUpdate):null;a?this.toastrService.success(`
|
|
2
|
-
${n+s} product updates in ${t.Name} </br>
|
|
3
|
-
(${s} In Channel + ${n} Not In Pos)
|
|
4
|
-
${o.IsNotEmpty(r)?"since "+r:""}
|
|
5
|
-
`,"Scan Complete!",{enableHtml:!0,timeOut:1e4}):this.toastrService.success(`${s} product updates in ${t.Name} </br>
|
|
6
|
-
(${s} In Channel + ${n} Not In Pos)
|
|
7
|
-
${o.IsNotEmpty(r)?"since "+r:""}`,"Scan Complete!",{enableHtml:!0,timeOut:1e4})}checkProductHasScanButton(e,t){let a;return e.map(s=>(s.Channel=this.getChannelProduct(s),a=this.filterUnselectedChannel([s],t),s.hasScan=a.length>0,s))}checkProductHasUploadBtn(e,t){let a;return e.map(s=>(s.Channel=this.getChannelProduct(s),a=this.filterUnselectedChannel([s],t),s.hasUpload=a.length>0,s))}showToastrUploadMultiple(e=[]){let t=[],a=[],s=this.getResponseList(e);if(e.forEach(n=>{typeof n?.Response=="string"?a=[...a,s.length>1?this.setHtmlli(n.Response):this.setHtmlli(n.Response,!1)]:(n?.Response?.Success.forEach(r=>{t=[...t,s.length>1?this.setHtmlli(`Product ${r} was <b>successfully</b> uploaded to ${n.Name}`):this.setHtmlli(`Product ${r} was <b>successfully</b> uploaded to ${n.Name}`,!1)]}),n?.Response.Fail.forEach(r=>{a=[...a,s.length>1?this.setHtmlli(r):this.setHtmlli(r,!1)]}))}),a.length>0&&t.length>0){let n=[...t,...a];this.toastrService.warning(this.concatMessage(n),"Warning!",{enableHtml:!0})}else t.length>0&&a.length==0?this.toastrService.success(this.concatMessage(t),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(a),"Error",{enableHtml:!0})}setHtmlli(e,t=!0){return t?`<li>${e}</li>`:e}getResponseList(e){let t=[];return e.forEach(a=>{typeof a?.Response=="string"?t=[...t,a.Response]:(a?.Response?.Success.forEach(s=>{t=[...t,a.Name]}),a?.Response.Fail.forEach(s=>{t=[...t,s]}))}),t}concatMessage(e=[]){let t="";return e.forEach(a=>{t+=a}),e.length>1?`<ol>${t}</ol>`:t}showToastrSuccessUploadSingle(e,t){let a=e.filter(r=>r.Status==!1),s=e.filter(r=>r.Status==!0),n=this.generateToastrMessage(a,s,t);this.toastrService.success(n.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,t){let a=e?.error?.Message.filter(r=>r.Status==!1),s=e?.error?.Message.filter(r=>r.Status==!0),n=this.generateToastrMessage(a,s,t);n.status=="WARNING"?this.toastrService.warning(n.message,"Warning!",{enableHtml:!0}):this.toastrService.error(n.message,`Error - ${e.status}`,{enableHtml:!0})}generateToastrMessage(e,t,a){let s="",n,r=[...e,...t];if(e.length==0&&t.length>0)n="SUCCESS",s=this.createSuccessResponse(t,a);else if(e.length>0&&t.length==0)n="ERROR",s=this.createErrResponse(e,a);else{n="WARNING";let p=this.createSuccessResponse(t,a),C=this.createErrResponse(e,a);s=`${p} ${C}`}return r.length>1&&(s=`<ol>${s}</ol>`),{status:n,message:s}}createErrResponse(e,t){let a="";return e.length>1?e.forEach((s,n)=>{a+=`<li>${s.Response}</li>`}):e.length==1&&(a+=`${e[0].Response}`),a}createSuccessResponse(e,t){let a="";return e.length>1?e.forEach((s,n)=>{a+=`<li>Product ${t.Name} was <b>successfully</b> uploaded to ${s.Name}</li>`}):e.length==1&&(a+=`Product ${t.Name} was <b>successfully</b> uploaded to ${e[0].Name}`),a}};l.\u0275fac=function(t){return new(t||l)(d(g),d(S))},l.\u0275prov=f({token:l,factory:l.\u0275fac,providedIn:"root"});let u=l;return u})();export{y as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as N}from"./chunk-XR6LJHZU.js";import{a as M}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as ke,c as U}from"./chunk-7XUSMPAA.js";import{a as _e}from"./chunk-BVIRHZTZ.js";import{a as Ee,b as Me}from"./chunk-S2Z3ZGU7.js";import{a as De}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Te}from"./chunk-PD4CUVAW.js";import"./chunk-GCKSYCMI.js";import{a as be}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import{a as Fe}from"./chunk-LUY3WZJE.js";import"./chunk-HCDKYABV.js";import{a as fe,b as xe,d as Se,e as Pe}from"./chunk-CCXKODFV.js";import{j as ue}from"./chunk-GUYZJ4TX.js";import{b as de,e as ge}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Ie,l as we,m as ye,n as ve}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as oe,c as re,h as le,m as ce,o as se,y as pe}from"./chunk-BSN7ZAXG.js";import{c as me,e as he,f as Ce}from"./chunk-47DMD3UG.js";import"./chunk-OVEJFFL6.js";import{$b as u,Bd as E,Cd as ie,Da as _,Ea as m,Eb as h,G as A,Gb as p,Gc as v,Hc as T,Ic as X,Id as ae,Jc as Y,Nb as S,Ob as k,Qb as L,Rb as R,Sb as o,Tb as c,Ub as P,Vb as q,Wb as K,Yb as x,Z as $,bc as r,ea as j,ec as H,gb as D,jb as l,kb as f,mc as J,nc as d,oc as B,pa as z,pc as F,rc as I,sc as w,sd as ee,ta as G,tc as y,uc as Z,vc as Q,vd as te,xc as V,yd as ne}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var O=i=>[i],Ue=i=>({"text-decoration-line-through":i}),Oe=i=>({"bg-gradient-warning":i}),We=i=>({"ms-10":i});function Ae(i,s){if(i&1&&(o(0,"span",10),P(1,"img",11),c(),d(2)),i&2){let t=s.item;l(),p("src",t==null?null:t.Img,D),l(),F(" ",t.Name," ")}}function $e(i,s){if(i&1){let t=x();o(0,"button",16),u("click",function(){_(t);let n=r().ngIf,a=r(2);return m(a.updateStock(n))}),P(1,"i",17),d(2," Update "),c()}}function je(i,s){if(i&1){let t=x();o(0,"actions")(1,"div",12),h(2,$e,3,0,"button",13),o(3,"button",14),u("click",function(){_(t);let n=r(2);return m(n.openExportDialog())}),P(4,"i",15),o(5,"span"),d(6,"Export"),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(2),p("ngIf",e.productService.hasSelectionVariant(t))}}function ze(i,s){if(i&1){let t=x();o(0,"th")(1,"input",32),u("change",function(n){_(t);let a=r().ngIf,g=r(2);return m(g.onSelectAllSKU(n.target.checked,a))}),c()()}}function Ge(i,s){if(i&1){let t=x();o(0,"input",51),y("ngModelChange",function(n){_(t);let a=r(4).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),u("ngModelChange",function(){_(t);let n=r(4).$implicit,a=r(3);return m(a.onCheckboxStateProduct(n))}),c()}if(i&2){let t=r(4).$implicit;I("ngModel",t.selected)}}function qe(i,s){if(i&1&&h(0,Ge,1,1,"ng-template",26),i&2){let t=r(6);p("ngxPermissionsOnly",V(1,O,t.rolePriceEdit))}}function Ke(i,s){if(i&1){let t=x();q(0),o(1,"img",52),u("click",function(n){_(t);let a=r(3).$implicit,g=r(3);return m(g.onZoomImage(n,a==null?null:a.ImageUrl))}),c(),K()}if(i&2){let t=r(3).$implicit;l(),H("src",t.ThumbnailUrl,D)}}function He(i,s){i&1&&P(0,"img",53)}function Je(i,s){if(i&1&&(o(0,"small",50),d(1),c()),i&2){let t=r(3).$implicit;l(),F("(",t.Category,")")}}function Ze(i,s){if(i&1&&(o(0,"td",44)(1,"div",45),h(2,qe,1,3,null,26),o(3,"div",46),h(4,Ke,2,1,"ng-container",47)(5,He,1,0,"ng-template",null,0,Y),c()()(),o(7,"td",48)(8,"span",49),d(9),c(),h(10,Je,2,1,"small",50),c()),i&2){let t=J(6),e=r(2).$implicit;p("rowSpan",e.Variants.length),l(2),S((e.Variants==null?null:e.Variants.length)>1?2:-1),l(),p("ngClass",V(8,We,(e.Variants==null?null:e.Variants.length)<=1)),l(),p("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(3),p("rowSpan",e.Variants.length),l(2),B(e.Name),l(),S(e.Category?10:-1)}}function Qe(i,s){if(i&1){let t=x();o(0,"input",56),y("ngModelChange",function(n){_(t);let a=r(2).$implicit;return w(a.selected,n)||(a.selected=n),m(n)}),c()}if(i&2){let t=r(2).$implicit;I("ngModel",t.selected)}}function Xe(i,s){if(i&1&&(o(0,"td",54),h(1,Qe,1,1,"input",55),c()),i&2){let t=r().$implicit;l(),S(t.UnitPrice>=0?1:-1)}}function Ye(i,s){i&1&&(o(0,"div",36),d(1," Not Found "),c())}function et(i,s){if(i&1&&(o(0,"div"),d(1),v(2,"number"),c()),i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.UnitPrice)," ")}}function tt(i,s){if(i&1&&(o(0,"div",37)(1,"a",40),P(2,"i",57),c()()),i&2){let t=r().$implicit,e=r(4);l(),p("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),D)}}function nt(i,s){if(i&1){let t=x();o(0,"div",58),u("click",function(){_(t);let n=r().$implicit,a=r().$implicit,g=r(2).ngIf,C=r();return m(C.openTableDialog(n,a,g))}),d(1),v(2,"number"),c()}if(i&2){let t=r().$implicit;l(),F(" ",T(2,1,t.Channel[0]==null?null:t.Channel[0].Price)," ")}}function it(i,s){if(i&1){let t=x();o(0,"tr",33),h(1,Ze,11,10),o(2,"td",24),d(3),c(),o(4,"td",27)(5,"span",34),d(6),c()(),h(7,Xe,2,1,"ng-template",26),o(8,"td",27)(9,"div",35),h(10,Ye,2,0,"div",36)(11,et,3,3,"div")(12,tt,3,1,"div",37),c()(),o(13,"td",38)(14,"div",35),h(15,nt,3,3,"div",39),o(16,"div",37)(17,"a",40),P(18,"i",41),c()(),o(19,"div",37)(20,"div",42),u("click",function(){let n=_(t).$implicit,a=r(4);return m(a.refreshPrice(n))}),P(21,"i",43),c()()()()()}if(i&2){let t=s.$implicit,e=s.$index,n=r(4);l(),S(e==0?1:-1),l(2),B(t.Model),l(2),p("matTooltip",t.Discontinued?n.discontinuedVariantMsg:"")("ngClass",V(12,Ue,t.Discontinued)),l(),F(" ",t.Code," "),l(),p("ngxPermissionsOnly",V(14,O,n.rolePriceEdit)),l(3),S((t.Channel[0]==null?null:t.Channel[0].Description)!=null?10:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?11:-1),l(),S((t.Channel[0]==null?null:t.Channel[0].Description)==null?12:-1),l(),p("ngClass",V(16,Oe,t.UnitPrice!=(t.Channel[0]==null?null:t.Channel[0].Price))),l(2),S(t.Channel.length>0?15:-1),l(2),p("href",t.Channel[0]==null?null:t.Channel[0].Url,D)}}function at(i,s){if(i&1&&L(0,it,22,18,"tr",33,k),i&2){let t=s.$implicit;R(t.Variants)}}function ot(i,s){if(i&1){let t=x();o(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),o(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(n){_(t);let a=r(2);return w(a.toggleDifferentInventory,n)||(a.toggleDifferentInventory=n),m(n)}),u("toggleChange",function(){_(t);let n=r(2);return m(n.onToggleDifferentInventory())}),o(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),o(12,"th",24),d(13,"Variant"),c(),o(14,"th",25),d(15,"SKU"),c(),h(16,ze,2,0,"ng-template",26),o(17,"th",27),d(18,"POS"),c(),o(19,"th",27)(20,"div",28),u("click",function(){_(t);let n=r(2);return m(n.openModalFilter())}),P(21,"img",29),o(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),o(25,"tbody"),L(26,at,2,0,null,null,k),c()(),o(28,"infinite-paginator",31),v(29,"async"),u("onNextPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(t);let n=r(2);return m(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(t);let n=r(2);return m(n.infinitePagination.getRowCount(n.searchFilter))}),c()()()()}if(i&2){let t=s.ngIf,e=r(2);l(9),I("ngModel",e.toggleDifferentInventory),l(7),p("ngxPermissionsOnly",V(16,O,e.rolePriceEdit)),l(4),p("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>=20?e.selectedChannel==null?null:e.selectedChannel.Name:""),l(),p("src",e.selectedChannel==null?null:e.selectedChannel.Img,D),l(2),F(" ",X(24,11,e.selectedChannel==null?null:e.selectedChannel.Name,20)," "),l(3),R(t),l(2),p("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",T(29,14,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}}function rt(i,s){if(i&1){let t=x();o(0,"mainpanel",2),y("textChange",function(n){_(t);let a=r();return w(a.searchFilter.text,n)||(a.searchFilter.text=n),m(n)}),u("onSubmit",function(){_(t);let n=r();return m(n.onSearch())}),o(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),o(5,"ng-select",4),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.ChannelID,n)||(a.searchFilter.ChannelID=n),m(n)}),h(6,Ae,3,2,"ng-template",5),c()(),o(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),o(10,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.PageNumber,n)||(a.searchFilter.PageNumber=n),m(n)}),c()(),o(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),o(14,"input",8),y("ngModelChange",function(n){_(t);let a=r();return w(a.searchFilter.RowCount,n)||(a.searchFilter.RowCount=n),m(n)}),c()()(),h(15,je,7,1,"actions",9),v(16,"async"),h(17,ot,30,18,"content",9),v(18,"async"),c()}if(i&2){let t=r();p("headerTitle",t.pageTitle),I("text",t.searchFilter.text),l(5),p("clearable",!1)("items",t.channelOptions),I("ngModel",t.searchFilter.ChannelID),l(5),I("ngModel",t.searchFilter.PageNumber),l(4),I("ngModel",t.searchFilter.RowCount),l(),p("ngIf",T(16,9,t.data$)),l(2),p("ngIf",T(18,11,t.data$))}}var zt=(()=>{let s=class s{constructor(e,n,a,g,C,b,W,Le,Re,Be){this.http=e,this.toastr=n,this.dialog=a,this.productService=g,this.biggerPictureService=C,this.inventoryService=b,this.authService=W,this.mainPanelService=Le,this.exportService=Re,this.decimalPipe=Be,this.infinitePagination=z(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=_e.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe($(1)),this.channelOptions=W.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe(j(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=M.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=M.ALL:this.searchFilter.filterModel=M.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let a=this.productService.selectedVariantProduct(e).map(C=>({ID:C.ID,ChannelID:C.Channel[0].ChannelID,Code:C.Code,Price:C.UnitPrice})),g={ListChannelID:[this.searchFilter.ChannelID],ListPrice:a};this.http.post("/api/Price/UpdateChannel",g).subscribe(C=>{this.onSearch(),this.handlingUpdateStock(C.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,a=e.success_list;this.inventoryService.showToastrUpdateInventory("Price",a,n)}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(a=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,a){let g=JSON.parse(JSON.stringify(e));this.dialog.open(Ne,{data:{Name:n.Name,Variant:g,ChannelID:g?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:g?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(A(b=>me.IsNotEmpty(b))).subscribe(b=>{this.updateItemAfterDialog(b,e)})}updateItemAfterDialog(e,n){let a={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",a).subscribe(g=>{let C=this.productService.findChannelById(a.ID,this.channelOptions),b=a.Price?this.decimalPipe.transform(a.Price):a.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${C.Name} to ${b}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=a.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(a=>(a.Variants=a.Variants.map(g=>(g.selected=e,g)),a))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(Me,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}};s.\u0275fac=function(n){return new(n||s)(f(ge),f(de),f(Ie),f(be),f(Fe),f(N),f(ue),f(we),f(Ee),f(E))},s.\u0275cmp=G({type:s,selectors:[["app-price-single-channel"]],standalone:!0,features:[Z([U,N,ae("https://res.cloudinary.com/"),E]),Q],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,a){n&1&&(h(0,rt,19,13,"mainpanel",1),v(1,"async")),n&2&&p("ngIf",T(1,1,a.loader$))},dependencies:[ie,ee,te,ne,E,ve,ye,Pe,Se,fe,xe,pe,re,se,oe,le,ce,De,ke,Ce,he,Te,Ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0});let i=s;return i})();export{zt as PriceSingleChannelComponent};
|