marketplacepos 26.40.7 → 26.40.9
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-WBWFCMGS.js → chunk-3EY234AE.js} +1 -1
- package/Marketplace/{chunk-2FMM7PY4.js → chunk-3QKR6QRE.js} +1 -1
- package/Marketplace/{chunk-DBIUPORL.js → chunk-3SESBNZV.js} +1 -1
- package/Marketplace/{chunk-WZWJUDC6.js → chunk-3X4LNNRV.js} +2 -2
- package/Marketplace/{chunk-VPQODBWR.js → chunk-3YEBU7OP.js} +1 -1
- package/Marketplace/{chunk-7IJKOBQA.js → chunk-5FDR54G6.js} +1 -1
- package/Marketplace/{chunk-AKAGLFPT.js → chunk-5PKYO4M4.js} +1 -1
- package/Marketplace/{chunk-LLVIGYHI.js → chunk-5YEMVNAD.js} +1 -1
- package/Marketplace/{chunk-BCQBJKMO.js → chunk-6XX6GMYQ.js} +1 -1
- package/Marketplace/{chunk-IFVVM2VT.js → chunk-6YOG4YOH.js} +1 -1
- package/Marketplace/{chunk-U5AEON4A.js → chunk-74WZQRDU.js} +1 -1
- package/Marketplace/{chunk-PD4C3QPZ.js → chunk-7PB4RY6H.js} +1 -1
- package/Marketplace/{chunk-SKBVCSWP.js → chunk-7Y7DL6IM.js} +1 -1
- package/Marketplace/{chunk-7CP3OSKC.js → chunk-BC4FEDI4.js} +1 -1
- package/Marketplace/{chunk-VTTAWWRF.js → chunk-BFUF4KKG.js} +1 -1
- package/Marketplace/{chunk-JOSLTOJC.js → chunk-BM4TQ2XD.js} +1 -1
- package/Marketplace/{chunk-ZTQXHQDN.js → chunk-CHITKM53.js} +1 -1
- package/Marketplace/{chunk-VHUA5GCZ.js → chunk-CKQKU4Y6.js} +1 -1
- package/Marketplace/{chunk-NV26AQKT.js → chunk-CPN54WLB.js} +1 -1
- package/Marketplace/{chunk-VMCRPVYZ.js → chunk-DHVOWRDT.js} +1 -1
- package/Marketplace/{chunk-2AJUUZFF.js → chunk-ECBGKR2L.js} +1 -1
- package/Marketplace/{chunk-W5AL5H2N.js → chunk-EQ4VDWRC.js} +1 -1
- package/Marketplace/{chunk-2CWB26KO.js → chunk-EXTRP54Z.js} +1 -1
- package/Marketplace/{chunk-AUXH37N2.js → chunk-FJTNY7YV.js} +1 -1
- package/Marketplace/{chunk-KAXLULSL.js → chunk-G6XX7VBV.js} +1 -1
- package/Marketplace/{chunk-NBCLCR62.js → chunk-HASFGC5M.js} +1 -1
- package/Marketplace/{chunk-622ZBEQT.js → chunk-HBDKLS2C.js} +1 -1
- package/Marketplace/{chunk-L4LHOLTA.js → chunk-IHAC3FTK.js} +1 -1
- package/Marketplace/{chunk-JMJSZXTK.js → chunk-KJXHHWWM.js} +1 -1
- package/Marketplace/{chunk-7MDPZ4NX.js → chunk-LJEMNZKK.js} +1 -1
- package/Marketplace/{chunk-4WHUSUHN.js → chunk-LS427CM3.js} +1 -1
- package/Marketplace/{chunk-Y3MKFFH7.js → chunk-MJAXBOJF.js} +1 -1
- package/Marketplace/{chunk-V3VWDNJC.js → chunk-MPCZQ2GX.js} +1 -1
- package/Marketplace/{chunk-3FZB2PN2.js → chunk-MSZQMFBN.js} +1 -1
- package/Marketplace/chunk-N4TFRBKT.js +3 -0
- package/Marketplace/{chunk-7KLEPZXV.js → chunk-NEJD7UBO.js} +1 -1
- package/Marketplace/{chunk-4PDUAO6G.js → chunk-P4TXRTZR.js} +1 -1
- package/Marketplace/{chunk-GVMGR2ZA.js → chunk-PLFJZWAW.js} +1 -1
- package/Marketplace/{chunk-52QY5PZN.js → chunk-PXG4PUP4.js} +1 -1
- package/Marketplace/{chunk-MWRLHBU6.js → chunk-R3DLO7DW.js} +1 -1
- package/Marketplace/{chunk-OEEQLKK3.js → chunk-R7OZJUFF.js} +1 -1
- package/Marketplace/{chunk-FFMRENF3.js → chunk-RMCDBZUB.js} +1 -1
- package/Marketplace/{chunk-ZCXTH7QS.js → chunk-S2QFGOC3.js} +1 -1
- package/Marketplace/{chunk-JI4ELPJW.js → chunk-SS5ZLBHA.js} +1 -1
- package/Marketplace/{chunk-PWHANPEF.js → chunk-T2D72BMT.js} +1 -1
- package/Marketplace/{chunk-GPIOS33D.js → chunk-T2FPKUMI.js} +1 -1
- package/Marketplace/{chunk-CIWMBRWY.js → chunk-TBJEUCQA.js} +2 -2
- package/Marketplace/{chunk-TPKSZN3I.js → chunk-TZ2UUTSG.js} +1 -1
- package/Marketplace/{chunk-ME36VSK5.js → chunk-U2D27KDO.js} +1 -1
- package/Marketplace/{chunk-WXMGMMQ7.js → chunk-VHAVTK3S.js} +1 -1
- package/Marketplace/{chunk-RRGKG4PE.js → chunk-VYM5Y6YE.js} +1 -1
- package/Marketplace/{chunk-TE3BD5FH.js → chunk-VZ5JNPS6.js} +1 -1
- package/Marketplace/{chunk-RR577B2W.js → chunk-VZR3GAA5.js} +1 -1
- package/Marketplace/{chunk-O4ISYWXL.js → chunk-W7W43H3O.js} +1 -1
- package/Marketplace/{chunk-NPDKHBFY.js → chunk-WKB4EU23.js} +1 -1
- package/Marketplace/{chunk-LWYLAWMC.js → chunk-X776TY3G.js} +1 -1
- package/Marketplace/{chunk-4SN2PPHZ.js → chunk-XCRNNTPJ.js} +1 -1
- package/Marketplace/{chunk-5IZXGEQ4.js → chunk-XDCFS4W5.js} +1 -1
- package/Marketplace/{chunk-FY5KUYKR.js → chunk-XUSLCIQH.js} +1 -1
- package/Marketplace/{chunk-VAHROJZ6.js → chunk-YHL3HEAR.js} +1 -1
- package/Marketplace/{chunk-CVHWI4PB.js → chunk-ZRP757C4.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7PHXN73B.js → main-Q2RMAIM7.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-BWF252DC.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-CLX6T6AB.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-UASBQJZD.js";import{g as at,i as rt,j as lt}from"./chunk-LLMHCE7Y.js";import"./chunk-DCGQK4V6.js";import{a as Ze,b as qe,c as Je}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as Ke,b as Qe}from"./chunk-P2ISUSTI.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as Ae,b as $e,c as We}from"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import{a as ze}from"./chunk-OEEQLKK3.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-2CWB26KO.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{c as Oe,d as Re,e as Be}from"./chunk-474G6BPL.js";import{b as Fe}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as ne}from"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import{e as Le}from"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import{qa as Pe}from"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as Ie}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as te}from"./chunk-VHUA5GCZ.js";import"./chunk-MWRLHBU6.js";import{a as Ee}from"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{b as Ve,c as ke,h as W,m as L,x as Ne,z}from"./chunk-7HUEGPJN.js";import{b as be,e as Te}from"./chunk-ZE4OOGMT.js";import{g as Me}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as $,z as xe}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as F,Aa as h,Da as Q,Dc as N,Eb as k,Fc as Z,Hc as B,Ic as d,Jc as b,Kc as E,Mc as _e,Nc as we,Oc as Ce,S as pe,Sc as ve,Uc as Se,Vc as q,Wc as U,Xb as w,Y as me,Yc as A,Zb as C,ac as O,bc as R,ca as ce,cc as p,db as ue,dc as o,ec as a,ed as Y,fc as v,fd as De,gb as l,gc as x,gd as oe,ha as S,hc as M,i as de,ic as ie,id as H,mc as D,md as J,oa as m,pa as c,r as se,rc as g,rd as ye,sd as V,tc as _,wa as I,xc as he,yb as P,yc as fe,zc as ge}from"./chunk-5VYDZBNH.js";import{a as re,b as le}from"./chunk-QWWW7GFA.js";function ht(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ft(t,s){if(t&1&&O(0,ht,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function gt(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,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,"over-due"],["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(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ft,2,0)(14,gt,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var _t=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(u){return m(r),we(n.time,u)||(n.time=u),c(u)}),g("ngModelChange",function(u){return m(r),c(n.onTimeChange(u))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,_t))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],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}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function wt(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function Ct(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function St(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function Dt(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=h(!1),this.selectedChannelId=h(null),this.channelOptions=h(this.authService.getChannels()),this.channelType=X,this.selectedChannel=h(null),this.showTimePicker=h(!1),this.startDate=h(null),this.endDate=h(null),this.startTime=h("00:00"),this.endTime=h("23:59"),this.minDate=h(new Date),this.maxDate=h(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=h(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],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(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(u){return m(r),n.selectedChannelId.set(u),c(n.onSelectChannel())}),O(10,wt,3,3,"ng-option",7,F),a()()(),w(12,Ct,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,vt,5,0,"p",5)(19,St,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(u){return m(r),c(n.startDate.set(u))})("click",function(){m(r);let u=N(26);return c(u.open())}),a(),o(24,"input",12),g("ngModelChange",function(u){return m(r),n.endDate.set(u),c(n.onFilterDateChange())})("click",function(){m(r);let u=N(26);return c(u.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(u){return m(r),n.rememberMe.set(u),c(n.onChangeRememberMe(u))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,Dt,5,2,"div",16),a()()()()}if(i&2){let r,f,u,ut=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",ut)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()&&((u=n.selectedChannel())==null?null:u.TypeID)!=n.channelType.Plugo?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],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}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var yt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),xt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),bt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),Tt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Mt=()=>({"min-width":"100%"}),Et=()=>({minWidth:"14rem"}),Pt=(t,s)=>({"over-due-today":t,"over-due":s});function Vt(t,s){t&1&&d(0," Created Date ")}function kt(t,s){t&1&&d(0," Modified Date ")}function Nt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Et))}}function It(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Vt,1,0)(6,kt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,Nt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Rt(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Bt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function At(t,s){if(t&1&&(o(0,"ul",26),O(1,Bt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function $t(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
|
|
1
|
+
import{a as ae}from"./chunk-CLX6T6AB.js";import{a as Xe,b as et,c as tt,e as nt,f as it,g as ot}from"./chunk-UASBQJZD.js";import{g as at,i as rt,j as lt}from"./chunk-LLMHCE7Y.js";import"./chunk-DCGQK4V6.js";import{a as Ze,b as qe,c as Je}from"./chunk-DEBF436Y.js";import"./chunk-RZM45AEI.js";import"./chunk-H276HPOG.js";import"./chunk-SJBVLNCR.js";import{a as Ke,b as Qe}from"./chunk-P2ISUSTI.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as Ae,b as $e,c as We}from"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import{a as ze}from"./chunk-R7OZJUFF.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-EXTRP54Z.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{c as Oe,d as Re,e as Be}from"./chunk-474G6BPL.js";import{b as Fe}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as ne}from"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import{f as je,g as Ge,h as Ue,i as Ye,j as He}from"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import{e as Le}from"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import{qa as Pe}from"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as Ie}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as te}from"./chunk-CKQKU4Y6.js";import"./chunk-R3DLO7DW.js";import{a as Ee}from"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as ee}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as X,c as y}from"./chunk-NNVT5X6O.js";import{b as Ve,c as ke,h as W,m as L,x as Ne,z}from"./chunk-7HUEGPJN.js";import{b as be,e as Te}from"./chunk-ZE4OOGMT.js";import{g as Me}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as $,z as xe}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as F,Aa as h,Da as Q,Dc as N,Eb as k,Fc as Z,Hc as B,Ic as d,Jc as b,Kc as E,Mc as _e,Nc as we,Oc as Ce,S as pe,Sc as ve,Uc as Se,Vc as q,Wc as U,Xb as w,Y as me,Yc as A,Zb as C,ac as O,bc as R,ca as ce,cc as p,db as ue,dc as o,ec as a,ed as Y,fc as v,fd as De,gb as l,gc as x,gd as oe,ha as S,hc as M,i as de,ic as ie,id as H,mc as D,md as J,oa as m,pa as c,r as se,rc as g,rd as ye,sd as V,tc as _,wa as I,xc as he,yb as P,yc as fe,zc as ge}from"./chunk-5VYDZBNH.js";import{a as re,b as le}from"./chunk-QWWW7GFA.js";function ht(t,s){if(t&1&&(x(0,"tr")(1,"td"),d(2),M(),x(3,"td"),d(4),M(),x(5,"td"),d(6),M(),x(7,"td"),d(8),M()()),t&2){let e=s.$implicit,i=s.$index;Z("over-due",e.Exception),l(2),b(i+1),l(2),b(e.Number),l(2),b(e.Status),l(2),b(e.Exception)}}function ft(t,s){if(t&1&&O(0,ht,9,6,"tr",6,F),t&2){let e,i=_();R((e=i.downloadResult())==null?null:e.Body)}}function gt(t,s){t&1&&(x(0,"tr",5)(1,"td",7)(2,"div",8),ie(3,"i",9),M(),x(4,"h4",10),d(5," There is no order to processed "),M()()())}var dt=(()=>{class t{constructor(){this.downloadResult=V()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,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,"over-due"],["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(i,n){if(i&1&&(x(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr"),ie(5,"th",4),x(6,"th"),d(7,"Order Number"),M(),x(8,"th"),d(9,"Status"),M(),x(10,"th"),d(11,"Exception"),M()()(),x(12,"tbody"),w(13,ft,2,0)(14,gt,6,0,"tr",5),M()()()()),i&2){let r;l(13),C(((r=n.downloadResult())==null||r.Body==null?null:r.Body.length)>0?13:14)}},encapsulation:2,changeDetection:0})}}return t})();var _t=()=>({standalone:!0}),pt=(()=>{class t{constructor(){this.datePipe=S($),this.fullWidth=V(!1),this.placeholder=V(""),this.timeChange=new I}ngOnInit(){}onTimeChange(e){let i=null;e&&(i=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(i),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:[1,"fullWidth"],placeholder:[1,"placeholder"]},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","baseZIndex","ngModel","timeOnly","ngModelOptions","placeholder"],["size","small","label","Close",3,"click"]],template:function(i,n){if(i&1){let r=D();o(0,"p-datepicker",1,0),Ce("ngModelChange",function(u){return m(r),we(n.time,u)||(n.time=u),c(u)}),g("ngModelChange",function(u){return m(r),c(n.onTimeChange(u))})("onSelect",function(){return m(r),c(n.onShowCalendar())}),o(2,"p-footer")(3,"p-button",2),g("click",function(){return m(r),N(1).hideOverlay(),c(n.onShowCalendar())}),a()()()}i&2&&(Z("full-width",n.fullWidth()),p("baseZIndex",1100),_e("ngModel",n.time),p("timeOnly",!0)("ngModelOptions",U(7,_t))("placeholder",n.placeholder()))},dependencies:[z,W,L,Je,qe,Ze,Pe],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}"],changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.httpService=S(Te),this.toastr=S(be),this.datePipe=S($)}gerChannelDetailById(e){return this.httpService.post(ee.GetChannelDetail,{ID:e})}getOrderPreview(e){return this.httpService.post(ee.GetOrderPreviewV2,e)}getDownloadOrder(e){return this.httpService.post(ee.GetDownloadOrderV2,e)}onPreviewOrder(e){return this.validateDatePreview(e)?this.getOrderPreview(e).pipe(me(i=>{i.Data?.length===0&&this.toastrEmptyPreview(e)})):de}toastrEmptyPreview(e){let i=this.datePipe.transform(e.From,"dd MMM yyyy"),n=this.datePipe.transform(e.To,"dd MMM yyyy"),r=e.TimeFrom?e.TimeFrom:"",f=e.TimeTo?e.TimeTo:"";this.toastr.info(`There is no orders from ${i} ${r} to ${n} ${f}!`,"No Orders!")}validateDatePreview(e){let i=!0;return e.downloadType==!0?y.getDaysDiff(e?.From,e?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),i=!1):y.getDaysDiff(e?.From,e?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),i=!1),i}getDateTitle(e,i){let n=y.formatTitleFromDate(new Date(e),new Date(i)),r=this.datePipe.transform(e,n),f=this.datePipe.transform(i,"dd MMM yyyy");return`${n==null?"":r+"-"} ${f}`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac})}}return t})();function wt(t,s){if(t&1&&(o(0,"ng-option",7),v(1,"img",17),d(2),a()),t&2){let e=s.$implicit;p("value",e.ID),l(),p("src",e==null?null:e.Img,ue),l(),E("",e.Name," ")}}function Ct(t,s){if(t&1){let e=D();o(0,"div",8)(1,"div",4)(2,"h5"),d(3,"Type"),a(),o(4,"p",5),d(5,"Select Type want to download"),a()(),o(6,"div",4)(7,"div",18)(8,"div")(9,"mat-radio-group",19),g("ngModelChange",function(n){m(e);let r=_();return r.downloadType.set(n),c(r.onDownloadTypeChange())}),o(10,"mat-radio-button",20),d(11," Orders "),a(),o(12,"mat-radio-button",21),d(13," Disbursement "),a()()()(),o(14,"div",22)(15,"div",23),v(16,"i",24),a(),o(17,"p",25),d(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(t&2){let e=_();l(9),p("ngModel",e.downloadType()),l(),p("value",!1),l(2),p("value",!0)}}function vt(t,s){t&1&&(o(0,"p",5),d(1," Select Disbursement date "),o(2,"span",26),d(3,"(payment date / order complete date)"),a(),d(4," of the channel you want to download (Max 1 Week). "),a())}function St(t,s){t&1&&(o(0,"p",5),d(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function Dt(t,s){if(t&1){let e=D();o(0,"div",16)(1,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.startTime.set(n),c(r.onStartTimeChange())}),a(),o(2,"span",28),d(3,"-"),a(),o(4,"app-timepicker",27),g("timeChange",function(n){m(e);let r=_();return r.endTime.set(n),c(r.onEndTimeChange())}),a()()}if(t&2){let e=_();l(),p("time",e.startTime()),l(3),p("time",e.endTime())}}var mt=(()=>{class t{constructor(){this.reset=V(!1),this.authService=S(te),this.tokenService=S(Ee),this.downloadService=S(j),this.downloadType=h(!1),this.selectedChannelId=h(null),this.channelOptions=h(this.authService.getChannels()),this.channelType=X,this.selectedChannel=h(null),this.showTimePicker=h(!1),this.startDate=h(null),this.endDate=h(null),this.startTime=h("00:00"),this.endTime=h("23:59"),this.minDate=h(new Date),this.maxDate=h(new Date),this.filterData=new I,this._onRememberMeChange=ye({alias:"onRememberMeChange"}),this.rememberMe=h(!1),Q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0}),this.initDateValidation()}initDateValidation(){let e=this.tokenService?.getTokenValue(),i=e?.DownloadRange?JSON.parse(e?.DownloadRange):0;if(i<=0)this.minDate.set(null),this.maxDate.set(null);else{let n=new Date,r=y.addDays(n,i-1);this.minDate.set(r)}}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(e=>e.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(se(e=>e?.Model),pe(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let e=1;this.startDate()&&this.endDate()&&(e=y.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>e==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}onChangeRememberMe(e){this._onRememberMeChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange",_onRememberMeChange:"onRememberMeChange"},features:[q([j,Le()])],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(i,n){if(i&1){let r=D();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),d(5,"Select a Channel"),a(),o(6,"p",5),d(7,"Select Channel want to download order"),a()(),o(8,"div",4)(9,"ng-select",6),g("ngModelChange",function(u){return m(r),n.selectedChannelId.set(u),c(n.onSelectChannel())}),O(10,wt,3,3,"ng-option",7,F),a()()(),w(12,Ct,19,3,"div",8),Y(13,"async"),o(14,"div",8)(15,"div",4)(16,"h5"),d(17,"Date Range"),a(),w(18,vt,5,0,"p",5)(19,St,2,0,"p",5),a(),o(20,"div",4)(21,"div",9)(22,"mat-date-range-input",10)(23,"input",11),g("ngModelChange",function(u){return m(r),c(n.startDate.set(u))})("click",function(){m(r);let u=N(26);return c(u.open())}),a(),o(24,"input",12),g("ngModelChange",function(u){return m(r),n.endDate.set(u),c(n.onFilterDateChange())})("click",function(){m(r);let u=N(26);return c(u.open())}),a()(),v(25,"mat-date-range-picker",null,0),a(),o(27,"div",13)(28,"input",14),g("ngModelChange",function(u){return m(r),n.rememberMe.set(u),c(n.onChangeRememberMe(u))}),a(),o(29,"h5",15),d(30,"Save Date"),a()(),w(31,Dt,5,2,"div",16),a()()()()}if(i&2){let r,f,u,ut=N(26);l(9),p("clearable",!1)("ngModel",n.selectedChannelId()),l(),R(n.channelOptions()),l(2),C((r=De(13,11,n.channelDetail$))!=null&&r.ServiceFeeWriteOff&&((r=n.selectedChannel())==null?null:r.TypeID)==n.channelType.Tokopedia?12:-1),l(6),C(n.downloadType()&&((f=n.selectedChannel())==null?null:f.TypeID)==n.channelType.Tokopedia?18:19),l(4),p("rangePicker",ut)("min",n.minDate())("max",n.maxDate()),l(),p("ngModel",n.startDate()),l(),p("ngModel",n.endDate()),l(4),p("ngModel",n.rememberMe()),l(3),C(n.showTimePicker()&&((u=n.selectedChannel())==null?null:u.TypeID)!=n.channelType.Plugo?31:-1)}},dependencies:[Be,Re,Oe,We,Ae,$e,z,ke,Ve,W,Ne,L,pt,Ye,je,He,Ge,Ue,xe],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}"],changeDetection:0})}}return t})();var T=(function(t){return t.ALL="all",t.SYNC="sync",t.WRONG="wrong",t.UNSYNC="unsync",t})(T||{});var G=(function(t){return t[t.DoNothing=0]="DoNothing",t[t.New=1]="New",t[t.Update=2]="Update",t})(G||{});var yt=(t,s)=>({"btn-secondary text-white":t,"btn-outline-dark":s}),xt=(t,s)=>({"btn-success":t,"btn-outline-success":s}),bt=(t,s)=>({"btn-warning text-white":t,"btn-outline-warning":s}),Tt=(t,s)=>({"btn-danger":t,"btn-outline-danger":s}),Mt=()=>({"min-width":"100%"}),Et=()=>({minWidth:"14rem"}),Pt=(t,s)=>({"over-due-today":t,"over-due":s});function Vt(t,s){t&1&&d(0," Created Date ")}function kt(t,s){t&1&&d(0," Modified Date ")}function Nt(t,s){if(t&1){let e=D();o(0,"p-multiselect",24),g("onChange",function(n){let r=m(e).filterCallback;return c(r(n.value))}),a()}if(t&2){let e=s.$implicit,i=_(2);p("ngModel",e)("options",i.channelStatusOptions())("panelStyle",U(3,Et))}}function It(t,s){if(t&1&&(o(0,"tr"),v(1,"th",18),o(2,"th",19),d(3,"Number"),a(),o(4,"th",20),w(5,Vt,1,0)(6,kt,1,0),a(),o(7,"th",21)(8,"div",22),d(9," Channel "),o(10,"p-columnFilter",23),k(11,Nt,1,4,"ng-template",null,3,H),a()()(),o(13,"th",21),d(14,"POS Status"),a(),o(15,"th"),d(16,"Action"),a(),v(17,"th",18),a()),t&2){let e,i=_();l(5),C(((e=i.selectedChannel())==null?null:e.TypeID)===i.channelType.WooCommerce?5:6),l(5),p("showMatchModes",!1)("showOperator",!1)("showAddButton",!1)}}function Ft(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Date,"dd MMM yyyy HH:mm:ss"))}}function Ot(t,s){if(t&1&&(o(0,"td"),d(1),Y(2,"date"),a()),t&2){let e=_().$implicit;l(),b(oe(2,1,e.Modified,"dd MMM yyyy HH:mm:ss"))}}function Rt(t,s){if(t&1&&(o(0,"span"),d(1),a()),t&2){let e=_().$implicit;l(),b(e.ActionString)}}function Bt(t,s){if(t&1&&(o(0,"li"),d(1),a()),t&2){let e=s.$implicit;l(),b(e)}}function At(t,s){if(t&1&&(o(0,"ul",26),O(1,Bt,2,1,"li",null,F),a()),t&2){let e=_().$implicit;l(),R(e.ActionString)}}function $t(t,s){if(t&1&&(o(0,"span",27),v(1,"i",28),a()),t&2){let e=_().$implicit;p("title",Se("Delivery : ",e.DeliveryState,`
|
|
2
2
|
Payment : `,e.PaymentState))}}function Wt(t,s){if(t&1&&(o(0,"tr")(1,"td"),d(2),a(),o(3,"td"),d(4),a(),w(5,Ft,3,4,"td")(6,Ot,3,4,"td"),o(7,"td")(8,"span"),d(9),a(),d(10),a(),o(11,"td",25)(12,"span"),d(13),a(),d(14),a(),o(15,"td"),w(16,Rt,2,1,"span"),w(17,At,3,0,"ul",26),a(),o(18,"td"),w(19,$t,2,3,"span",27),a()()),t&2){let e,i=s.$implicit,n=s.rowIndex,r=_();l(2),b(n+1),l(2),b(i.Number),l(),C(((e=r.selectedChannel())==null?null:e.TypeID)===r.channelType.WooCommerce?5:6),l(4),E("",i.ChannelStatus," - "),l(),E("",i.ChannelStatusDescription," "),l(),B(A(13,Pt,(i==null?null:i.Action)==r.actionPreviewOrder.Update,(i==null?null:i.Action)==r.actionPreviewOrder.New)),p("matTooltip",i.POSStatus==91||i.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),E("",i.POSStatus," - "),l(),E("",i.POSStatusDescription," "),l(2),C(i.ActionString.length==1?16:-1),l(),C(i.ActionString.length>1?17:-1),l(2),C(i.ChannelStatus!=99&&i.POSStatus!=99?19:-1)}}function Lt(t,s){t&1&&(o(0,"tr",29)(1,"td",30)(2,"div",31),v(3,"i",32),a(),o(4,"h4",33),d(5," There is no order to processed "),a()()())}var ct=(()=>{class t{constructor(){this.orderPreview=V(),this.selectedChannel=V(),this.channelType=X,this.allData=h(0),this.syncData=h(0),this.wrongData=h(0),this.unsyncData=h(0),this.pillStatus=h(T.ALL),this.actionPreviewOrder=G,this.previewStatus=T,this.displayPreviewData=h([]),this.exportOrders=new I,this.channelStatusOptions=J(()=>{let e=this.orderPreview()??[],i=new Map;return e.forEach(n=>{i.has(n.ChannelStatus)||i.set(n.ChannelStatus,n.ChannelStatusDescription)}),Array.from(i.entries()).map(([n,r])=>({label:`${n} - ${r}`,value:n}))}),Q(()=>{this.orderPreview()&&(this.filterPreviewData(T.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(e){this.pillStatus.update(()=>e),this.displayPreviewData.update(()=>this.filterDataByStatus(e))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(T.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(T.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(T.UNSYNC).length)}filterDataByStatus(e){let i=[];switch(e){case T.ALL:i=this.orderPreview();break;case T.SYNC:i=this.orderPreview().filter(n=>n.Action==G.DoNothing);break;case T.WRONG:i=this.orderPreview().filter(n=>n.Action==G.Update);break;case T.UNSYNC:i=this.orderPreview().filter(n=>n.Action==G.New);break}return i}onExportOrders(){this.exportOrders.emit()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},decls:30,vars:27,consts:[["header",""],["body",""],["emptymessage",""],["filter",""],[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"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[3,"value","tableStyle"],["width","1%"],["width","25%"],["width","15%"],["width","10%"],[1,"d-flex","align-items-center","justify-content-between","gap-2"],["field","ChannelStatus","matchMode","in","display","menu",3,"showMatchModes","showOperator","showAddButton"],["optionLabel","label","optionValue","value","placeholder","All",2,"min-width","14rem","width","14rem",3,"onChange","ngModel","options","panelStyle"],["matTooltipClass","custom-width-tooltip",3,"matTooltip"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(i,n){if(i&1){let r=D();o(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"div")(5,"ul",8)(6,"li",9)(7,"button",10),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.ALL))}),d(8),a()(),o(9,"li",11)(10,"button",12),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.SYNC))}),d(11),a()(),o(12,"li",11)(13,"button",13),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.WRONG))}),d(14),a()(),o(15,"li",11)(16,"button",14),g("click",function(){return m(r),c(n.filterPreviewData(n.previewStatus.UNSYNC))}),d(17),a()()()(),o(18,"div")(19,"button",15),g("click",function(){return m(r),c(n.onExportOrders())}),v(20,"i",16),o(21,"span"),d(22,"Export"),a()()()()(),o(23,"p-table",17),k(24,It,18,4,"ng-template",null,0,H)(26,Wt,20,16,"ng-template",null,1,H)(28,Lt,6,0,"ng-template",null,2,H),a()()()}i&2&&(l(7),B(A(14,yt,n.pillStatus()=="all",n.pillStatus()!="all")),l(),E(" All (",n.allData(),") "),l(2),B(A(17,xt,n.pillStatus()=="sync",n.pillStatus()!="sync")),l(),E(" Existing (",n.syncData(),") "),l(2),B(A(20,bt,n.pillStatus()=="wrong",n.pillStatus()!="wrong")),l(),E(" Wrong Status (",n.wrongData(),") "),l(2),B(A(23,Tt,n.pillStatus()=="unsync",n.pillStatus()!="unsync")),l(),E(" Missing (",n.unsyncData(),") "),l(6),p("value",n.displayPreviewData())("tableStyle",U(26,Mt)))},dependencies:[ne,Ie,lt,at,rt,Qe,Ke,z,W,L,$],encapsulation:2,changeDetection:0})}}return t})();var zt=["stepper"];function jt(t,s){if(t&1){let e=D();o(0,"div",2)(1,"button",20),g("click",function(){m(e);let n=_();return c(n.onStepperBack())}),d(2," Back "),a(),o(3,"button",21),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(4," Next "),a()()}if(t&2){let e=_();l(3),p("disabled",e.disabledNextFilter())}}function Gt(t,s){if(t&1){let e=D();o(0,"button",22),g("click",function(){m(e);let n=_();return c(n.onNextStep())}),d(1," Next "),a()}if(t&2){let e=_();p("disabled",e.disabledNextFilter())}}function Ut(t,s){if(t&1){let e=D();o(0,"button",23),g("click",function(){m(e);let n=_();return c(n.onNewDownload())}),v(1,"i",24),d(2," New "),a()}}function Yt(t,s){t&1&&(v(0,"i",25),o(1,"span"),d(2,"Filter"),a())}function Ht(t,s){t&1&&(v(0,"i",26),o(1,"span"),d(2,"Preview"),a())}function Kt(t,s){if(t&1){let e=D();o(0,"preview-step",27),g("onExportOrders",function(){m(e);let n=_();return c(n.onExportOrders())}),a()}if(t&2){let e=_();p("orderPreview",s)("selectedChannel",e.selectedChannel())}}function Qt(t,s){t&1&&(v(0,"i",28),o(1,"span"),d(2,"Finish"),a())}function Zt(t,s){t&1&&v(0,"complete-step",16),t&2&&p("downloadResult",s)}function qt(t,s){t&1&&(o(0,"h6"),d(1,"1"),a())}function Jt(t,s){t&1&&(o(0,"h6"),d(1,"2"),a())}function Xt(t,s){t&1&&(o(0,"h6"),d(1,"3"),a())}var ki=(()=>{class t{constructor(){this.downloadService=S(j),this.orderService=S(ae),this.productService=S(ze),this.authService=S(te),this.stepperSelectedIndex=h(0),this.disabledNextFilter=h(!0),this.filter=h(void 0),this.isResetFilter=h(!1),this.orderPreview=h(void 0),this.downloadPreview=h(void 0),this.pageTitle=h("Download to POS"),this.cacheKey=h(y.GuidEMpty),this.rememberMe=h(!1),this.selectedChannel=J(()=>{let e=this.filter()?.channelId;if(e)return this.productService.findChannelById(e,this.authService.getChannels())})}onFilterChange(e){this.filter.set(e),this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>{let e=this.filter();return y.IsEmpty(e?.channelId)||!y.isValidDate(e.startDate)||!y.isValidDate(e.endDate)})}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let e=this.productService.findChannelById(this.filter().channelId,this.authService.getChannels());this.setPageTitle(`Preview ${e?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,IsDisbursement:e.downloadType};y.IsNotEmpty(e.startTime)&&(i=le(re({},i),{TimeFrom:e.startTime+":00",TimeTo:e.endTime+":00"})),this.downloadService.onPreviewOrder(i).subscribe(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext()),this.orderPreview.set(n.Data)})}onExportOrders(){let e=this.filter(),i={ID:e.channelId,From:e.startDate?e.startDate:null,To:e.endDate?e.endDate:null},n=`Orders ${this.downloadService.getDateTitle(e.startDate,e.endDate)}`;this.orderService.exportOrders(i,n).subscribe()}onDownload(){let e=this.filter(),i={ID:e.channelId,From:e.startDate,To:e.endDate,ListPreview:[],IsDisbursement:e.downloadType,CacheKey:this.cacheKey()},n=this.orderPreview();i.ListPreview=n,this.downloadService.getDownloadOrder(i).subscribe(r=>{this.downloadPreview.set(r),this.onStepperNext()})}setPageTitle(e){let i=this.filter();this.pageTitle.update(()=>`
|
|
3
3
|
${e} (${this.downloadService.getDateTitle(i.startDate,i.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.set(void 0),this.downloadPreview.set(void 0),this.pageTitle.update(()=>"Download to POS")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-download-v2"]],viewQuery:function(i,n){if(i&1&&he(zt,5),i&2){let r;fe(r=ge())&&(n.stepper=r.first)}},features:[q([j,ae,{provide:Xe,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:17,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","selectedChannel"],["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","selectedChannel"],[1,"fa-solid","fa-flag","me-3"]],template:function(i,n){if(i&1){let r=D();o(0,"mainpanel",1)(1,"actions"),w(2,jt,5,1,"div",2),w(3,Gt,2,1,"button",3),w(4,Ut,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),g("selectedIndexChange",function(u){return m(r),c(n.stepperSelectedIndex.set(u))}),o(12,"mat-step",10),k(13,Yt,3,0,"ng-template",11),o(14,"filter-step",12),g("onFilterChange",function(u){return m(r),c(n.onFilterChange(u))})("onRememberMeChange",function(u){return m(r),c(n.rememberMe.set(u))}),a()(),o(15,"mat-step",13),k(16,Ht,3,0,"ng-template",11),w(17,Kt,1,2,"preview-step",14),a(),o(18,"mat-step",15),k(19,Qt,3,0,"ng-template",11),w(20,Zt,1,1,"complete-step",16),a(),k(21,qt,2,0,"ng-template",17)(22,Jt,2,0,"ng-template",18)(23,Xt,2,0,"ng-template",19),a()()()()()()()}if(i&2){let r,f,u=N(11);p("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",n.pageTitle())("description",n.pageTitle()),l(2),C(n.stepperSelectedIndex()==1?2:-1),l(),C(n.stepperSelectedIndex()==0?3:-1),l(),C(n.stepperSelectedIndex()==2?4:-1),l(6),p("ngClass",ve("last-edited-step-"+u.selectedIndex))("selectedIndex",n.stepperSelectedIndex()),l(2),p("completed",!1)("editable",n.stepperSelectedIndex()!=2),l(2),p("reset",n.isResetFilter()),l(),p("editable",n.stepperSelectedIndex()!=2)("completed",!1),l(2),C((r=n.orderPreview())?17:-1,r),l(3),C((f=n.downloadPreview())?20:-1,f)}},dependencies:[dt,mt,ct,ot,nt,et,it,tt,Fe,Me,ne],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 X}from"./chunk-ZSUWHVKX.js";import{f as J}from"./chunk-VHUA5GCZ.js";import{a as G}from"./chunk-MWRLHBU6.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{a as Y}from"./chunk-MDHMVGYC.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de,z as le}from"./chunk-7HUEGPJN.js";import{b as Q}from"./chunk-ZE4OOGMT.js";import{d as K}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as H}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as O,Aa as f,Dc as S,Hc as T,Ic as s,Jc as N,Kc as R,Lc as j,S as I,Xb as _,Yc as z,Zb as h,ac as P,bc as E,ca as D,cc as x,db as C,dc as o,ec as r,ed as $,fc as m,fd as q,gb as a,gc as v,hc as M,ic as V,mc as k,nc as L,oa as p,pa as g,rb as w,rc as u,sd as B,tc as d,xc as A,yb as y,yc as U,zc as F}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|
|
1
|
+
import{a as X}from"./chunk-ZSUWHVKX.js";import{f as J}from"./chunk-CKQKU4Y6.js";import{a as G}from"./chunk-R3DLO7DW.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{a as Y}from"./chunk-MDHMVGYC.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de,z as le}from"./chunk-7HUEGPJN.js";import{b as Q}from"./chunk-ZE4OOGMT.js";import{d as K}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as H}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as O,Aa as f,Dc as S,Hc as T,Ic as s,Jc as N,Kc as R,Lc as j,S as I,Xb as _,Yc as z,Zb as h,ac as P,bc as E,ca as D,cc as x,db as C,dc as o,ec as r,ed as $,fc as m,fd as q,gb as a,gc as v,hc as M,ic as V,mc as k,nc as L,oa as p,pa as g,rb as w,rc as u,sd as B,tc as d,xc as A,yb as y,yc as U,zc as F}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-
|
|
1
|
+
import"./chunk-QWWW7GFA.js";var o=[{path:"",loadComponent(){return import("./chunk-5L5EFIUV.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-BC4FEDI4.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-HBDKLS2C.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-ZRP757C4.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-MJAXBOJF.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-7PB4RY6H.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-XDCFS4W5.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-3EY234AE.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-XUSLCIQH.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"log/detail",loadComponent(){return import("./chunk-XFTWDHBO.js").then(t=>t.DownloadOrderDetailComponent)},title:"Download Log Detail"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
|