marketplacepos 5.48.3 → 5.48.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-HCR33US3.js → chunk-2HGLCZCJ.js} +1 -1
- package/Marketplace/{chunk-4JRHCYVO.js → chunk-2PXOGGDS.js} +1 -1
- package/Marketplace/{chunk-YF56YLYK.js → chunk-2WEEVTKZ.js} +1 -1
- package/Marketplace/{chunk-WFXKYFBX.js → chunk-35DCCWTG.js} +1 -1
- package/Marketplace/{chunk-YQWENM2M.js → chunk-3IGKGUHQ.js} +1 -1
- package/Marketplace/{chunk-KNPQ6DPC.js → chunk-3J4WF3UO.js} +1 -1
- package/Marketplace/{chunk-X2RNU4B3.js → chunk-6J3WQHJF.js} +1 -1
- package/Marketplace/{chunk-7CYONN5M.js → chunk-6T3PILHS.js} +1 -1
- package/Marketplace/{chunk-F7JWZJVZ.js → chunk-7NHO7E6W.js} +1 -1
- package/Marketplace/{chunk-77NAUG5Y.js → chunk-AMHOLPZC.js} +1 -1
- package/Marketplace/{chunk-QMC2DZIB.js → chunk-BI2LUCYC.js} +1 -1
- package/Marketplace/{chunk-KOQGQF2L.js → chunk-BY7LPG4A.js} +1 -1
- package/Marketplace/{chunk-QQY7JGZW.js → chunk-CBB3JEV7.js} +1 -1
- package/Marketplace/{chunk-NN6DSN34.js → chunk-DDSVUI6T.js} +2 -2
- package/Marketplace/{chunk-PL2WVYMI.js → chunk-DOVAN3PS.js} +1 -1
- package/Marketplace/{chunk-GWYT3CQM.js → chunk-E3TCC2HT.js} +1 -1
- package/Marketplace/{chunk-4UPWMQJX.js → chunk-E4BL56JJ.js} +1 -1
- package/Marketplace/{chunk-OR34CB7O.js → chunk-ESXTZ7DM.js} +1 -1
- package/Marketplace/{chunk-FQQOS3AF.js → chunk-F6SEXTTP.js} +1 -1
- package/Marketplace/{chunk-F7I7HQGQ.js → chunk-FEQNJY7V.js} +1 -1
- package/Marketplace/{chunk-GFVJVBGH.js → chunk-GEDKSGFP.js} +1 -1
- package/Marketplace/{chunk-YLQKFPMU.js → chunk-HVGTRPJH.js} +1 -1
- package/Marketplace/{chunk-IFP44BTX.js → chunk-I7YNDTEK.js} +1 -1
- package/Marketplace/{chunk-Z5D5R7AO.js → chunk-JTP3ZFNS.js} +1 -1
- package/Marketplace/{chunk-HUZZJ34K.js → chunk-JZL2233L.js} +2 -2
- package/Marketplace/{chunk-5NFLGFHD.js → chunk-K2QHJ7WS.js} +1 -1
- package/Marketplace/{chunk-XMN2RKK3.js → chunk-KWRH5WFZ.js} +1 -1
- package/Marketplace/{chunk-B5AYTAZQ.js → chunk-LA2EIRS6.js} +1 -1
- package/Marketplace/{chunk-IGS6BEII.js → chunk-LVRM4JAP.js} +1 -1
- package/Marketplace/{chunk-YN55P3QH.js → chunk-MAK2RHFD.js} +1 -1
- package/Marketplace/{chunk-X7JNYYQS.js → chunk-MYJY2N6R.js} +1 -1
- package/Marketplace/{chunk-HANPHNZU.js → chunk-OCP5FDSY.js} +1 -1
- package/Marketplace/{chunk-HF4T6G54.js → chunk-PYQPYOIY.js} +1 -1
- package/Marketplace/{chunk-MQRQ3LOB.js → chunk-QFGKR62M.js} +1 -1
- package/Marketplace/{chunk-U6KJZIHD.js → chunk-RXE72I2S.js} +1 -1
- package/Marketplace/{chunk-5QQCKNH2.js → chunk-SETHDR5R.js} +1 -1
- package/Marketplace/{chunk-BNAARI67.js → chunk-TJUIBLFE.js} +1 -1
- package/Marketplace/{chunk-BUY4AAHK.js → chunk-UJ4S2WZV.js} +1 -1
- package/Marketplace/{chunk-6FAJM27Z.js → chunk-UN53SVGE.js} +1 -1
- package/Marketplace/{chunk-DCAYH4J7.js → chunk-UYG2OCBS.js} +1 -1
- package/Marketplace/{chunk-A62IPN6W.js → chunk-VEBP36WX.js} +1 -1
- package/Marketplace/{chunk-PHTDDNER.js → chunk-VKZ2UVXB.js} +1 -1
- package/Marketplace/{chunk-BTSGHYIF.js → chunk-VNI2KCJE.js} +1 -1
- package/Marketplace/{chunk-T7HRAMHR.js → chunk-VX75I7HA.js} +1 -1
- package/Marketplace/{chunk-M2FDHHOH.js → chunk-WD4PA53F.js} +1 -1
- package/Marketplace/{chunk-2XYIINPQ.js → chunk-WZYOXBEP.js} +1 -1
- package/Marketplace/{chunk-SZVJOKAX.js → chunk-XUMLTOVI.js} +1 -1
- package/Marketplace/{chunk-WPKFNEM6.js → chunk-Z2CPXQ24.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-BI4BOJO4.js → main-JXUEQJZZ.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ie,b as re,c as ae,d as le,e as pe,f as se,g as me}from"./chunk-R2XT5M5F.js";import{b as oe}from"./chunk-2F4DTZCZ.js";import{a as Y}from"./chunk-
|
|
1
|
+
import{a as ie,b as re,c as ae,d as le,e as pe,f as se,g as me}from"./chunk-R2XT5M5F.js";import{b as oe}from"./chunk-2F4DTZCZ.js";import{a as Y}from"./chunk-UJ4S2WZV.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import{a as Z,b as ee}from"./chunk-A7PUMY67.js";import"./chunk-N5AE5WMQ.js";import{i as X}from"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{e as Q}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as te,n as ne}from"./chunk-EDEZ3JLR.js";import{A as J,c as z,h as K,m as q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as j,G as $,I as G,g as H,m as W}from"./chunk-LNJUGHOX.js";import{$b as x,$c as T,Gb as h,Hb as L,Hc as D,Mb as v,Mc as p,Nc as R,Oc as O,Qc as P,Rc as F,Sc as V,Zc as A,bc as w,dc as g,ec as S,fc as C,gc as m,hc as i,ic as o,jc as c,kb as N,ma as M,na as U,nb as s,qc as _,ra as y,sb as B,td as E,vc as b,xa as u,xc as d,ya as f}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var he=e=>[e];function ge(e,t){if(e&1&&(i(0,"a",8),p(1),o()),e&2){let a=t.$implicit;m("routerLink",T(2,he,a.url)),s(),O(" ",a.title)}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-download"]],standalone:!1,decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(r,l){r&1&&(i(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),o()(),i(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),o(),i(8,"div",6)(9,"div",7),S(10,ge,2,4,"a",8,g),o()()()()(),c(12,"router-outlet")),r&2&&(s(3),m("Tabs",l.tabs),s(7),C(l.moreMenu))},dependencies:[Z,j,$],encapsulation:2});let e=t;return e})();var k=(()=>{let t=class t{constructor(){this.httpService=y(Q)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Se=e=>({"background-color":e});function Ce(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),R(a.column)}}function be(e,t){if(e&1&&(i(0,"td"),c(1,"span",4),o()),e&2){let a=t.$implicit,n=d().$implicit;s(),m("innerHTML",n[a.prop],N)}}function ye(e,t){if(e&1&&(i(0,"tr",3),S(1,be,2,1,"td",null,g),o()),e&2){let a=t.$implicit,n=d();m("ngStyle",T(1,Se,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),C(n.configs())}}var de=(()=>{let t=class t{constructor(){this.configs=E([]),this.data=E([]),this.status=E(void 0),this.eventClose=new B}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},standalone:!1,decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),S(4,Ce,2,1,"th",null,g),o()(),i(6,"tbody"),S(7,ye,3,3,"tr",3,g),o()()()),r&2&&(s(4),C(l.configs()),s(3),C(l.data()))},dependencies:[H],encapsulation:2});let e=t;return e})();function xe(e,t){if(e&1){let a=_();i(0,"button",17),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onNewStepperState(l))}),c(1,"i",18),p(2," New "),o()}}function we(e,t){if(e&1){let a=_();i(0,"button",17),b("click",function(){u(a),d();let r=D(11);return f(r.previous())}),p(1," Back "),o()}}function De(e,t){if(e&1){let a=_();i(0,"button",19),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function Te(e,t){if(e&1){let a=_();i(0,"button",20),b("click",function(){u(a);let r=d(),l=D(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=d();m("disabled",!a.urls)}}function Ee(e,t){e&1&&(c(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function Ie(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function ke(e,t){e&1&&(c(0,"i",29),i(1,"span"),p(2,"Download"),o())}function Me(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),V("ngModelChange",function(r){u(a);let l=d();return F(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=d();s(),m("placeholder",a.urlPlaceholder),P("ngModel",a.urls)}}function Ue(e,t){e&1&&(c(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function Ne(e,t){if(e&1&&(i(0,"div",22),c(1,"app-response-api-list",32),o()),e&2){let a=d();s(),m("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function Le(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function Re(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var ue=(()=>{let t=class t{constructor(){this.downloadService=y(k),this.authService=y(X),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
2
|
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let r=this.urls.split(/\r?\n/);this.downloadService.download(r).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
3
|
${n?.Name}
|
|
4
4
|
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=h({type:t,selectors:[["app-by-url"]],standalone:!1,features:[A([{provide:ie,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(r,l){if(r&1){let fe=_();i(0,"mainpanel",1)(1,"actions"),x(2,xe,3,0,"button",2),x(3,we,2,0,"button",2),x(4,De,2,0,"button",3),x(5,Te,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),b("selectionChange",function(_e){return u(fe),f(l.onStepperChange(_e))}),i(12,"mat-step",9),v(13,Ee,3,0,"ng-template",10)(14,Ie,16,0,"ng-template",11),o(),i(15,"mat-step",12),v(16,ke,3,0,"ng-template",10)(17,Me,2,2,"ng-template",11),o(),i(18,"mat-step",13),v(19,Ue,3,0,"ng-template",10)(20,Ne,2,2,"ng-template",11),o(),v(21,Be,2,0,"ng-template",14)(22,Le,2,0,"ng-template",15)(23,Re,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),w(l.stepperState=="FINISH"?2:-1),s(),w(l.stepperState=="DOWNLOAD"?3:-1),s(),w(l.stepperState=="GUIDE"?4:-1),s(),w(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[z,K,q,te,pe,re,se,ae,le,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U}from"./chunk-
|
|
1
|
+
import{a as U}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as H}from"./chunk-AGBJEXIM.js";import{e as F}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as J,n as G}from"./chunk-EDEZ3JLR.js";import{A as j,c as W,h as I,m as R}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,k,m as B}from"./chunk-LNJUGHOX.js";import{$b as M,Gb as x,Ha as h,Mc as i,Nc as V,Qc as f,Rc as C,Sc as b,Tc as O,Uc as D,Vc as _,Z as S,bc as N,gc as g,hc as e,hd as v,ic as t,id as y,jc as L,nb as d,qc as T,ra as E,vc as w,xa as p,xc as A,ya as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function q(r,l){if(r&1&&(e(0,"pre",21),i(1),v(2,"json"),t()),r&2){A();let Y=_(25);d(),V(y(2,1,Y))}}function z(r,l){r&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{let l=class l{constructor(){this.httpService=E(F),this.selectedChannel=h(null),this.orderNumber=h(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(H.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}copyToClipboard(c){if(!c)return;let s=typeof c=="string"?c:JSON.stringify(c,null,2);navigator.clipboard.writeText(s),alert("Copied to clipboard!")}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=x({type:l,selectors:[["app-escrow-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","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","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(s,n){if(s&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),w("click",function(){return p(a),m(n.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),b("ngModelChange",function(o){return p(a),C(n.selectedChannel,o)||(n.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),b("ngModelChange",function(o){return p(a),C(n.orderNumber,o)||(n.orderNumber=o),m(o)}),t()()()()(),O(25),v(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),w("click",function(){p(a);let o=_(25);return m(n.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,q,3,3,"pre",21)(39,z,2,0,"p",22),t()()()()()()()()()}if(s&2){g("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),f("ngModel",n.selectedChannel),d(8),f("ngModel",n.orderNumber),d();let a=D(y(26,6,n.escrowLog$));d(8),g("disabled",!a),d(5),N(a?38:39)}},dependencies:[B,j,W,I,R,G,J,U,P,k],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]});let r=l;return r})();export{ce as EscrowApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as h}from"./chunk-
|
|
1
|
+
import{i as h}from"./chunk-PYQPYOIY.js";import{b as p}from"./chunk-OXWPYJNB.js";import{a as u}from"./chunk-ZETUYNFJ.js";import{F as l}from"./chunk-LNJUGHOX.js";import{ma as c,qa as t}from"./chunk-ZYJ6LAJ3.js";var g=(()=>{let e=class e{constructor(s,i,r,n){this.toastr=s,this.authService=i,this.router=r,this.permissionService=n}canActivate(s,i){let r=JSON.parse(window.localStorage.getItem("user")),n=new Date,a=!1;if(r!=null){let m=new Date(r?.Token?.expiredAt);n<m?a=!0:(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return a}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}};e.\u0275fac=function(i){return new(i||e)(t(p),t(h),t(l),t(u))},e.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe,b as be}from"./chunk-S5R6MCNP.js";import{a as xe,b as he}from"./chunk-DXYMG6QK.js";import{b as ue}from"./chunk-QFSA7CU4.js";import{a as ge}from"./chunk-4YCSITNV.js";import{a as M}from"./chunk-ZSUWHVKX.js";import{a as Ce}from"./chunk-6OJQRHIZ.js";import{i as _e}from"./chunk-HF4T6G54.js";import{c as R}from"./chunk-JBEKD57G.js";import{d as me,h as pe}from"./chunk-EDEZ3JLR.js";import{A as le,b as ne,h as ie,m as oe}from"./chunk-L3W6SG2T.js";import{a as re,b as ae,c as ce}from"./chunk-ZETUYNFJ.js";import{v as se,w as de}from"./chunk-STYL7ETF.js";import{c as J,h as Q,l as ee,m as te}from"./chunk-LNJUGHOX.js";import{$b as p,$c as T,G as A,Gb as Z,Ha as $,Hc as W,Mb as h,Mc as m,Nc as V,Oc as v,Qc as k,Rc as O,Sc as D,Wc as K,ad as X,bc as g,ca as H,cc as E,dc as q,ec as F,f as z,fc as I,gc as s,hc as c,hd as N,ic as _,id as j,jc as P,jd as Y,kd as G,lb as w,nb as a,pc as L,qc as f,ra as S,sb as B,td as y,vc as b,xa as u,xc as o,ya as C}from"./chunk-ZYJ6LAJ3.js";var U=t=>[t],Te=t=>({"text-decoration-line-through":t}),ve=t=>({"text-danger":t}),ye=(t,r)=>({"bg-gradient-warning":t,"cell-hover pointer":r});function Se(t,r){if(t&1){let e=f();c(0,"mat-slide-toggle",10),b("toggleChange",function(){u(e);let n=o();return n.toggleStatus=!n.toggleStatus,C(n.onToggle())}),c(1,"small",11),m(2),_()()}if(t&2){let e=o();a(2),v(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function we(t,r){if(t&1){let e=f();c(0,"th")(1,"input",13),D("ngModelChange",function(n){u(e);let l=o(2);return O(l.checkboxState,n)||(l.checkboxState=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(2);return C(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Fe(t,r){if(t&1&&(h(0,we,2,1,"ng-template",12),c(1,"th",8),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ie(t,r){if(t&1&&(c(0,"th",9)(1,"div",14)(2,"div",15),P(3,"img",16),c(4,"div",17),m(5),N(6,"stringLimit"),_()()()()),t&2){let e=r.$implicit;a(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,w),a(2),v(" ",Y(6,3,e.Name,20)," ")}}function Pe(t,r){t&1&&L(0)}function Me(t,r){if(t&1&&h(0,Pe,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Ee(t,r){if(t&1&&h(0,Me,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function Ve(t,r){t&1&&L(0)}function ke(t,r){if(t&1&&h(0,Ve,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Oe(t,r){if(t&1&&h(0,ke,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function De(t,r){if(t&1){let e=f();c(0,"div")(1,"input",30),D("ngModelChange",function(n){u(e);let l=o(4).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(4).$implicit,l=o();return C(l.onCheckboxStateProduct(n.ID))}),_()()}if(t&2){let e=o(4).$implicit;a(),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Ne(t,r){if(t&1&&p(0,De,2,2,"div"),t&2){let e=o(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function Ue(t,r){if(t&1){let e=f();c(0,"img",31),b("click",function(n){u(e);let l=o(3).$implicit,d=o();return C(d.onZoomImage(n,l==null?null:l.ImageUrl))}),_()}if(t&2){let e=o(3).$implicit;s("src",K(e==null?null:e.ThumbnailUrl),w)}}function $e(t,r){t&1&&P(0,"img",26)}function Be(t,r){if(t&1&&(c(0,"td",23)(1,"div",24),p(2,Ee,1,3,null,12)(3,Oe,1,3,null,12),h(4,Ne,1,1,"ng-template",null,0,G),c(6,"div"),p(7,Ue,1,2,"img",25)(8,$e,1,0,"img",26),_()()(),c(9,"td",27)(10,"div"),m(11),_(),c(12,"small",28),m(13),_()()),t&2){let e=o(2).$implicit,i=o();s("rowSpan",e==null?null:e.Variants.length),a(2),g(i.table()=="inventory"?2:3),a(5),g(e!=null&&e.ThumbnailUrl?7:8),a(2),s("rowSpan",e==null?null:e.Variants.length),a(2),V(e==null?null:e.Name),a(),s("ngClass",T(7,ve,!(e!=null&&e.Category))),a(),v("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Le(t,r){if(t&1&&(c(0,"a",22),P(1,"i",32),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),w)}}function We(t,r){if(t&1){let e=f();c(0,"input",35),D("ngModelChange",function(n){u(e);let l=o(3).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function je(t,r){if(t&1&&(c(0,"td",33),p(1,We,1,2,"input",34),_()),t&2){let e=o(2).$implicit,i=o(2);a(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Re(t,r){if(t&1&&(h(0,je,2,1,"ng-template",12),c(1,"td",19),m(2),N(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),V(j(3,2,i.printPOS(e)))}}function ze(t,r){if(t&1){let e=f();c(0,"td",38),b("click",function(){u(e);let n=o().$implicit,l=o().$implicit,d=o().$implicit,x=o();return C(x.onUpdateData(d.Name,l,n.ID,d.ChannelItemID))}),c(1,"div",39)(2,"div",40),m(3),N(4,"number"),_(),c(5,"a",41),b("click",function(n){return u(e),C(n==null?null:n.stopPropagation())}),P(6,"i",32),_()()()}if(t&2){let e=r,i=o(2).$implicit,n=o(2);s("ngClass",X(5,ye,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),a(3),v(" ",j(4,3,n.printItem(e))," "),a(2),s("href",e.Url,w)}}function Ae(t,r){t&1&&(c(0,"td",37)(1,"div",39)(2,"span"),m(3,"X"),_()()())}function He(t,r){if(t&1&&p(0,ze,7,8,"td",36)(1,Ae,4,0,"td",37),t&2){let e,i=r.$implicit,n=o().$implicit,l=o(2);g((e=l.getItemFromChannel(n,i))?0:1,e)}}function Ze(t,r){if(t&1&&(c(0,"tr"),p(1,Be,14,9),c(2,"td",18),m(3),_(),c(4,"td",19)(5,"div",20)(6,"div",21),m(7),_(),c(8,"div",17),p(9,Le,2,1,"a",22),_()()(),p(10,Re,4,6),F(11,He,2,1,null,null,E),_()),t&2){let e=r.$implicit,i=r.$index,n=o().$implicit,l=o();a(),g(i==0?1:-1),a(2),V(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?l.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Te,e.Discontinued)),a(),v(" ",e.Code," "),a(2),g(n.Category?9:-1),a(),g(l.hiddenIPOSInventory()==!1?10:-1),a(),I(l.channel())}}function qe(t,r){if(t&1&&(c(0,"tbody"),F(1,Ze,13,9,"tr",null,E),_()),t&2){let e=r.$implicit;a(),I(e.Variants)}}var ft=(()=>{let r=class r{constructor(){this.dialog=S(me),this.biggerPictureService=S(Ce),this.authService=S(_e),this.permissionsService=S(re),this.table=y(void 0),this.channel=y(void 0),this.showProductToggle=y(!1),this.multiwarehouse=y(!1),this.hiddenIPOSInventory=y(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=M.PriceUpdate,this.roleInventoryUpdate=M.InventoryUpdate,this.hasPriceEdit=$(!1),this.hasInventoryEdit=$(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new z,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(M.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(M.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(l=>l.ID==i);n.length>0&&(n=n.map(l=>(l.Variants=l.Variants.map(d=>(d.selected=l.selected,d)),l)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(d=>R.IsNotEmpty(n.LocationID)?d.LocationID==n.LocationID:d.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,l,d){let x=this.table();this.hasPriceEdit()&&x=="price"&&this.onOpenDialogUpdate(i,n,l,d),this.hasInventoryEdit()&&x=="inventory"&&this.onOpenDialogUpdate(i,n,l,d)}onOpenDialogUpdate(i,n,l,d){this.dialog.open(fe,{data:{Name:i,Variant:n,ChannelID:l,Table:this.table(),ChannelItemID:d}}).afterClosed().pipe(A(x=>R.IsNotEmpty(x)),H(this.destroy$)).subscribe(x=>{this.onSubmit.emit(x)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=Z({type:r,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,l){n&1&&(c(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),_(),p(8,Se,3,1,"mat-slide-toggle",6),_()(),c(9,"th",7),m(10,"Variant"),_(),c(11,"th",8),m(12,"SKU"),_(),p(13,Fe,3,3),F(14,Ie,7,6,"th",9,q),_()(),F(16,qe,3,0,"tbody",null,E),_()()),n&2&&(a(8),g(l.showProductToggle()?8:-1),a(5),g(l.hiddenIPOSInventory()==!1?13:-1),a(),I(l.channel()),a(2),I(l.data))},dependencies:[te,J,Q,le,ne,ie,oe,he,xe,pe,ge,ue,ce,ae,de,se,ee,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=r;return t})();export{ft as a};
|
|
1
|
+
import{a as fe,b as be}from"./chunk-S5R6MCNP.js";import{a as xe,b as he}from"./chunk-DXYMG6QK.js";import{b as ue}from"./chunk-QFSA7CU4.js";import{a as ge}from"./chunk-4YCSITNV.js";import{a as M}from"./chunk-ZSUWHVKX.js";import{a as Ce}from"./chunk-6OJQRHIZ.js";import{i as _e}from"./chunk-PYQPYOIY.js";import{c as R}from"./chunk-JBEKD57G.js";import{d as me,h as pe}from"./chunk-EDEZ3JLR.js";import{A as le,b as ne,h as ie,m as oe}from"./chunk-L3W6SG2T.js";import{a as re,b as ae,c as ce}from"./chunk-ZETUYNFJ.js";import{v as se,w as de}from"./chunk-STYL7ETF.js";import{c as J,h as Q,l as ee,m as te}from"./chunk-LNJUGHOX.js";import{$b as p,$c as T,G as A,Gb as Z,Ha as $,Hc as W,Mb as h,Mc as m,Nc as V,Oc as v,Qc as k,Rc as O,Sc as D,Wc as K,ad as X,bc as g,ca as H,cc as E,dc as q,ec as F,f as z,fc as I,gc as s,hc as c,hd as N,ic as _,id as j,jc as P,jd as Y,kd as G,lb as w,nb as a,pc as L,qc as f,ra as S,sb as B,td as y,vc as b,xa as u,xc as o,ya as C}from"./chunk-ZYJ6LAJ3.js";var U=t=>[t],Te=t=>({"text-decoration-line-through":t}),ve=t=>({"text-danger":t}),ye=(t,r)=>({"bg-gradient-warning":t,"cell-hover pointer":r});function Se(t,r){if(t&1){let e=f();c(0,"mat-slide-toggle",10),b("toggleChange",function(){u(e);let n=o();return n.toggleStatus=!n.toggleStatus,C(n.onToggle())}),c(1,"small",11),m(2),_()()}if(t&2){let e=o();a(2),v(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function we(t,r){if(t&1){let e=f();c(0,"th")(1,"input",13),D("ngModelChange",function(n){u(e);let l=o(2);return O(l.checkboxState,n)||(l.checkboxState=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(2);return C(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Fe(t,r){if(t&1&&(h(0,we,2,1,"ng-template",12),c(1,"th",8),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ie(t,r){if(t&1&&(c(0,"th",9)(1,"div",14)(2,"div",15),P(3,"img",16),c(4,"div",17),m(5),N(6,"stringLimit"),_()()()()),t&2){let e=r.$implicit;a(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,w),a(2),v(" ",Y(6,3,e.Name,20)," ")}}function Pe(t,r){t&1&&L(0)}function Me(t,r){if(t&1&&h(0,Pe,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Ee(t,r){if(t&1&&h(0,Me,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function Ve(t,r){t&1&&L(0)}function ke(t,r){if(t&1&&h(0,Ve,1,0,"ng-container",29),t&2){o(2);let e=W(5);s("ngTemplateOutlet",e)}}function Oe(t,r){if(t&1&&h(0,ke,1,1,"ng-template",12),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function De(t,r){if(t&1){let e=f();c(0,"div")(1,"input",30),D("ngModelChange",function(n){u(e);let l=o(4).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),b("ngModelChange",function(){u(e);let n=o(4).$implicit,l=o();return C(l.onCheckboxStateProduct(n.ID))}),_()()}if(t&2){let e=o(4).$implicit;a(),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Ne(t,r){if(t&1&&p(0,De,2,2,"div"),t&2){let e=o(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function Ue(t,r){if(t&1){let e=f();c(0,"img",31),b("click",function(n){u(e);let l=o(3).$implicit,d=o();return C(d.onZoomImage(n,l==null?null:l.ImageUrl))}),_()}if(t&2){let e=o(3).$implicit;s("src",K(e==null?null:e.ThumbnailUrl),w)}}function $e(t,r){t&1&&P(0,"img",26)}function Be(t,r){if(t&1&&(c(0,"td",23)(1,"div",24),p(2,Ee,1,3,null,12)(3,Oe,1,3,null,12),h(4,Ne,1,1,"ng-template",null,0,G),c(6,"div"),p(7,Ue,1,2,"img",25)(8,$e,1,0,"img",26),_()()(),c(9,"td",27)(10,"div"),m(11),_(),c(12,"small",28),m(13),_()()),t&2){let e=o(2).$implicit,i=o();s("rowSpan",e==null?null:e.Variants.length),a(2),g(i.table()=="inventory"?2:3),a(5),g(e!=null&&e.ThumbnailUrl?7:8),a(2),s("rowSpan",e==null?null:e.Variants.length),a(2),V(e==null?null:e.Name),a(),s("ngClass",T(7,ve,!(e!=null&&e.Category))),a(),v("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Le(t,r){if(t&1&&(c(0,"a",22),P(1,"i",32),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),w)}}function We(t,r){if(t&1){let e=f();c(0,"input",35),D("ngModelChange",function(n){u(e);let l=o(3).$implicit;return O(l.selected,n)||(l.selected=n),C(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function je(t,r){if(t&1&&(c(0,"td",33),p(1,We,1,2,"input",34),_()),t&2){let e=o(2).$implicit,i=o(2);a(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Re(t,r){if(t&1&&(h(0,je,2,1,"ng-template",12),c(1,"td",19),m(2),N(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),V(j(3,2,i.printPOS(e)))}}function ze(t,r){if(t&1){let e=f();c(0,"td",38),b("click",function(){u(e);let n=o().$implicit,l=o().$implicit,d=o().$implicit,x=o();return C(x.onUpdateData(d.Name,l,n.ID,d.ChannelItemID))}),c(1,"div",39)(2,"div",40),m(3),N(4,"number"),_(),c(5,"a",41),b("click",function(n){return u(e),C(n==null?null:n.stopPropagation())}),P(6,"i",32),_()()()}if(t&2){let e=r,i=o(2).$implicit,n=o(2);s("ngClass",X(5,ye,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),a(3),v(" ",j(4,3,n.printItem(e))," "),a(2),s("href",e.Url,w)}}function Ae(t,r){t&1&&(c(0,"td",37)(1,"div",39)(2,"span"),m(3,"X"),_()()())}function He(t,r){if(t&1&&p(0,ze,7,8,"td",36)(1,Ae,4,0,"td",37),t&2){let e,i=r.$implicit,n=o().$implicit,l=o(2);g((e=l.getItemFromChannel(n,i))?0:1,e)}}function Ze(t,r){if(t&1&&(c(0,"tr"),p(1,Be,14,9),c(2,"td",18),m(3),_(),c(4,"td",19)(5,"div",20)(6,"div",21),m(7),_(),c(8,"div",17),p(9,Le,2,1,"a",22),_()()(),p(10,Re,4,6),F(11,He,2,1,null,null,E),_()),t&2){let e=r.$implicit,i=r.$index,n=o().$implicit,l=o();a(),g(i==0?1:-1),a(2),V(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?l.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Te,e.Discontinued)),a(),v(" ",e.Code," "),a(2),g(n.Category?9:-1),a(),g(l.hiddenIPOSInventory()==!1?10:-1),a(),I(l.channel())}}function qe(t,r){if(t&1&&(c(0,"tbody"),F(1,Ze,13,9,"tr",null,E),_()),t&2){let e=r.$implicit;a(),I(e.Variants)}}var ft=(()=>{let r=class r{constructor(){this.dialog=S(me),this.biggerPictureService=S(Ce),this.authService=S(_e),this.permissionsService=S(re),this.table=y(void 0),this.channel=y(void 0),this.showProductToggle=y(!1),this.multiwarehouse=y(!1),this.hiddenIPOSInventory=y(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=M.PriceUpdate,this.roleInventoryUpdate=M.InventoryUpdate,this.hasPriceEdit=$(!1),this.hasInventoryEdit=$(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new z,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let i=this.table();i=="inventory"?this.stockHeader="Stock":i=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(M.InventoryUpdate).then(i=>this.hasInventoryEdit.set(i)),this.permissionsService.hasPermission(M.PriceUpdate).then(i=>this.hasPriceEdit.set(i))}onCheckboxStateProduct(i){let n=this.data.filter(l=>l.ID==i);n.length>0&&(n=n.map(l=>(l.Variants=l.Variants.map(d=>(d.selected=l.selected,d)),l)))}onCheckboxStateChange(){this.data=this.data.map(i=>(i.Variants=i.Variants.map(n=>(n.selected=this.checkboxState,n)),i))}getItemFromChannel(i,n){return i.Channel.find(d=>R.IsNotEmpty(n.LocationID)?d.LocationID==n.LocationID:d.ChannelID==n.ID)}printItem(i){let n=this.table();if(n=="inventory")return i.Inventory;if(n=="price")return i.Price}onUpdateData(i,n,l,d){let x=this.table();this.hasPriceEdit()&&x=="price"&&this.onOpenDialogUpdate(i,n,l,d),this.hasInventoryEdit()&&x=="inventory"&&this.onOpenDialogUpdate(i,n,l,d)}onOpenDialogUpdate(i,n,l,d){this.dialog.open(fe,{data:{Name:i,Variant:n,ChannelID:l,Table:this.table(),ChannelItemID:d}}).afterClosed().pipe(A(x=>R.IsNotEmpty(x)),H(this.destroy$)).subscribe(x=>{this.onSubmit.emit(x)})}printPOS(i){let n=this.table();return n=="inventory"?i.Inventory?i.Inventory:0:n=="price"?i.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(i,n){this.biggerPictureService.openBiggerPicture(i,n)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=Z({type:r,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"ngClass"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(n,l){n&1&&(c(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),_(),p(8,Se,3,1,"mat-slide-toggle",6),_()(),c(9,"th",7),m(10,"Variant"),_(),c(11,"th",8),m(12,"SKU"),_(),p(13,Fe,3,3),F(14,Ie,7,6,"th",9,q),_()(),F(16,qe,3,0,"tbody",null,E),_()()),n&2&&(a(8),g(l.showProductToggle()?8:-1),a(5),g(l.hiddenIPOSInventory()==!1?13:-1),a(),I(l.channel()),a(2),I(l.data))},dependencies:[te,J,Q,le,ne,ie,oe,he,xe,pe,ge,ue,ce,ae,de,se,ee,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]});let t=r;return t})();export{ft as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-UJ4S2WZV.js";import{a as l,b as u}from"./chunk-A7PUMY67.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as m,I as s}from"./chunk-LNJUGHOX.js";import{Gb as i,gc as p,hc as c,ic as d,jc as n,nb as a}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,f){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),d()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",f.tabs))},dependencies:[u,l,s,m],encapsulation:2});let t=e;return t})(),O=[{path:"",component:h,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-Z2CPXQ24.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-VEBP36WX.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-TJUIBLFE.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{h as JsonApiComponent,O as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as H}from"./chunk-AGBJEXIM.js";import{e as F}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as J,n as G}from"./chunk-EDEZ3JLR.js";import{A as j,c as U,h as K,m as R,p as O}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as W,k as D,m as N}from"./chunk-LNJUGHOX.js";import{$b as S,Gb as V,Ha as w,Mc as d,Nc as A,Qc as g,Rc as C,Sc as y,Tc as L,Uc as T,Vc as P,Z as k,bc as x,gc as f,hc as i,hd as b,ic as t,id as B,jc as E,nb as c,qc as M,ra as I,vc as v,xa as m,xc as h,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function q(n,a){if(n&1){let p=M();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 z(n,a){if(n&1){let p=M();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 Q(n,a){if(n&1&&(i(0,"pre",28),d(1),b(2,"json"),t()),n&2){h();let p=P(35);c(),A(B(2,1,p))}}function X(n,a){n&1&&(i(0,"p",29),d(1," Your data will be shown here once it's available "),t())}var me=(()=>{let a=class a{constructor(){this.httpService=I(F),this.selectedChannel=w(null),this.sku=w(null),this.itemId=w(null),this.searchBy="sku"}initProductLog(){let l={ChannelID:this.selectedChannel()};this.searchBy==="sku"?l.SKU=this.sku():l.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,l).pipe(k(1))}copyToClipboard(l){if(!l)return;let o=typeof l=="string"?l:JSON.stringify(l,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=M();i(0,"mainpanel",0)(1,"actions")(2,"button",1),v("click",function(){return m(s),u(e.initProductLog())}),E(3,"i",2),d(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),d(12,"Channel"),t(),i(13,"p",8),d(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"),d(20,"Product Code / SKU"),t(),i(21,"p",8),d(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),d(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),d(32,"Search by ItemID"),t()()(),S(33,q,1,1,"input",18),S(34,z,1,1,"input",19),t()()()(),L(35),b(36,"async"),i(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),d(42,"Response"),t(),i(43,"button",24),v("click",function(){m(s);let r=P(35);return u(e.copyToClipboard(r))}),d(44," Copy "),t()(),i(45,"div",25)(46,"div",26)(47,"div",27),S(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),t()()()()()()()()()}if(o&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),g("ngModel",e.selectedChannel),c(10),g("ngModel",e.searchBy),f("value","sku"),c(4),g("ngModel",e.searchBy),f("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),f("disabled",!s),c(5),x(s?48:49)}},dependencies:[N,j,U,O,K,R,G,J,Y,W,D],encapsulation:2});let n=a;return n})();export{me as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-UJ4S2WZV.js";import{b as l}from"./chunk-A7PUMY67.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{n as u}from"./chunk-EDEZ3JLR.js";import{A as d}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as c,I as m,m as n}from"./chunk-LNJUGHOX.js";import{Gb as a,Hb as i,jc as s,na as r}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(e,O){e&1&&s(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-2HGLCZCJ.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,l,C,d,u,m]});let o=t;return o})();export{b as ReportModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as _}from"./chunk-
|
|
1
|
+
import{f as _}from"./chunk-PYQPYOIY.js";import{c as a}from"./chunk-JBEKD57G.js";import{G as k,I as C}from"./chunk-LNJUGHOX.js";import{$b as I,Gb as v,Mc as u,Oc as p,ad as D,bc as g,gc as s,hc as c,ic as m,lb as b,ma as h,nb as l,od as f,ra as o,td as x,xc as d}from"./chunk-ZYJ6LAJ3.js";var y=(()=>{let e=class e{constructor(){this.localDataService=o(_),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var U=(t,e)=>({Number:t,Outlet:e});function L(t,e){if(t&1&&(c(0,"a",0),u(1),m()),t&2){let i,n=d();s("href",n.baseUrl(),b),l(),p(" ",(i=n.order())==null?null:i.Number," ")}}function S(t,e){if(t&1&&(c(0,"a",1),u(1),m()),t&2){let i,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,U,(i=r.order())==null?null:i.Number,(i=r.order())==null?null:i.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var z=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=o(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,N){r&1&&I(0,L,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(N.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2});let t=e;return t})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./chunk-DAUML5UD.js";import{d as T,e as O}from"./chunk-6KWG6O5L.js";import{A as M,h as y,m as f}from"./chunk-L3W6SG2T.js";import{Gb as
|
|
1
|
+
import{a as S}from"./chunk-DAUML5UD.js";import{d as T,e as O}from"./chunk-6KWG6O5L.js";import{A as M,h as y,m as f}from"./chunk-L3W6SG2T.js";import{Gb as C,Mc as h,gc as c,hc as a,ic as i,ma as b,nb as d,sd as g,td as s,vc as u}from"./chunk-ZYJ6LAJ3.js";var p=(function(e){return e[e.SkuAndName=0]="SkuAndName",e[e.SKUOnly=1]="SKUOnly",e[e.NameOnly=2]="NameOnly",e})(p||{});var o=(function(e){return e[e.Is=0]="Is",e[e.StartsWith=1]="StartsWith",e[e.EndsWith=2]="EndsWith",e[e.Contains=3]="Contains",e})(o||{});var I=(()=>{let n=class n{generatePlaceholderBySearchType(m,r){let t="Search ...";switch(m){case p.SkuAndName:t="SKU / Name";break;case p.SKUOnly:t="SKU";break;case p.NameOnly:t="Name";break}switch(r){case o.StartsWith:t=`${t} Starts With`;break;case o.EndsWith:t=`${t} Ends With`;break;case o.Contains:t=`${t} Contains`;break;case o.Is:t=`${t} Is`;break}return t}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=b({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();var Q=(()=>{let n=class n{constructor(){this.searchType=s(),this.searchTypeChange=g(),this.searchTypeOptions=s([]),this.numberFilterComparator=s(),this.numberFilterComparatorChange=g(),this.numberFilterComparatorOptions=s([])}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=C({type:n,selectors:[["filter-query-type"]],inputs:{searchType:[1,"searchType"],searchTypeOptions:[1,"searchTypeOptions"],numberFilterComparator:[1,"numberFilterComparator"],numberFilterComparatorOptions:[1,"numberFilterComparatorOptions"]},outputs:{searchTypeChange:"searchTypeChange",numberFilterComparatorChange:"numberFilterComparatorChange"},decls:9,vars:5,consts:[[1,"mb-5"],[1,"fw-bold","mb-2"],["bindLabel","Value","bindValue","Key","placeholder","Number Filter Comparator","name","numberFilterComparator","appendTo","body",3,"ngModelChange","items","ngModel","clearable"],[1,"border","border-1","rounded-1","p-4"],[3,"ngModelChange","options","ngModel"]],template:function(r,t){r&1&&(a(0,"div",0)(1,"label",1),h(2,"Number Filter Comparator"),i(),a(3,"ng-select",2),u("ngModelChange",function(l){return t.numberFilterComparatorChange.emit(l)}),i()(),a(4,"div")(5,"label",1),h(6,"Search Type"),i(),a(7,"div",3)(8,"radio-options",4),u("ngModelChange",function(l){return t.searchTypeChange.emit(l)}),i()()()),r&2&&(d(3),c("items",t.numberFilterComparatorOptions())("ngModel",t.numberFilterComparator())("clearable",!1),d(5),c("options",t.searchTypeOptions())("ngModel",t.searchType()))},dependencies:[S,O,T,M,y,f],encapsulation:2});let e=n;return e})();export{p as a,o as b,I as c,Q as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-7JQEF4XX.js";import{a as pe,b as me}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-FULVA6QB.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import{a as te,b as ne,d as ie,e as ae}from"./chunk-6KWG6O5L.js";import{i as ee}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-7JQEF4XX.js";import{a as pe,b as me}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-FULVA6QB.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import{a as te,b as ne,d as ie,e as ae}from"./chunk-6KWG6O5L.js";import{i as ee}from"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{e as Z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as Y}from"./chunk-JBEKD57G.js";import{m as oe,n as le}from"./chunk-EDEZ3JLR.js";import{A as X,h as K,m as Q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as k,j as H,k as U,m as G}from"./chunk-LNJUGHOX.js";import{$b as R,Gb as P,Mb as B,Mc as s,Nc as f,Oc as y,Qc as z,Rc as A,Sc as V,Z as M,Zc as J,aa as D,ac as T,bc as $,cc as F,ec as j,fc as O,g as L,gc as h,hc as a,hd as c,ic as o,id as d,jc as u,jd as W,lb as S,ma as w,nb as p,qc as q,ra as g,v as I,vc as v,xa as E,xc as x,ya as N}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{let t=class t{constructor(){this.httpService=g(Z),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=_(_({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=w({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),u(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,S)("alt",l.Name),p(),y(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),u(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td")(6,"span",18),s(7),c(8,"json"),o()(),a(9,"td"),s(10),c(11,"json"),o(),a(12,"td"),s(13),c(14,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,S),p(2),y(" ",l.ChannelName," "),p(3),f(d(8,5,l.Request)),p(3),f(d(11,7,l.Response)),p(3),f(W(14,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=q();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),j(13,de,15,12,"tr",null,F),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),v("page",function(e){E(l);let r=x();return N(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=x();p(13),O((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),u(1,"app-empty-state"),o())}var qe=(()=>{let t=class t{constructor(){this.channelLogService=g(b),this.authService=g(ee),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=Y.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=P({type:t,selectors:[["app-channel-log"]],features:[J([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),V("ngModelChange",function(C){return A(r.channelID,C)||(r.channelID=C),C}),B(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),R(12,he,21,13,"div",8),c(13,"async"),T(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),z("ngModel",r.channelID),p(6),$(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[G,le,oe,re,me,pe,ae,ie,te,ne,X,K,Q,k,U,H],encapsulation:2});let i=t;return i})();export{qe as ChannelLogComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as et,b as tt,c as it}from"./chunk-Q2QX5AAJ.js";import"./chunk-AZOCRKXK.js";import{a as de}from"./chunk-WFXKYFBX.js";import"./chunk-RNWHARPK.js";import{a as Ke,b as Qe,c as Ze,e as qe,f as Je,g as Xe}from"./chunk-R2XT5M5F.js";import{e as $e,k as Ue,l as Ge,m as je,n as Ye,o as He}from"./chunk-ZW2TMVZP.js";import"./chunk-2F4DTZCZ.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-UH5C5HXK.js";import{a as ze}from"./chunk-OR34CB7O.js";import"./chunk-OPXITNRF.js";import{a as Be,b as Le,c as Ae}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-4UPWMQJX.js";import{c as Ve,d as Ie,e as Ne}from"./chunk-6KWG6O5L.js";import"./chunk-4RLWHMI6.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{h as ke,i as ae}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import{qa as We}from"./chunk-5PMKN6PM.js";import{a as oe}from"./chunk-AGBJEXIM.js";import{b as Pe,e as Ee}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as ne,c as x}from"./chunk-JBEKD57G.js";import{m as Oe,n as Re}from"./chunk-EDEZ3JLR.js";import{A as ie,b as Te,c as be,h as ee,m as te,x as Me}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as Fe,w as re}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{I as xe,c as O,i as X,j as $,m as V}from"./chunk-LNJUGHOX.js";import{$b as w,$c as q,Bc as fe,Cc as ge,Dc as _e,Gb as k,Ha as g,Hc as N,Mb as Y,Mc as s,Nc as F,Oc as D,Qc as b,Rc as M,Sc as P,Wc as Ce,Yc as we,Z as G,Zc as Z,_c as ve,aa as ce,ad as Se,bc as v,dc as R,ea as j,ec as W,fc as B,gc as h,hc as o,hd as L,ic as a,id as H,jc as S,jd as ye,lb as he,m as me,ma as ue,nb as l,pd as J,qc as T,ra as y,sb as A,sd as De,td as I,v as Q,vc as C,xa as c,xc as _,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var lt=e=>({"over-due":e});function dt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,lt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function st(e,r){if(e&1&&W(0,dt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function pt(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var nt=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,st,2,0)(14,pt,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var ct=e=>({"full-width":e}),ut=()=>({standalone:!0}),ot=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,ct,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ut)))},dependencies:[V,O,ie,ee,te,it,tt,et,We],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Ee),this.toastr=y(Pe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(oe.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(oe.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(oe.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ht(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ft(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function _t(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function Ct(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var at=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ae),this.tokenService=y(ke),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ne,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,$e()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ht,3,3,"ng-option",7,R),a()()(),w(12,ft,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,gt,5,0,"p",5)(19,_t,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,Ct,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Ne,Ie,Ve,Ae,Be,Le,ie,be,Te,ee,Me,te,ot,Ye,Ue,He,Ge,je,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var wt=(e,r)=>({"over-due-today":e,"over-due":r});function vt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function St(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function yt(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function Dt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function xt(e,r){if(e&1&&(o(0,"ul",21),W(1,Dt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function Tt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
|
|
1
|
+
import{a as et,b as tt,c as it}from"./chunk-Q2QX5AAJ.js";import"./chunk-AZOCRKXK.js";import{a as de}from"./chunk-35DCCWTG.js";import"./chunk-RNWHARPK.js";import{a as Ke,b as Qe,c as Ze,e as qe,f as Je,g as Xe}from"./chunk-R2XT5M5F.js";import{e as $e,k as Ue,l as Ge,m as je,n as Ye,o as He}from"./chunk-ZW2TMVZP.js";import"./chunk-2F4DTZCZ.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-UH5C5HXK.js";import{a as ze}from"./chunk-ESXTZ7DM.js";import"./chunk-OPXITNRF.js";import{a as Be,b as Le,c as Ae}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-E4BL56JJ.js";import{c as Ve,d as Ie,e as Ne}from"./chunk-6KWG6O5L.js";import"./chunk-4RLWHMI6.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{h as ke,i as ae}from"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import{qa as We}from"./chunk-5PMKN6PM.js";import{a as oe}from"./chunk-AGBJEXIM.js";import{b as Pe,e as Ee}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as ne,c as x}from"./chunk-JBEKD57G.js";import{m as Oe,n as Re}from"./chunk-EDEZ3JLR.js";import{A as ie,b as Te,c as be,h as ee,m as te,x as Me}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as Fe,w as re}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{I as xe,c as O,i as X,j as $,m as V}from"./chunk-LNJUGHOX.js";import{$b as w,$c as q,Bc as fe,Cc as ge,Dc as _e,Gb as k,Ha as g,Hc as N,Mb as Y,Mc as s,Nc as F,Oc as D,Qc as b,Rc as M,Sc as P,Wc as Ce,Yc as we,Z as G,Zc as Z,_c as ve,aa as ce,ad as Se,bc as v,dc as R,ea as j,ec as W,fc as B,gc as h,hc as o,hd as L,ic as a,id as H,jc as S,jd as ye,lb as he,m as me,ma as ue,nb as l,pd as J,qc as T,ra as y,sb as A,sd as De,td as I,v as Q,vc as C,xa as c,xc as _,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as se,b as pe}from"./chunk-66YHNWRR.js";var lt=e=>({"over-due":e});function dt(e,r){if(e&1&&(o(0,"tr",6)(1,"td"),s(2),a(),o(3,"td"),s(4),a(),o(5,"td"),s(6),a(),o(7,"td"),s(8),a()()),e&2){let d=r.$implicit,t=r.$index;h("ngClass",q(5,lt,d.Exception)),l(2),F(t+1),l(2),F(d.Number),l(2),F(d.Status),l(2),F(d.Exception)}}function st(e,r){if(e&1&&W(0,dt,9,7,"tr",6,R),e&2){let d,t=_();B((d=t.downloadResult())==null?null:d.Body)}}function pt(e,r){e&1&&(o(0,"tr",5)(1,"td",7)(2,"div",8),S(3,"i",9),a(),o(4,"h4",10),s(5," There is no order to processed "),a()()())}var nt=(()=>{let r=class r{constructor(){this.downloadResult=I()}ngOnInit(){}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},decls:15,vars:1,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[1,"text-center"],[3,"ngClass"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),S(5,"th",4),o(6,"th"),s(7,"Order Number"),a(),o(8,"th"),s(9,"Status"),a(),o(10,"th"),s(11,"Exception"),a()()(),o(12,"tbody"),w(13,st,2,0)(14,pt,6,0,"tr",5),a()()()()),n&2){let p;l(13),v(((p=i.downloadResult())==null||p.Body==null?null:p.Body.length)>0?13:14)}},dependencies:[V,O],encapsulation:2});let e=r;return e})();var ct=e=>({"full-width":e}),ut=()=>({standalone:!0}),ot=(()=>{let r=class r{constructor(){this.datePipe=y($),this.fullWidth=I(!1),this.timeChange=new A}ngOnInit(){}onTimeChange(t){let n=null;t&&(n=this.datePipe.transform(t,"HH:mm")),this.timeChange.emit(n),this.onTimePickerChange()}onShowCalendar(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="inside")}}onTimePickerChange(){let t=document.getElementById("dropdown-filter");if(t){var n=new bootstrap.Dropdown(t);n&&(n._config.autoClose="outside")}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(n,i){if(n&1){let p=T();o(0,"p-datepicker",1,0),P("ngModelChange",function(m){return c(p),M(i.time,m)||(i.time=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onTimeChange(m))})("onSelect",function(){return c(p),u(i.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),C("click",function(){return c(p),N(1).hideOverlay(),u(i.onShowCalendar())}),a()()()}n&2&&(h("ngClass",q(5,ct,i.fullWidth()))("baseZIndex",1100),b("ngModel",i.time),h("timeOnly",!0)("ngModelOptions",ve(7,ut)))},dependencies:[V,O,ie,ee,te,it,tt,et,We],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]});let e=r;return e})();var z=(()=>{let r=class r{constructor(){this.httpService=y(Ee),this.toastr=y(Pe),this.datePipe=y($)}gerChannelDetailById(t){return this.httpService.post(oe.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(oe.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(oe.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(j(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):me}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),p=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${p} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?x.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):x.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=x.formatTitleFromDate(new Date(t),new Date(n)),p=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":p+"-"} ${f}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=ue({token:r,factory:r.\u0275fac});let e=r;return e})();function ht(e,r){if(e&1&&(o(0,"ng-option",7),S(1,"img",17),s(2),a()),e&2){let d=r.$implicit;h("value",d.ID),l(),h("src",d==null?null:d.Img,he),l(),D("",d.Name," ")}}function ft(e,r){if(e&1){let d=T();o(0,"div",8)(1,"div",4)(2,"h5"),s(3,"Type"),a(),o(4,"p",5),s(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),P("ngModelChange",function(n){c(d);let i=_();return M(i.downloadType,n)||(i.downloadType=n),u(n)}),C("ngModelChange",function(){c(d);let n=_();return u(n.onDownloadTypeChange())}),o(10,"mat-radio-button",20),s(11," Orders "),a(),o(12,"mat-radio-button",21),s(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),S(16,"i",24),a(),o(17,"p",25),s(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let d=_();l(9),b("ngModel",d.downloadType),l(),h("value",!1),l(2),h("value",!0)}}function gt(e,r){e&1&&(o(0,"p",5),s(1," Select Disbursement date "),o(2,"span",26),s(3,"(payment date / order complete date)"),a(),s(4," of the channel you want to download (Max 1 Week). "),a())}function _t(e,r){e&1&&(o(0,"p",5),s(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function Ct(e,r){if(e&1){let d=T();o(0,"div",16)(1,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.startTime,n)||(i.startTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onStartTimeChange())}),a(),o(2,"span",28),s(3,"-"),a(),o(4,"app-timepicker",27),P("timeChange",function(n){c(d);let i=_();return M(i.endTime,n)||(i.endTime=n),u(n)}),C("timeChange",function(){c(d);let n=_();return u(n.onEndTimeChange())}),a()()}if(e&2){let d=_();l(),b("time",d.startTime),l(3),b("time",d.endTime)}}var at=(()=>{let r=class r{constructor(){this.reset=I(!1),this.authService=y(ae),this.tokenService=y(ke),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ne,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.minDate=g(new Date),this.maxDate=g(new Date),this.filterData=new A,this._onRememberMeChange=De({alias:"onRememberMeChange"}),this.rememberMe=g(!1),J(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let t=this.tokenService?.getTokenValue(),n=t?.DownloadRange?JSON.parse(t?.DownloadRange):0;if(n<=0)this.minDate.set(null),this.maxDate.set(null);else{let i=new Date,p=x.addDays(i,n-1);this.minDate.set(p)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(Q(t=>t?.Model),G(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=x.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(t){this._onRememberMeChange.emit(t)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[Z([z,$e()])],decls:32,vars:13,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"row","mt-6"],[1,"col-12","d-flex","align-items-center"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker","min","max"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel","maxlength"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"col-6","d-flex","align-items-center","gap-2","mt-10"],["type","checkbox",2,"width","16px","height","16px",3,"ngModelChange","ngModel"],[1,"ms-2"],[1,"mt-8","d-flex","align-items-center"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let p=T();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),s(5,"Select a Channel"),a(),o(6,"p",5),s(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),P("ngModelChange",function(m){return c(p),M(i.selectedChannelId,m)||(i.selectedChannelId=m),u(m)}),C("ngModelChange",function(){return c(p),u(i.onSelectChannel())}),W(10,ht,3,3,"ng-option",7,R),a()()(),w(12,ft,19,3,"div",8),L(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),s(17,"Date Range"),a(),w(18,gt,5,0,"p",5)(19,_t,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),P("ngModelChange",function(m){return c(p),M(i.startDate,m)||(i.startDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())}),a(),o(24,"input",12),P("ngModelChange",function(m){return c(p),M(i.endDate,m)||(i.endDate=m),u(m)}),C("click",function(){c(p);let m=N(26);return u(m.open())})("ngModelChange",function(){return c(p),u(i.onFilterDateChange())}),a()(),S(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),P("ngModelChange",function(m){return c(p),M(i.rememberMe,m)||(i.rememberMe=m),u(m)}),C("ngModelChange",function(m){return c(p),u(i.onChangeRememberMe(m))}),a(),o(29,"h5",15),s(30,"Save Date"),a()(),w(31,Ct,5,2,"div",16),a()()()()}if(n&2){let p,f,m=N(26);l(9),h("clearable",!1),b("ngModel",i.selectedChannelId),l(),B(i.channelOptions()),l(2),v((p=H(13,11,i.channelDetail$))!=null&&p.ServiceFeeWriteOff&&((p=i.selectedChannel())==null?null:p.TypeID)==i.channelType.Tokopedia?12:-1),l(6),v(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?18:19),l(4),h("rangePicker",m)("min",i.minDate())("max",i.maxDate()),l(),b("ngModel",i.startDate),l(),b("ngModel",i.endDate),l(4),b("ngModel",i.rememberMe),l(3),v(i.showTimePicker()?31:-1)}},dependencies:[V,Ne,Ie,Ve,Ae,Be,Le,ie,be,Te,ee,Me,te,ot,Ye,Ue,He,Ge,je,X],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=r;return e})();var E=(function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e})(E||{});var U=(function(e){return e[e.DoNothing=0]="DoNothing",e[e.New=1]="New",e[e.Update=2]="Update",e})(U||{});var wt=(e,r)=>({"over-due-today":e,"over-due":r});function vt(e,r){if(e&1&&(o(0,"th",17),s(1),a()),e&2){let d=_();l(),D(" ",d.selectedChannel()?"Created Date":"Last Status Update"," ")}}function St(e,r){if(e&1&&(o(0,"td"),s(1),L(2,"date"),a()),e&2){let d=_().$implicit;l(),D(" ",ye(2,1,d.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function yt(e,r){if(e&1&&(o(0,"span"),s(1),a()),e&2){let d=_().$implicit;l(),D(" ",d.ActionString," ")}}function Dt(e,r){if(e&1&&(o(0,"li"),s(1),a()),e&2){let d=r.$implicit;l(),D(" ",d," ")}}function xt(e,r){if(e&1&&(o(0,"ul",21),W(1,Dt,2,1,"li",null,R),a()),e&2){let d=_().$implicit;l(),B(d.ActionString)}}function Tt(e,r){if(e&1&&(o(0,"span",22),S(1,"i",23),a()),e&2){let d=_().$implicit;h("title",we("Delivery : ",d.DeliveryState,`
|
|
2
2
|
Payment : `,d.PaymentState))}}function bt(e,r){if(e&1&&(o(0,"tr")(1,"td"),s(2),a(),o(3,"td"),s(4),a(),w(5,St,3,4,"td"),o(6,"td")(7,"span"),s(8),a(),s(9),a(),o(10,"td",20)(11,"span"),s(12),a(),s(13),a(),o(14,"td"),w(15,yt,2,1,"span"),w(16,xt,3,0,"ul",21),a(),o(17,"td"),w(18,Tt,2,3,"span",22),a()()),e&2){let d,t=r.$implicit,n=r.$index,i=_(2);l(2),F(n+1),l(2),F(t.Number),l(),v(((d=i.selectedChannel())==null?null:d.TypeID)!=i.channelType.Shopee&&((d=i.selectedChannel())==null?null:d.TypeID)!==i.channelType.Tiktok?5:-1),l(3),D("",t.ChannelStatus," - "),l(),D("",t.ChannelStatusDescription," "),l(),h("ngClass",Se(12,wt,(t==null?null:t.Action)==i.actionPreviewOrder.Update,(t==null?null:t.Action)==i.actionPreviewOrder.New))("matTooltip",t.POSStatus==91||t.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),D("",t.POSStatus," - "),l(),D("",t.POSStatusDescription," "),l(2),v(t.ActionString.length==1?15:-1),l(),v(t.ActionString.length>1?16:-1),l(2),v(t.ChannelStatus!=99&&t.POSStatus!=99?18:-1)}}function Mt(e,r){if(e&1&&W(0,bt,19,15,"tr",null,R),e&2){let d=_();B(d.displayPreviewData())}}function Pt(e,r){e&1&&(o(0,"tr",19)(1,"td",24)(2,"div",25),S(3,"i",26),a(),o(4,"h4",27),s(5," There is no order to processed "),a()()())}var rt=(()=>{let r=class r{constructor(){this.orderPreview=I(),this.selectedChannel=I(),this.channelType=ne,this.allData=g(0),this.syncData=g(0),this.wrongData=g(0),this.unsyncData=g(0),this.pillStatus=g(E.ALL),this.actionPreviewOrder=U,this.previewStatus=E,this.displayPreviewData=g([]),this.exportOrders=new A,J(()=>{this.orderPreview()&&(this.filterPreviewData(E.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(t){this.pillStatus.update(()=>t),this.displayPreviewData.update(()=>this.filterDataByStatus(t))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(E.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(E.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(E.UNSYNC).length)}filterDataByStatus(t){let n=[];switch(t){case E.ALL:n=this.orderPreview();break;case E.SYNC:n=this.orderPreview().filter(i=>i.Action==U.DoNothing);break;case E.WRONG:n=this.orderPreview().filter(i=>i.Action==U.Update);break;case E.UNSYNC:n=this.orderPreview().filter(i=>i.Action==U.New);break}return n}onExportOrders(){this.exportOrders.emit()}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:40,vars:10,consts:[[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"text-center"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div")(5,"ul",4)(6,"li",5)(7,"button",6),C("click",function(){return i.filterPreviewData(i.previewStatus.ALL)}),s(8),a()(),o(9,"li",7)(10,"button",8),C("click",function(){return i.filterPreviewData(i.previewStatus.SYNC)}),s(11),a()(),o(12,"li",7)(13,"button",9),C("click",function(){return i.filterPreviewData(i.previewStatus.WRONG)}),s(14),a()(),o(15,"li",7)(16,"button",10),C("click",function(){return i.filterPreviewData(i.previewStatus.UNSYNC)}),s(17),a()()()(),o(18,"div")(19,"button",11),C("click",function(){return i.onExportOrders()}),S(20,"i",12),o(21,"span"),s(22,"Export"),a()()()()(),o(23,"table",13)(24,"thead",14)(25,"tr"),S(26,"th",15),o(27,"th",16),s(28,"Number"),a(),w(29,vt,2,1,"th",17),o(30,"th",18),s(31,"Channel Status"),a(),o(32,"th",18),s(33,"POS Status"),a(),o(34,"th"),s(35,"Action"),a(),S(36,"th",15),a()(),o(37,"tbody"),w(38,Mt,2,0)(39,Pt,6,0,"tr",19),a()()()()),n&2){let p,f;l(7),h("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),D(" All (",i.allData(),") "),l(2),h("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),l(),D(" Existing (",i.syncData(),") "),l(2),h("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),D(" Wrong Status (",i.wrongData(),") "),l(2),h("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),l(),D(" Missing (",i.unsyncData(),") "),l(12),v(((p=i.selectedChannel())==null?null:p.TypeID)!=i.channelType.Shopee&&((p=i.selectedChannel())==null?null:p.TypeID)!==i.channelType.Tiktok?29:-1),l(9),v(((f=i.displayPreviewData())==null?null:f.length)>0?38:39)}},dependencies:[V,O,re,Fe,$],encapsulation:2});let e=r;return e})();var Et=["stepper"];function kt(e,r){if(e&1){let d=T();o(0,"div",2)(1,"button",20),C("click",function(){c(d);let n=_();return u(n.onStepperBack())}),s(2," Back "),a(),o(3,"button",21),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(4," Next "),a()()}if(e&2){let d=_();l(3),h("disabled",d.disabledNextFilter())}}function Vt(e,r){if(e&1){let d=T();o(0,"button",22),C("click",function(){c(d);let n=_();return u(n.onNextStep())}),s(1," Next "),a()}if(e&2){let d=_();h("disabled",d.disabledNextFilter())}}function It(e,r){if(e&1){let d=T();o(0,"button",23),C("click",function(){c(d);let n=_();return u(n.onNewDownload())}),S(1,"i",24),s(2," New "),a()}}function Nt(e,r){e&1&&(S(0,"i",25),o(1,"span"),s(2,"Filter"),a())}function Ft(e,r){e&1&&(S(0,"i",26),o(1,"span"),s(2,"Preview"),a())}function Ot(e,r){if(e&1){let d=T();o(0,"preview-step",27),C("onExportOrders",function(){c(d);let n=_();return u(n.onExportOrders())}),a()}e&2&&h("orderPreview",r)}function Rt(e,r){e&1&&(S(0,"i",28),o(1,"span"),s(2,"Finish"),a())}function Wt(e,r){e&1&&S(0,"complete-step",16),e&2&&h("downloadResult",r)}function Bt(e,r){e&1&&(o(0,"h6"),s(1,"1"),a())}function Lt(e,r){e&1&&(o(0,"h6"),s(1,"2"),a())}function At(e,r){e&1&&(o(0,"h6"),s(1,"3"),a())}var cn=(()=>{let r=class r{constructor(){this.downloadService=y(z),this.orderService=y(de),this.productService=y(ze),this.authService=y(ae),this.stepperSelectedIndex=g(0),this.disabledNextFilter=g(!0),this.isResetFilter=g(!1),this.pageTitle=g("Download to POS"),this.cacheKey=g(x.GuidEMpty),this.rememberMe=g(!1)}onFilterChange(t){this.filter=t,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>x.IsEmpty(this.filter?.channelId)||!x.isValidDate(this.filter.startDate)||!x.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let t=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${t?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};x.IsNotEmpty(this.filter.startTime)&&(t=pe(se({},t),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(t).pipe(j(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),Q(n=>n.Data),G(1))}onExportOrders(){let t={ID:this.filter.channelId,From:this.filter.startDate?this.filter.startDate:null,To:this.filter.endDate?this.filter.endDate:null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(t,n).subscribe()}onDownload(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(ce(n=>(t.ListPreview=n,this.downloadService.getDownloadOrder(t))),j(()=>{this.onStepperNext()}),G(1))}setPageTitle(t){this.pageTitle.update(()=>`
|
|
3
3
|
${t} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
|
|
4
4
|
`)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!this.rememberMe()),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=k({type:r,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&fe(Et,5),n&2){let p;ge(p=_e())&&(i.stepper=p.first)}},features:[Z([z,de,{provide:Ke,useValue:{displayDefaultIndicatorType:!1}}])],decls:26,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","onRememberMeChange","reset"],["state","preview",3,"editable","completed"],[3,"orderPreview"],["state","finish"],[3,"downloadResult"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill","d-flex","align-items-center","gap-2",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"]],template:function(n,i){if(n&1){let p=T();o(0,"mainpanel",1)(1,"actions"),w(2,kt,5,1,"div",2),w(3,Vt,2,1,"button",3),w(4,It,3,0,"button",4),a(),o(5,"content")(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"mat-stepper",9,0),P("selectedIndexChange",function(m){return c(p),M(i.stepperSelectedIndex,m)||(i.stepperSelectedIndex=m),u(m)}),o(12,"mat-step",10),Y(13,Nt,3,0,"ng-template",11),o(14,"filter-step",12),C("onFilterChange",function(m){return c(p),u(i.onFilterChange(m))})("onRememberMeChange",function(m){return c(p),u(i.rememberMe.set(m))}),a()(),o(15,"mat-step",13),Y(16,Ft,3,0,"ng-template",11),w(17,Ot,1,1,"preview-step",14),L(18,"async"),a(),o(19,"mat-step",15),Y(20,Rt,3,0,"ng-template",11),w(21,Wt,1,1,"complete-step",16),L(22,"async"),a(),Y(23,Bt,2,0,"ng-template",17)(24,Lt,2,0,"ng-template",18)(25,At,2,0,"ng-template",19),a()()()()()()()}if(n&2){let p,f,m=N(11);h("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),l(2),v(i.stepperSelectedIndex()==1?2:-1),l(),v(i.stepperSelectedIndex()==0?3:-1),l(),v(i.stepperSelectedIndex()==2?4:-1),l(6),h("ngClass",Ce("last-edited-step-"+m.selectedIndex)),b("selectedIndex",i.stepperSelectedIndex),l(2),h("completed",!1)("editable",i.stepperSelectedIndex()!=2),l(2),h("reset",i.isResetFilter()),l(),h("editable",i.stepperSelectedIndex()!=2)("completed",!1),l(2),v((p=H(18,17,i.orderPreview$))?17:-1,p),l(4),v((f=H(22,19,i.downloadPreview$))?21:-1,f)}},dependencies:[V,O,nt,at,rt,Xe,qe,Qe,Je,Ze,Re,Oe,xe,re,X],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-UJ4S2WZV.js";import{a as C,b as v}from"./chunk-A7PUMY67.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as h,I as o,m as f}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as c,gc as s,hc as d,ic as u,jc as i,na as p,nb as m}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var b=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),u()()(),i(4,"router-outlet")),n&2&&(m(3),s("Tabs",g.priceTabs))},dependencies:[v,C,o,h],encapsulation:2});let t=e;return t})();var M=[{path:"",component:b,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-3IGKGUHQ.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-DOVAN3PS.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],F=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=p({imports:[f,o.forChild(M)]});let t=e;return t})();export{F as PriceRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as G}from"./chunk-6KWG6O5L.js";import{a as q}from"./chunk-
|
|
1
|
+
import{e as G}from"./chunk-6KWG6O5L.js";import{a as q}from"./chunk-LA2EIRS6.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-PYQPYOIY.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as J}from"./chunk-AGBJEXIM.js";import{b as F,e as H}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as U,n as Y}from"./chunk-EDEZ3JLR.js";import{A as j,c as B,h as I,m as R}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,k as W,m as k}from"./chunk-LNJUGHOX.js";import{$b as N,Gb as M,Ha as g,Mc as i,Nc as T,Qc as b,Rc as v,Sc as _,Tc as V,Uc as D,Vc as S,Z as x,bc as O,gc as f,hc as e,hd as w,ic as t,id as y,jc as L,nb as d,qc as E,ra as h,vc as C,xa as s,xc as A,ya as c}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function K(o,l){if(o&1&&(e(0,"pre",21),i(1),w(2,"json"),t()),o&2){A();let z=S(25);d(),T(y(2,1,z))}}function Q(o,l){o&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ue=(()=>{let l=class l{constructor(){this.httpService=h(H),this.toastr=h(F),this.selectedChannel=g(null),this.orderNumber=g(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(J.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(x(1))}copyToClipboard(p){if(!p)return;let m=typeof p=="string"?p:JSON.stringify(p,null,2);navigator.clipboard.writeText(m),this.toastr.success("Copied to clipboard!","Success")}};l.\u0275fac=function(m){return new(m||l)},l.\u0275cmp=M({type:l,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","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","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(m,n){if(m&1){let a=E();e(0,"mainpanel",0)(1,"actions")(2,"button",1),C("click",function(){return s(a),c(n.fetchLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),_("ngModelChange",function(r){return s(a),v(n.selectedChannel,r)||(n.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(r){return s(a),v(n.orderNumber,r)||(n.orderNumber=r),c(r)}),t()()()()(),V(25),w(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),C("click",function(){s(a);let r=S(25);return c(n.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),N(38,K,3,3,"pre",21)(39,Q,2,0,"p",22),t()()()()()()()()()}if(m&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),b("ngModel",n.selectedChannel),d(8),b("ngModel",n.orderNumber),d();let a=D(y(26,6,n.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,Y,U,G,j,B,I,R,q,P,W],encapsulation:2});let o=l;return o})();export{ue as OrderApiComponent};
|