dealpos 25.35.2 → 25.35.3
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/browser/{chunk-FY4JABYL.js → chunk-2XMIL3M5.js} +1 -1
- package/browser/{chunk-LKZE2HD4.js → chunk-32XPQS72.js} +1 -1
- package/browser/{chunk-ZYTLUHOS.js → chunk-3BF3LB6Z.js} +1 -1
- package/browser/{chunk-VMIXOKE7.js → chunk-3T3RRVKX.js} +1 -1
- package/browser/{chunk-BBRBME3A.js → chunk-3Z3TRQBS.js} +1 -1
- package/browser/{chunk-ETHIPTBJ.js → chunk-4E4L6WXO.js} +1 -1
- package/browser/{chunk-45Q3TR52.js → chunk-5LVF3GQO.js} +1 -1
- package/browser/{chunk-M2DBAY4P.js → chunk-6DJNKKNB.js} +1 -1
- package/browser/{chunk-LHGABVF6.js → chunk-7AAAKDTU.js} +2 -2
- package/browser/{chunk-LYOMQKFY.js → chunk-7BDVBLHM.js} +1 -1
- package/browser/{chunk-2BRCOLHG.js → chunk-7IVZ7O4B.js} +1 -1
- package/browser/{chunk-LFRQUM6J.js → chunk-7J6JNI44.js} +1 -1
- package/browser/{chunk-4DIUJNZF.js → chunk-AAVH5EBY.js} +1 -1
- package/browser/{chunk-FBTUV7TY.js → chunk-AK6EELSP.js} +1 -1
- package/browser/{chunk-SVW3DCFV.js → chunk-BGQQUPTZ.js} +1 -1
- package/browser/{chunk-A477JKU4.js → chunk-BN2DUB4S.js} +1 -1
- package/browser/{chunk-XGQGO4PE.js → chunk-BUFUGEKP.js} +1 -1
- package/browser/{chunk-U7VNF37P.js → chunk-BXFKD2CO.js} +1 -1
- package/browser/{chunk-ZCKT34V7.js → chunk-BZAN6DNV.js} +1 -1
- package/browser/{chunk-AYEQLVMX.js → chunk-CESIM7I2.js} +1 -1
- package/browser/{chunk-EXCJNRRJ.js → chunk-CUD4PHJT.js} +1 -1
- package/browser/{chunk-E5UK2WMM.js → chunk-DDSUKJHT.js} +1 -1
- package/browser/{chunk-M7KP6PSY.js → chunk-DHQUQTIV.js} +1 -1
- package/browser/{chunk-GK45LVUY.js → chunk-DKX7YVH4.js} +1 -1
- package/browser/{chunk-OZOAAIBM.js → chunk-DO6W6BG2.js} +1 -1
- package/browser/{chunk-73ESQDPI.js → chunk-DU2U47CB.js} +1 -1
- package/browser/{chunk-5IY3H7NG.js → chunk-E7SOAHON.js} +1 -1
- package/browser/{chunk-6CUC5ZVY.js → chunk-EIPWN4ZG.js} +1 -1
- package/browser/{chunk-J4SLL7XI.js → chunk-F3QKO3WX.js} +1 -1
- package/browser/{chunk-WDIJOVDQ.js → chunk-FQSQUAUB.js} +1 -1
- package/browser/{chunk-NT4HXAUQ.js → chunk-GIMMGWIY.js} +1 -1
- package/browser/chunk-GLXNXL3M.js +1 -0
- package/browser/chunk-GWY532ZF.js +3 -0
- package/browser/{chunk-2ULGMZHE.js → chunk-H24HNIUV.js} +1 -1
- package/browser/{chunk-6E4UKP3I.js → chunk-H5EACBML.js} +2 -2
- package/browser/chunk-H7DCK5WJ.js +1 -0
- package/browser/{chunk-RXY2UMNO.js → chunk-HJZUPJW2.js} +1 -1
- package/browser/{chunk-GFFJDDRS.js → chunk-HKACPPVL.js} +1 -1
- package/browser/{chunk-HV7GI3KE.js → chunk-HSQKKFE6.js} +1 -1
- package/browser/{chunk-66WXWMUG.js → chunk-IWQEXFGO.js} +1 -1
- package/browser/{chunk-XXGDZ22Y.js → chunk-JRMGNV6W.js} +1 -1
- package/browser/chunk-JUDTCQVV.js +1 -0
- package/browser/{chunk-W64M5WBH.js → chunk-K4YUTEMS.js} +1 -1
- package/browser/{chunk-3GB5DSK3.js → chunk-KHHM6IFR.js} +1 -1
- package/browser/{chunk-33JZH2UR.js → chunk-KM4YGIPJ.js} +1 -1
- package/browser/{chunk-CNY7II6H.js → chunk-KQLFNIFZ.js} +1 -1
- package/browser/{chunk-7NMXZ55P.js → chunk-LS4LCNAF.js} +2 -2
- package/browser/{chunk-SO3WWYN3.js → chunk-MERQX2AF.js} +1 -1
- package/browser/{chunk-4YPJAUSY.js → chunk-MLMSIZGP.js} +1 -1
- package/browser/{chunk-FOVCORMR.js → chunk-MUFGLBTW.js} +1 -1
- package/browser/{chunk-WDS6MTSX.js → chunk-MXRJZC7D.js} +2 -2
- package/browser/{chunk-V4OYKDE2.js → chunk-NHVQ6BHI.js} +1 -1
- package/browser/{chunk-LXZS75G2.js → chunk-NLWPMDWU.js} +1 -1
- package/browser/{chunk-WOBW4V44.js → chunk-NMGT5PYX.js} +1 -1
- package/browser/{chunk-CZTNOFUC.js → chunk-NQPOGM3H.js} +1 -1
- package/browser/{chunk-Q76KX5JJ.js → chunk-NY4SVPPU.js} +1 -1
- package/browser/{chunk-Q5YFG526.js → chunk-O3IGBF5Z.js} +1 -1
- package/browser/{chunk-F3ZJVCRK.js → chunk-OFNXPEBH.js} +1 -1
- package/browser/{chunk-P5KSSZK7.js → chunk-P4TUOMJ4.js} +1 -1
- package/browser/{chunk-7B7ON5E6.js → chunk-QZFGYG5J.js} +1 -1
- package/browser/{chunk-K76G23WC.js → chunk-RJSPJ6CG.js} +1 -1
- package/browser/{chunk-Z7WYC46Q.js → chunk-RYONOB6O.js} +1 -1
- package/browser/{chunk-VDKUDQZO.js → chunk-S7QH3NMD.js} +1 -1
- package/browser/{chunk-NPHAQCON.js → chunk-SJ7OFVH5.js} +1 -1
- package/browser/{chunk-5MGHIIE6.js → chunk-SKFIRYCU.js} +2 -2
- package/browser/{chunk-HNBLWEAJ.js → chunk-TYIDA4YO.js} +1 -1
- package/browser/{chunk-VJWRLXE4.js → chunk-W2TSDYEA.js} +1 -1
- package/browser/{chunk-4YAMWP7V.js → chunk-W7HVLC6V.js} +1 -1
- package/browser/{chunk-O7H6QE5A.js → chunk-XEKUUP6Y.js} +1 -1
- package/browser/{chunk-X4VB4DKS.js → chunk-YCPSIUQ3.js} +1 -1
- package/browser/{chunk-7VKHUEU6.js → chunk-YGUNDEOT.js} +1 -1
- package/browser/{chunk-LYGTJSME.js → chunk-ZFMK7BOT.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-WYOICQDK.js → main-XQZCWN5T.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-INDKSR3O.js +0 -3
- package/browser/chunk-LI3MYO4W.js +0 -1
- package/browser/chunk-PDHJSRKI.js +0 -1
- package/browser/chunk-R3IC3THI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ge}from"./chunk-Z5N4EKJ3.js";import{a as Ae,f as Ne}from"./chunk-LFRQUM6J.js";import"./chunk-BMQKMDMC.js";import"./chunk-AYEQLVMX.js";import"./chunk-TOWVTOFV.js";import"./chunk-EYCYL6AL.js";import"./chunk-3YXP5Q5V.js";import{b as Le,c as Re,d as Be,e as We,f as je,g as ze}from"./chunk-SJIEANJU.js";import"./chunk-7BU64MD2.js";import{b as $e}from"./chunk-YOKPVEGO.js";import"./chunk-34GJS34C.js";import"./chunk-NHVOGEOO.js";import{d as Fe}from"./chunk-AYBLEFQB.js";import"./chunk-LCUJHXDF.js";import{b as xe}from"./chunk-NI6KAEXM.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-L2EDFSBR.js";import"./chunk-TEFNN3TY.js";import{d as Se}from"./chunk-GOQ3ZCDK.js";import"./chunk-JKYTSC2D.js";import"./chunk-B7E3DL2Y.js";import"./chunk-H6BFHXJX.js";import"./chunk-MHBOKOSN.js";import"./chunk-S6TMUVGC.js";import"./chunk-PPWHSAY6.js";import{d as Pe,e as Oe,f as De,g as ke,h as Ue,i as Ve}from"./chunk-SO3WWYN3.js";import"./chunk-ETHIPTBJ.js";import{a as be,b as Ee}from"./chunk-M7KP6PSY.js";import"./chunk-AZT6QE56.js";import"./chunk-5UL73W4S.js";import{u as ye,v as Te,w as Me}from"./chunk-677WPFLK.js";import"./chunk-CIBQBSM6.js";import{P as H}from"./chunk-L2RZWAX3.js";import{e as we,f as ve,g as Ie}from"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-WEJYVCCX.js";import"./chunk-AAJJTF33.js";import"./chunk-2FWFPV5I.js";import{ja as Ce}from"./chunk-3PYW74LR.js";import{D as L,E as fe,h as ue,o as _e}from"./chunk-P7HKWFZT.js";import"./chunk-HV7GI3KE.js";import"./chunk-LYOMQKFY.js";import"./chunk-AHCRE4GP.js";import"./chunk-4YAMWP7V.js";import{$a as a,$b as A,Ac as S,Bc as ae,Db as b,E as K,Eb as te,Gb as ie,Hb as ne,I as Y,Ia as $,Ib as n,Ja as k,Jb as o,Kb as x,Lb as y,Ma as U,Mb as T,Ob as h,Qb as f,Rb as d,Sb as oe,Tb as Q,Wa as X,Wc as me,Y as j,Yd as ge,Zb as V,Zc as se,_b as F,aa as J,cd as de,db as G,dc as N,ec as l,fa as z,fc as c,gc as w,gd as ce,jc as P,jd as M,k as q,kb as I,kc as O,lc as D,na as E,ob as Z,qb as C,qc as re,rc as le,tc as pe,va as u,vb as s,wa as _,xb as ee,zc as g}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";var Ye=["stepperRef"],Je=[[["preview"]],[["complete"]]],Xe=["preview","complete"];function Ze(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function et(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function it(t,r){t&1&&(x(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function nt(t,r){if(t&1){let e=h();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=d(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=d(2);a(2),s("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),s("href",e.articleLink(),X)}}function ot(t,r){if(t&1&&C(0,nt,9,3,"div",9),t&2){d();let e=N(1);b(e.selectedIndex===0?0:-1)}}function rt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function at(t,r){t&1&&(x(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function mt(t,r){t&1&&Q(0)}function st(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function ut(t,r){t&1&&(x(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function _t(t,r){t&1&&Q(0,1)}var R=class t{sampleUrl=k();articleLink=k();_onDropFile=$({alias:"onDropFile"});disabledEdit=k(!1);_onStateChange=$({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&V(Ye,5),e&2){let i;F(i=A())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Xe,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=h();oe(Je),n(0,"mat-stepper",1,0),f("selectionChange",function(v){return u(i),_(p.onStepChange(v))}),n(2,"mat-step",2),C(3,Ze,1,1,"ng-template",3)(4,et,1,1,"ng-template",4)(5,tt,1,1,"ng-template",5)(6,it,3,0,"ng-template",6)(7,ot,1,1,"ng-template",7),o(),n(8,"mat-step",2),C(9,rt,1,1,"ng-template",3)(10,lt,1,1,"ng-template",4)(11,pt,1,1,"ng-template",5)(12,at,3,0,"ng-template",6)(13,mt,1,0,"ng-template",7),o(),n(14,"mat-step",2),C(15,st,1,1,"ng-template",3)(16,dt,1,1,"ng-template",4)(17,ct,1,1,"ng-template",5)(18,ut,3,0,"ng-template",6)(19,_t,1,0,"ng-template",7),o()()}e&2&&(s("linear",!0),a(2),s("completed",!1)("editable",!p.disabledEdit()),a(6),s("completed",!1)("editable",!p.disabledEdit()),a(6),s("completed",!1)("editable",!1))},dependencies:[M,Se,L,fe,he,xe,$e,Fe,ze,We,Le,je,Re,Be],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var B=class t{configModal=new ye;dialogRef=E(we);data=E(ve);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),x(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(s("config",p.configModal),a(12),c(S(13,4,p.data==null?null:p.data.new)),a(7),c(S(20,6,p.data==null?null:p.data.update)),a(7),c(S(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[M,ce,Me,Te],encapsulation:2})};var gt=["importStepper"],Ct=()=>({"min-width":"50rem"}),St=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,r){if(t&1){let e=h();n(0,"button",14),f("click",function(){u(e);let i=d();return _(i.onPreviousStep())}),l(1," Back "),o()}}function bt(t,r){if(t&1){let e=h();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=d();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=d();s("ngClass",pe(6,St,i.currentState()===1,i.currentState()!==1,!((e=S(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=S(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=h();n(0,"button",14),f("click",function(){u(e);let i=d();return _(i.onReset())}),l(1," New "),o()}}function vt(t,r){if(t&1){let e=h();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=d();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=d();a(12),s("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function It(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=d().$implicit;s("ngClass",le(3,ht,p<i.Issues.length-1)),a(2),w(" ",e.Issue,". "),a(2),w("",e.Solution," ")}}function yt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,It,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),c(e.Name),a(2),c(e.Code),a(),ee("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),w(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(y(0),n(1,"div",38)(2,"span"),l(3),o(),l(4,", "),n(5,"span"),l(6),o(),n(7,"span"),l(8),o(),n(9,"span"),l(10,"succesfully imported"),o()(),T()),t&2){let e=r.ngIf;a(3),w("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),w("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),w("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Mt(t,r){if(t&1&&(n(0,"div",13),x(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),C(4,Tt,11,3,"ng-container",37),g(5,"async"),o()),t&2){let e=d();a(4),s("ngIf",S(5,1,e.importPreview$))}}var qe=class t extends be{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=U(null);importPreview$;sampleUrl="https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv";articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=U(0);confirmImport$;importPreview=U(null);dialog=E(Ie);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(H.previewImportOutlet,e).pipe(z(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),j(1))}onImport(){this.confirmImport$=this.dialog.open(B,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(K(e=>e==!0),J(()=>this.httpService.post(H.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),z(e=>{this.importStepper.nextStep()}),Y(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],q)),j(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Ee),G(ge))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&V(gt,5),p&2){let m;F(m=A())&&(i.importStepper=m.first)}},features:[Z],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[4,"ngIf"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=h();n(0,"mainpanel-cmp",2),y(1,3),C(2,xt,2,0,"button",4)(3,bt,4,10,"button",5)(4,wt,2,0,"button",4),T(),y(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(W){return u(m),_(i.onDropFile(W))})("onStateChange",function(W){return u(m),_(i.onStateChange(W))}),y(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),C(12,vt,33,5,"ng-template",10)(13,yt,10,9,"ng-template",11),o(),T(),y(14,12),C(15,Mt,6,3,"div",13),g(16,"async"),T(),o(),T(),o()}if(p&2){let m,v;s("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),b(i.currentState()==1?2:-1),a(),b(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),b(i.currentState()===2?4:-1),a(2),s("sampleUrl",i.sampleUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),s("value",ae(11,15,(v=S(10,13,i.importPreview$))==null?null:v.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",re(20,Ct)),a(6),b(S(16,18,i.confirmImport$)?15:-1)}},dependencies:[M,me,se,de,R,Ve,Ue,Ne,Ae,Ce,Oe,Pe,L,ue,_e,ke,De,Ge],encapsulation:2})};export{qe as OutletImportComponent};
|
|
1
|
+
import{a as Ge}from"./chunk-Z5N4EKJ3.js";import{a as Ae,f as Ne}from"./chunk-7J6JNI44.js";import"./chunk-BMQKMDMC.js";import"./chunk-CESIM7I2.js";import"./chunk-TOWVTOFV.js";import"./chunk-EYCYL6AL.js";import"./chunk-3YXP5Q5V.js";import{b as Le,c as Re,d as Be,e as We,f as je,g as ze}from"./chunk-SJIEANJU.js";import"./chunk-7BU64MD2.js";import{b as $e}from"./chunk-YOKPVEGO.js";import"./chunk-34GJS34C.js";import"./chunk-NHVOGEOO.js";import{d as Fe}from"./chunk-AYBLEFQB.js";import"./chunk-LCUJHXDF.js";import{b as xe}from"./chunk-NI6KAEXM.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-L2EDFSBR.js";import"./chunk-TEFNN3TY.js";import{d as Se}from"./chunk-GOQ3ZCDK.js";import"./chunk-JKYTSC2D.js";import"./chunk-B7E3DL2Y.js";import"./chunk-H6BFHXJX.js";import"./chunk-MHBOKOSN.js";import"./chunk-S6TMUVGC.js";import"./chunk-PPWHSAY6.js";import{d as Pe,e as Oe,f as De,g as ke,h as Ue,i as Ve}from"./chunk-MERQX2AF.js";import"./chunk-4E4L6WXO.js";import{a as be,b as Ee}from"./chunk-DHQUQTIV.js";import"./chunk-AZT6QE56.js";import"./chunk-5UL73W4S.js";import{u as ye,v as Te,w as Me}from"./chunk-677WPFLK.js";import"./chunk-CIBQBSM6.js";import{P as H}from"./chunk-L2RZWAX3.js";import{e as we,f as ve,g as Ie}from"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-WEJYVCCX.js";import"./chunk-AAJJTF33.js";import"./chunk-2FWFPV5I.js";import{ja as Ce}from"./chunk-3PYW74LR.js";import{D as L,E as fe,h as ue,o as _e}from"./chunk-P7HKWFZT.js";import"./chunk-HSQKKFE6.js";import"./chunk-7BDVBLHM.js";import"./chunk-AHCRE4GP.js";import"./chunk-W7HVLC6V.js";import{$a as a,$b as A,Ac as S,Bc as ae,Db as b,E as K,Eb as te,Gb as ie,Hb as ne,I as Y,Ia as $,Ib as n,Ja as k,Jb as o,Kb as x,Lb as y,Ma as U,Mb as T,Ob as h,Qb as f,Rb as d,Sb as oe,Tb as Q,Wa as X,Wc as me,Y as j,Yd as ge,Zb as V,Zc as se,_b as F,aa as J,cd as de,db as G,dc as N,ec as l,fa as z,fc as c,gc as w,gd as ce,jc as P,jd as M,k as q,kb as I,kc as O,lc as D,na as E,ob as Z,qb as C,qc as re,rc as le,tc as pe,va as u,vb as s,wa as _,xb as ee,zc as g}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";var Ye=["stepperRef"],Je=[[["preview"]],[["complete"]]],Xe=["preview","complete"];function Ze(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function et(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function tt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function it(t,r){t&1&&(x(0,"i",8),n(1,"span"),l(2,"Upload"),o())}function nt(t,r){if(t&1){let e=h();n(0,"div",9)(1,"div",10)(2,"POS-uppy",11),f("fileUploaded",function(i){u(e);let m=d(2);return _(m.onDropFile(i))}),o()(),n(3,"div",12)(4,"p",13),l(5," Please refer this "),n(6,"a",14),l(7,"article"),o(),l(8," for more information "),o()()()}if(t&2){let e=d(2);a(2),s("sampleUrl",e.sampleUrl())("subtitle","Accepted file formats: .csv & max file size: 1 MB"),a(4),s("href",e.articleLink(),X)}}function ot(t,r){if(t&1&&C(0,nt,9,3,"div",9),t&2){d();let e=N(1);b(e.selectedIndex===0?0:-1)}}function rt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function lt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function pt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function at(t,r){t&1&&(x(0,"i",15),n(1,"span"),l(2,"Preview"),o())}function mt(t,r){t&1&&Q(0)}function st(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function dt(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function ct(t,r){if(t&1&&l(0),t&2){let e=r.index;c(e+1)}}function ut(t,r){t&1&&(x(0,"i",16),n(1,"span"),l(2,"Finish"),o())}function _t(t,r){t&1&&Q(0,1)}var R=class t{sampleUrl=k();articleLink=k();_onDropFile=$({alias:"onDropFile"});disabledEdit=k(!1);_onStateChange=$({alias:"onStateChange"});_stepper;get stepper(){return this._stepper}nextStep(){this._stepper&&(this.stepper.selected.completed=!0,this._stepper.next())}previousStep(){this._stepper&&this._stepper.previous()}resetStep(){this._stepper&&this._stepper.reset()}onStepChange(r){r.selectedIndex===1?this._onStateChange.emit(1):r.selectedIndex===2?this._onStateChange.emit(2):this._onStateChange.emit(0)}onDropFile(r){this._onDropFile.emit(r)}onRemoveFile(){}stateUpload(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["pos-import-stepper"]],viewQuery:function(e,p){if(e&1&&V(Ye,5),e&2){let i;F(i=A())&&(p._stepper=i.first)}},inputs:{sampleUrl:[1,"sampleUrl"],articleLink:[1,"articleLink"],disabledEdit:[1,"disabledEdit"]},outputs:{_onDropFile:"onDropFile",_onStateChange:"onStateChange"},ngContentSelectors:Xe,decls:20,vars:7,consts:[["stepperRef",""],[3,"selectionChange","linear"],[3,"completed","editable"],["matStepperIcon","done"],["matStepperIcon","create"],["matStepperIcon","edit"],["matStepLabel",""],["matStepContent",""],[1,"fa-solid","fa-upload","me-3"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-2"],[2,"max-width","580px"],["file","",3,"fileUploaded","sampleUrl","subtitle"],[1,"d-flex","w-100",2,"max-width","580px"],[1,"fst-italic"],["target","_blank",3,"href"],[1,"fa-regular","fa-file","me-3"],[1,"fa-solid","fa-check","me-3"]],template:function(e,p){if(e&1){let i=h();oe(Je),n(0,"mat-stepper",1,0),f("selectionChange",function(v){return u(i),_(p.onStepChange(v))}),n(2,"mat-step",2),C(3,Ze,1,1,"ng-template",3)(4,et,1,1,"ng-template",4)(5,tt,1,1,"ng-template",5)(6,it,3,0,"ng-template",6)(7,ot,1,1,"ng-template",7),o(),n(8,"mat-step",2),C(9,rt,1,1,"ng-template",3)(10,lt,1,1,"ng-template",4)(11,pt,1,1,"ng-template",5)(12,at,3,0,"ng-template",6)(13,mt,1,0,"ng-template",7),o(),n(14,"mat-step",2),C(15,st,1,1,"ng-template",3)(16,dt,1,1,"ng-template",4)(17,ct,1,1,"ng-template",5)(18,ut,3,0,"ng-template",6)(19,_t,1,0,"ng-template",7),o()()}e&2&&(s("linear",!0),a(2),s("completed",!1)("editable",!p.disabledEdit()),a(6),s("completed",!1)("editable",!p.disabledEdit()),a(6),s("completed",!1)("editable",!1))},dependencies:[M,Se,L,fe,he,xe,$e,Fe,ze,We,Le,je,Re,Be],styles:[".mat-horizontal-stepper-header-container{width:50%!important;margin:0 auto} .mat-horizontal-stepper-wrapper{gap:1rem} .mat-horizontal-stepper-content{display:flex;justify-content:center} p-table .p-datatable-tbody>tr{border-bottom-width:1px;border-color:#dee2e6} p-table .p-datatable-tbody>tr>th{font-family:Roboto,system-ui!important;font-weight:400;font-style:normal} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-thead>tr>th{font-family:Roboto,Courier,monospace;font-weight:700;font-style:normal;color:#333} .p-datatable .p-datatable-wrapper .p-datatable-table .p-datatable-tbody>tr>td{font-family:Roboto,Courier,monospace;font-weight:400;font-style:normal;color:#333}"]})};var B=class t{configModal=new ye;dialogRef=E(we);data=E(ve);constructor(){this.initDialogConfig()}initDialogConfig(){this.configModal.title="Preview Summary",this.configModal.hideCancel=!0,this.configModal.okText="Import (F2)",this.configModal.customWidth="500px"}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=I({type:t,selectors:[["app-dialog-import-preview"]],decls:30,vars:10,consts:[[3,"onOk","onCancel","onClose","config"],[1,"card","mb-0"],[1,"card-header","py-6","bg-gradient-success"],[1,"card-body"],[1,"row"],[1,"col"],[1,"d-flex","flex-column","gap-2"],[2,"font-size","1.9rem"],[2,"font-size","1rem"]],template:function(e,p){e&1&&(n(0,"modal-material",0),f("onOk",function(){return p.onOk()})("onCancel",function(){return p.onClose()})("onClose",function(){return p.onClose()}),x(1,"header"),n(2,"content")(3,"div",1)(4,"div",2)(5,"h3"),l(6,"Import Summary"),o()(),n(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),l(12),g(13,"number"),o(),n(14,"span",8),l(15,"New Outlet"),o()()(),n(16,"div",5)(17,"div",6)(18,"span",7),l(19),g(20,"number"),o(),n(21,"span",8),l(22,"Update Outlet"),o()()(),n(23,"div",5)(24,"div",6)(25,"span",7),l(26),g(27,"number"),o(),n(28,"span",8),l(29,"New Outlet Group"),o()()()()()()()()),e&2&&(s("config",p.configModal),a(12),c(S(13,4,p.data==null?null:p.data.new)),a(7),c(S(20,6,p.data==null?null:p.data.update)),a(7),c(S(27,8,p.data==null?null:p.data.newOutletGroup)))},dependencies:[M,ce,Me,Te],encapsulation:2})};var gt=["importStepper"],Ct=()=>({"min-width":"50rem"}),St=(t,r,e)=>({"btn-success":t,"btn-outline-secondary":r,"not-allowed":e}),ht=t=>({"mb-1":t});function xt(t,r){if(t&1){let e=h();n(0,"button",14),f("click",function(){u(e);let i=d();return _(i.onPreviousStep())}),l(1," Back "),o()}}function bt(t,r){if(t&1){let e=h();n(0,"button",15),g(1,"async"),g(2,"async"),f("click",function(){u(e);let i=d();return _(i.onNextStep())}),l(3," Next "),o()}if(t&2){let e,p,i=d();s("ngClass",pe(6,St,i.currentState()===1,i.currentState()!==1,!((e=S(1,2,i.importPreview$))!=null&&e.CanProceed)))("disabled",!((p=S(2,4,i.importPreview$))!=null&&p.CanProceed)&&i.currentState()===1)}}function wt(t,r){if(t&1){let e=h();n(0,"button",14),f("click",function(){u(e);let i=d();return _(i.onReset())}),l(1," New "),o()}}function vt(t,r){if(t&1){let e=h();n(0,"tr")(1,"th",16),l(2,"Name"),o(),n(3,"th",17),l(4,"Code"),o(),n(5,"th",18),l(6," Status "),n(7,"i",19),f("click",function(i){u(e);let m=N(9);return _(m.toggle(i))}),o(),n(8,"p-popover",null,1)(10,"div",20)(11,"div",21)(12,"p-checkbox",22),f("ngModelChange",function(i){u(e);let m=d();return _(m.selectAll(i))}),o(),n(13,"label",23),l(14,"All"),o()(),n(15,"div",24)(16,"p-checkbox",25),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(17,"label",26),l(18,"Unchanged"),o()(),n(19,"div",24)(20,"p-checkbox",27),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(21,"label",28),l(22,"New"),o()(),n(23,"div",24)(24,"p-checkbox",29),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(25,"label",30),l(26,"Error"),o()(),n(27,"div",24)(28,"p-checkbox",31),D("ngModelChange",function(i){u(e);let m=d();return O(m.filterTreeCondition,i)||(m.filterTreeCondition=i),_(i)}),o(),n(29,"label",32),l(30,"Update"),o()()()()(),n(31,"th"),l(32,"Message"),o()()}if(t&2){let e=d();a(12),s("ngModel",e.pickAll),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition),a(4),P("ngModel",e.filterTreeCondition)}}function It(t,r){if(t&1&&(n(0,"div",33)(1,"span",34),l(2),o(),n(3,"span"),l(4),o()()),t&2){let e=r.$implicit,p=r.$index,i=d().$implicit;s("ngClass",le(3,ht,p<i.Issues.length-1)),a(2),w(" ",e.Issue,". "),a(2),w("",e.Solution," ")}}function yt(t,r){if(t&1&&(n(0,"tr")(1,"td"),l(2),o(),n(3,"td"),l(4),o(),n(5,"td"),l(6),o(),n(7,"td"),ie(8,It,5,5,"div",33,te),o()()),t&2){let e=r.$implicit;a(2),c(e.Name),a(2),c(e.Code),a(),ee("bg-gradient-success",e.Action=="New")("bg-gradient-warning",e.Action=="Update")("bg-gradient-danger",e.Action=="Error"),a(),w(" ",e.Action," "),a(2),ne(e.Issues)}}function Tt(t,r){if(t&1&&(y(0),n(1,"div",38)(2,"span"),l(3),o(),l(4,", "),n(5,"span"),l(6),o(),n(7,"span"),l(8),o(),n(9,"span"),l(10,"succesfully imported"),o()(),T()),t&2){let e=r.ngIf;a(3),w("",e==null?null:e.Summary.NewOutlet," New Outlets"),a(3),w("",e==null?null:e.Summary.UpdateOutlet," Updated Outlets"),a(2),w("and ",e==null?null:e.Summary.NewOutletGroup," New Outlet Group")}}function Mt(t,r){if(t&1&&(n(0,"div",13),x(1,"i",35),n(2,"h1",36),l(3,"Upload Complete!"),o(),C(4,Tt,11,3,"ng-container",37),g(5,"async"),o()),t&2){let e=d();a(4),s("ngIf",S(5,1,e.importPreview$))}}var qe=class t extends be{constructor(e,p){super(e);this.httpService=p;this.menuData$.subscribe()}pickAll=["All"];filterTreeCondition=["Unchanged","New","Error","Update"];importStepper;fileToImport=U(null);importPreview$;sampleUrl="https://cdn.dealpos.xyz/web-import-template/Outlet_Import_Template.csv";articleLink="https://support.dealpos.com/en/articles/11069092-import-new-outlet";currentState=U(0);confirmImport$;importPreview=U(null);dialog=E(Ie);onDropFile(e){this.fileToImport.set(e)}onNextStep(){switch(this.currentState()){case 0:this.onPreviewImport();break;case 1:this.onImport();break;default:break}}onPreviousStep(){this.importStepper.previousStep()}onReset(){this.importPreview.set(null),this.importPreview$=null,this.confirmImport$=null,this.fileToImport.set(null),this.currentState.update(()=>0),this.importStepper.resetStep()}onStateChange(e){this.currentState.update(()=>e)}onPreviewImport(){this.pickAll=["All"],this.filterTreeCondition=["Unchanged","New","Error","Update"];let e=new FormData;e.append("file",this.fileToImport()),this.importPreview$=this.httpService.postFormData(H.previewImportOutlet,e).pipe(z(p=>{this.importPreview.set(p),this.importStepper.nextStep()}),j(1))}onImport(){this.confirmImport$=this.dialog.open(B,{data:{new:this.importPreview()?.Summary?.NewOutlet,update:this.importPreview()?.Summary?.UpdateOutlet,newOutletGroup:this.importPreview()?.Summary?.NewOutletGroup}}).afterClosed().pipe(K(e=>e==!0),J(()=>this.httpService.post(H.importOutlet,{CacheKey:this.importPreview()?.CacheKey})),z(e=>{this.importStepper.nextStep()}),Y(e=>(this.pickAll=[],this.filterTreeCondition=["Error"],q)),j(1))}selectAll(e){this.pickAll=e,this.pickAll.length==0?this.filterTreeCondition=[]:this.filterTreeCondition=["Unchanged","New","Error","Update"]}static \u0275fac=function(p){return new(p||t)(G(Ee),G(ge))};static \u0275cmp=I({type:t,selectors:[["app-outlet-import"]],viewQuery:function(p,i){if(p&1&&V(gt,5),p&2){let m;F(m=A())&&(i.importStepper=m.first)}},features:[Z],decls:17,vars:21,consts:[["importStepper",""],["op",""],[3,"pageData","hideSearchBox","hideSearchDropdown"],["ngProjectAs","actions",5,["actions"]],["type","button",1,"btn","btn-outline-secondary"],[1,"btn",3,"ngClass","disabled"],["ngProjectAs","content",5,["content"]],[3,"onDropFile","onStateChange","sampleUrl","disabledEdit","articleLink"],["ngProjectAs","preview",5,["preview"]],[1,"w-100",3,"value","scrollable","tableStyle"],["pTemplate","header"],["pTemplate","body"],["ngProjectAs","complete",5,["complete"]],[1,"d-flex","flex-column","align-items-center"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"btn",3,"click","ngClass","disabled"],[2,"width","300px"],[2,"width","200px"],[2,"width","100px"],[1,"fa","fa-filter","pointer",3,"click"],[2,"width","150px"],[1,"border-bottom","pb-3","d-flex","align-items-center","column-gap-3"],["label","Select All","name","filterTreeCondition","value","All","inputId","all",3,"ngModelChange","ngModel"],["for","all",1,"ms-2"],[1,"mt-4","d-flex","align-items-center","column-gap-3"],["label","Unchanged","name","filterTreeCondition","value","Unchanged","inputId","unchanged",3,"ngModelChange","ngModel"],["for","unchanged",1,"ms-2"],["label","New","name","filterTreeCondition","value","New","inputId","new",3,"ngModelChange","ngModel"],["for","new",1,"ms-2"],["label","Error","name","filterTreeCondition","value","Error","inputId","error",3,"ngModelChange","ngModel"],["for","error",1,"ms-2"],["label","Updated","name","filterTreeCondition","value","Update","inputId","update",3,"ngModelChange","ngModel"],["for","update",1,"ms-2"],[3,"ngClass"],[1,"me-1"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","110px"],[1,"mt-8"],[4,"ngIf"],[1,"d-flex","gap-2","fw-normal","fs-4","mt-2"]],template:function(p,i){if(p&1){let m=h();n(0,"mainpanel-cmp",2),y(1,3),C(2,xt,2,0,"button",4)(3,bt,4,10,"button",5)(4,wt,2,0,"button",4),T(),y(5,6),n(6,"pos-import-stepper",7,0),f("onDropFile",function(W){return u(m),_(i.onDropFile(W))})("onStateChange",function(W){return u(m),_(i.onStateChange(W))}),y(8,8),n(9,"p-table",9),g(10,"async"),g(11,"filterTree"),C(12,vt,33,5,"ng-template",10)(13,yt,10,9,"ng-template",11),o(),T(),y(14,12),C(15,Mt,6,3,"div",13),g(16,"async"),T(),o(),T(),o()}if(p&2){let m,v;s("pageData",i.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),b(i.currentState()==1?2:-1),a(),b(i.fileToImport()&&((m=i.fileToImport())==null?null:m.size)>0&&i.currentState()<2?3:-1),a(),b(i.currentState()===2?4:-1),a(2),s("sampleUrl",i.sampleUrl)("disabledEdit",i.currentState()===2)("articleLink",i.articleLink),a(3),s("value",ae(11,15,(v=S(10,13,i.importPreview$))==null?null:v.DataRow,i.filterTreeCondition))("scrollable",!0)("tableStyle",re(20,Ct)),a(6),b(S(16,18,i.confirmImport$)?15:-1)}},dependencies:[M,me,se,de,R,Ve,Ue,Ne,Ae,Ce,Oe,Pe,L,ue,_e,ke,De,Ge],encapsulation:2})};export{qe as OutletImportComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-MLMSIZGP.js";import{A as N,D as L,E as j,c as E,h as A,i as V,k as I,o as R,p as U}from"./chunk-P7HKWFZT.js";import{c as D}from"./chunk-HSQKKFE6.js";import"./chunk-7BDVBLHM.js";import{a as p}from"./chunk-AHCRE4GP.js";import"./chunk-W7HVLC6V.js";import{$a as b,$b as x,Ib as i,Jb as n,Kb as u,Ob as C,Qb as g,Qd as M,Vd as P,Zb as S,_b as _,d as f,da as v,db as d,ec as s,jc as w,kb as y,kc as O,lc as T,va as l,wa as m}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";var z=["totpCode"],F=class h{constructor(e,t,o,r){this.authenticatorService=e;this.router=t;this.authService=o;this.toastrService=r;this.redirectUrl=this.authService.returnUrl,this.destroy$=new f,this.checkOnRefreshPage()}validationCodeEl;validationCode;redirectUrl;destroy$;ngOnInit(){document.body.classList.add("login-body")}ngAfterViewInit(){this.validationCodeEl.nativeElement.focus()}ngOnDestroy(){document.body.classList.remove("login-body"),this.destroy$.next(!0),this.destroy$.complete()}checkOnRefreshPage(){p.IsEmpty(this.authService.loginResponse)&&this.router.navigate(["/"])}onSubmit(){this.validateOnVerfiyCode()&&this.authenticatorService.validateCode(this.validationCode,this.authService.loginResponse.UserID).pipe(v(this.destroy$)).subscribe({next:e=>{if(this.authService.saveLoginConfigToStorage(e),p.IsNotEmpty(this.redirectUrl))this.router.navigateByUrl(this.redirectUrl),this.authService.returnUrl=null;else{let t=this.authService.getRedirectUrl();this.router.navigate([t])}}})}validateOnVerfiyCode(){let e=!0;return p.IsEmpty(this.validationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validationCode.length<6||this.validationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return p.numberOnly(e)}submitOnFullOTP(e){e.length==6&&this.onSubmit()}static \u0275fac=function(t){return new(t||h)(d(k),d(M),d(D),d(P))};static \u0275cmp=y({type:h,selectors:[["POS-auth-totp"]],viewQuery:function(t,o){if(t&1&&S(z,5),t&2){let r;_(r=x())&&(o.validationCodeEl=r.first)}},decls:28,vars:1,consts:[["totpCode",""],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-first","form-pane"],[1,"text-start"],[1,"mt-6","text-start"],[3,"submit"],[1,"row","mt-3"],[1,"col-12","text-start","otp-container","position-relative"],["for","totpCode",1,"form-label"],["type","text","maxlength","6","data-cy","totp-code","aria-label","Username","name","totp-code","id","totpCode",1,"border-0",3,"ngModelChange","keypress","ngModel"],[1,"stripe"],["type","submit",1,"btn","btn-lg","btn-primary","rounded-1","fw-normal","rounded-0"],[1,"col-md-5","order-md-last","order-last","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane"],[1,"d-flex","align-items-center","justify-content-center","mb-6"],["src","//res.cloudinary.com/pos/image/upload/v1666079494/POS/Images/Login/TOTP.png",1,"border-0",2,"width","50%"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"]],template:function(t,o){if(t&1){let r=C();i(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),s(4,"Enter time-based OTP"),n(),i(5,"p",5),s(6,"Enter the OTP generated on your authenticator app"),n(),i(7,"form",6),g("submit",function(){return l(r),m(o.onSubmit())}),i(8,"div",7)(9,"div",8)(10,"label",9),s(11,"AUTHENTICATION CODE"),n(),i(12,"input",10,0),T("ngModelChange",function(a){return l(r),O(o.validationCode,a)||(o.validationCode=a),m(a)}),g("keypress",function(a){return l(r),m(o.numberOnly(a))})("ngModelChange",function(a){return l(r),m(o.submitOnFullOTP(a))}),n(),i(14,"span",11),s(15,"______"),n(),i(16,"button",12),s(17," Verify "),n()()()()(),i(18,"div",13)(19,"div",14),u(20,"img",15),n()()(),i(21,"div",16)(22,"div",17)(23,"div")(24,"span"),s(25,"powered by :"),n(),u(26,"a",18)(27,"img",19),n()()()()}t&2&&(b(12),w("ngModel",o.validationCode))},dependencies:[j,U,E,A,V,N,L,R,I],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:3rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}"]})};export{F as AuthTotpComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re}from"./chunk-SRISQ4G6.js";import{a as ae,b as oe}from"./chunk-JFAIF63Q.js";import"./chunk-W2UCLTBY.js";import"./chunk-34GJS34C.js";import"./chunk-NHVOGEOO.js";import"./chunk-AYBLEFQB.js";import"./chunk-LCUJHXDF.js";import{d as ie,e as ne}from"./chunk-3VKLFFAF.js";import"./chunk-NI6KAEXM.js";import"./chunk-3RK6DDJD.js";import"./chunk-L2EDFSBR.js";import"./chunk-GEWY5VWO.js";import"./chunk-TEFNN3TY.js";import"./chunk-GOQ3ZCDK.js";import"./chunk-JKYTSC2D.js";import"./chunk-TGAOY65D.js";import{e as ee}from"./chunk-ZR4YNJBZ.js";import"./chunk-VQ7WKMGF.js";import{a as K}from"./chunk-
|
|
1
|
+
import{a as re}from"./chunk-SRISQ4G6.js";import{a as ae,b as oe}from"./chunk-JFAIF63Q.js";import"./chunk-W2UCLTBY.js";import"./chunk-34GJS34C.js";import"./chunk-NHVOGEOO.js";import"./chunk-AYBLEFQB.js";import"./chunk-LCUJHXDF.js";import{d as ie,e as ne}from"./chunk-3VKLFFAF.js";import"./chunk-NI6KAEXM.js";import"./chunk-3RK6DDJD.js";import"./chunk-L2EDFSBR.js";import"./chunk-GEWY5VWO.js";import"./chunk-TEFNN3TY.js";import"./chunk-GOQ3ZCDK.js";import"./chunk-JKYTSC2D.js";import"./chunk-TGAOY65D.js";import{e as ee}from"./chunk-ZR4YNJBZ.js";import"./chunk-VQ7WKMGF.js";import{a as K}from"./chunk-NLWPMDWU.js";import"./chunk-H24HNIUV.js";import"./chunk-MHBOKOSN.js";import"./chunk-S6TMUVGC.js";import"./chunk-PPWHSAY6.js";import"./chunk-FD5YMPRL.js";import"./chunk-MV3QRRW6.js";import"./chunk-6ZOGADBZ.js";import{a as te}from"./chunk-3AY3BZNI.js";import{a as J,h as Z,i as $}from"./chunk-MERQX2AF.js";import"./chunk-4E4L6WXO.js";import{b as X}from"./chunk-DHQUQTIV.js";import"./chunk-AZT6QE56.js";import"./chunk-5UL73W4S.js";import"./chunk-677WPFLK.js";import"./chunk-CIBQBSM6.js";import{P as Y}from"./chunk-L2RZWAX3.js";import"./chunk-ZT4RBJMM.js";import"./chunk-GIKR6Y2K.js";import{e as Q}from"./chunk-VMY3JQDA.js";import"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-WEJYVCCX.js";import"./chunk-AAJJTF33.js";import{a as z}from"./chunk-2FWFPV5I.js";import"./chunk-3PYW74LR.js";import{D as U,h as j,o as G}from"./chunk-P7HKWFZT.js";import"./chunk-HSQKKFE6.js";import"./chunk-7BDVBLHM.js";import"./chunk-AHCRE4GP.js";import"./chunk-W7HVLC6V.js";import{$a as c,Ac as x,Db as A,Eb as E,Fc as O,Gb as V,Hb as W,Ib as n,Jb as a,Kb as S,Lb as D,Mb as v,Ob as T,Qb as y,Rb as s,Vd as H,Y as k,Yd as q,Zc as L,cd as N,db as h,ec as u,fa as I,jc as g,jd as R,kb as P,kc as _,lc as f,na as B,ob as M,qb as C,va as p,vb as l,wa as m,zc as b}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";function pe(o,d){if(o&1){let t=T();n(0,"button",7),y("click",function(){p(t);let e=s();return m(e.onPrint())}),S(1,"i",8),n(2,"span"),u(3,"Print"),a()()}}function me(o,d){if(o&1){let t=T();n(0,"div",9)(1,"h6"),u(2,"Outlet"),a(),n(3,"outlet-selector",10),f("ngModelChange",function(e){p(t);let i=s();return _(i.pageData.Filter.EntityID,e)||(i.pageData.Filter.EntityID=e),m(e)}),a(),n(4,"h6"),u(5,"Sales Order Tag"),a(),n(6,"ng-select",11),f("ngModelChange",function(e){p(t);let i=s();return _(i.pageData.Filter.SalesOrderTagID,e)||(i.pageData.Filter.SalesOrderTagID=e),m(e)}),a(),n(7,"h6"),u(8,"From"),a(),n(9,"div",12)(10,"div",13)(11,"datepicker",14),f("dateChange",function(e){p(t);let i=s();return _(i.pageData.Filter.From,e)||(i.pageData.Filter.From=e),m(e)}),a()(),n(12,"div",13)(13,"app-timepicker",15),f("timeChange",function(e){p(t);let i=s();return _(i.pageData.Filter.StartTime,e)||(i.pageData.Filter.StartTime=e),m(e)}),a()()(),n(14,"h6"),u(15,"To"),a(),n(16,"div",12)(17,"div",13)(18,"datepicker",16),f("dateChange",function(e){p(t);let i=s();return _(i.pageData.Filter.To,e)||(i.pageData.Filter.To=e),m(e)}),a()(),n(19,"div",13)(20,"app-timepicker",15),f("timeChange",function(e){p(t);let i=s();return _(i.pageData.Filter.EndTime,e)||(i.pageData.Filter.EndTime=e),m(e)}),a()()()()}if(o&2){let t=s();c(3),l("accessType",2),g("ngModel",t.pageData.Filter.EntityID),c(3),l("items",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.SalesOrderTags),g("ngModel",t.pageData.Filter.SalesOrderTagID),c(5),l("isFloatingLabel",!1),g("date",t.pageData.Filter.From),l("hidelClearBtn",!0),c(2),g("time",t.pageData.Filter.StartTime),l("fullWidth",!0),c(5),l("isFloatingLabel",!1)("hidelClearBtn",!0),g("date",t.pageData.Filter.To),c(2),g("time",t.pageData.Filter.EndTime),l("fullWidth",!0)}}function ce(o,d){o&1&&(D(0),n(1,"div",20),u(2,"\xA0"),a(),v())}function se(o,d){if(o&1&&(S(0,"pos-receipt-a4",17),n(1,"div",18),S(2,"div",19),a(),C(3,ce,3,0,"ng-container",6)),o&2){let t=d.$implicit,r=d.$index,e=s().ngIf,i=s();l("data",t)("printTemplate",i.printTemplates==null?null:i.printTemplates.get(t.PrintTemplateID))("config",e.AppConfig)("workOrderMode",!1)("fullMode",!0)("stylesheet",e.StylesSheet),c(3),l("ngIf",r!==(e.Data==null?null:e.Data.length)-1)}}function de(o,d){if(o&1&&(D(0),V(1,se,4,7,null,null,E),v()),o&2){let t=d.ngIf;c(),W(t.Data)}}var le=class o extends K{constructor(t,r,e){super(t,r,"Tool/GetBulkPrintLoader","Tool/GetBulkPrintLoader",e,null,!0);this.httpService=r}dialogFilter=B(J);receipts$;printTemplates;preInitList(){this.pageData.Filter.From=new Date,this.pageData.Filter.To=new Date,this.pageData.Filter.StartTime="00:00",this.pageData.Filter.EndTime="23:59"}onFilter(){this.receipts$=this.httpService.post(Y.GetBulkPrintA4,this.pageData.Filter).pipe(I(t=>{t?.Data?.length==0?this.toastrService.info("There are no transaction",z.Info):this.generatePrintTemplate(t.PrintTemplates)}),k(1))}generatePrintTemplate(t=[]){this.printTemplates=new Map(t.map(r=>[r.ID,r]))}onNewPrint(){this.dialogFilter.openDialog()}onPrint(){window.setTimeout(function(){window.print()},500)}static \u0275fac=function(r){return new(r||o)(h(X),h(q),h(H))};static \u0275cmp=P({type:o,selectors:[["bulk-invoice-A4"]],features:[M],decls:13,vars:10,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","pageData","hideSearchBox","text","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-3"],[1,"btn","btn-success",3,"click"],["filters",""],[1,"container-fluid","mt-5"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa","fa-print","me-3"],[1,"dialog-filter"],["placeholder","Choose an Outlet",3,"ngModelChange","accessType","ngModel"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales Order Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center","gap-5"],[1,"w-100"],["placeholder","From","appearance","outline","name","From",1,"me-4",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[3,"timeChange","time","fullWidth"],["placeholder","To","appearance","outline","name","To",1,"me-4",3,"dateChange","isFloatingLabel","hidelClearBtn","date"],[3,"data","printTemplate","config","workOrderMode","fullMode","stylesheet"],[1,"d-print-none","mt-8"],[2,"border-top-style","dotted","margin-bottom","5px"],[1,"page-break"]],template:function(r,e){if(r&1){let i=T();n(0,"mainpanel-cmp",1),f("textChange",function(w){return p(i),_(e.pageData.Filter.Number,w)||(e.pageData.Filter.Number=w),m(w)}),y("onSubmit",function(){return p(i),m(e.onFilter())}),n(1,"actions"),C(2,pe,4,0,"button",2),b(3,"async"),n(4,"button",3),y("click",function(){return p(i),m(e.onNewPrint())}),u(5,"New"),a()(),n(6,"div",4),C(7,me,21,14,"ng-template",null,0,O),a(),n(9,"content")(10,"div",5),C(11,de,3,0,"ng-container",6),b(12,"async"),a()()()}if(r&2){let i;l("pageData",e.menuData)("hideSearchBox",!0),g("text",e.pageData.Filter.Number),l("hideSearchDropdown",!0),c(2),A(((i=x(3,6,e.receipts$))==null||i.Data==null?null:i.Data.length)>0?2:-1),c(9),l("ngIf",x(12,8,e.printTemplates&&e.receipts$))}},dependencies:[R,L,N,oe,ae,$,Z,te,Q,ne,ie,ee,U,j,G,re],styles:["input.p-inputtext{height:46.63px;border-color:#0000001f!important} input.p-inputtext :hover{border-color:#0000001f!important}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]})};export{le as BulkInvoiceA4Component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as yt,c as xt}from"./chunk-WEJYVCCX.js";import{a as wt}from"./chunk-AAJJTF33.js";import{a as P}from"./chunk-2FWFPV5I.js";import{ja as _t,ka as S,sa as ht}from"./chunk-3PYW74LR.js";import{D as mt,E as gt,a as st,c as at,h as pt,i as lt,k as ut,o as ct,p as dt}from"./chunk-P7HKWFZT.js";import{a as ot}from"./chunk-
|
|
1
|
+
import{a as yt,c as xt}from"./chunk-WEJYVCCX.js";import{a as wt}from"./chunk-AAJJTF33.js";import{a as P}from"./chunk-2FWFPV5I.js";import{ja as _t,ka as S,sa as ht}from"./chunk-3PYW74LR.js";import{D as mt,E as gt,a as st,c as at,h as pt,i as lt,k as ut,o as ct,p as dt}from"./chunk-P7HKWFZT.js";import{a as ot}from"./chunk-W7HVLC6V.js";import{$a as l,$b as D,Ab as V,Fa as T,Ib as o,Jb as a,Kb as E,Lb as _,Mb as h,Mc as X,Nb as U,Ob as w,Qb as f,Qc as $,Qd as it,Rb as r,Vd as rt,Wc as I,Yb as A,Yc as tt,Yd as ft,Zc as M,_b as N,bc as q,bd as et,cc as K,db as j,ec as m,fc as Y,gb as W,gc as G,ia as R,ja as H,jc as C,jd as nt,ka as L,kb as O,kc as b,lb as z,lc as v,na as x,ob as Q,pc as Z,qb as g,sc as B,tc as J,va as c,vb as u,wa as d,za as F}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";var Ot=["input"],Et=(i,s,t)=>({$implicit:i,events:s,index:t});function It(i,s){if(i&1){let t=w();_(0),o(1,"input",2),f("input",function(n){c(t);let p=r().$implicit,y=r();return d(y.onInput(n,p-1))})("focus",function(n){c(t);let p=r(2);return d(p.onInputFocus(n))})("blur",function(n){c(t);let p=r(2);return d(p.onInputBlur(n))})("paste",function(n){c(t);let p=r(2);return d(p.onPaste(n))})("keydown",function(n){c(t);let p=r(2);return d(p.onKeyDown(n))}),a(),h()}if(i&2){let t=r().$implicit,e=r();l(),u("value",e.getModelValue(t))("maxLength",t===1?e.length:1)("type",e.inputType)("pSize",e.size)("variant",e.variant)("readonly",e.readonly)("disabled",e.disabled)("tabindex",e.tabindex)("pAutoFocus",e.getAutofocus(t))("ngClass",e.styleClass)}}function Mt(i,s){i&1&&U(0)}function St(i,s){if(i&1&&(_(0),g(1,Mt,1,0,"ng-container",3),h()),i&2){let t=r().$implicit,e=r();l(),u("ngTemplateOutlet",e.inputTemplate||e._inputTemplate)("ngTemplateOutletContext",J(2,Et,e.getToken(t-1),e.getTemplateEvents(t-1),t))}}function kt(i,s){if(i&1&&(_(0),g(1,It,2,10,"ng-container",1)(2,St,2,6,"ng-container",1),h()),i&2){let t=r();l(),u("ngIf",!t.inputTemplate&&!t._inputTemplate),l(),u("ngIf",t.inputTemplate||t._inputTemplate)}}var Ft=({dt:i})=>`
|
|
2
2
|
.p-inputotp {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as z,i as S}from"./chunk-
|
|
1
|
+
import{h as z,i as S}from"./chunk-MERQX2AF.js";import"./chunk-4E4L6WXO.js";import"./chunk-AZT6QE56.js";import"./chunk-5UL73W4S.js";import"./chunk-677WPFLK.js";import"./chunk-CIBQBSM6.js";import"./chunk-L2RZWAX3.js";import"./chunk-D35OBUDE.js";import"./chunk-567HXZXC.js";import"./chunk-AAJJTF33.js";import"./chunk-2FWFPV5I.js";import"./chunk-3PYW74LR.js";import"./chunk-P7HKWFZT.js";import"./chunk-HSQKKFE6.js";import"./chunk-7BDVBLHM.js";import"./chunk-AHCRE4GP.js";import"./chunk-W7HVLC6V.js";import{$a as p,Ib as o,Jb as i,Kb as g,Qd as x,Td as l,db as d,ec as r,fc as v,jd as M,ka as a,kb as h,lb as s,vb as f}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";var m=class e{constructor(n){this.router=n;console.log(this.router.getCurrentNavigation()),console.log(this.router.lastSuccessfulNavigation),this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role??localStorage.getItem("role"),localStorage.setItem("role",this.role),console.log(this.previousPage)}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(d(x))};static \u0275cmp=h({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,c){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),r(7,"You are not authorized"),i(),o(8,"p"),r(9," This page require "),o(10,"span",5),r(11),i(),r(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(f("pageData",c.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),p(11),v(c.role))},dependencies:[z],encapsulation:2})};var D=[{path:"Main/Unauthorized",component:m},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],u=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[l.forChild(D),l]})};var y=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[M,u,S]})};export{y as UnauthorizedModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as N,c as D}from"./chunk-
|
|
1
|
+
import{a as N,c as D}from"./chunk-HSQKKFE6.js";import{a as p}from"./chunk-AHCRE4GP.js";import{$a as n,Ib as c,Jb as l,Qd as M,Rb as d,Rd as C,Sc as g,Td as I,Wc as v,Zc as f,db as o,ec as u,gc as h,jd as E,kb as m,qb as S,qc as y,rc as a,vb as r,zb as b}from"./chunk-DZT5XHBQ.js";var _=e=>({"pe-none":e}),O=()=>["/menu/Profile/Main/My_Subscription"],k=e=>({"text-decoration-none":e}),A=e=>({"text-capitalize":e});function L(e,i){if(e&1&&(c(0,"div",1)(1,"h5",2),u(2),c(3,"a",3)(4,"u",4)(5,"span",4),u(6,"please"),l(),u(7," process your payment! "),l()()()()),e&2){let t=d();b("alert rounded-0 mb-0 text-center border-bottom "+(t.subscriptionState==null?null:t.subscriptionState.class)),n(2),h(" ",t.subscriptionState==null?null:t.subscriptionState.message," "),n(),r("ngClass",a(7,_,t.isMySubscriptionMenu))("routerLink",y(9,O)),n(),r("ngClass",a(10,k,t.isMySubscriptionMenu)),n(),r("ngClass",a(12,A,t.isNotEmpty(t.currentSubStatus)&&t.currentSubStatus!=t.subsStatusEnum.OVERDUE))}}var x=class e{constructor(i,t,s){this.document=i;this.router=t;this.authService=s}subscriptionStatus;subscriptionState;currentSubStatus;subsStatusEnum=N;isMySubscriptionMenu;htmlStyleElement;htmlBodyElement;ngOnInit(){this.checkMySubscriptionMenu(),this.initSubscriptionStatus(),this.getCurrentSubscriptionStatus()}getCurrentSubscriptionStatus(){this.overrideCssStickyHeader()}checkMySubscriptionMenu(){this.isMySubscriptionMenu=!1,this.router.url.includes("/Profile/Main/My_Subscription")&&(this.isMySubscriptionMenu=!0)}isNotEmpty(i){return p.IsNotEmpty(i)}overrideCssStickyHeader(){if(p.IsNotEmpty(this.currentSubStatus)&&this.currentSubStatus!==0){let i=`.sticky-top-thead th {
|
|
2
2
|
top: 100px !important;
|
|
3
3
|
z-index: 1020;
|
|
4
4
|
}`;this.htmlBodyElement=this.document.getElementsByTagName("body")[0],this.htmlStyleElement=this.document.createElement("style"),this.htmlStyleElement.appendChild(this.document.createTextNode(i)),this.htmlBodyElement.appendChild(this.htmlStyleElement)}}initSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus(),this.subscriptionStatus=[{status:1,class:"alert-warning",message:"Your subscription is overdue. To avoid suspension, "},{status:2,class:"alert-danger",message:"Your subscription is partially suspended."},{status:3,class:"alert-danger",message:"Your subscription is suspended."}],this.subscriptionState=this.subscriptionStatus.filter(i=>i.status==this.currentSubStatus)[0]}ngOnDestroy(){this.htmlBodyElement&&this.htmlBodyElement.removeChild(this.htmlStyleElement)}static \u0275fac=function(t){return new(t||e)(o(g),o(M),o(D))};static \u0275cmp=m({type:e,selectors:[["subscription-alert"]],decls:1,vars:1,consts:[["role","alert",3,"class",4,"ngIf"],["role","alert"],[1,"fw-normal"],[1,"alert-link",3,"ngClass","routerLink"],[3,"ngClass"]],template:function(t,s){t&1&&S(0,L,8,14,"div",0),t&2&&r("ngIf",(s.subscriptionState==null?null:s.subscriptionState.status)==s.currentSubStatus&&s.isNotEmpty(s.currentSubStatus))},dependencies:[E,v,f,I,C],encapsulation:2})};export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-DHQUQTIV.js";import{K as a}from"./chunk-DZT5XHBQ.js";var s=class extends r{constructor(t,e,o,n){super(t);this.httpService=e;let p=this.getInfoID(n);this.menuData$.pipe(a(()=>this.getBindDataObservable(o,p))).subscribe({next:i=>{this.bindData(i),this.postBindData(i)}})}data;getInfoID(t){return t.snapshot.queryParams.ID}getBindDataObservable(t,e){return this.httpService.post(`/API/${t}`,{ID:e})}bindData(t){this.data=t}postBindData(t){}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N}from"./chunk-
|
|
1
|
+
import{c as N}from"./chunk-HSQKKFE6.js";import"./chunk-7BDVBLHM.js";import{a as D}from"./chunk-AHCRE4GP.js";import"./chunk-W7HVLC6V.js";import{$ as _,$a as l,Ac as k,Ga as P,Ib as o,Jb as e,Kb as u,N as b,Ob as S,Qb as I,Qd as G,Rb as f,Y as m,Yd as j,Zc as A,aa as s,c as p,cd as E,db as d,ec as a,fa as y,fc as x,jd as R,kb as w,n as v,qb as g,va as C,vb as c,wa as O,yb as M,zc as L}from"./chunk-DZT5XHBQ.js";import"./chunk-7DCB7DB2.js";function T(r,n){r&1&&(o(0,"div",21)(1,"span",22),a(2,"Latitude and Longitude is empty, please allow your browser location permission!"),e(),o(3,"a",23),a(4,"Click here to learn how to manually activate the location permission"),e()())}function z(r,n){if(r&1){let t=S();o(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3",4),a(4,"Geo Fencing"),e(),o(5,"p",5),a(6,"You are about to sign-in from this location"),e(),o(7,"div",6)(8,"div",7)(9,"div",8)(10,"span",9),a(11,"LAT"),e(),o(12,"span",10),a(13),e()(),o(14,"div",8)(15,"span",11),a(16,"LONG"),e(),o(17,"span",12),a(18),e()()(),o(19,"button",13),I("click",function(){C(t);let h=f();return O(h.proceed())}),a(20,"Proceed"),e()(),g(21,T,5,0,"div",14),e(),o(22,"div",15),u(23,"img",16),e()(),o(24,"div",17)(25,"div",18)(26,"div")(27,"span"),a(28,"powered by :"),e(),u(29,"a",19)(30,"img",20),e()()()()}if(r&2){let t=n.ngIf,i=f();l(2),M(t.latitude&&t.longitude?i.centerGeoPanelStyle:""),l(11),x(t.latitude),l(5),x(t.longitude),l(),c("disabled",!(t.latitude&&t.longitude)),l(2),c("ngIf",!(t.latitude&&t.longitude))}}var Z=class r{constructor(n,t,i,h){this.ngZone=n;this.auth=t;this.http=i;this.router=h}centerGeoPanelStyle="display: flex; flex-direction: column; justify-content: center;";latLong$;ngOnInit(){this.checkOnRefreshPage(),document.body.classList.add("login-body");let n=v(navigator.permissions.query({name:"geolocation"})).pipe(s(t=>new p(i=>{i.next(t.state),t.onchange=()=>this.ngZone.run(()=>i.next(t.state))})),m(1));this.latLong$=n.pipe(s(()=>new p(t=>{navigator.geolocation.getCurrentPosition(i=>this.ngZone.run(()=>{t.next({latitude:i.coords.latitude.toString(),longitude:i.coords.longitude.toString()}),t.complete()}),()=>this.ngZone.run(()=>{t.next({latitude:"",longitude:""}),t.complete()}),{enableHighAccuracy:!0,maximumAge:0,timeout:8e3})})),_({latitude:"",longitude:""}),m(1))}ngOnDestroy(){document.body.classList.remove("login-body")}checkOnRefreshPage(){D.IsEmpty(this.auth.loginResponse)&&this.router.navigate(["/"])}proceed(){this.latLong$.pipe(s(n=>this.http.post("/api/Authentication/LoginGeoRestriction",{UserID:this.auth.loginResponse.UserID,Latitude:n.latitude,Longitude:n.longitude})),y(n=>this.auth.saveLoginConfigToStorage(n)),s(()=>this.router.navigate([this.auth.getRedirectUrl()])),b(1)).subscribe()}static \u0275fac=function(t){return new(t||r)(d(P),d(N),d(j),d(G))};static \u0275cmp=w({type:r,selectors:[["POS-auth-geolocation"]],decls:2,vars:3,consts:[["class","container-fluid",4,"ngIf"],[1,"container-fluid"],[1,"row","bg-white","mx-auto","totp-pane"],[1,"col-md-7","order-md-first","order-last","form-pane"],[1,"text-start"],[1,"text-start","mb-7"],[1,"d-flex","flex-column","flex-md-row",2,"column-gap","10px"],[1,"latlong-container","d-flex","flex-grow-1"],[1,"flex-grow-1","text-start","d-flex"],[1,"lat-label","fw-bold"],[1,"ps-5","lat-value","flex-grow-1","d-flex","align-items-center"],[1,"long-label","fw-bold"],[1,"ps-5","long-value","flex-grow-1","d-flex","align-items-center"],[1,"btn","btn-success","mt-5","mx-auto","mx-md-0","mt-md-0","w-25","w-md-100",3,"click","disabled"],["class","text-start mt-7",4,"ngIf"],[1,"col-md-5","order-md-last","order-first","border-start","border-secondary","d-flex","align-items-center","justify-content-center","img-pane","py-6"],["src","https://res.cloudinary.com/pos/image/upload/v1685343992/POS/Images/geolocation-map.png",1,"border-0","w-100"],[1,"fixed-bottom"],[1,"d-flex","justify-content-start","mb-11","mx-11","footer-mobile"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"ms-3","border-0"],[1,"text-start","mt-7"],[1,"text-danger"],["href","https://support.dealpos.com/en/articles/7963864-enable-location-services-for-several-browser","target","_blank",1,"d-block"]],template:function(t,i){t&1&&(g(0,z,31,6,"div",0),L(1,"async")),t&2&&c("ngIf",k(1,1,i.latLong$))},dependencies:[R,A,E],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}.totp-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:140px}@media (max-width: 768px){.totp-pane[_ngcontent-%COMP%]{margin-top:0}}.form-pane[_ngcontent-%COMP%]{padding:2rem}@media (max-width: 768px){.form-pane[_ngcontent-%COMP%]{padding:50px 24px 30px}}@media (max-width: 768px){.img-pane[_ngcontent-%COMP%]{border:0px!important}}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;width:325px;font-family:monospace;background:transparent;z-index:1;position:relative}.otp-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none!important}.otp-container[_ngcontent-%COMP%] .stripe[_ngcontent-%COMP%]{font-size:32px;letter-spacing:32px;font-family:monospace;position:absolute;padding-top:6px;z-index:0;bottom:0;left:14px}.latlong-container[_ngcontent-%COMP%]{background:#fff;border:1px solid #000000;border-radius:5px}.latlong-container[_ngcontent-%COMP%] .lat-label[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{display:inline-block;padding:12px;border-right:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .long-label[_ngcontent-%COMP%]{border-left:1px solid #000000}.latlong-container[_ngcontent-%COMP%] .lat-value[_ngcontent-%COMP%], .latlong-container[_ngcontent-%COMP%] .long-value[_ngcontent-%COMP%]{background:#d9d9d94d}"]})};export{Z as AuthGeolocationComponent};
|