dealpos 12.50.0 → 12.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/POS/{chunk-T67RS3Z3.js → chunk-25GQJUIH.js} +1 -1
- package/POS/{chunk-B7ONZE23.js → chunk-2EH3BK6J.js} +1 -1
- package/POS/{chunk-IH7N3UMV.js → chunk-2K3JRN64.js} +1 -1
- package/POS/{chunk-2EB6AOTJ.js → chunk-34IE7Y3E.js} +1 -1
- package/POS/{chunk-VX57G45X.js → chunk-3FT34Y4V.js} +1 -1
- package/POS/{chunk-RKV7T7VN.js → chunk-3QYUXXRQ.js} +1 -1
- package/POS/{chunk-L5MLK7YH.js → chunk-3XO2222I.js} +1 -1
- package/POS/chunk-44E4T2G4.js +1 -0
- package/POS/{chunk-X5QKAXMC.js → chunk-47YUKZFW.js} +3 -3
- package/POS/{chunk-425FZTEZ.js → chunk-4CGZRLZ7.js} +1 -1
- package/POS/{chunk-H5ZANGI4.js → chunk-4CVIYLEB.js} +1 -1
- package/POS/{chunk-EJK26SPG.js → chunk-4E337YZJ.js} +1 -1
- package/POS/{chunk-JDIG73YM.js → chunk-4E5SZI2D.js} +1 -1
- package/POS/{chunk-Z34LFHQ7.js → chunk-4GSRHCX6.js} +1 -1
- package/POS/chunk-52ZDTORG.js +2 -0
- package/POS/{chunk-F6KRRUA2.js → chunk-5WJLMPB7.js} +1 -1
- package/POS/{chunk-H5E6TCS4.js → chunk-7HOFTWLW.js} +1 -1
- package/POS/{chunk-TYD4D3HD.js → chunk-A3YFV43R.js} +1 -1
- package/POS/{chunk-BROSFR75.js → chunk-AOM5F7UX.js} +1 -1
- package/POS/{chunk-JWJRG5PS.js → chunk-APZ77K5R.js} +1 -1
- package/POS/chunk-BJ6A2FME.js +1 -0
- package/POS/{chunk-3NRQRGPP.js → chunk-BJNWNXDU.js} +1 -1
- package/POS/chunk-BNGIKNFH.js +1 -0
- package/POS/{chunk-QTF4PVLU.js → chunk-BPNEHOWG.js} +1 -1
- package/POS/{chunk-2M6NTEAI.js → chunk-BY646SCP.js} +1 -1
- package/POS/{chunk-OK2O67VS.js → chunk-CKXGV4TZ.js} +1 -1
- package/POS/{chunk-EC5JIRUQ.js → chunk-CXKLAS5F.js} +1 -1
- package/POS/{chunk-44CMAGBE.js → chunk-DJ23SYAV.js} +1 -1
- package/POS/{chunk-OA2A3GGL.js → chunk-DO5BNHOT.js} +1 -1
- package/POS/{chunk-IAEV7OSB.js → chunk-EMAOGETT.js} +1 -1
- package/POS/{chunk-DN5C77LM.js → chunk-EYB5YANP.js} +1 -1
- package/POS/{chunk-UTKPY4D2.js → chunk-FXO5UFL6.js} +1 -1
- package/POS/chunk-GFNQBVHS.js +1 -0
- package/POS/{chunk-R5XZRIA2.js → chunk-GKT6ZKJA.js} +1 -1
- package/POS/{chunk-MGBISXC4.js → chunk-GL7SEAHM.js} +1 -1
- package/POS/{chunk-7ZNNIUJW.js → chunk-GMZBUBBA.js} +1 -1
- package/POS/{chunk-NJG2DCEK.js → chunk-GS43AQFP.js} +1 -1
- package/POS/{chunk-ZCEATVPG.js → chunk-GZ3F26M5.js} +1 -1
- package/POS/{chunk-QMWLYMVO.js → chunk-GZB3LQD5.js} +1 -1
- package/POS/{chunk-XKZAAQ2S.js → chunk-H75NHPOH.js} +1 -1
- package/POS/{chunk-GMRJAQYB.js → chunk-HZFXBLI2.js} +1 -1
- package/POS/{chunk-5BS25DOO.js → chunk-IEED37H5.js} +2 -2
- package/POS/{chunk-EN2OQQ5O.js → chunk-IVNI37SJ.js} +1 -1
- package/POS/{chunk-DOUNETSE.js → chunk-J6EFOYGX.js} +1 -1
- package/POS/{chunk-UTICPSDU.js → chunk-JKMQSOWD.js} +1 -1
- package/POS/{chunk-GTGKSURG.js → chunk-JRRO2EBD.js} +1 -1
- package/POS/{chunk-GSJNCKJX.js → chunk-K5M2UJEX.js} +1 -1
- package/POS/{chunk-YAFGIOE2.js → chunk-KNIJQFYL.js} +1 -1
- package/POS/{chunk-ALV6KRXN.js → chunk-KNMHWUEM.js} +1 -1
- package/POS/{chunk-YT5REVFM.js → chunk-KOA5T4NW.js} +1 -1
- package/POS/{chunk-EI5RXF4E.js → chunk-KPCCC7Q2.js} +1 -1
- package/POS/{chunk-ZKM5QUPU.js → chunk-KZHM63BM.js} +1 -1
- package/POS/{chunk-3SJYIQ6J.js → chunk-MRHWOTAT.js} +1 -1
- package/POS/{chunk-A3BVGPJ3.js → chunk-MTGNT63J.js} +1 -1
- package/POS/{chunk-UNUXT2QM.js → chunk-NDJOFI5S.js} +1 -1
- package/POS/{chunk-QFVW2U6L.js → chunk-OEZ2ESQO.js} +1 -1
- package/POS/{chunk-KCNXZEXF.js → chunk-P3TIUP73.js} +1 -1
- package/POS/{chunk-JOZX3JYR.js → chunk-PCR232HC.js} +1 -1
- package/POS/{chunk-L723O7H3.js → chunk-PZYMGZZL.js} +1 -1
- package/POS/chunk-QBQ3SLGO.js +1 -0
- package/POS/{chunk-MUHSN4YO.js → chunk-QGDDZ5OZ.js} +1 -1
- package/POS/chunk-R5OAFY62.js +1 -0
- package/POS/{chunk-WD4ET7TF.js → chunk-R6XTM6RB.js} +1 -1
- package/POS/{chunk-X6FNYDGE.js → chunk-R73KDMYK.js} +1 -1
- package/POS/{chunk-WYZ6JUOQ.js → chunk-RBHKVOFW.js} +1 -1
- package/POS/{chunk-MVDSGC4L.js → chunk-RFJKUMU7.js} +1 -1
- package/POS/{chunk-4L6BU7CZ.js → chunk-RTHCDJAB.js} +1 -1
- package/POS/{chunk-ZKRXG2GR.js → chunk-RXPB4PXU.js} +1 -1
- package/POS/{chunk-EF7DVF24.js → chunk-RXYNSO34.js} +1 -1
- package/POS/{chunk-BDA2RQUK.js → chunk-S3LUOCII.js} +1 -1
- package/POS/{chunk-7SWGUPQW.js → chunk-S6RRBCVA.js} +1 -1
- package/POS/{chunk-IVWPAT6Q.js → chunk-SXCUODUO.js} +1 -1
- package/POS/{chunk-35H53ABM.js → chunk-TDKWBH7Q.js} +1 -1
- package/POS/{chunk-JLQ56567.js → chunk-TG7DIYR4.js} +1 -1
- package/POS/{chunk-AC6UYHEB.js → chunk-TTAHWPAH.js} +1 -1
- package/POS/{chunk-YA2V4WBI.js → chunk-UCEYSWFB.js} +1 -1
- package/POS/{chunk-A7L2S5C6.js → chunk-UFISO2OK.js} +1 -1
- package/POS/{chunk-SPEMCHUZ.js → chunk-UMDBPPFL.js} +1 -1
- package/POS/{chunk-AT2GWK5V.js → chunk-VW2OFMNF.js} +1 -1
- package/POS/{chunk-CE3Z2GNW.js → chunk-WISPWSLQ.js} +1 -1
- package/POS/{chunk-JUUFXLLO.js → chunk-WIY4X4IX.js} +1 -1
- package/POS/{chunk-DVRJAZ2J.js → chunk-WOI6VORS.js} +1 -1
- package/POS/{chunk-ZQVSOZRA.js → chunk-X4IT7XMK.js} +2 -2
- package/POS/{chunk-Z5MFYUR4.js → chunk-XBOD7C4D.js} +1 -1
- package/POS/{chunk-32SRP6JE.js → chunk-XDAJJ4BW.js} +1 -1
- package/POS/{chunk-E5TZFRL2.js → chunk-XXOZNDUH.js} +1 -1
- package/POS/{chunk-H7DDTQGD.js → chunk-YH62IQVX.js} +1 -1
- package/POS/{chunk-EQMRGUQX.js → chunk-YTOEFIVO.js} +1 -1
- package/POS/{chunk-ZVMYPYPY.js → chunk-ZMVGPXXL.js} +1 -1
- package/POS/{chunk-FDIAD6HZ.js → chunk-ZPRBJQFG.js} +1 -1
- package/POS/{chunk-OOUKFWXP.js → chunk-ZXUTLRFS.js} +1 -1
- package/POS/index.html +2 -2
- package/POS/{main-PZGD555M.js → main-DV3UQHRP.js} +2 -2
- package/package.json +1 -1
- package/POS/chunk-E7INKNCP.js +0 -1
- package/POS/chunk-FR4Y6YOD.js +0 -1
- package/POS/chunk-P6WBC2GS.js +0 -1
- package/POS/chunk-PAMQZAPZ.js +0 -1
- package/POS/chunk-R2VTMK5S.js +0 -1
- package/POS/chunk-XCAXYEMM.js +0 -2
- package/POS/chunk-XZFSZNBS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Je,b as Pt,c as Ye}from"./chunk-ZVMYPYPY.js";import{a as qe,b as Ke}from"./chunk-GSJNCKJX.js";import{a as Ae,b as Le,c as We,d as je,e as Ue,f as Ge,g as ze}from"./chunk-YA2V4WBI.js";import{a as Qe,b as He}from"./chunk-X74ILNCH.js";import{a as Et}from"./chunk-3SJYIQ6J.js";import"./chunk-K7ACLCRR.js";import"./chunk-B5FODXLM.js";import{a as Oe,b as Ee,c as we,d as wt,e as Pe}from"./chunk-ZD7EZIME.js";import"./chunk-SCLRE6QV.js";import"./chunk-BYXBJQAS.js";import{a as Me,b as Se}from"./chunk-AMHDH5HH.js";import{c as Te}from"./chunk-VX57G45X.js";import{b as ke,c as Ve,d as Ne,e as Fe}from"./chunk-QFVW2U6L.js";import{a as Re,b as Be}from"./chunk-QENIAO63.js";import"./chunk-EI5RXF4E.js";import{r as ve,s as De}from"./chunk-35H53ABM.js";import"./chunk-NOVFJBRH.js";import"./chunk-DVRJAZ2J.js";import"./chunk-CG2MPZLY.js";import{a as k}from"./chunk-DBT3YELG.js";import{a as _e,b as St}from"./chunk-MWT4HWQF.js";import{a as se,c as ce,e as de,f as pe}from"./chunk-LYITOHIC.js";import{b as Ie,c as ye}from"./chunk-GTGKSURG.js";import"./chunk-OA2A3GGL.js";import{a as ue}from"./chunk-3ZGW3GTD.js";import{m as Ot,n as xe}from"./chunk-BDA2RQUK.js";import"./chunk-TY5LEO35.js";import{a as Ce}from"./chunk-H5E6TCS4.js";import"./chunk-YT5REVFM.js";import{a as it,b as nt,c as Mt}from"./chunk-MK7N2B7O.js";import{a as vt,b as le}from"./chunk-KSHZDNE3.js";import{T as be,_ as ut,c as tt,d as et,e as fe,t as he}from"./chunk-5IPTS6ES.js";import{K as me}from"./chunk-2D2KKGFZ.js";import{e as Dt,f as ge}from"./chunk-C64I6KJE.js";import"./chunk-474RFSQT.js";import{a as q}from"./chunk-2FWFPV5I.js";import{C as yt,c as W,h as B,n as A}from"./chunk-YJMA7EY3.js";import"./chunk-ZKRXG2GR.js";import"./chunk-AT2GWK5V.js";import{b as ae}from"./chunk-EW4KR6O6.js";import{a as _}from"./chunk-C34GKBAP.js";import{b as re}from"./chunk-UTICPSDU.js";import{$ as G,$b as v,Bb as x,C as H,Ca as S,Eb as f,Gb as c,H as at,Hd as ne,Jd as oe,Kd as It,Lc as bt,Md as zt,Na as te,Nc as Z,Oa as ee,Ob as lt,Oc as P,Od as $,Pb as st,Qa as Gt,Qb as ct,Sa as l,Ta as h,Ub as L,Vb as s,Wb as E,Xb as y,Xc as R,Yb as dt,_c as xt,ac as D,ba as Kt,bc as M,c as K,cb as ie,d as $t,eb as g,ec as Ct,fa as gt,fc as F,ga as z,ia as mt,ib as d,jb as _t,na as w,nc as C,oa as J,oc as I,pc as ht,r as Ht,s as qt,tc as pt,ua as p,va as u,vb as r,wb as a,xb as b,yb as Y,zb as X}from"./chunk-U4MBKXDU.js";import"./chunk-LHUGHE24.js";var ot=class{ContactName;Items;Order;OrderItems;constructor(){this.Items=[],this.Order=new Jt}},Jt=class{Bin;Created;CreatorID;CurrencyID;CurrencyRate;CustomerID;Date;Discount;Discount2;DiscountAmount;EntityID;ID;Modified;ModifierID;Note;Number;SalesID;SalesOrderID;TaxTypeID;TypeID;constructor(){this.CustomerID=_.GuidEmpty,this.EntityID=_.GuidEmpty,this.ID=_.GuidEmpty,this.TaxTypeID=_.GuidEmpty,this.Discount=0,this.DiscountAmount=0}};var rt=class n{_Data=new $t(new ot);Data$=this._Data.asObservable();get Data(){return this._Data.value}pushNewValue(o){this._Data.next(o)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=gt({token:n,factory:n.\u0275fac,providedIn:"root"})};var j=class n{constructor(o,t,e,i){this.estimateDataService=o;this.backEndService=t;this.factoryService=e;this.toastr=i}_notifyNewItem=new K;notifyNewItem$=this._notifyNewItem.asObservable();getItemById(o,t){let e;return this.backEndService.getVariantById(o,t).pipe(Ht(i=>{let m=this.patchVariantToItem(i);return e=m.Variant,m.UnitCost=e.UnitCost,m}))}updateCartItem(o){let t=this.estimateDataService.Data;t.Items=o,this.estimateDataService.pushNewValue(t)}addCartItemByCode(o,t){this.backEndService.getVarianByCode(o,t).subscribe(e=>{this.createNewCartItem(e)})}getItemByCode(o,t){let e;return this.backEndService.getVarianByCode(o,t).pipe(Ht(i=>{let m=this.patchVariantToItem(i);return e=m.Variant,m.UnitCost=e.UnitCost,m}))}createNewCartItem(o){let t=new ut;t.patchByVariant(o),t.UnitPrice=o.UnitPrice,this.addNewItem(t)}patchVariantToItem(o){let t=new ut;return o=this.factoryService.generateVariantObj(o),t.patchByVariant(o),t}addNewItem(o,t){if(!this.validateCartItem(o.Variant))return;let e=this.checkBehaviourRowItem(o,t);this.updateCartItem(e)}removeItem(o){let t=this.estimateDataService.Data;t.Items.splice(o.index,1),this.updateCartItem(t.Items)}updateItem(o){let t=this.estimateDataService.Data.Items;t[o.index]=o.item,this.updateCartItem(t)}checkBehaviourRowItem(o,t=!1){let e=[];if(t)e=this.estimateDataService.Data.Items,this._notifyNewItem.next("NEW"),e.push(o);else{e=this.estimateDataService.Data.Items!=null?this.estimateDataService.Data.Items:Array();let i=e.findIndex(O=>O.VariantID===o.VariantID),m=o.Quantity;i===-1?(_.IsNotEmpty(m)?o.Quantity=m:o.Quantity=1,this._notifyNewItem.next("NEW"),e.push(o)):_.IsNotEmpty(m)?e[i].Quantity+=m:e[i].Quantity++}return e}validateCartItem(o){return o.CategoryTypeID==-1?(this.toastr.info(o.Name+" cannot be sold, check Category "+o.CategoryName+" settings","info"),!1):!0}static \u0275fac=function(t){return new(t||n)(mt(rt),mt(Et),mt(Je),mt($))};static \u0275prov=gt({token:n,factory:n.\u0275fac,providedIn:"root"})};var li=["qty"],ei=n=>({selected:n}),si=()=>["/menu/Products/Catalog/Variants/Info"],ci=n=>({ID:n});function di(n,o){if(n&1){let t=x();r(0,"a",8),f("click",function(){p(t);let i=c();return u(i.currentTab="Product")}),s(1," Product "),a()}if(n&2){let t=c();d("ngClass",F(1,ei,t.currentTab=="Product"))}}function pi(n,o){if(n&1){let t=x();r(0,"div",13)(1,"div",14)(2,"autocompleteV2",15),f("onSelect",function(i){p(t);let m=c();return u(m.addItem(i))})("keyup.enter",function(i){return p(t),u(i.stopPropagation())})("onInputEnter",function(i){p(t);let m=c();return u(m.scanCode(i))}),a()()()}n&2&&(l(2),d("renderThumbnail",!0))}function ui(n,o){if(n&1){let t=x();r(0,"input",24),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.item.Price,i)||(m.item.Price=i),u(i)}),a()}if(n&2){let t=c(2);v("ngModel",t.item.Price)}}function fi(n,o){if(n&1){let t=x();r(0,"input",19,2),M("ngModelChange",function(i){p(t);let m=c(3);return D(m.item.Price,i)||(m.item.Price=i),u(i)}),a()}if(n&2){let t=c(3);v("ngModel",t.item.Price)}}function gi(n,o){if(n&1&&g(0,fi,2,1,"input",25),n&2){let t=c(2);d("ngIf",t.role.UnitPriceEditor)}}function _i(n,o){if(n&1){let t=x();r(0,"div",26)(1,"div",14)(2,"h5",27),s(3,"Note"),a(),r(4,"POS-tinymce-editor",28),M("valueChange",function(i){p(t);let m=c(2);return D(m.item.Note,i)||(m.item.Note=i),u(i)}),a()()()}if(n&2){let t=c(2);l(4),v("value",t.item.Note)}}function Ci(n,o){if(n&1){let t=x();r(0,"mat-chip-row",34),f("removed",function(){let i=p(t).$implicit,m=c(3);return u(m.removeSerial(i))}),s(1),a()}if(n&2){let t=o.$implicit;l(),y(" ",t," ")}}function hi(n,o){if(n&1){let t=x();r(0,"div",29)(1,"mat-form-field",30),f("keyup.enter",function(i){return p(t),u(i.stopPropagation())}),r(2,"mat-label"),s(3,"Serial"),a(),r(4,"mat-chip-grid",31,3),g(6,Ci,2,1,"mat-chip-row",32),r(7,"input",33),f("matChipInputTokenEnd",function(i){p(t);let m=c(2);return u(m.addSerial(i))}),a()()()()}if(n&2){let t=L(5),e=c(2);l(6),d("ngForOf",e.item.Serial),l(),d("matChipInputFor",t)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",e.addOnBlur)}}function bi(n,o){if(n&1){let t=x();Y(0),r(1,"div",16)(2,"div",17)(3,"div",18)(4,"h5"),s(5,"Qty"),a(),r(6,"input",19,0),M("ngModelChange",function(i){p(t);let m=c();return D(m.item.Quantity,i)||(m.item.Quantity=i),u(i)}),a()(),r(8,"div",20)(9,"h5"),s(10,"Discount (%)"),a(),r(11,"input",19),M("ngModelChange",function(i){p(t);let m=c();return D(m.item.Discount,i)||(m.item.Discount=i),u(i)}),a()(),r(12,"div",20)(13,"h5"),s(14,"Price"),a(),g(15,ui,1,1,"input",21)(16,gi,1,1,"ng-template",null,1,pt),a()(),g(18,_i,5,1,"div",22)(19,hi,8,4,"div",23),a(),X()}if(n&2){let t=L(17),e=c();l(),_t("height",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)==4?"150px":"350px"),l(5),v("ngModel",e.item.Quantity),l(5),v("ngModel",e.item.Discount),l(4),d("ngIf",!e.role.UnitPriceEditor)("ngIfElse",t),l(3),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)!=4),l(),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)==4)}}function xi(n,o){n&1&&(Y(0),b(1,"i",52),r(2,"h6"),s(3,"No Image"),a(),X())}function Ii(n,o){if(n&1&&b(0,"img",53),n&2){let t=c(2);d("src",t.item.Variant.ThumbnailUrl,ee)}}function yi(n,o){if(n&1){let t=x();r(0,"tr")(1,"th",49),s(2,"Cost"),a(),r(3,"td",54)(4,"input",55),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.item.Cost,i)||(m.item.Cost=i),u(i)}),a()()()}if(n&2){let t=c(2);l(4),v("ngModel",t.item.Cost),d("readonly",!t.moduleSell.Cost.Enabled)}}function vi(n,o){if(n&1&&(r(0,"tr")(1,"th",49),s(2,"Content"),a(),r(3,"td",50)(4,"div",56),s(5),C(6,"number"),a()()()),n&2){let t=c(2);l(5),dt(" ",t.item==null?null:t.item.VariantUnitQuantity," (@",I(6,2,t.item.Price/(t.item==null?null:t.item.VariantUnitQuantity)),")")}}function Di(n,o){if(n&1&&(r(0,"div",47)(1,"table",57)(2,"thead")(3,"tr")(4,"th",58),s(5,"Storage Location"),a()()(),r(6,"tbody")(7,"tr")(8,"td"),s(9),a()()()()()),n&2){let t=c(2);l(9),y(" ",t.item.Variant.Storage," ")}}function Mi(n,o){if(n&1&&(Y(0),r(1,"div",13)(2,"div",35)(3,"a",36),g(4,xi,4,0,"ng-container",37)(5,Ii,1,1,"ng-template",null,4,pt),a()(),r(7,"div",38)(8,"div",39)(9,"div",14)(10,"div",40),b(11,"i",41),r(12,"div",42),s(13,"Inventory"),a()(),r(14,"table",43)(15,"thead")(16,"tr")(17,"th",44),s(18,"On Hand"),a(),r(19,"th",44),s(20,"Allocated"),a(),r(21,"th",45),s(22,"Available"),a()()(),r(23,"tbody")(24,"tr")(25,"td",46),s(26),C(27,"number"),a(),r(28,"td",46),s(29),C(30,"number"),a(),r(31,"td",46),s(32),C(33,"number"),a()()()()()(),r(34,"div",13)(35,"div",47)(36,"table",48)(37,"thead"),g(38,yi,5,2,"tr",12),r(39,"tr")(40,"th",49),s(41,"Price"),a(),r(42,"td",50),s(43),C(44,"number"),a()(),g(45,vi,7,4,"tr",12),a()()(),g(46,Di,10,1,"div",51),a()()(),X()),n&2){let t=L(6),e=c();l(3),d("routerLink",Ct(19,si))("queryParams",F(20,ci,e.item==null||e.item.Variant==null?null:e.item.Variant.ID)),l(),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.ThumbnailUrl)==null)("ngIfElse",t),l(22),y(" ",I(27,11,e.onHand)," "),l(3),y(" ",I(30,13,e.allocated)," "),l(3),y(" ",I(33,15,e.onHand-e.allocated)," "),l(6),d("ngIf",e.moduleSell.Cost.Visible&&e.role.product.Cost),l(5),y(" ",I(44,17,e.item.Variant.UnitPrice)," "),l(2),d("ngIf",(e.item==null?null:e.item.VariantUnitQuantity)>1),l(),d("ngIf",(e.moduleSell.Grid==null?null:e.moduleSell.Grid.StorageVisible)&&e.item.Variant.Storage)}}var Tt=class n{constructor(o,t,e,i,m){this.data=o;this.dialogRef=t;this.cartItemService=e;this.httpService=i;this.toastr=m;this.config=new it,this.entityID=o.entityID,this.moduleSell=o.moduleSell,this.role=o.role,_.IsNotEmpty(o.itemInfo)?(this.isEdit=!0,this.item=Object.assign({},this.data.itemInfo.item),this.requestUnitInStock(),this.config.title=this.item.Variant.Name,this.item.Variant.Ordered!=null?(this.extraTitle=` Inventory: ${this.item.Variant.UnitsInStock}, Allocated: ${this.item.Variant.Ordered}`,this.toggleInventory=!0):this.toggleInventory=!1):(this.item=new ut,this.config.title="Add Item"),this.config.customWidth="650px"}moduleSell;role;onHand;allocated;currentTab="Cart";qty;addOnBlur=!0;config;item;isEdit=!1;toggleInventory=!0;extraTitle;entityID;separatorKeysCodes=[13,188];onOk(){_.IsNotEmpty(this.item.VariantID)&&(this.isEdit?this.cartItemService.updateItem({item:this.item,index:this.data.itemInfo.index}):this.cartItemService.addNewItem(this.item,!0));let o=this.item.Note;if(o&&o.length>500){this.toastr.warning("Maximum 500 characters allowed","Warning");return}this.dialogRef.close()}addItem(o){this.cartItemService.getItemById(o,this.data.entityID).subscribe(t=>{this.item=t,this.config.title=this.item.Variant.Name,this.toggleInventory=!1}),setTimeout(()=>{this.qty.nativeElement.focus()},100)}addSerial(o){let t=(o.value||"").trim();o.chipInput.clear()}removeSerial(o){let t=this.item.Serial.indexOf(o);t>=0&&this.item.Serial.splice(t,1)}requestUnitInStock(){if(_.IsEmpty(this.entityID)){this.toastr.error("Please select outlet before proceeding..",q.Error);return}this.httpService.get(k.GetVariantStockByID,[{key:"ID",value:this.item?.Variant?.ID},{key:"EntityID",value:this.entityID}]).subscribe(o=>{this.onHand=o.OnHand,this.allocated=o.Allocated})}scanCode(o){this.cartItemService.getItemByCode(o,this.entityID).subscribe(t=>{this.item=t,this.config.title=this.item.Variant.Name,this.toggleInventory=!1}),setTimeout(()=>{this.qty.nativeElement.focus()},100)}static \u0275fac=function(t){return new(t||n)(h(et),h(tt),h(j),h(re),h($))};static \u0275cmp=w({type:n,selectors:[["POS-modal-item"]],viewQuery:function(t,e){if(t&1&<(li,5),t&2){let i;st(i=ct())&&(e.qty=i.first)}},decls:12,vars:8,consts:[["qty",""],["PRICE",""],["price",""],["chipList",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"container","w-100","h-100"],[1,"row","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link",3,"ngClass","click",4,"ngIf"],[1,"container-fluid","mt-5"],["class","row",4,"ngIf"],[4,"ngIf"],[1,"row"],[1,"col-12"],["placeholder","Search product by name / code","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"input-left","w-100",3,"onSelect","keyup.enter","onInputEnter","renderThumbnail"],[2,"height","350px"],[1,"row","mt-5"],[1,"col-auto"],["type","text","autoNum","",1,"mt-5","form-control",2,"width","100px",3,"ngModelChange","ngModel"],[1,"col-auto","ps-0"],["type","text","style","width: 100px;","class","mt-5 form-control","disabled","",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["style","height: 200px;","class","row mt-5",4,"ngIf"],["class","mt-5",4,"ngIf"],["type","text","disabled","",1,"mt-5","form-control",2,"width","100px",3,"ngModelChange","ngModel"],["type","text","style","width: 100px;","class","mt-5 form-control","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-5",2,"height","200px"],[1,"mb-5"],["height","220px",3,"valueChange","value"],[1,"mt-5"],["appearance","fill",1,"example-chip-list","w-100",3,"keyup.enter"],["aria-label","Serial"],[3,"removed",4,"ngFor","ngForOf"],["placeholder","Serial...",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur"],[3,"removed"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-8","inventory"],[1,"row","mb-8"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","'Roboto Slab'"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","py-6","border-end",2,"text-transform","none"],[1,"table-light","py-6",2,"text-transform","none"],[1,"py-6"],[1,"col-6"],[1,"table","table-bordered",2,"width","171px"],[1,"table-light",2,"text-transform","none"],[1,"pe-6","text-end"],["class","col-6",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"p-0"],["type","text","autoNum","",1,"form-control","border-0","bg-white","text-end",3,"ngModelChange","ngModel","readonly"],["ngClass","ms-3"],[1,"table","table-bordered","text-center"],[1,"table-light"]],template:function(t,e){t&1&&(r(0,"modal-material",5),f("onOk",function(){return e.onOk()})("onCancel",function(){return e.dialogRef.close()})("onClose",function(){return e.dialogRef.close()}),r(1,"content")(2,"div",6)(3,"div",7)(4,"div")(5,"a",8),f("click",function(){return e.currentTab="Cart"}),s(6," Cart "),a(),g(7,di,2,3,"a",9),a()()(),r(8,"div",10),g(9,pi,3,1,"div",11)(10,bi,20,8,"ng-container",12)(11,Mi,47,22,"ng-container",12),a()()()),t&2&&(d("config",e.config),l(5),d("ngClass",F(6,ei,e.currentTab=="Cart")),l(2),d("ngIf",e.role.InventoryView),l(2),d("ngIf",!e.isEdit),l(),d("ngIf",e.currentTab=="Cart"),l(),d("ngIf",e.currentTab=="Product"&&e.isEdit))},dependencies:[bt,Z,P,It,W,B,A,Ot,Ve,Ne,ke,nt,St,Re,R],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}autocompleteV2[_ngcontent-%COMP%] mat-form-field input{padding:10px 15px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.inventory[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}"]})};var Zt=(t=>(t[t.DISCOUNT=0]="DISCOUNT",t[t.CALCULATOR=1]="CALCULATOR",t))(Zt||{});var ii=n=>({selected:n});function Si(n,o){if(n&1){let t=x();Y(0),r(1,"div",8)(2,"div",9)(3,"label",10),s(4,"Discount %"),a(),r(5,"div",11)(6,"input",12),M("ngModelChange",function(i){p(t);let m=c();return D(m.transactionData.Order.Discount,i)||(m.transactionData.Order.Discount=i),u(i)}),a(),r(7,"span",13),s(8,"%"),a()()(),r(9,"div",14)(10,"label",15),s(11),a(),r(12,"input",16),M("ngModelChange",function(i){p(t);let m=c();return D(m.transactionData.Order.DiscountAmount,i)||(m.transactionData.Order.DiscountAmount=i),u(i)}),a()()(),X()}if(n&2){let t=c();l(6),v("ngModel",t.transactionData.Order.Discount),l(5),y("Discount ",t.data.cartFooterInfo.currencySymbol,""),l(),v("ngModel",t.transactionData.Order.DiscountAmount)}}function Oi(n,o){if(n&1){let t=x();r(0,"div",8)(1,"div",17)(2,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[0],i)||(m.disc[0]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(3,"span"),s(4,"%+"),a(),r(5,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[1],i)||(m.disc[1]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(6,"span"),s(7,"%+"),a(),r(8,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[2],i)||(m.disc[2]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(9,"span"),s(10,"%"),a()()()}if(n&2){let t=c();l(2),v("ngModel",t.disc[0]),l(3),v("ngModel",t.disc[1]),l(3),v("ngModel",t.disc[2])}}var Vt=class n{constructor(o,t){this.data=o;this.dialogRef=t;this.transactionData=this.data.transactionData,this.config=new it,this.config.title="Discount from Supplier",this.config.customWidth="350px",this.disc=this.data.cartFooterInfo.disc}transactionData;config;tabState=Zt;currentTabState=0;disc;discountCalculator(){let o=100;this.disc.forEach(t=>o=o*(100-t)/100),this.transactionData.Order.Discount=100-o}static \u0275fac=function(t){return new(t||n)(h(et),h(tt))};static \u0275cmp=w({type:n,selectors:[["POS-modal-discount"]],decls:12,vars:9,consts:[["CALCULATOR",""],[3,"onCancel","onClose","onOk","config"],[1,"container-fluid"],[1,"row","border-bottom"],[1,"col-12"],["data-cy","discount",1,"btn","btn-link-tab",3,"click","ngClass"],["data-cy","calculator",1,"btn","btn-link-tab",3,"click","ngClass"],[4,"ngIf","ngIfElse"],[1,"row","mt-8"],[1,"col-md-6","ps-12"],[1,"fw-bold","d-block"],[1,"input-group","mb-3"],["type","text","autoNum","","percentage","",1,"form-control",3,"ngModelChange","ngModel"],[1,"input-group-text"],[1,"col-md-6","pe-12"],[1,"fw-bold"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],[1,"col-12","d-flex","align-items-center","justify-content-center"],["type","text","autoNum","","percentage","",1,"form-control",2,"width","70px","display","inline",3,"ngModelChange","keyup","ngModel"]],template:function(t,e){if(t&1){let i=x();r(0,"modal-material",1),f("onCancel",function(){return p(i),u(e.dialogRef.close())})("onClose",function(){return p(i),u(e.dialogRef.close())})("onOk",function(){return p(i),u(e.dialogRef.close())}),r(1,"content")(2,"div",2)(3,"div",3)(4,"div",4)(5,"a",5),f("click",function(){return p(i),u(e.currentTabState=e.tabState.DISCOUNT)}),s(6," Discount "),a(),r(7,"a",6),f("click",function(){return p(i),u(e.currentTabState=e.tabState.CALCULATOR)}),s(8," Calculator "),a()()(),g(9,Si,13,3,"ng-container",7)(10,Oi,11,3,"ng-template",null,0,pt),a()()()}if(t&2){let i=L(11);d("config",e.config),l(5),d("ngClass",F(5,ii,e.tabState.DISCOUNT==e.currentTabState)),l(2),d("ngClass",F(7,ii,e.tabState.CALCULATOR==e.currentTabState)),l(2),d("ngIf",e.currentTabState==e.tabState.DISCOUNT)("ngIfElse",i)}},dependencies:[bt,P,nt,W,B,A]})},Nt=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[xt,Mt,yt]})};var Ft=class{total;discount;taxRate;tax;currencySymbol;disc;label;constructor(){this.total=0,this.discount=0,this.taxRate=0,this.tax=0,this.currencySymbol="",this.disc=[0,0,0]}};function wi(n,o){if(n&1){let t=x();r(0,"input",11),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.estimateData.Order.CurrencyRate,i)||(m.estimateData.Order.CurrencyRate=i),u(i)}),a()}if(n&2){let t=c(2);v("ngModel",t.estimateData.Order.CurrencyRate)}}function Pi(n,o){if(n&1&&(r(0,"div",8)(1,"span",9),s(2,"@"),a(),g(3,wi,1,1,"input",10),a()),n&2){let t=c();l(3),d("ngIf",t.estimateData.Order.CurrencyID!=t.oldCurrencyID)}}var Rt=class n{constructor(o,t){this.data=o;this.dialogRef=t;this.config=new it,this.config.title="Estimate Note",this.config.customWidth="325px",this.currencies=this.data.currencies,this.customerPOTypes=this.data.type,this.estimateData=this.data.estimateData,this.oldCurrencyID=this.data.estimateData.Order.CurrencyID}currencies;customerPOTypes;estimateData;oldCurrencyID;config;static \u0275fac=function(t){return new(t||n)(h(et),h(tt))};static \u0275cmp=w({type:n,selectors:[["POS-modal-estimate-note"]],decls:21,vars:9,consts:[[3,"onCancel","onClose","onOk","config"],[1,"table-sm"],[3,"hidden"],[1,"row"],[1,"col-sm-5"],["appendTo","body","bindLabel","Symbol","bindValue","ID",1,"currency-select",2,"width","100px",3,"ngModelChange","clearable","ngModel","items"],["class","col-sm-4 ms-2 d-flex",4,"ngIf"],["appendTo","body","bindLabel","Name","bindValue","ID",1,"customer-po-select",2,"width","215px",3,"ngModelChange","clearable","ngModel","items"],[1,"col-sm-4","ms-2","d-flex"],[1,"pt-4"],["style","width: 100px;","class","form-control","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],["autoNum","",1,"form-control",2,"width","100px",3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(r(0,"modal-material",0),f("onCancel",function(){return e.dialogRef.close()})("onClose",function(){return e.dialogRef.close()})("onOk",function(){return e.dialogRef.close()}),r(1,"content")(2,"table",1)(3,"tbody")(4,"tr",2)(5,"th"),s(6,"Currency"),a(),r(7,"td"),s(8,":"),a(),r(9,"td")(10,"div",3)(11,"div",4)(12,"ng-select",5),M("ngModelChange",function(m){return D(e.estimateData.Order.CurrencyID,m)||(e.estimateData.Order.CurrencyID=m),m}),a()(),g(13,Pi,4,1,"div",6),a()()(),r(14,"tr")(15,"th"),s(16,"Tag"),a(),r(17,"td"),s(18,":"),a(),r(19,"td")(20,"ng-select",7),M("ngModelChange",function(m){return D(e.estimateData.Order.TypeID,m)||(e.estimateData.Order.TypeID=m),m}),a()()()()()()()),t&2&&(d("config",e.config),l(4),d("hidden",e.currencies.length<2),l(8),d("clearable",!1),v("ngModel",e.estimateData.Order.CurrencyID),d("items",e.currencies),l(),d("ngIf",e.estimateData.Order.CurrencyID!=e.oldCurrencyID),l(7),d("clearable",!1),v("ngModel",e.estimateData.Order.TypeID),d("items",e.customerPOTypes))},dependencies:[P,W,B,A,Dt,nt,St],encapsulation:2})};function ki(n,o){if(n&1){let t=x();r(0,"div",1)(1,"div",2),f("click",function(){p(t);let i=c();return u(i.openOutletModal())}),b(2,"i",3)(3,"input",4),C(4,"limitTo"),a(),r(5,"div",5)(6,"datepicker",6),M("dateChange",function(i){p(t);let m=c();return D(m.estimateData.Order.Date,i)||(m.estimateData.Order.Date=i),u(i)}),a()(),r(7,"div",7),b(8,"i",8),r(9,"input",9),M("ngModelChange",function(i){p(t);let m=c();return D(m.estimateData.Order.Number,i)||(m.estimateData.Order.Number=i),u(i)}),a()(),r(10,"div",10),b(11,"i",11),r(12,"autocompleteV2",12),f("onSelect",function(i){p(t);let m=c();return u(m.selectCustomer(i))}),a(),r(13,"i",13),f("click",function(){p(t);let i=c();return u(i.openCustomerModal())}),a()(),r(14,"div",14),b(15,"i",15),r(16,"ng-select-infinite",16),M("selectedChange",function(i){p(t);let m=c();return D(m.estimateData.Order.SalesID,i)||(m.estimateData.Order.SalesID=i),u(i)}),a()()()}if(n&2){let t=c();l(2),d("matTooltip",t.outletName),l(),d("value",ht(4,11,t.outletName,20))("placeholder",t.outletName),l(3),d("disabled",!t.role.Date),v("date",t.estimateData.Order.Date),d("matTooltip",t.role!=null&&t.role.Date?"":"Date role is required"),l(3),d("disabled",!t.role.Number),v("ngModel",t.estimateData.Order.Number),l(3),d("inputTextValue",t.customerName),l(4),d("items",t.salesPerson),v("selected",t.estimateData.Order.SalesID)}}var Bt=class n{onOpenOutletModal=new S;onSelectCustomer=new S;onOpenCustomerModal=new S;salesPerson;estimateData;outletName;customerName;role;selectCustomer(o){this.onSelectCustomer.emit(o)}openOutletModal(){this.onOpenOutletModal.emit()}openCustomerModal(){this.onOpenCustomerModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-toolbar"]],inputs:{salesPerson:"salesPerson",estimateData:"estimateData",outletName:"outletName",customerName:"customerName",role:"role"},outputs:{onOpenOutletModal:"onOpenOutletModal",onSelectCustomer:"onSelectCustomer",onOpenCustomerModal:"onOpenCustomerModal"},decls:1,vars:1,consts:[["class","row header g-0 py-4",4,"ngIf"],[1,"row","header","g-0","py-4"],[1,"col-auto",3,"click"],["matTooltipPosition","above",1,"fa-solid","fa-house",3,"matTooltip"],["readonly","",1,"outlet","cursor",3,"value","placeholder"],[1,"col-auto","date","me-5"],["appearance","fill","name","orderDate","matTooltipPosition","above",3,"dateChange","disabled","date","matTooltip"],[1,"col-auto","me-5"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Order number",1,"far","fa-file-lines"],["type","text","placeholder","Puchase Order Number",1,"number",2,"width","180px",3,"ngModelChange","disabled","ngModel"],[1,"col-auto","d-flex","me-5"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Customer",1,"fa","fa-user"],["requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer","notFoundMessageFor","customer","panelWidth","30%",3,"onSelect","inputTextValue"],["aria-hidden","true",1,"fa-solid","fa-circle-plus",3,"click"],[1,"col-auto","d-flex"],[1,"fa","fa-id-badge","ps-2"],["bindValue","ID","bindLabel","Name","width","135px","placeholder","Sales Person",3,"selectedChange","items","selected"]],template:function(t,e){t&1&&g(0,ki,17,14,"div",0),t&2&&d("ngIf",e.estimateData)},dependencies:[P,ve,W,B,A,Ot,Me,vt,he],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:3px!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex{background-color:#e9ecef!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex input{opacity:1!important;color:#00000061!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field .mat-mdc-text-field-wrapper{padding-bottom:0;background-color:#fff;padding-left:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-flex{width:147px;height:35px;border:1px solid rgb(207,207,207);margin-left:40px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none!important;top:5px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:4px;padding-bottom:4px;padding-left:8px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix{position:relative;left:-140px;top:1px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix .mat-mdc-button-persistent-ripple{color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix button.mat-mdc-icon-button.mat-mdc-button-base{padding:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mdc-line-ripple{display:none}.date[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-mdc-form-field-flex{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.col-auto[_ngcontent-%COMP%]{font-size:.875rem;height:fit-content}.col-auto[_ngcontent-%COMP%]:last-child{margin-right:0}.col-auto[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.25rem;color:#3b3b3b;margin-right:5px;line-height:unset!important;position:relative;top:2px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .col-auto[_ngcontent-%COMP%] span.outlet[_ngcontent-%COMP%]{padding:4px 8px 3px 5px;border:1px solid #dddddd;font-size:.875rem}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:36px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background-color:#e9ecef!important;opacity:1!important;color:#00000061!important}.col-auto[_ngcontent-%COMP%] .outlet[_ngcontent-%COMP%]{width:165px;color:#337ab7;background:#fff}.col-auto[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:150px}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}"]})};function Ni(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2),C(3,"number"),a(),r(4,"td",16),s(5),C(6,"number"),a()()),n&2){let t=c();l(2),E("DISCOUNT "+I(3,2,t.estimateData.Order.Discount)+" %"),l(3),E(I(6,4,t.cartFooterInfo.discount))}}function Fi(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2,"DISCOUNT"),a(),r(3,"td",16),s(4),C(5,"number"),a()()),n&2){let t=c();l(4),E(I(5,1,t.estimateData.Order.DiscountAmount))}}function Ri(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2),a(),r(3,"td",17),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),E(t.cartFooterInfo.label),l(2),E(I(5,2,t.cartFooterInfo.tax))}}var At=class n{cartFooterInfo;cartItems;estimateData;taxes;onChangeTaxType=new S;onOpenDiscountModal=new S;changeTaxType(o){this.onChangeTaxType.emit(o)}openDiscountModal(){this.onOpenDiscountModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-cart-footer"]],inputs:{cartFooterInfo:"cartFooterInfo",cartItems:"cartItems",estimateData:"estimateData",taxes:"taxes"},outputs:{onChangeTaxType:"onChangeTaxType",onOpenDiscountModal:"onOpenDiscountModal"},decls:23,vars:9,consts:[[1,"row","g-0","cart-footer","justify-content-between"],[1,"col-auto","align-self-center",2,"margin-top","15px","margin-bottom","15px","margin-right","7px"],[1,"row","g-0","d-flex","align-items-center"],[1,"col-auto","mx-5","d-flex","align-items-center"],["aria-hidden","true",1,"fa","fa-tags",2,"font-size","1.25rem"],["bindLabel","Label","bindValue","ID","placeholder","Choose...",1,"ms-5",2,"width","150px",3,"ngModelChange","change","ngModel","items","clearable"],[1,"col-auto","ms-5"],[1,"btn","btn-gray","fw-normal","d-flex","align-items-center",2,"height","36px",3,"click"],["aria-hidden","true",1,"fa","fa-tags"],[1,"ms-3"],[1,"col-auto","summary"],[1,"table"],[1,"table-light","border-top-0"],[1,"text-end","border-top-0",2,"width","100px"],[4,"ngIf"],[1,"table-light"],[1,"text-danger","text-end"],[1,"text-end"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),b(4,"i",4),r(5,"ng-select",5),M("ngModelChange",function(m){return D(e.estimateData.Order.TaxTypeID,m)||(e.estimateData.Order.TaxTypeID=m),m}),f("change",function(m){return e.changeTaxType(m)}),a()(),r(6,"div",6)(7,"a",7),f("click",function(){return e.openDiscountModal()}),b(8,"i",8),r(9,"span",9),s(10,"Discount"),a()()()()(),r(11,"div",10)(12,"table",11)(13,"tbody")(14,"tr")(15,"th",12),s(16,"Amount"),a(),r(17,"td",13),s(18),C(19,"number"),a()(),g(20,Ni,7,6,"tr",14)(21,Fi,6,3,"tr",14)(22,Ri,6,4,"tr",14),a()()()()),t&2&&(l(5),v("ngModel",e.estimateData.Order.TaxTypeID),d("items",e.taxes)("clearable",!1),l(13),E(I(19,7,e.cartFooterInfo.total)),l(2),d("ngIf",e.cartItems.length>0&&e.estimateData.Order.Discount>0),l(),d("ngIf",e.cartItems.length>0&&e.estimateData.Order.DiscountAmount>0),l(),d("ngIf",e.cartItems.length>0&&e.cartFooterInfo.taxRate>0))},dependencies:[P,B,A,Dt,R],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-left:solid 1px #cfcfcf;border-bottom:solid 1px #cfcfcf}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px 8px}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px 5px}.btn-gray[_ngcontent-%COMP%]{background-color:#f4f4f4;border:1px solid #d6d6d6;font-weight:700;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}.cart-footer[_ngcontent-%COMP%]{width:550px}"]})};var Lt=class n{total;onSubmit=new S;onOpenVoidModal=new S;onOpenNoteModal=new S;submit(){this.onSubmit.emit()}openVoidModal(){this.onOpenVoidModal.emit()}openEstimateNoteModal(){this.onOpenNoteModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-cart-action"]],inputs:{total:"total"},outputs:{onSubmit:"onSubmit",onOpenVoidModal:"onOpenVoidModal",onOpenNoteModal:"onOpenNoteModal"},decls:14,vars:4,consts:[[1,"mt-5","d-flex","action-button","justify-content-end"],[1,"d-flex","justify-content-end",2,"width","85%"],[1,"btn","btn-gray","me-5",3,"click"],[1,"fa-solid","fa-note-sticky"],[1,"fa-regular","fa-rectangle-xmark"],[1,"btn","btn-success","d-flex","justify-content-between","align-items-center",2,"height","60px","width","200px","font-size","18px",3,"click"],[1,"text-bold"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"button",2),f("click",function(){return e.openEstimateNoteModal()}),b(3,"i",3),s(4," NOTE "),a(),r(5,"button",2),f("click",function(){return e.openVoidModal()}),b(6,"i",4),s(7," Clear "),a(),r(8,"button",5),f("click",function(){return e.submit()}),r(9,"span",6),s(10,"Submit:"),a(),r(11,"span"),s(12),C(13,"number"),a()()()()),t&2&&(l(12),E(ht(13,1,e.total,"1.0-4")))},dependencies:[R],styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;font-weight:700;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee);font-size:1.125rem}"]})};var ni=n=>({ID:n}),Li=()=>["/menu/Orders/Orders/Estimate/Info"];function Wi(n,o){if(n&1&&(r(0,"div",24)(1,"div",25),s(2),a(),r(3,"div",25),s(4),C(5,"number"),a()()),n&2){let t=o.$implicit;l(2),E(t.Variant.Name),l(2),y("",I(5,2,t.Price*t.Quantity*((100-t.Discount)/100))," ")}}function ji(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),C(3,"number"),a(),r(4,"div",21),s(5),C(6,"number"),a()()),n&2){let t=c();l(2),dt("","Discount "+I(3,3,t.estimateData.Order.Discount)+" %",": ",t.cartFooterInfo.currencySymbol,""),l(3),E(I(6,5,t.cartFooterInfo.discount))}}function Ui(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),a(),r(3,"div",21),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),y("Discount: ",t.cartFooterInfo.currencySymbol,""),l(2),E(I(5,2,t.estimateData.Order.DiscountAmount))}}function Qi(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),a(),r(3,"div",21),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),dt("","Tax "+t.cartFooterInfo.taxRate+" %",": ",t.cartFooterInfo.currencySymbol,""),l(2),E(I(5,3,t.cartFooterInfo.tax))}}var Wt=class n{cartFooterInfo;estimateData;total;completeInfo;cartItems;onUndo=new S;onNewForm=new S;undo(){this.onUndo.emit()}newForm(){this.onNewForm.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-complete"]],inputs:{cartFooterInfo:"cartFooterInfo",estimateData:"estimateData",total:"total",completeInfo:"completeInfo",cartItems:"cartItems"},outputs:{onUndo:"onUndo",onNewForm:"onNewForm"},decls:40,vars:21,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","115px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","my-6"],["target","_blank","routerLink","/print/Estimate",1,"btn","bg-light-gray","btn-secondary",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-5",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],["class","row justify-content-end",4,"ngIf"],[1,"row","justify-content-end"],[1,"row","justify-content-between","mb-5"],[1,"col","text-end"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),b(5,"i",5),s(6,"Order Complete "),a()(),r(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),f("click",function(){return e.newForm()}),s(11,"New Order (F8)"),a()()()(),r(12,"div",10)(13,"div",11)(14,"a",12),b(15,"i",13),s(16,"Print Receipt"),a()()()()(),r(17,"div",14)(18,"div",2)(19,"div",15)(20,"h2",16)(21,"a",17),s(22),a()()(),r(23,"div",18),g(24,Wi,6,4,"div",19),r(25,"div",20)(26,"div",21),s(27),a(),r(28,"div",21),s(29),C(30,"number"),a()(),g(31,ji,7,7,"div",22)(32,Ui,6,4,"div",22)(33,Qi,6,5,"div",22),r(34,"div",23)(35,"div",21),s(36),a(),r(37,"div",21),s(38),C(39,"number"),a()()()()()()),t&2&&(l(14),d("queryParams",F(16,ni,e.completeInfo.OrderID)),l(7),d("routerLink",Ct(18,Li))("queryParams",F(19,ni,e.completeInfo.OrderID)),l(),y("Estimate #",e.completeInfo.InvoiceNumber,""),l(2),d("ngForOf",e.cartItems),l(3),y("Amount: ",e.cartFooterInfo.currencySymbol,""),l(2),E(I(30,12,e.cartFooterInfo.total)),l(2),d("ngIf",e.cartFooterInfo.discount>0),l(),d("ngIf",e.estimateData.Order.DiscountAmount>0),l(),d("ngIf",e.cartFooterInfo.tax>0),l(3),y("Total: ",e.cartFooterInfo.currencySymbol,""),l(2),E(I(39,14,e.total)))},dependencies:[Z,P,It,R]})};var Ki=["cartContainer"];function Gi(n,o){n&1&&b(0,"th",18)}function zi(n,o){n&1&&(r(0,"th",9),s(1,"UOM"),a())}function Ji(n,o){if(n&1&&(r(0,"td")(1,"small"),s(2),a()()),n&2){let t=c().index;l(2),y("",t+1,".")}}function Yi(n,o){if(n&1&&(r(0,"td"),s(1),a()),n&2){let t=c().$implicit;l(),y(" ",t.Variant.UOMName," ")}}function Xi(n,o){if(n&1){let t=x();r(0,"tr",19),f("click",function(){let i=p(t),m=i.$implicit,O=i.index,V=c();return u(V.onSelect({item:m,index:O}))})("contextmenu",function(i){let m=p(t),O=m.$implicit,V=m.index,ft=c();return u(ft.onContextMenu(i,O,V))}),r(1,"td",20)(2,"i",21),f("click",function(){let i=p(t),m=i.$implicit,O=i.index,V=c();return u(V.onRemove({item:m,index:O}))}),a()(),g(3,Ji,3,1,"td",22),r(4,"td",23)(5,"span",24),s(6),b(7,"br"),a(),b(8,"span",25),a(),r(9,"td"),s(10),a(),r(11,"td",26),s(12),C(13,"number"),r(14,"span"),s(15),a()(),g(16,Yi,2,1,"td",22),r(17,"td",26),s(18),C(19,"number"),a(),r(20,"td",27),s(21),C(22,"number"),a(),r(23,"td",26),s(24),C(25,"number"),a()()}if(n&2){let t=o.$implicit,e=c();d("cdkDragDisabled",!e.dragDropEnabled),l(3),d("ngIf",e.appConfig.ModuleSell.Grid.RowNumberVisible),l(3),y(" ",t.Variant.Name," "),l(2),d("innerHTML",t.Note,te),l(2),E(t.Variant.Code),l(2),y(" ",I(13,11,t.Quantity),""),l(3),E(t.UnitQuantity>1?"@"+t.UnitQuantity:""),l(),d("ngIf",e.appConfig.ModuleSell.Grid.UOMVisible),l(2),y(" ",I(19,13,t.Price)," "),l(3),y(" ",t.Discount==0?"":"-"+I(22,15,t.Discount)," "),l(3),y(" ",I(25,17,t.Price*t.Quantity*((100-t.Discount)/100))," ")}}function Zi(n,o){if(n&1){let t=x();r(0,"button",28),f("click",function(){let i=p(t).item,m=c();return u(m.onReverse(i,!0))}),s(1,"Return"),a(),r(2,"button",28),f("click",function(){let i=p(t).item,m=c();return u(m.onReverse(i,!1))}),s(3,"Purchase"),a()}}var jt=class n{constructor(o,t){this.loadService=o;this.cartItemService=t;this.cartItems=[],this.destroy$=new K,this.onSelectItem=new S,this.onReturnItem=new S,this.onPurchaseItem=new S,this.onRemoveItem=new S,this.onDragItem=new S,this.cartItemsChange=new S,this.cartItemService.notifyNewItem$.pipe(H(e=>_.IsNotEmpty(e))).subscribe({next:e=>{setTimeout(()=>{let i=this.cartContainer.nativeElement.scrollHeight;this.cartContainer.nativeElement.scrollTop=i},1)}}),this.initDisableDragNDrop()}cartItems;cartItemsChange;onSelectItem;onReturnItem;onPurchaseItem;onRemoveItem;onDragItem;dragDropEnabled=!0;cartContainer;contextMenu;contextMenuPosition={x:"0px",y:"0px"};onContextMenu(o,t,e){o.preventDefault(),this.contextMenuPosition.x=o.clientX+"px",this.contextMenuPosition.y=o.clientY+"px",t.Index=e,this.contextMenu.menuData={item:t},this.contextMenu.openMenu()}onDrop(o){se(this.cartItems,o.previousIndex,o.currentIndex),this.cartItemService.updateCartItem(this.cartItems),this.onDragItem.emit(this.cartItems),this.cartItemsChange.emit(this.cartItems)}destroy$;appConfig;role;initDisableDragNDrop(){_.isMobileDevice&&(this.dragDropEnabled=!1)}ngOnInit(){this.initAppConfig(),this.initRole()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initAppConfig(){this.appConfig=this.loadService.Data.AppConfigJSON}initRole(){this.loadService.role$.pipe(G(this.destroy$)).subscribe(o=>{this.role=o})}onRemove(o){this.onRemoveItem.emit(o)}onSelect(o){this.onSelectItem.emit(o)}onReverse(o,t){t?(o.Quantity>0&&(o.Quantity=o.Quantity*-1),this.onReturnItem.emit(o)):(o.Quantity<0&&(o.Quantity=o.Quantity*-1),this.onPurchaseItem.emit(o))}static \u0275fac=function(t){return new(t||n)(h(Pt),h(j))};static \u0275cmp=w({type:n,selectors:[["POS-cart-display"]],viewQuery:function(t,e){if(t&1&&(lt(Ki,5),lt(wt,7)),t&2){let i;st(i=ct())&&(e.cartContainer=i.first),st(i=ct())&&(e.contextMenu=i.first)}},inputs:{cartItems:"cartItems"},outputs:{cartItemsChange:"cartItemsChange",onSelectItem:"onSelectItem",onReturnItem:"onReturnItem",onPurchaseItem:"onPurchaseItem",onRemoveItem:"onRemoveItem",onDragItem:"onDragItem"},decls:28,vars:8,consts:[["cartContainer",""],["contextMenu","matMenu"],[1,"cashier"],[1,"row","g-0","cart-table","border-bottom"],["cdkScrollable","",1,"col"],[1,"table"],[2,"width","18px"],["style","width: 36px",4,"ngIf"],[1,"text-start",2,"width","250px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 50px",4,"ngIf"],[1,"text-end",2,"width","70px"],[1,"disc","text-end",2,"width","20px"],[1,"text-end",2,"width","85px"],["cdkDropList","",1,"itemList",3,"cdkDropListDropped"],["class","item","cdkDrag","",3,"cdkDragDisabled","click","contextmenu",4,"ngFor","ngForOf"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["matMenuContent",""],[2,"width","36px"],["cdkDrag","",1,"item",3,"click","contextmenu","cdkDragDisabled"],[1,"cursor"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Click to Remove",1,"fa","fa-xmark","text-danger",3,"click"],[4,"ngIf"],[1,"text-start"],[1,"d-block"],[3,"innerHTML"],[1,"text-end"],[1,"text-end","text-danger","disc"],["mat-menu-item","",3,"click"]],template:function(t,e){if(t&1){let i=x();r(0,"div",2)(1,"div",3)(2,"div",4,0)(4,"table",5)(5,"thead")(6,"tr"),b(7,"th",6),g(8,Gi,1,0,"th",7),r(9,"th",8),s(10,"Item"),a(),r(11,"th"),s(12,"Code"),a(),r(13,"th",9),s(14,"Qty"),a(),g(15,zi,2,0,"th",10),r(16,"th",11),s(17,"Price"),a(),r(18,"th",12),s(19,"%"),a(),r(20,"th",13),s(21,"Total"),a()()(),r(22,"tbody",14),f("cdkDropListDropped",function(O){return p(i),u(e.onDrop(O))}),g(23,Xi,26,19,"tr",15),a()()()(),b(24,"div",16),r(25,"mat-menu",null,1),g(27,Zi,4,0,"ng-template",17),a()()}if(t&2){let i=L(26);l(8),d("ngIf",e.appConfig.ModuleSell.Grid.RowNumberVisible),l(7),d("ngIf",e.appConfig.ModuleSell.Grid.UOMVisible),l(8),d("ngForOf",e.cartItems),l(),_t("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),d("matMenuTriggerFor",i)}},dependencies:[Z,P,me,we,Oe,Ee,wt,de,ce,vt,R],styles:["div.row.cart-table[_ngcontent-%COMP%]{border-left:solid 1px #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%]{overflow:auto;height:250px}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background:#fbfbf7;border-left:none}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.75rem;padding:9px 5px!important}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.75rem;padding:6px 5px;border-bottom:1px solid #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-right:0}.cdk-drag-preview[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.item[_ngcontent-%COMP%]:last-child{border:none}.itemList.cdk-drop-list-dragging[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cashier[_ngcontent-%COMP%]{width:550px;max-width:37rem;min-width:33rem}"]})};function tn(n,o){if(n&1){let t=x();r(0,"div",9)(1,"POS-cart-header",10),f("onCreateItem",function(){p(t);let i=c(2);return u(i.selectItem())})("onAddItem",function(i){p(t);let m=c(2);return u(m.addItem(i))})("onScanCode",function(i){p(t);let m=c(2);return u(m.onScanBarcode(i))}),a(),r(2,"POS-cart-display",11),f("onRemoveItem",function(i){p(t);let m=c(2);return u(m.removeItem(i))})("onSelectItem",function(i){p(t);let m=c(2);return u(m.selectItem(i))})("onDragItem",function(i){p(t);let m=c(2);return u(m.saveItemAfterDrag(i))}),a(),r(3,"POS-cart-footer",12),f("onOpenDiscountModal",function(){p(t);let i=c(2);return u(i.openDiscountModal())})("onChangeTaxType",function(i){p(t);let m=c(2);return u(m.changeTaxType(i))}),a(),r(4,"POS-cart-action",13),f("onOpenVoidModal",function(){p(t);let i=c(2);return u(i.openVoidModal())})("onOpenNoteModal",function(){p(t);let i=c(2);return u(i.openEstimateNoteModal())})("onSubmit",function(){p(t);let i=c(2);return u(i.submit())}),a()()}if(n&2){let t=c(2);l(),d("cartItems",t.cartItems),l(),d("cartItems",t.cartItems),l(),d("cartFooterInfo",t.cartFooterInfo)("cartItems",t.cartItems)("estimateData",t.estimateData)("taxes",t.taxes),l(),d("total",t.total)}}function en(n,o){if(n&1){let t=x();r(0,"div",3)(1,"POS-toolbar",4),f("onOpenOutletModal",function(){p(t);let i=c();return u(i.openOutletModal())})("onSelectCustomer",function(i){p(t);let m=c();return u(m.selectCustomer(i))})("onOpenCustomerModal",function(){p(t);let i=c();return u(i.openCustomerModal())}),a(),r(2,"div",5)(3,"div",6),b(4,"pos-quick-key",7),a(),g(5,tn,5,7,"div",8),a()()}if(n&2){let t=c();l(),d("salesPerson",t.salesPerson)("estimateData",t.estimateData)("outletName",t.outletName)("customerName",t.customerName)("role",t.roleService.global),l(3),d("quickKeyId",t.quickKeyID)("outletID",t.outletID),l(),d("ngIf",t.estimateStorage)}}function nn(n,o){if(n&1){let t=x();r(0,"div",14)(1,"POS-complete",15),f("onUndo",function(){p(t);let i=c();return u(i.undo())})("onNewForm",function(){p(t);let i=c();return u(i.newForm())}),a()()}if(n&2){let t=c();l(),d("cartFooterInfo",t.cartFooterInfo)("estimateData",t.estimateData)("total",t.total)("completeInfo",t.completeInfo)("cartItems",t.cartItems)}}var Ut=class n extends ue{constructor(t,e,i,m,O,V,ft,rn,an,mn,ln){super(t);this.firstLoadService=e;this.matDialog=i;this.backEndService=m;this.estimateDataService=O;this.quickKeyService=V;this.cartItemService=ft;this.toastr=rn;this.router=an;this.activatedRoute=mn;this.roleService=ln;this.destroy$=new K,this.cartFooterInfo=new Ft,this.firstLoadService.initRoles(),this.firstLoadService.role$.pipe(G(this.destroy$)).subscribe(N=>{this.role=N}),this.estimateDataService.Data$.pipe(G(this.destroy$)).subscribe(N=>{this.estimateData=N,this.fillCartItems(),this.changeTaxType()}),this.quickKeyService.onSelectQuickeyItem$.pipe(G(this.destroy$),H(N=>_.IsNotEmpty(N.id)),at(N=>this.cartItemService.getItemById(N.id,N.entityID))).subscribe(N=>this.cartItemService.addNewItem(N))}quickKeyID;originalOutletID;originalNumber;estimateStorage;estimateData;outletID=_.GuidEmpty;outletName="Choose an Outlet";entities;destroy$;isComplete=!1;salesPerson;cartItems;cartFooterInfo;customerName;taxes;completeInfo;total=0;tax;role;handleF4(){this.matDialog.openDialogs.length==0&&this.selectItem()}handleF8(){this.isComplete&&this.newForm()}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.estimateDataService.pushNewValue(new ot),this.quickKeyService.Data=new Ae,this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){let t=this.activatedRoute.snapshot.queryParams.ID,e=this.estimateData.Order.EntityID;this.menuData$.pipe(at(()=>this.firstLoadService.getStorage(k.LoadFormEstimate,t,e))).subscribe(i=>{this.fillData(i);let m=this.estimateStorage.Entities.length==1;if(_.IsEmpty(t)&&!m)this.openOutletModal();else{if(m){let O={outlet:null};O.outlet=this.estimateStorage.Entities[0],this.outletName=O.outlet.Name,this.outletID=O.outlet.ID,this.originalOutletID=O.outlet.ID,this.estimateData.Order.EntityID=this.outletID,this.quickKeyID=O.outlet.QuickKeyTemplateID,_.IsNotEmpty(O.outlet.DefaultTaxTypeID)&&(this.estimateData.Order.TaxTypeID=O.outlet.DefaultTaxTypeID,this.tax=this.taxes.filter(V=>V.ID==this.estimateData.Order.TaxTypeID)[0],this.changeTaxType(this.tax)),qt([this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber),this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID)]).subscribe(([V,ft])=>{this.estimateData.Order.Number=V.Number,this.initQuickKey(ft)})}this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID).subscribe(O=>this.initQuickKey(O))}})}onScanBarcode(t){this.cartItemService.addCartItemByCode(t,this.outletID)}fillData(t){this.estimateStorage=t,this.entities=this.estimateStorage.Entities,this.salesPerson=this.estimateStorage.SalesPOTypes,this.taxes=this.estimateStorage.Taxes,this.firstLoadService.pageState=4,_.IsEmpty(t.Data)?(this.estimateData.Order.TaxTypeID=this.estimateStorage.Taxes[0].ID,_.IsEmpty(this.tax)&&(this.tax=this.estimateStorage.Taxes[0],this.changeTaxType(this.tax)),this.estimateData.Order.Date=this.estimateStorage.ServerTime.toString(),this.estimateData.Order.TypeID=this.estimateStorage.CustomerPOTypes[0].ID,this.estimateData.Order.CurrencyID=this.estimateStorage.Currencies[0].ID):(this.estimateDataService.pushNewValue(t.Data),this.estimateData=t.Data,this.customerName=t.Data.ContactName,this.outletID=t.Data.Order.EntityID,this.outletName=t.Entities.find(e=>e.ID==this.outletID)?.Name,this.tax=this.taxes.filter(e=>e.ID==this.estimateData.Order.TaxTypeID)[0],this.menuData.H=`Editing Estimate #${t.Data.Order.Number}`,this.fillCartItems(),this.changeTaxType(this.tax)),this.cartFooterInfo.currencySymbol=this.findCurrencySymbol()}openOutletModal(){this.matDialog.open(Qe,{data:{Entities:this.entities}}).afterClosed().pipe(H(t=>_.IsNotEmpty(t)),Kt(t=>{this.outletName=t.outlet.Name,this.outletID=t.outlet.ID,this.estimateData.Order.EntityID=this.outletID,this.quickKeyID=t.outlet.QuickKeyTemplateID,_.IsNotEmpty(t.outlet.DefaultTaxTypeID)&&(this.estimateData.Order.TaxTypeID=t.outlet.DefaultTaxTypeID,this.tax=this.taxes.filter(e=>e.ID==this.estimateData.Order.TaxTypeID)[0],this.changeTaxType(this.tax))}),at(()=>qt([this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber),this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID)]))).subscribe(([t,e])=>{this.originalOutletID!=this.outletID?this.estimateData.Order.Number=t.Number:this.estimateData.Order.Number=this.originalNumber,this.initQuickKey(e)})}initQuickKey(t){this.quickKeyService.Data=t,this.quickKeyService.EntityID=this.outletID}selectCustomer(t){this.estimateData.Order.CustomerID=t}fillCartItems(){this.cartItems=[],this.estimateData.Items.forEach(t=>this.cartItems.push(t))}saveItemAfterDrag(t){this.cartItemService.updateCartItem(t)}removeItem(t){this.cartItemService.removeItem(t)}selectItem(t){this.matDialog.open(Tt,{data:{itemInfo:t,entityID:this.outletID,moduleSell:this.estimateStorage.AppConfigJSON.ModuleSell,role:this.role}})}addItem(t){this.cartItemService.getItemById(t,this.outletID).subscribe(e=>{this.cartItemService.addNewItem(e)})}calculateTotal(){this.cartFooterInfo.total=0,this.cartItems.forEach(t=>this.cartFooterInfo.total+=t.Price*t.Quantity*((100-t.Discount)/100)),this.cartFooterInfo.discount=this.estimateData.Order.Discount/100*this.cartFooterInfo.total,this.total=this.cartFooterInfo.total-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount}changeTaxType(t){t!==void 0?(this.tax=t,this.cartFooterInfo.taxRate=t.Rate,this.cartFooterInfo.label=t.Label):_.IsEmpty(this.cartFooterInfo.taxRate)&&(this.cartFooterInfo.taxRate=0),this.calculateTotal(),this.cartFooterInfo.tax=this.calculateTax(),this.calculateTotalWithTax(this.tax)}calculateTotalWithTax(t){t&&t.CalculationTypeID==0&&(this.total=this.total+this.cartFooterInfo.tax)}calculateTax(){if(_.IsNotEmpty(this.tax)){let t=0;return this.cartItems.filter(e=>e.Variant.Taxable).forEach(e=>t+=e.Price*e.Quantity),this.tax.CalculationTypeID==1?this.cartFooterInfo.taxRate/(100+this.cartFooterInfo.taxRate)*(t-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount):this.cartFooterInfo.taxRate/100*(t-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount)}}openDiscountModal(){this.matDialog.open(Vt,{data:{transactionData:this.estimateData,cartFooterInfo:this.cartFooterInfo}}).afterClosed().subscribe(()=>{this.changeTaxType()})}openCustomerModal(){this.matDialog.open(Te,{data:{options:this.estimateStorage.EstimateOptions,config:this.estimateStorage.AppConfigJSON.ModuleContact,type:"customer",title:"New Customer Form"}}).afterClosed().subscribe(t=>{this.estimateData.Order.CustomerID=t.CustomerID,this.customerName=t.ContactName})}openEstimateNoteModal(){this.estimateData.Order.CurrencyRate=1,this.matDialog.open(Rt,{data:{estimateData:this.estimateData,currencies:this.estimateStorage.Currencies,type:this.estimateStorage.CustomerPOTypes}}).afterClosed().subscribe(()=>this.cartFooterInfo.currencySymbol=this.findCurrencySymbol())}findCurrencySymbol(){return this.estimateStorage.Currencies.find(t=>t.ID===this.estimateData.Order.CurrencyID).Symbol}openVoidModal(){this.matDialog.open(Ge).afterClosed().pipe(H(t=>t),Kt(()=>{this.estimateData.Items=[],this.cartItems=[]}),at(()=>this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber))).subscribe(t=>this.estimateData.Order.Number=t.Number)}submit(){if(_.IsEmpty(this.estimateData.Order.EntityID)){this.toastr.error("Please select outlet before proceeding..",q.Error),this.openOutletModal();return}if(_.IsEmpty(this.estimateData.Order.CustomerID)){this.toastr.warning("Please select a customer!",q.Warning);return}if(this.cartItems.length==0){this.toastr.error("You must have at least one item.",q.Error);return}if(_.IsEmpty(this.estimateData.Order.Number)){this.toastr.error("Number cannot be empty.",q.Error);return}this.estimateData.Items.forEach(t=>t.ID=""),this.estimateData.Items=this.estimateData.Items.map(t=>(delete t.UnitPriceOriginal,t)),this.matDialog.open(qe,{data:{transactionData:this.estimateData,api:k.SubmitEstimate}}).afterClosed().pipe(H(t=>_.IsNotEmpty(t))).subscribe(t=>{this.completeInfo=t,this.isComplete=!0,this.estimateData.Order.ID=this.completeInfo.OrderID})}undo(){this.isComplete=!1,this.originalOutletID=this.outletID,this.originalNumber=this.estimateData.Order.Number,this.initLoadForm()}newForm(){this.router.navigate(["/menu/Estimate"]).then(()=>window.location.reload())}static \u0275fac=function(e){return new(e||n)(h(Ce),h(Pt),h(fe),h(Et),h(rt),h(Le),h(j),h($),h(oe),h(ne),h(ae))};static \u0275cmp=w({type:n,selectors:[["POS-estimate"]],hostBindings:function(e,i){e&1&&f("keydown.F4",function(){return i.handleF4()},!1,Gt)("keydown.F8",function(){return i.handleF8()},!1,Gt)},features:[ie],decls:4,vars:6,consts:[[3,"hideSearchDropdown","hideSearchBox","pageData","hideMoreMenu"],["class","container-fluid",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],[1,"container-fluid"],[3,"onOpenOutletModal","onSelectCustomer","onOpenCustomerModal","salesPerson","estimateData","outletName","customerName","role"],[1,"row","row","body","g-0","mt-4","justify-content-start"],[1,"col-auto","quickKey"],[3,"quickKeyId","outletID"],["class","ms-5 col-auto cart",4,"ngIf"],[1,"ms-5","col-auto","cart"],[3,"onCreateItem","onAddItem","onScanCode","cartItems"],[3,"onRemoveItem","onSelectItem","onDragItem","cartItems"],[3,"onOpenDiscountModal","onChangeTaxType","cartFooterInfo","cartItems","estimateData","taxes"],[3,"onOpenVoidModal","onOpenNoteModal","onSubmit","total"],[1,"container-fluid","mt-5"],[3,"onUndo","onNewForm","cartFooterInfo","estimateData","total","completeInfo","cartItems"]],template:function(e,i){e&1&&(r(0,"mainpanel-cmp",0)(1,"content"),g(2,en,6,8,"div",1)(3,nn,2,5,"div",2),a()()),e&2&&(d("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",i.menuData)("hideMoreMenu",!0),l(2),d("ngIf",!i.isComplete),l(),d("ngIf",i.isComplete))},dependencies:[P,Ie,Ye,je,Bt,At,Lt,Wt,jt]})};var on=[{path:"",component:Ut}],Qt=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[zt.forChild(on),zt]})};var oi=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[xt,Qt,ye,We,be,De,yt,xe,ge,Ue,Fe,Mt,_e,Pe,pe,Se,Nt,He,Ke,ze,Be,le]})};export{oi as EstimateModule};
|
|
1
|
+
import{a as Je,b as Pt,c as Ye}from"./chunk-ZMVGPXXL.js";import{a as qe,b as Ke}from"./chunk-K5M2UJEX.js";import{a as Ae,b as Le,c as We,d as je,e as Ue,f as Ge,g as ze}from"./chunk-UCEYSWFB.js";import{a as Qe,b as He}from"./chunk-X74ILNCH.js";import{a as Et}from"./chunk-MRHWOTAT.js";import"./chunk-K7ACLCRR.js";import"./chunk-B5FODXLM.js";import{a as Oe,b as Ee,c as we,d as wt,e as Pe}from"./chunk-ZD7EZIME.js";import"./chunk-SCLRE6QV.js";import"./chunk-BYXBJQAS.js";import{a as Me,b as Se}from"./chunk-AMHDH5HH.js";import{c as Te}from"./chunk-3FT34Y4V.js";import{b as ke,c as Ve,d as Ne,e as Fe}from"./chunk-OEZ2ESQO.js";import{a as Re,b as Be}from"./chunk-QENIAO63.js";import"./chunk-KPCCC7Q2.js";import{r as ve,s as De}from"./chunk-TDKWBH7Q.js";import"./chunk-NOVFJBRH.js";import"./chunk-WOI6VORS.js";import"./chunk-CG2MPZLY.js";import{a as k}from"./chunk-DBT3YELG.js";import{a as _e,b as St}from"./chunk-MWT4HWQF.js";import{a as se,c as ce,e as de,f as pe}from"./chunk-LYITOHIC.js";import{b as Ie,c as ye}from"./chunk-JRRO2EBD.js";import"./chunk-DO5BNHOT.js";import{a as ue}from"./chunk-3ZGW3GTD.js";import{m as Ot,n as xe}from"./chunk-S3LUOCII.js";import"./chunk-TY5LEO35.js";import{a as Ce}from"./chunk-7HOFTWLW.js";import"./chunk-KOA5T4NW.js";import{a as it,b as nt,c as Mt}from"./chunk-MK7N2B7O.js";import{a as vt,b as le}from"./chunk-KSHZDNE3.js";import{T as be,_ as ut,c as tt,d as et,e as fe,t as he}from"./chunk-5IPTS6ES.js";import{K as me}from"./chunk-2D2KKGFZ.js";import{e as Dt,f as ge}from"./chunk-C64I6KJE.js";import"./chunk-474RFSQT.js";import{a as q}from"./chunk-2FWFPV5I.js";import{C as yt,c as W,h as B,n as A}from"./chunk-YJMA7EY3.js";import"./chunk-RXPB4PXU.js";import"./chunk-VW2OFMNF.js";import{b as ae}from"./chunk-EW4KR6O6.js";import{a as _}from"./chunk-C34GKBAP.js";import{b as re}from"./chunk-JKMQSOWD.js";import{$ as G,$b as v,Bb as x,C as H,Ca as S,Eb as f,Gb as c,H as at,Hd as ne,Jd as oe,Kd as It,Lc as bt,Md as zt,Na as te,Nc as Z,Oa as ee,Ob as lt,Oc as P,Od as $,Pb as st,Qa as Gt,Qb as ct,Sa as l,Ta as h,Ub as L,Vb as s,Wb as E,Xb as y,Xc as R,Yb as dt,_c as xt,ac as D,ba as Kt,bc as M,c as K,cb as ie,d as $t,eb as g,ec as Ct,fa as gt,fc as F,ga as z,ia as mt,ib as d,jb as _t,na as w,nc as C,oa as J,oc as I,pc as ht,r as Ht,s as qt,tc as pt,ua as p,va as u,vb as r,wb as a,xb as b,yb as Y,zb as X}from"./chunk-U4MBKXDU.js";import"./chunk-LHUGHE24.js";var ot=class{ContactName;Items;Order;OrderItems;constructor(){this.Items=[],this.Order=new Jt}},Jt=class{Bin;Created;CreatorID;CurrencyID;CurrencyRate;CustomerID;Date;Discount;Discount2;DiscountAmount;EntityID;ID;Modified;ModifierID;Note;Number;SalesID;SalesOrderID;TaxTypeID;TypeID;constructor(){this.CustomerID=_.GuidEmpty,this.EntityID=_.GuidEmpty,this.ID=_.GuidEmpty,this.TaxTypeID=_.GuidEmpty,this.Discount=0,this.DiscountAmount=0}};var rt=class n{_Data=new $t(new ot);Data$=this._Data.asObservable();get Data(){return this._Data.value}pushNewValue(o){this._Data.next(o)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=gt({token:n,factory:n.\u0275fac,providedIn:"root"})};var j=class n{constructor(o,t,e,i){this.estimateDataService=o;this.backEndService=t;this.factoryService=e;this.toastr=i}_notifyNewItem=new K;notifyNewItem$=this._notifyNewItem.asObservable();getItemById(o,t){let e;return this.backEndService.getVariantById(o,t).pipe(Ht(i=>{let m=this.patchVariantToItem(i);return e=m.Variant,m.UnitCost=e.UnitCost,m}))}updateCartItem(o){let t=this.estimateDataService.Data;t.Items=o,this.estimateDataService.pushNewValue(t)}addCartItemByCode(o,t){this.backEndService.getVarianByCode(o,t).subscribe(e=>{this.createNewCartItem(e)})}getItemByCode(o,t){let e;return this.backEndService.getVarianByCode(o,t).pipe(Ht(i=>{let m=this.patchVariantToItem(i);return e=m.Variant,m.UnitCost=e.UnitCost,m}))}createNewCartItem(o){let t=new ut;t.patchByVariant(o),t.UnitPrice=o.UnitPrice,this.addNewItem(t)}patchVariantToItem(o){let t=new ut;return o=this.factoryService.generateVariantObj(o),t.patchByVariant(o),t}addNewItem(o,t){if(!this.validateCartItem(o.Variant))return;let e=this.checkBehaviourRowItem(o,t);this.updateCartItem(e)}removeItem(o){let t=this.estimateDataService.Data;t.Items.splice(o.index,1),this.updateCartItem(t.Items)}updateItem(o){let t=this.estimateDataService.Data.Items;t[o.index]=o.item,this.updateCartItem(t)}checkBehaviourRowItem(o,t=!1){let e=[];if(t)e=this.estimateDataService.Data.Items,this._notifyNewItem.next("NEW"),e.push(o);else{e=this.estimateDataService.Data.Items!=null?this.estimateDataService.Data.Items:Array();let i=e.findIndex(O=>O.VariantID===o.VariantID),m=o.Quantity;i===-1?(_.IsNotEmpty(m)?o.Quantity=m:o.Quantity=1,this._notifyNewItem.next("NEW"),e.push(o)):_.IsNotEmpty(m)?e[i].Quantity+=m:e[i].Quantity++}return e}validateCartItem(o){return o.CategoryTypeID==-1?(this.toastr.info(o.Name+" cannot be sold, check Category "+o.CategoryName+" settings","info"),!1):!0}static \u0275fac=function(t){return new(t||n)(mt(rt),mt(Et),mt(Je),mt($))};static \u0275prov=gt({token:n,factory:n.\u0275fac,providedIn:"root"})};var li=["qty"],ei=n=>({selected:n}),si=()=>["/menu/Products/Catalog/Variants/Info"],ci=n=>({ID:n});function di(n,o){if(n&1){let t=x();r(0,"a",8),f("click",function(){p(t);let i=c();return u(i.currentTab="Product")}),s(1," Product "),a()}if(n&2){let t=c();d("ngClass",F(1,ei,t.currentTab=="Product"))}}function pi(n,o){if(n&1){let t=x();r(0,"div",13)(1,"div",14)(2,"autocompleteV2",15),f("onSelect",function(i){p(t);let m=c();return u(m.addItem(i))})("keyup.enter",function(i){return p(t),u(i.stopPropagation())})("onInputEnter",function(i){p(t);let m=c();return u(m.scanCode(i))}),a()()()}n&2&&(l(2),d("renderThumbnail",!0))}function ui(n,o){if(n&1){let t=x();r(0,"input",24),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.item.Price,i)||(m.item.Price=i),u(i)}),a()}if(n&2){let t=c(2);v("ngModel",t.item.Price)}}function fi(n,o){if(n&1){let t=x();r(0,"input",19,2),M("ngModelChange",function(i){p(t);let m=c(3);return D(m.item.Price,i)||(m.item.Price=i),u(i)}),a()}if(n&2){let t=c(3);v("ngModel",t.item.Price)}}function gi(n,o){if(n&1&&g(0,fi,2,1,"input",25),n&2){let t=c(2);d("ngIf",t.role.UnitPriceEditor)}}function _i(n,o){if(n&1){let t=x();r(0,"div",26)(1,"div",14)(2,"h5",27),s(3,"Note"),a(),r(4,"POS-tinymce-editor",28),M("valueChange",function(i){p(t);let m=c(2);return D(m.item.Note,i)||(m.item.Note=i),u(i)}),a()()()}if(n&2){let t=c(2);l(4),v("value",t.item.Note)}}function Ci(n,o){if(n&1){let t=x();r(0,"mat-chip-row",34),f("removed",function(){let i=p(t).$implicit,m=c(3);return u(m.removeSerial(i))}),s(1),a()}if(n&2){let t=o.$implicit;l(),y(" ",t," ")}}function hi(n,o){if(n&1){let t=x();r(0,"div",29)(1,"mat-form-field",30),f("keyup.enter",function(i){return p(t),u(i.stopPropagation())}),r(2,"mat-label"),s(3,"Serial"),a(),r(4,"mat-chip-grid",31,3),g(6,Ci,2,1,"mat-chip-row",32),r(7,"input",33),f("matChipInputTokenEnd",function(i){p(t);let m=c(2);return u(m.addSerial(i))}),a()()()()}if(n&2){let t=L(5),e=c(2);l(6),d("ngForOf",e.item.Serial),l(),d("matChipInputFor",t)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",e.addOnBlur)}}function bi(n,o){if(n&1){let t=x();Y(0),r(1,"div",16)(2,"div",17)(3,"div",18)(4,"h5"),s(5,"Qty"),a(),r(6,"input",19,0),M("ngModelChange",function(i){p(t);let m=c();return D(m.item.Quantity,i)||(m.item.Quantity=i),u(i)}),a()(),r(8,"div",20)(9,"h5"),s(10,"Discount (%)"),a(),r(11,"input",19),M("ngModelChange",function(i){p(t);let m=c();return D(m.item.Discount,i)||(m.item.Discount=i),u(i)}),a()(),r(12,"div",20)(13,"h5"),s(14,"Price"),a(),g(15,ui,1,1,"input",21)(16,gi,1,1,"ng-template",null,1,pt),a()(),g(18,_i,5,1,"div",22)(19,hi,8,4,"div",23),a(),X()}if(n&2){let t=L(17),e=c();l(),_t("height",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)==4?"150px":"350px"),l(5),v("ngModel",e.item.Quantity),l(5),v("ngModel",e.item.Discount),l(4),d("ngIf",!e.role.UnitPriceEditor)("ngIfElse",t),l(3),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)!=4),l(),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.TypeID)==4)}}function xi(n,o){n&1&&(Y(0),b(1,"i",52),r(2,"h6"),s(3,"No Image"),a(),X())}function Ii(n,o){if(n&1&&b(0,"img",53),n&2){let t=c(2);d("src",t.item.Variant.ThumbnailUrl,ee)}}function yi(n,o){if(n&1){let t=x();r(0,"tr")(1,"th",49),s(2,"Cost"),a(),r(3,"td",54)(4,"input",55),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.item.Cost,i)||(m.item.Cost=i),u(i)}),a()()()}if(n&2){let t=c(2);l(4),v("ngModel",t.item.Cost),d("readonly",!t.moduleSell.Cost.Enabled)}}function vi(n,o){if(n&1&&(r(0,"tr")(1,"th",49),s(2,"Content"),a(),r(3,"td",50)(4,"div",56),s(5),C(6,"number"),a()()()),n&2){let t=c(2);l(5),dt(" ",t.item==null?null:t.item.VariantUnitQuantity," (@",I(6,2,t.item.Price/(t.item==null?null:t.item.VariantUnitQuantity)),")")}}function Di(n,o){if(n&1&&(r(0,"div",47)(1,"table",57)(2,"thead")(3,"tr")(4,"th",58),s(5,"Storage Location"),a()()(),r(6,"tbody")(7,"tr")(8,"td"),s(9),a()()()()()),n&2){let t=c(2);l(9),y(" ",t.item.Variant.Storage," ")}}function Mi(n,o){if(n&1&&(Y(0),r(1,"div",13)(2,"div",35)(3,"a",36),g(4,xi,4,0,"ng-container",37)(5,Ii,1,1,"ng-template",null,4,pt),a()(),r(7,"div",38)(8,"div",39)(9,"div",14)(10,"div",40),b(11,"i",41),r(12,"div",42),s(13,"Inventory"),a()(),r(14,"table",43)(15,"thead")(16,"tr")(17,"th",44),s(18,"On Hand"),a(),r(19,"th",44),s(20,"Allocated"),a(),r(21,"th",45),s(22,"Available"),a()()(),r(23,"tbody")(24,"tr")(25,"td",46),s(26),C(27,"number"),a(),r(28,"td",46),s(29),C(30,"number"),a(),r(31,"td",46),s(32),C(33,"number"),a()()()()()(),r(34,"div",13)(35,"div",47)(36,"table",48)(37,"thead"),g(38,yi,5,2,"tr",12),r(39,"tr")(40,"th",49),s(41,"Price"),a(),r(42,"td",50),s(43),C(44,"number"),a()(),g(45,vi,7,4,"tr",12),a()()(),g(46,Di,10,1,"div",51),a()()(),X()),n&2){let t=L(6),e=c();l(3),d("routerLink",Ct(19,si))("queryParams",F(20,ci,e.item==null||e.item.Variant==null?null:e.item.Variant.ID)),l(),d("ngIf",(e.item==null||e.item.Variant==null?null:e.item.Variant.ThumbnailUrl)==null)("ngIfElse",t),l(22),y(" ",I(27,11,e.onHand)," "),l(3),y(" ",I(30,13,e.allocated)," "),l(3),y(" ",I(33,15,e.onHand-e.allocated)," "),l(6),d("ngIf",e.moduleSell.Cost.Visible&&e.role.product.Cost),l(5),y(" ",I(44,17,e.item.Variant.UnitPrice)," "),l(2),d("ngIf",(e.item==null?null:e.item.VariantUnitQuantity)>1),l(),d("ngIf",(e.moduleSell.Grid==null?null:e.moduleSell.Grid.StorageVisible)&&e.item.Variant.Storage)}}var Tt=class n{constructor(o,t,e,i,m){this.data=o;this.dialogRef=t;this.cartItemService=e;this.httpService=i;this.toastr=m;this.config=new it,this.entityID=o.entityID,this.moduleSell=o.moduleSell,this.role=o.role,_.IsNotEmpty(o.itemInfo)?(this.isEdit=!0,this.item=Object.assign({},this.data.itemInfo.item),this.requestUnitInStock(),this.config.title=this.item.Variant.Name,this.item.Variant.Ordered!=null?(this.extraTitle=` Inventory: ${this.item.Variant.UnitsInStock}, Allocated: ${this.item.Variant.Ordered}`,this.toggleInventory=!0):this.toggleInventory=!1):(this.item=new ut,this.config.title="Add Item"),this.config.customWidth="650px"}moduleSell;role;onHand;allocated;currentTab="Cart";qty;addOnBlur=!0;config;item;isEdit=!1;toggleInventory=!0;extraTitle;entityID;separatorKeysCodes=[13,188];onOk(){_.IsNotEmpty(this.item.VariantID)&&(this.isEdit?this.cartItemService.updateItem({item:this.item,index:this.data.itemInfo.index}):this.cartItemService.addNewItem(this.item,!0));let o=this.item.Note;if(o&&o.length>500){this.toastr.warning("Maximum 500 characters allowed","Warning");return}this.dialogRef.close()}addItem(o){this.cartItemService.getItemById(o,this.data.entityID).subscribe(t=>{this.item=t,this.config.title=this.item.Variant.Name,this.toggleInventory=!1}),setTimeout(()=>{this.qty.nativeElement.focus()},100)}addSerial(o){let t=(o.value||"").trim();o.chipInput.clear()}removeSerial(o){let t=this.item.Serial.indexOf(o);t>=0&&this.item.Serial.splice(t,1)}requestUnitInStock(){if(_.IsEmpty(this.entityID)){this.toastr.error("Please select outlet before proceeding..",q.Error);return}this.httpService.get(k.GetVariantStockByID,[{key:"ID",value:this.item?.Variant?.ID},{key:"EntityID",value:this.entityID}]).subscribe(o=>{this.onHand=o.OnHand,this.allocated=o.Allocated})}scanCode(o){this.cartItemService.getItemByCode(o,this.entityID).subscribe(t=>{this.item=t,this.config.title=this.item.Variant.Name,this.toggleInventory=!1}),setTimeout(()=>{this.qty.nativeElement.focus()},100)}static \u0275fac=function(t){return new(t||n)(h(et),h(tt),h(j),h(re),h($))};static \u0275cmp=w({type:n,selectors:[["POS-modal-item"]],viewQuery:function(t,e){if(t&1&<(li,5),t&2){let i;st(i=ct())&&(e.qty=i.first)}},decls:12,vars:8,consts:[["qty",""],["PRICE",""],["price",""],["chipList",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"container","w-100","h-100"],[1,"row","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link",3,"ngClass","click",4,"ngIf"],[1,"container-fluid","mt-5"],["class","row",4,"ngIf"],[4,"ngIf"],[1,"row"],[1,"col-12"],["placeholder","Search product by name / code","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"input-left","w-100",3,"onSelect","keyup.enter","onInputEnter","renderThumbnail"],[2,"height","350px"],[1,"row","mt-5"],[1,"col-auto"],["type","text","autoNum","",1,"mt-5","form-control",2,"width","100px",3,"ngModelChange","ngModel"],[1,"col-auto","ps-0"],["type","text","style","width: 100px;","class","mt-5 form-control","disabled","",3,"ngModel","ngModelChange",4,"ngIf","ngIfElse"],["style","height: 200px;","class","row mt-5",4,"ngIf"],["class","mt-5",4,"ngIf"],["type","text","disabled","",1,"mt-5","form-control",2,"width","100px",3,"ngModelChange","ngModel"],["type","text","style","width: 100px;","class","mt-5 form-control","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-5",2,"height","200px"],[1,"mb-5"],["height","220px",3,"valueChange","value"],[1,"mt-5"],["appearance","fill",1,"example-chip-list","w-100",3,"keyup.enter"],["aria-label","Serial"],[3,"removed",4,"ngFor","ngForOf"],["placeholder","Serial...",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur"],[3,"removed"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-8","inventory"],[1,"row","mb-8"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","'Roboto Slab'"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","py-6","border-end",2,"text-transform","none"],[1,"table-light","py-6",2,"text-transform","none"],[1,"py-6"],[1,"col-6"],[1,"table","table-bordered",2,"width","171px"],[1,"table-light",2,"text-transform","none"],[1,"pe-6","text-end"],["class","col-6",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"p-0"],["type","text","autoNum","",1,"form-control","border-0","bg-white","text-end",3,"ngModelChange","ngModel","readonly"],["ngClass","ms-3"],[1,"table","table-bordered","text-center"],[1,"table-light"]],template:function(t,e){t&1&&(r(0,"modal-material",5),f("onOk",function(){return e.onOk()})("onCancel",function(){return e.dialogRef.close()})("onClose",function(){return e.dialogRef.close()}),r(1,"content")(2,"div",6)(3,"div",7)(4,"div")(5,"a",8),f("click",function(){return e.currentTab="Cart"}),s(6," Cart "),a(),g(7,di,2,3,"a",9),a()()(),r(8,"div",10),g(9,pi,3,1,"div",11)(10,bi,20,8,"ng-container",12)(11,Mi,47,22,"ng-container",12),a()()()),t&2&&(d("config",e.config),l(5),d("ngClass",F(6,ei,e.currentTab=="Cart")),l(2),d("ngIf",e.role.InventoryView),l(2),d("ngIf",!e.isEdit),l(),d("ngIf",e.currentTab=="Cart"),l(),d("ngIf",e.currentTab=="Product"&&e.isEdit))},dependencies:[bt,Z,P,It,W,B,A,Ot,Ve,Ne,ke,nt,St,Re,R],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}autocompleteV2[_ngcontent-%COMP%] mat-form-field input{padding:10px 15px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.inventory[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}"]})};var Zt=(t=>(t[t.DISCOUNT=0]="DISCOUNT",t[t.CALCULATOR=1]="CALCULATOR",t))(Zt||{});var ii=n=>({selected:n});function Si(n,o){if(n&1){let t=x();Y(0),r(1,"div",8)(2,"div",9)(3,"label",10),s(4,"Discount %"),a(),r(5,"div",11)(6,"input",12),M("ngModelChange",function(i){p(t);let m=c();return D(m.transactionData.Order.Discount,i)||(m.transactionData.Order.Discount=i),u(i)}),a(),r(7,"span",13),s(8,"%"),a()()(),r(9,"div",14)(10,"label",15),s(11),a(),r(12,"input",16),M("ngModelChange",function(i){p(t);let m=c();return D(m.transactionData.Order.DiscountAmount,i)||(m.transactionData.Order.DiscountAmount=i),u(i)}),a()()(),X()}if(n&2){let t=c();l(6),v("ngModel",t.transactionData.Order.Discount),l(5),y("Discount ",t.data.cartFooterInfo.currencySymbol,""),l(),v("ngModel",t.transactionData.Order.DiscountAmount)}}function Oi(n,o){if(n&1){let t=x();r(0,"div",8)(1,"div",17)(2,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[0],i)||(m.disc[0]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(3,"span"),s(4,"%+"),a(),r(5,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[1],i)||(m.disc[1]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(6,"span"),s(7,"%+"),a(),r(8,"input",18),M("ngModelChange",function(i){p(t);let m=c();return D(m.disc[2],i)||(m.disc[2]=i),u(i)}),f("keyup",function(){p(t);let i=c();return u(i.discountCalculator())}),a(),r(9,"span"),s(10,"%"),a()()()}if(n&2){let t=c();l(2),v("ngModel",t.disc[0]),l(3),v("ngModel",t.disc[1]),l(3),v("ngModel",t.disc[2])}}var Vt=class n{constructor(o,t){this.data=o;this.dialogRef=t;this.transactionData=this.data.transactionData,this.config=new it,this.config.title="Discount from Supplier",this.config.customWidth="350px",this.disc=this.data.cartFooterInfo.disc}transactionData;config;tabState=Zt;currentTabState=0;disc;discountCalculator(){let o=100;this.disc.forEach(t=>o=o*(100-t)/100),this.transactionData.Order.Discount=100-o}static \u0275fac=function(t){return new(t||n)(h(et),h(tt))};static \u0275cmp=w({type:n,selectors:[["POS-modal-discount"]],decls:12,vars:9,consts:[["CALCULATOR",""],[3,"onCancel","onClose","onOk","config"],[1,"container-fluid"],[1,"row","border-bottom"],[1,"col-12"],["data-cy","discount",1,"btn","btn-link-tab",3,"click","ngClass"],["data-cy","calculator",1,"btn","btn-link-tab",3,"click","ngClass"],[4,"ngIf","ngIfElse"],[1,"row","mt-8"],[1,"col-md-6","ps-12"],[1,"fw-bold","d-block"],[1,"input-group","mb-3"],["type","text","autoNum","","percentage","",1,"form-control",3,"ngModelChange","ngModel"],[1,"input-group-text"],[1,"col-md-6","pe-12"],[1,"fw-bold"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],[1,"col-12","d-flex","align-items-center","justify-content-center"],["type","text","autoNum","","percentage","",1,"form-control",2,"width","70px","display","inline",3,"ngModelChange","keyup","ngModel"]],template:function(t,e){if(t&1){let i=x();r(0,"modal-material",1),f("onCancel",function(){return p(i),u(e.dialogRef.close())})("onClose",function(){return p(i),u(e.dialogRef.close())})("onOk",function(){return p(i),u(e.dialogRef.close())}),r(1,"content")(2,"div",2)(3,"div",3)(4,"div",4)(5,"a",5),f("click",function(){return p(i),u(e.currentTabState=e.tabState.DISCOUNT)}),s(6," Discount "),a(),r(7,"a",6),f("click",function(){return p(i),u(e.currentTabState=e.tabState.CALCULATOR)}),s(8," Calculator "),a()()(),g(9,Si,13,3,"ng-container",7)(10,Oi,11,3,"ng-template",null,0,pt),a()()()}if(t&2){let i=L(11);d("config",e.config),l(5),d("ngClass",F(5,ii,e.tabState.DISCOUNT==e.currentTabState)),l(2),d("ngClass",F(7,ii,e.tabState.CALCULATOR==e.currentTabState)),l(2),d("ngIf",e.currentTabState==e.tabState.DISCOUNT)("ngIfElse",i)}},dependencies:[bt,P,nt,W,B,A]})},Nt=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[xt,Mt,yt]})};var Ft=class{total;discount;taxRate;tax;currencySymbol;disc;label;constructor(){this.total=0,this.discount=0,this.taxRate=0,this.tax=0,this.currencySymbol="",this.disc=[0,0,0]}};function wi(n,o){if(n&1){let t=x();r(0,"input",11),M("ngModelChange",function(i){p(t);let m=c(2);return D(m.estimateData.Order.CurrencyRate,i)||(m.estimateData.Order.CurrencyRate=i),u(i)}),a()}if(n&2){let t=c(2);v("ngModel",t.estimateData.Order.CurrencyRate)}}function Pi(n,o){if(n&1&&(r(0,"div",8)(1,"span",9),s(2,"@"),a(),g(3,wi,1,1,"input",10),a()),n&2){let t=c();l(3),d("ngIf",t.estimateData.Order.CurrencyID!=t.oldCurrencyID)}}var Rt=class n{constructor(o,t){this.data=o;this.dialogRef=t;this.config=new it,this.config.title="Estimate Note",this.config.customWidth="325px",this.currencies=this.data.currencies,this.customerPOTypes=this.data.type,this.estimateData=this.data.estimateData,this.oldCurrencyID=this.data.estimateData.Order.CurrencyID}currencies;customerPOTypes;estimateData;oldCurrencyID;config;static \u0275fac=function(t){return new(t||n)(h(et),h(tt))};static \u0275cmp=w({type:n,selectors:[["POS-modal-estimate-note"]],decls:21,vars:9,consts:[[3,"onCancel","onClose","onOk","config"],[1,"table-sm"],[3,"hidden"],[1,"row"],[1,"col-sm-5"],["appendTo","body","bindLabel","Symbol","bindValue","ID",1,"currency-select",2,"width","100px",3,"ngModelChange","clearable","ngModel","items"],["class","col-sm-4 ms-2 d-flex",4,"ngIf"],["appendTo","body","bindLabel","Name","bindValue","ID",1,"customer-po-select",2,"width","215px",3,"ngModelChange","clearable","ngModel","items"],[1,"col-sm-4","ms-2","d-flex"],[1,"pt-4"],["style","width: 100px;","class","form-control","autoNum","",3,"ngModel","ngModelChange",4,"ngIf"],["autoNum","",1,"form-control",2,"width","100px",3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(r(0,"modal-material",0),f("onCancel",function(){return e.dialogRef.close()})("onClose",function(){return e.dialogRef.close()})("onOk",function(){return e.dialogRef.close()}),r(1,"content")(2,"table",1)(3,"tbody")(4,"tr",2)(5,"th"),s(6,"Currency"),a(),r(7,"td"),s(8,":"),a(),r(9,"td")(10,"div",3)(11,"div",4)(12,"ng-select",5),M("ngModelChange",function(m){return D(e.estimateData.Order.CurrencyID,m)||(e.estimateData.Order.CurrencyID=m),m}),a()(),g(13,Pi,4,1,"div",6),a()()(),r(14,"tr")(15,"th"),s(16,"Tag"),a(),r(17,"td"),s(18,":"),a(),r(19,"td")(20,"ng-select",7),M("ngModelChange",function(m){return D(e.estimateData.Order.TypeID,m)||(e.estimateData.Order.TypeID=m),m}),a()()()()()()()),t&2&&(d("config",e.config),l(4),d("hidden",e.currencies.length<2),l(8),d("clearable",!1),v("ngModel",e.estimateData.Order.CurrencyID),d("items",e.currencies),l(),d("ngIf",e.estimateData.Order.CurrencyID!=e.oldCurrencyID),l(7),d("clearable",!1),v("ngModel",e.estimateData.Order.TypeID),d("items",e.customerPOTypes))},dependencies:[P,W,B,A,Dt,nt,St],encapsulation:2})};function ki(n,o){if(n&1){let t=x();r(0,"div",1)(1,"div",2),f("click",function(){p(t);let i=c();return u(i.openOutletModal())}),b(2,"i",3)(3,"input",4),C(4,"limitTo"),a(),r(5,"div",5)(6,"datepicker",6),M("dateChange",function(i){p(t);let m=c();return D(m.estimateData.Order.Date,i)||(m.estimateData.Order.Date=i),u(i)}),a()(),r(7,"div",7),b(8,"i",8),r(9,"input",9),M("ngModelChange",function(i){p(t);let m=c();return D(m.estimateData.Order.Number,i)||(m.estimateData.Order.Number=i),u(i)}),a()(),r(10,"div",10),b(11,"i",11),r(12,"autocompleteV2",12),f("onSelect",function(i){p(t);let m=c();return u(m.selectCustomer(i))}),a(),r(13,"i",13),f("click",function(){p(t);let i=c();return u(i.openCustomerModal())}),a()(),r(14,"div",14),b(15,"i",15),r(16,"ng-select-infinite",16),M("selectedChange",function(i){p(t);let m=c();return D(m.estimateData.Order.SalesID,i)||(m.estimateData.Order.SalesID=i),u(i)}),a()()()}if(n&2){let t=c();l(2),d("matTooltip",t.outletName),l(),d("value",ht(4,11,t.outletName,20))("placeholder",t.outletName),l(3),d("disabled",!t.role.Date),v("date",t.estimateData.Order.Date),d("matTooltip",t.role!=null&&t.role.Date?"":"Date role is required"),l(3),d("disabled",!t.role.Number),v("ngModel",t.estimateData.Order.Number),l(3),d("inputTextValue",t.customerName),l(4),d("items",t.salesPerson),v("selected",t.estimateData.Order.SalesID)}}var Bt=class n{onOpenOutletModal=new S;onSelectCustomer=new S;onOpenCustomerModal=new S;salesPerson;estimateData;outletName;customerName;role;selectCustomer(o){this.onSelectCustomer.emit(o)}openOutletModal(){this.onOpenOutletModal.emit()}openCustomerModal(){this.onOpenCustomerModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-toolbar"]],inputs:{salesPerson:"salesPerson",estimateData:"estimateData",outletName:"outletName",customerName:"customerName",role:"role"},outputs:{onOpenOutletModal:"onOpenOutletModal",onSelectCustomer:"onSelectCustomer",onOpenCustomerModal:"onOpenCustomerModal"},decls:1,vars:1,consts:[["class","row header g-0 py-4",4,"ngIf"],[1,"row","header","g-0","py-4"],[1,"col-auto",3,"click"],["matTooltipPosition","above",1,"fa-solid","fa-house",3,"matTooltip"],["readonly","",1,"outlet","cursor",3,"value","placeholder"],[1,"col-auto","date","me-5"],["appearance","fill","name","orderDate","matTooltipPosition","above",3,"dateChange","disabled","date","matTooltip"],[1,"col-auto","me-5"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Order number",1,"far","fa-file-lines"],["type","text","placeholder","Puchase Order Number",1,"number",2,"width","180px",3,"ngModelChange","disabled","ngModel"],[1,"col-auto","d-flex","me-5"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Customer",1,"fa","fa-user"],["requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer","notFoundMessageFor","customer","panelWidth","30%",3,"onSelect","inputTextValue"],["aria-hidden","true",1,"fa-solid","fa-circle-plus",3,"click"],[1,"col-auto","d-flex"],[1,"fa","fa-id-badge","ps-2"],["bindValue","ID","bindLabel","Name","width","135px","placeholder","Sales Person",3,"selectedChange","items","selected"]],template:function(t,e){t&1&&g(0,ki,17,14,"div",0),t&2&&d("ngIf",e.estimateData)},dependencies:[P,ve,W,B,A,Ot,Me,vt,he],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:3px!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex{background-color:#e9ecef!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex input{opacity:1!important;color:#00000061!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field .mat-mdc-text-field-wrapper{padding-bottom:0;background-color:#fff;padding-left:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-flex{width:147px;height:35px;border:1px solid rgb(207,207,207);margin-left:40px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none!important;top:5px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:4px;padding-bottom:4px;padding-left:8px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix{position:relative;left:-140px;top:1px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix .mat-mdc-button-persistent-ripple{color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix button.mat-mdc-icon-button.mat-mdc-button-base{padding:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mdc-line-ripple{display:none}.date[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-mdc-form-field-flex{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.col-auto[_ngcontent-%COMP%]{font-size:.875rem;height:fit-content}.col-auto[_ngcontent-%COMP%]:last-child{margin-right:0}.col-auto[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.25rem;color:#3b3b3b;margin-right:5px;line-height:unset!important;position:relative;top:2px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .col-auto[_ngcontent-%COMP%] span.outlet[_ngcontent-%COMP%]{padding:4px 8px 3px 5px;border:1px solid #dddddd;font-size:.875rem}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:36px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background-color:#e9ecef!important;opacity:1!important;color:#00000061!important}.col-auto[_ngcontent-%COMP%] .outlet[_ngcontent-%COMP%]{width:165px;color:#337ab7;background:#fff}.col-auto[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:150px}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}"]})};function Ni(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2),C(3,"number"),a(),r(4,"td",16),s(5),C(6,"number"),a()()),n&2){let t=c();l(2),E("DISCOUNT "+I(3,2,t.estimateData.Order.Discount)+" %"),l(3),E(I(6,4,t.cartFooterInfo.discount))}}function Fi(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2,"DISCOUNT"),a(),r(3,"td",16),s(4),C(5,"number"),a()()),n&2){let t=c();l(4),E(I(5,1,t.estimateData.Order.DiscountAmount))}}function Ri(n,o){if(n&1&&(r(0,"tr")(1,"th",15),s(2),a(),r(3,"td",17),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),E(t.cartFooterInfo.label),l(2),E(I(5,2,t.cartFooterInfo.tax))}}var At=class n{cartFooterInfo;cartItems;estimateData;taxes;onChangeTaxType=new S;onOpenDiscountModal=new S;changeTaxType(o){this.onChangeTaxType.emit(o)}openDiscountModal(){this.onOpenDiscountModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-cart-footer"]],inputs:{cartFooterInfo:"cartFooterInfo",cartItems:"cartItems",estimateData:"estimateData",taxes:"taxes"},outputs:{onChangeTaxType:"onChangeTaxType",onOpenDiscountModal:"onOpenDiscountModal"},decls:23,vars:9,consts:[[1,"row","g-0","cart-footer","justify-content-between"],[1,"col-auto","align-self-center",2,"margin-top","15px","margin-bottom","15px","margin-right","7px"],[1,"row","g-0","d-flex","align-items-center"],[1,"col-auto","mx-5","d-flex","align-items-center"],["aria-hidden","true",1,"fa","fa-tags",2,"font-size","1.25rem"],["bindLabel","Label","bindValue","ID","placeholder","Choose...",1,"ms-5",2,"width","150px",3,"ngModelChange","change","ngModel","items","clearable"],[1,"col-auto","ms-5"],[1,"btn","btn-gray","fw-normal","d-flex","align-items-center",2,"height","36px",3,"click"],["aria-hidden","true",1,"fa","fa-tags"],[1,"ms-3"],[1,"col-auto","summary"],[1,"table"],[1,"table-light","border-top-0"],[1,"text-end","border-top-0",2,"width","100px"],[4,"ngIf"],[1,"table-light"],[1,"text-danger","text-end"],[1,"text-end"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),b(4,"i",4),r(5,"ng-select",5),M("ngModelChange",function(m){return D(e.estimateData.Order.TaxTypeID,m)||(e.estimateData.Order.TaxTypeID=m),m}),f("change",function(m){return e.changeTaxType(m)}),a()(),r(6,"div",6)(7,"a",7),f("click",function(){return e.openDiscountModal()}),b(8,"i",8),r(9,"span",9),s(10,"Discount"),a()()()()(),r(11,"div",10)(12,"table",11)(13,"tbody")(14,"tr")(15,"th",12),s(16,"Amount"),a(),r(17,"td",13),s(18),C(19,"number"),a()(),g(20,Ni,7,6,"tr",14)(21,Fi,6,3,"tr",14)(22,Ri,6,4,"tr",14),a()()()()),t&2&&(l(5),v("ngModel",e.estimateData.Order.TaxTypeID),d("items",e.taxes)("clearable",!1),l(13),E(I(19,7,e.cartFooterInfo.total)),l(2),d("ngIf",e.cartItems.length>0&&e.estimateData.Order.Discount>0),l(),d("ngIf",e.cartItems.length>0&&e.estimateData.Order.DiscountAmount>0),l(),d("ngIf",e.cartItems.length>0&&e.cartFooterInfo.taxRate>0))},dependencies:[P,B,A,Dt,R],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-left:solid 1px #cfcfcf;border-bottom:solid 1px #cfcfcf}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px 8px}div.summary[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px 5px}.btn-gray[_ngcontent-%COMP%]{background-color:#f4f4f4;border:1px solid #d6d6d6;font-weight:700;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}.cart-footer[_ngcontent-%COMP%]{width:550px}"]})};var Lt=class n{total;onSubmit=new S;onOpenVoidModal=new S;onOpenNoteModal=new S;submit(){this.onSubmit.emit()}openVoidModal(){this.onOpenVoidModal.emit()}openEstimateNoteModal(){this.onOpenNoteModal.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-cart-action"]],inputs:{total:"total"},outputs:{onSubmit:"onSubmit",onOpenVoidModal:"onOpenVoidModal",onOpenNoteModal:"onOpenNoteModal"},decls:14,vars:4,consts:[[1,"mt-5","d-flex","action-button","justify-content-end"],[1,"d-flex","justify-content-end",2,"width","85%"],[1,"btn","btn-gray","me-5",3,"click"],[1,"fa-solid","fa-note-sticky"],[1,"fa-regular","fa-rectangle-xmark"],[1,"btn","btn-success","d-flex","justify-content-between","align-items-center",2,"height","60px","width","200px","font-size","18px",3,"click"],[1,"text-bold"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"button",2),f("click",function(){return e.openEstimateNoteModal()}),b(3,"i",3),s(4," NOTE "),a(),r(5,"button",2),f("click",function(){return e.openVoidModal()}),b(6,"i",4),s(7," Clear "),a(),r(8,"button",5),f("click",function(){return e.submit()}),r(9,"span",6),s(10,"Submit:"),a(),r(11,"span"),s(12),C(13,"number"),a()()()()),t&2&&(l(12),E(ht(13,1,e.total,"1.0-4")))},dependencies:[R],styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;font-weight:700;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee);font-size:1.125rem}"]})};var ni=n=>({ID:n}),Li=()=>["/menu/Orders/Orders/Estimate/Info"];function Wi(n,o){if(n&1&&(r(0,"div",24)(1,"div",25),s(2),a(),r(3,"div",25),s(4),C(5,"number"),a()()),n&2){let t=o.$implicit;l(2),E(t.Variant.Name),l(2),y("",I(5,2,t.Price*t.Quantity*((100-t.Discount)/100))," ")}}function ji(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),C(3,"number"),a(),r(4,"div",21),s(5),C(6,"number"),a()()),n&2){let t=c();l(2),dt("","Discount "+I(3,3,t.estimateData.Order.Discount)+" %",": ",t.cartFooterInfo.currencySymbol,""),l(3),E(I(6,5,t.cartFooterInfo.discount))}}function Ui(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),a(),r(3,"div",21),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),y("Discount: ",t.cartFooterInfo.currencySymbol,""),l(2),E(I(5,2,t.estimateData.Order.DiscountAmount))}}function Qi(n,o){if(n&1&&(r(0,"div",23)(1,"div",21),s(2),a(),r(3,"div",21),s(4),C(5,"number"),a()()),n&2){let t=c();l(2),dt("","Tax "+t.cartFooterInfo.taxRate+" %",": ",t.cartFooterInfo.currencySymbol,""),l(2),E(I(5,3,t.cartFooterInfo.tax))}}var Wt=class n{cartFooterInfo;estimateData;total;completeInfo;cartItems;onUndo=new S;onNewForm=new S;undo(){this.onUndo.emit()}newForm(){this.onNewForm.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["POS-complete"]],inputs:{cartFooterInfo:"cartFooterInfo",estimateData:"estimateData",total:"total",completeInfo:"completeInfo",cartItems:"cartItems"},outputs:{onUndo:"onUndo",onNewForm:"onNewForm"},decls:40,vars:21,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","115px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","my-6"],["target","_blank","routerLink","/print/Estimate",1,"btn","bg-light-gray","btn-secondary",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-5",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],["class","row justify-content-end",4,"ngIf"],[1,"row","justify-content-end"],[1,"row","justify-content-between","mb-5"],[1,"col","text-end"]],template:function(t,e){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),b(5,"i",5),s(6,"Order Complete "),a()(),r(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),f("click",function(){return e.newForm()}),s(11,"New Order (F8)"),a()()()(),r(12,"div",10)(13,"div",11)(14,"a",12),b(15,"i",13),s(16,"Print Receipt"),a()()()()(),r(17,"div",14)(18,"div",2)(19,"div",15)(20,"h2",16)(21,"a",17),s(22),a()()(),r(23,"div",18),g(24,Wi,6,4,"div",19),r(25,"div",20)(26,"div",21),s(27),a(),r(28,"div",21),s(29),C(30,"number"),a()(),g(31,ji,7,7,"div",22)(32,Ui,6,4,"div",22)(33,Qi,6,5,"div",22),r(34,"div",23)(35,"div",21),s(36),a(),r(37,"div",21),s(38),C(39,"number"),a()()()()()()),t&2&&(l(14),d("queryParams",F(16,ni,e.completeInfo.OrderID)),l(7),d("routerLink",Ct(18,Li))("queryParams",F(19,ni,e.completeInfo.OrderID)),l(),y("Estimate #",e.completeInfo.InvoiceNumber,""),l(2),d("ngForOf",e.cartItems),l(3),y("Amount: ",e.cartFooterInfo.currencySymbol,""),l(2),E(I(30,12,e.cartFooterInfo.total)),l(2),d("ngIf",e.cartFooterInfo.discount>0),l(),d("ngIf",e.estimateData.Order.DiscountAmount>0),l(),d("ngIf",e.cartFooterInfo.tax>0),l(3),y("Total: ",e.cartFooterInfo.currencySymbol,""),l(2),E(I(39,14,e.total)))},dependencies:[Z,P,It,R]})};var Ki=["cartContainer"];function Gi(n,o){n&1&&b(0,"th",18)}function zi(n,o){n&1&&(r(0,"th",9),s(1,"UOM"),a())}function Ji(n,o){if(n&1&&(r(0,"td")(1,"small"),s(2),a()()),n&2){let t=c().index;l(2),y("",t+1,".")}}function Yi(n,o){if(n&1&&(r(0,"td"),s(1),a()),n&2){let t=c().$implicit;l(),y(" ",t.Variant.UOMName," ")}}function Xi(n,o){if(n&1){let t=x();r(0,"tr",19),f("click",function(){let i=p(t),m=i.$implicit,O=i.index,V=c();return u(V.onSelect({item:m,index:O}))})("contextmenu",function(i){let m=p(t),O=m.$implicit,V=m.index,ft=c();return u(ft.onContextMenu(i,O,V))}),r(1,"td",20)(2,"i",21),f("click",function(){let i=p(t),m=i.$implicit,O=i.index,V=c();return u(V.onRemove({item:m,index:O}))}),a()(),g(3,Ji,3,1,"td",22),r(4,"td",23)(5,"span",24),s(6),b(7,"br"),a(),b(8,"span",25),a(),r(9,"td"),s(10),a(),r(11,"td",26),s(12),C(13,"number"),r(14,"span"),s(15),a()(),g(16,Yi,2,1,"td",22),r(17,"td",26),s(18),C(19,"number"),a(),r(20,"td",27),s(21),C(22,"number"),a(),r(23,"td",26),s(24),C(25,"number"),a()()}if(n&2){let t=o.$implicit,e=c();d("cdkDragDisabled",!e.dragDropEnabled),l(3),d("ngIf",e.appConfig.ModuleSell.Grid.RowNumberVisible),l(3),y(" ",t.Variant.Name," "),l(2),d("innerHTML",t.Note,te),l(2),E(t.Variant.Code),l(2),y(" ",I(13,11,t.Quantity),""),l(3),E(t.UnitQuantity>1?"@"+t.UnitQuantity:""),l(),d("ngIf",e.appConfig.ModuleSell.Grid.UOMVisible),l(2),y(" ",I(19,13,t.Price)," "),l(3),y(" ",t.Discount==0?"":"-"+I(22,15,t.Discount)," "),l(3),y(" ",I(25,17,t.Price*t.Quantity*((100-t.Discount)/100))," ")}}function Zi(n,o){if(n&1){let t=x();r(0,"button",28),f("click",function(){let i=p(t).item,m=c();return u(m.onReverse(i,!0))}),s(1,"Return"),a(),r(2,"button",28),f("click",function(){let i=p(t).item,m=c();return u(m.onReverse(i,!1))}),s(3,"Purchase"),a()}}var jt=class n{constructor(o,t){this.loadService=o;this.cartItemService=t;this.cartItems=[],this.destroy$=new K,this.onSelectItem=new S,this.onReturnItem=new S,this.onPurchaseItem=new S,this.onRemoveItem=new S,this.onDragItem=new S,this.cartItemsChange=new S,this.cartItemService.notifyNewItem$.pipe(H(e=>_.IsNotEmpty(e))).subscribe({next:e=>{setTimeout(()=>{let i=this.cartContainer.nativeElement.scrollHeight;this.cartContainer.nativeElement.scrollTop=i},1)}}),this.initDisableDragNDrop()}cartItems;cartItemsChange;onSelectItem;onReturnItem;onPurchaseItem;onRemoveItem;onDragItem;dragDropEnabled=!0;cartContainer;contextMenu;contextMenuPosition={x:"0px",y:"0px"};onContextMenu(o,t,e){o.preventDefault(),this.contextMenuPosition.x=o.clientX+"px",this.contextMenuPosition.y=o.clientY+"px",t.Index=e,this.contextMenu.menuData={item:t},this.contextMenu.openMenu()}onDrop(o){se(this.cartItems,o.previousIndex,o.currentIndex),this.cartItemService.updateCartItem(this.cartItems),this.onDragItem.emit(this.cartItems),this.cartItemsChange.emit(this.cartItems)}destroy$;appConfig;role;initDisableDragNDrop(){_.isMobileDevice&&(this.dragDropEnabled=!1)}ngOnInit(){this.initAppConfig(),this.initRole()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initAppConfig(){this.appConfig=this.loadService.Data.AppConfigJSON}initRole(){this.loadService.role$.pipe(G(this.destroy$)).subscribe(o=>{this.role=o})}onRemove(o){this.onRemoveItem.emit(o)}onSelect(o){this.onSelectItem.emit(o)}onReverse(o,t){t?(o.Quantity>0&&(o.Quantity=o.Quantity*-1),this.onReturnItem.emit(o)):(o.Quantity<0&&(o.Quantity=o.Quantity*-1),this.onPurchaseItem.emit(o))}static \u0275fac=function(t){return new(t||n)(h(Pt),h(j))};static \u0275cmp=w({type:n,selectors:[["POS-cart-display"]],viewQuery:function(t,e){if(t&1&&(lt(Ki,5),lt(wt,7)),t&2){let i;st(i=ct())&&(e.cartContainer=i.first),st(i=ct())&&(e.contextMenu=i.first)}},inputs:{cartItems:"cartItems"},outputs:{cartItemsChange:"cartItemsChange",onSelectItem:"onSelectItem",onReturnItem:"onReturnItem",onPurchaseItem:"onPurchaseItem",onRemoveItem:"onRemoveItem",onDragItem:"onDragItem"},decls:28,vars:8,consts:[["cartContainer",""],["contextMenu","matMenu"],[1,"cashier"],[1,"row","g-0","cart-table","border-bottom"],["cdkScrollable","",1,"col"],[1,"table"],[2,"width","18px"],["style","width: 36px",4,"ngIf"],[1,"text-start",2,"width","250px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 50px",4,"ngIf"],[1,"text-end",2,"width","70px"],[1,"disc","text-end",2,"width","20px"],[1,"text-end",2,"width","85px"],["cdkDropList","",1,"itemList",3,"cdkDropListDropped"],["class","item","cdkDrag","",3,"cdkDragDisabled","click","contextmenu",4,"ngFor","ngForOf"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["matMenuContent",""],[2,"width","36px"],["cdkDrag","",1,"item",3,"click","contextmenu","cdkDragDisabled"],[1,"cursor"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Click to Remove",1,"fa","fa-xmark","text-danger",3,"click"],[4,"ngIf"],[1,"text-start"],[1,"d-block"],[3,"innerHTML"],[1,"text-end"],[1,"text-end","text-danger","disc"],["mat-menu-item","",3,"click"]],template:function(t,e){if(t&1){let i=x();r(0,"div",2)(1,"div",3)(2,"div",4,0)(4,"table",5)(5,"thead")(6,"tr"),b(7,"th",6),g(8,Gi,1,0,"th",7),r(9,"th",8),s(10,"Item"),a(),r(11,"th"),s(12,"Code"),a(),r(13,"th",9),s(14,"Qty"),a(),g(15,zi,2,0,"th",10),r(16,"th",11),s(17,"Price"),a(),r(18,"th",12),s(19,"%"),a(),r(20,"th",13),s(21,"Total"),a()()(),r(22,"tbody",14),f("cdkDropListDropped",function(O){return p(i),u(e.onDrop(O))}),g(23,Xi,26,19,"tr",15),a()()()(),b(24,"div",16),r(25,"mat-menu",null,1),g(27,Zi,4,0,"ng-template",17),a()()}if(t&2){let i=L(26);l(8),d("ngIf",e.appConfig.ModuleSell.Grid.RowNumberVisible),l(7),d("ngIf",e.appConfig.ModuleSell.Grid.UOMVisible),l(8),d("ngForOf",e.cartItems),l(),_t("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),d("matMenuTriggerFor",i)}},dependencies:[Z,P,me,we,Oe,Ee,wt,de,ce,vt,R],styles:["div.row.cart-table[_ngcontent-%COMP%]{border-left:solid 1px #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%]{overflow:auto;height:250px}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background:#fbfbf7;border-left:none}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.75rem;padding:9px 5px!important}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:.75rem;padding:6px 5px;border-bottom:1px solid #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-right:0}.cdk-drag-preview[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.item[_ngcontent-%COMP%]:last-child{border:none}.itemList.cdk-drop-list-dragging[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cashier[_ngcontent-%COMP%]{width:550px;max-width:37rem;min-width:33rem}"]})};function tn(n,o){if(n&1){let t=x();r(0,"div",9)(1,"POS-cart-header",10),f("onCreateItem",function(){p(t);let i=c(2);return u(i.selectItem())})("onAddItem",function(i){p(t);let m=c(2);return u(m.addItem(i))})("onScanCode",function(i){p(t);let m=c(2);return u(m.onScanBarcode(i))}),a(),r(2,"POS-cart-display",11),f("onRemoveItem",function(i){p(t);let m=c(2);return u(m.removeItem(i))})("onSelectItem",function(i){p(t);let m=c(2);return u(m.selectItem(i))})("onDragItem",function(i){p(t);let m=c(2);return u(m.saveItemAfterDrag(i))}),a(),r(3,"POS-cart-footer",12),f("onOpenDiscountModal",function(){p(t);let i=c(2);return u(i.openDiscountModal())})("onChangeTaxType",function(i){p(t);let m=c(2);return u(m.changeTaxType(i))}),a(),r(4,"POS-cart-action",13),f("onOpenVoidModal",function(){p(t);let i=c(2);return u(i.openVoidModal())})("onOpenNoteModal",function(){p(t);let i=c(2);return u(i.openEstimateNoteModal())})("onSubmit",function(){p(t);let i=c(2);return u(i.submit())}),a()()}if(n&2){let t=c(2);l(),d("cartItems",t.cartItems),l(),d("cartItems",t.cartItems),l(),d("cartFooterInfo",t.cartFooterInfo)("cartItems",t.cartItems)("estimateData",t.estimateData)("taxes",t.taxes),l(),d("total",t.total)}}function en(n,o){if(n&1){let t=x();r(0,"div",3)(1,"POS-toolbar",4),f("onOpenOutletModal",function(){p(t);let i=c();return u(i.openOutletModal())})("onSelectCustomer",function(i){p(t);let m=c();return u(m.selectCustomer(i))})("onOpenCustomerModal",function(){p(t);let i=c();return u(i.openCustomerModal())}),a(),r(2,"div",5)(3,"div",6),b(4,"pos-quick-key",7),a(),g(5,tn,5,7,"div",8),a()()}if(n&2){let t=c();l(),d("salesPerson",t.salesPerson)("estimateData",t.estimateData)("outletName",t.outletName)("customerName",t.customerName)("role",t.roleService.global),l(3),d("quickKeyId",t.quickKeyID)("outletID",t.outletID),l(),d("ngIf",t.estimateStorage)}}function nn(n,o){if(n&1){let t=x();r(0,"div",14)(1,"POS-complete",15),f("onUndo",function(){p(t);let i=c();return u(i.undo())})("onNewForm",function(){p(t);let i=c();return u(i.newForm())}),a()()}if(n&2){let t=c();l(),d("cartFooterInfo",t.cartFooterInfo)("estimateData",t.estimateData)("total",t.total)("completeInfo",t.completeInfo)("cartItems",t.cartItems)}}var Ut=class n extends ue{constructor(t,e,i,m,O,V,ft,rn,an,mn,ln){super(t);this.firstLoadService=e;this.matDialog=i;this.backEndService=m;this.estimateDataService=O;this.quickKeyService=V;this.cartItemService=ft;this.toastr=rn;this.router=an;this.activatedRoute=mn;this.roleService=ln;this.destroy$=new K,this.cartFooterInfo=new Ft,this.firstLoadService.initRoles(),this.firstLoadService.role$.pipe(G(this.destroy$)).subscribe(N=>{this.role=N}),this.estimateDataService.Data$.pipe(G(this.destroy$)).subscribe(N=>{this.estimateData=N,this.fillCartItems(),this.changeTaxType()}),this.quickKeyService.onSelectQuickeyItem$.pipe(G(this.destroy$),H(N=>_.IsNotEmpty(N.id)),at(N=>this.cartItemService.getItemById(N.id,N.entityID))).subscribe(N=>this.cartItemService.addNewItem(N))}quickKeyID;originalOutletID;originalNumber;estimateStorage;estimateData;outletID=_.GuidEmpty;outletName="Choose an Outlet";entities;destroy$;isComplete=!1;salesPerson;cartItems;cartFooterInfo;customerName;taxes;completeInfo;total=0;tax;role;handleF4(){this.matDialog.openDialogs.length==0&&this.selectItem()}handleF8(){this.isComplete&&this.newForm()}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.estimateDataService.pushNewValue(new ot),this.quickKeyService.Data=new Ae,this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){let t=this.activatedRoute.snapshot.queryParams.ID,e=this.estimateData.Order.EntityID;this.menuData$.pipe(at(()=>this.firstLoadService.getStorage(k.LoadFormEstimate,t,e))).subscribe(i=>{this.fillData(i);let m=this.estimateStorage.Entities.length==1;if(_.IsEmpty(t)&&!m)this.openOutletModal();else{if(m){let O={outlet:null};O.outlet=this.estimateStorage.Entities[0],this.outletName=O.outlet.Name,this.outletID=O.outlet.ID,this.originalOutletID=O.outlet.ID,this.estimateData.Order.EntityID=this.outletID,this.quickKeyID=O.outlet.QuickKeyTemplateID,_.IsNotEmpty(O.outlet.DefaultTaxTypeID)&&(this.estimateData.Order.TaxTypeID=O.outlet.DefaultTaxTypeID,this.tax=this.taxes.filter(V=>V.ID==this.estimateData.Order.TaxTypeID)[0],this.changeTaxType(this.tax)),qt([this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber),this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID)]).subscribe(([V,ft])=>{this.estimateData.Order.Number=V.Number,this.initQuickKey(ft)})}this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID).subscribe(O=>this.initQuickKey(O))}})}onScanBarcode(t){this.cartItemService.addCartItemByCode(t,this.outletID)}fillData(t){this.estimateStorage=t,this.entities=this.estimateStorage.Entities,this.salesPerson=this.estimateStorage.SalesPOTypes,this.taxes=this.estimateStorage.Taxes,this.firstLoadService.pageState=4,_.IsEmpty(t.Data)?(this.estimateData.Order.TaxTypeID=this.estimateStorage.Taxes[0].ID,_.IsEmpty(this.tax)&&(this.tax=this.estimateStorage.Taxes[0],this.changeTaxType(this.tax)),this.estimateData.Order.Date=this.estimateStorage.ServerTime.toString(),this.estimateData.Order.TypeID=this.estimateStorage.CustomerPOTypes[0].ID,this.estimateData.Order.CurrencyID=this.estimateStorage.Currencies[0].ID):(this.estimateDataService.pushNewValue(t.Data),this.estimateData=t.Data,this.customerName=t.Data.ContactName,this.outletID=t.Data.Order.EntityID,this.outletName=t.Entities.find(e=>e.ID==this.outletID)?.Name,this.tax=this.taxes.filter(e=>e.ID==this.estimateData.Order.TaxTypeID)[0],this.menuData.H=`Editing Estimate #${t.Data.Order.Number}`,this.fillCartItems(),this.changeTaxType(this.tax)),this.cartFooterInfo.currencySymbol=this.findCurrencySymbol()}openOutletModal(){this.matDialog.open(Qe,{data:{Entities:this.entities}}).afterClosed().pipe(H(t=>_.IsNotEmpty(t)),Kt(t=>{this.outletName=t.outlet.Name,this.outletID=t.outlet.ID,this.estimateData.Order.EntityID=this.outletID,this.quickKeyID=t.outlet.QuickKeyTemplateID,_.IsNotEmpty(t.outlet.DefaultTaxTypeID)&&(this.estimateData.Order.TaxTypeID=t.outlet.DefaultTaxTypeID,this.tax=this.taxes.filter(e=>e.ID==this.estimateData.Order.TaxTypeID)[0],this.changeTaxType(this.tax))}),at(()=>qt([this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber),this.backEndService.getQuickKey(this.outletID,k.GetQuickKeyByEntityID)]))).subscribe(([t,e])=>{this.originalOutletID!=this.outletID?this.estimateData.Order.Number=t.Number:this.estimateData.Order.Number=this.originalNumber,this.initQuickKey(e)})}initQuickKey(t){this.quickKeyService.Data=t,this.quickKeyService.EntityID=this.outletID}selectCustomer(t){this.estimateData.Order.CustomerID=t}fillCartItems(){this.cartItems=[],this.estimateData.Items.forEach(t=>this.cartItems.push(t))}saveItemAfterDrag(t){this.cartItemService.updateCartItem(t)}removeItem(t){this.cartItemService.removeItem(t)}selectItem(t){this.matDialog.open(Tt,{data:{itemInfo:t,entityID:this.outletID,moduleSell:this.estimateStorage.AppConfigJSON.ModuleSell,role:this.role}})}addItem(t){this.cartItemService.getItemById(t,this.outletID).subscribe(e=>{this.cartItemService.addNewItem(e)})}calculateTotal(){this.cartFooterInfo.total=0,this.cartItems.forEach(t=>this.cartFooterInfo.total+=t.Price*t.Quantity*((100-t.Discount)/100)),this.cartFooterInfo.discount=this.estimateData.Order.Discount/100*this.cartFooterInfo.total,this.total=this.cartFooterInfo.total-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount}changeTaxType(t){t!==void 0?(this.tax=t,this.cartFooterInfo.taxRate=t.Rate,this.cartFooterInfo.label=t.Label):_.IsEmpty(this.cartFooterInfo.taxRate)&&(this.cartFooterInfo.taxRate=0),this.calculateTotal(),this.cartFooterInfo.tax=this.calculateTax(),this.calculateTotalWithTax(this.tax)}calculateTotalWithTax(t){t&&t.CalculationTypeID==0&&(this.total=this.total+this.cartFooterInfo.tax)}calculateTax(){if(_.IsNotEmpty(this.tax)){let t=0;return this.cartItems.filter(e=>e.Variant.Taxable).forEach(e=>t+=e.Price*e.Quantity),this.tax.CalculationTypeID==1?this.cartFooterInfo.taxRate/(100+this.cartFooterInfo.taxRate)*(t-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount):this.cartFooterInfo.taxRate/100*(t-this.cartFooterInfo.discount-this.estimateData.Order.DiscountAmount)}}openDiscountModal(){this.matDialog.open(Vt,{data:{transactionData:this.estimateData,cartFooterInfo:this.cartFooterInfo}}).afterClosed().subscribe(()=>{this.changeTaxType()})}openCustomerModal(){this.matDialog.open(Te,{data:{options:this.estimateStorage.EstimateOptions,config:this.estimateStorage.AppConfigJSON.ModuleContact,type:"customer",title:"New Customer Form"}}).afterClosed().subscribe(t=>{this.estimateData.Order.CustomerID=t.CustomerID,this.customerName=t.ContactName})}openEstimateNoteModal(){this.estimateData.Order.CurrencyRate=1,this.matDialog.open(Rt,{data:{estimateData:this.estimateData,currencies:this.estimateStorage.Currencies,type:this.estimateStorage.CustomerPOTypes}}).afterClosed().subscribe(()=>this.cartFooterInfo.currencySymbol=this.findCurrencySymbol())}findCurrencySymbol(){return this.estimateStorage.Currencies.find(t=>t.ID===this.estimateData.Order.CurrencyID).Symbol}openVoidModal(){this.matDialog.open(Ge).afterClosed().pipe(H(t=>t),Kt(()=>{this.estimateData.Items=[],this.cartItems=[]}),at(()=>this.backEndService.generateNumber(this.outletID,k.EstimateGenerateNumber))).subscribe(t=>this.estimateData.Order.Number=t.Number)}submit(){if(_.IsEmpty(this.estimateData.Order.EntityID)){this.toastr.error("Please select outlet before proceeding..",q.Error),this.openOutletModal();return}if(_.IsEmpty(this.estimateData.Order.CustomerID)){this.toastr.warning("Please select a customer!",q.Warning);return}if(this.cartItems.length==0){this.toastr.error("You must have at least one item.",q.Error);return}if(_.IsEmpty(this.estimateData.Order.Number)){this.toastr.error("Number cannot be empty.",q.Error);return}this.estimateData.Items.forEach(t=>t.ID=""),this.estimateData.Items=this.estimateData.Items.map(t=>(delete t.UnitPriceOriginal,t)),this.matDialog.open(qe,{data:{transactionData:this.estimateData,api:k.SubmitEstimate}}).afterClosed().pipe(H(t=>_.IsNotEmpty(t))).subscribe(t=>{this.completeInfo=t,this.isComplete=!0,this.estimateData.Order.ID=this.completeInfo.OrderID})}undo(){this.isComplete=!1,this.originalOutletID=this.outletID,this.originalNumber=this.estimateData.Order.Number,this.initLoadForm()}newForm(){this.router.navigate(["/menu/Estimate"]).then(()=>window.location.reload())}static \u0275fac=function(e){return new(e||n)(h(Ce),h(Pt),h(fe),h(Et),h(rt),h(Le),h(j),h($),h(oe),h(ne),h(ae))};static \u0275cmp=w({type:n,selectors:[["POS-estimate"]],hostBindings:function(e,i){e&1&&f("keydown.F4",function(){return i.handleF4()},!1,Gt)("keydown.F8",function(){return i.handleF8()},!1,Gt)},features:[ie],decls:4,vars:6,consts:[[3,"hideSearchDropdown","hideSearchBox","pageData","hideMoreMenu"],["class","container-fluid",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],[1,"container-fluid"],[3,"onOpenOutletModal","onSelectCustomer","onOpenCustomerModal","salesPerson","estimateData","outletName","customerName","role"],[1,"row","row","body","g-0","mt-4","justify-content-start"],[1,"col-auto","quickKey"],[3,"quickKeyId","outletID"],["class","ms-5 col-auto cart",4,"ngIf"],[1,"ms-5","col-auto","cart"],[3,"onCreateItem","onAddItem","onScanCode","cartItems"],[3,"onRemoveItem","onSelectItem","onDragItem","cartItems"],[3,"onOpenDiscountModal","onChangeTaxType","cartFooterInfo","cartItems","estimateData","taxes"],[3,"onOpenVoidModal","onOpenNoteModal","onSubmit","total"],[1,"container-fluid","mt-5"],[3,"onUndo","onNewForm","cartFooterInfo","estimateData","total","completeInfo","cartItems"]],template:function(e,i){e&1&&(r(0,"mainpanel-cmp",0)(1,"content"),g(2,en,6,8,"div",1)(3,nn,2,5,"div",2),a()()),e&2&&(d("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",i.menuData)("hideMoreMenu",!0),l(2),d("ngIf",!i.isComplete),l(),d("ngIf",i.isComplete))},dependencies:[P,Ie,Ye,je,Bt,At,Lt,Wt,jt]})};var on=[{path:"",component:Ut}],Qt=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[zt.forChild(on),zt]})};var oi=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=z({imports:[xt,Qt,ye,We,be,De,yt,xe,ge,Ue,Fe,Mt,_e,Pe,pe,Se,Nt,He,Ke,ze,Be,le]})};export{oi as EstimateModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as v}from"./chunk-
|
|
1
|
+
import{b as v}from"./chunk-JKMQSOWD.js";import{Hd as u,Sa as a,Ta as r,Vb as o,Xb as s,dc as l,na as c,vb as i,wb as e,xb as p}from"./chunk-U4MBKXDU.js";import"./chunk-LHUGHE24.js";var f=class d{constructor(m,n){this.httpService=m;this.activeRoute=n;document.title="Outlet | Reset Password Form";let t=this.activeRoute.snapshot.queryParams;this.httpService.post("/api/login/ResetPassword",t).subscribe(h=>{this.data=h})}data;ngOnInit(){document.body.classList.add("login-body")}ngOnDestroy(){document.body.classList.remove("login-body")}static \u0275fac=function(n){return new(n||d)(r(v),r(u))};static \u0275cmp=c({type:d,selectors:[["POS-auth-reset-password"]],standalone:!0,features:[l],decls:18,vars:2,consts:[[1,"container-fluid"],[1,"card","mx-auto","bg-primary","text-light"],[1,"card-title"],[1,"text-center"],[1,"card-body"],[1,"fw-normal"],[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(n,t){n&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),o(4,"Your New Account Info"),e()(),i(5,"div",4)(6,"div",3)(7,"h3",5),o(8),e(),i(9,"h3",5),o(10),e()()()(),i(11,"div",6)(12,"div",7)(13,"div")(14,"span"),o(15,"powered by :"),e(),p(16,"a",8)(17,"img",9),e()()()()),n&2&&(a(8),s("Login ID: ",t.data==null?null:t.data.Username,""),a(2),s("Password: ",t.data==null?null:t.data.Password,""))},styles:[".card[_ngcontent-%COMP%]{width:30%;margin-top:150px;padding:15px}@media screen and (max-width: 768px){.footer-mobile[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important}div.vh-100[_ngcontent-%COMP%]{height:40vh!important}.fixed-bottom[_ngcontent-%COMP%]{position:static!important}input[type=submit][_ngcontent-%COMP%]{width:98%}.card[_ngcontent-%COMP%]{border:none;width:85%}}"]})};export{f as AuthResetPasswordComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as j,f as H,g as z,h as q,i as G,j as J,k as K,l as Q,m as U,n as M,q as W,s as X}from"./chunk-
|
|
1
|
+
import{b as j,f as H,g as z,h as q,i as G,j as J,k as K,l as Q,m as U,n as M,q as W,s as X}from"./chunk-TDKWBH7Q.js";import{a as P,c as B}from"./chunk-NOVFJBRH.js";import{d as L,g as N,h as O}from"./chunk-S3LUOCII.js";import{ia as A,ja as V,ka as F,la as I}from"./chunk-2D2KKGFZ.js";import{C as R}from"./chunk-YJMA7EY3.js";import{Bb as g,Ca as k,Eb as s,Gb as E,Oc as S,Sa as p,Ub as f,Vb as D,_c as b,cc as T,eb as w,ga as _,ib as l,jb as v,na as h,oa as C,ua as o,va as m,vb as d,wb as c,xb as y,yb as Y,zb as x}from"./chunk-U4MBKXDU.js";function ee(n,t){if(n&1){let e=g();Y(0),d(1,"mat-date-range-picker-actions")(2,"button",7),D(3,"Cancel"),c(),d(4,"button",8),s("click",function(){o(e);let i=E();return m(i.onSelectDate())}),D(5,"Search"),c()(),x()}}var te={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Z=class n{placeholder;displayToggle;minDate;maxDate;showButtonConfirm=!1;width;dateChange=new k;from;to;fromDateChange(t){if(t){let e=t.toDate();e.setHours(0,0,0,0),this.from=e}}toDateChange(t){if(t){let e=t.toDate();e.setHours(0,0,0,0),this.to=e,this.showButtonConfirm||this.emitDateChange()}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=h({type:n,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",minDate:"minDate",maxDate:"maxDate",showButtonConfirm:"showButtonConfirm",width:"width",from:"from",to:"to"},outputs:{dateChange:"dateChange"},features:[T([{provide:V,useClass:W,deps:[A]},{provide:F,useValue:te}])],decls:8,vars:9,consts:[["picker",""],["appearance","outline",1,"p-0","date-range"],["id","dates",3,"min","max","rangePicker"],["matStartDate","","placeholder","Start date",3,"dateChange","click","value"],["matEndDate","","placeholder","End date",3,"dateChange","click","value"],["matSuffix","",3,"for"],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(e,a){if(e&1){let i=g();d(0,"mat-form-field",1)(1,"mat-date-range-input",2)(2,"input",3),s("dateChange",function(r){return o(i),m(a.fromDateChange(r.value))})("click",function(){o(i);let r=f(6);return m(r.open())}),c(),d(3,"input",4),s("dateChange",function(r){return o(i),m(a.toDateChange(r.value))})("click",function(){o(i);let r=f(6);return m(r.open())}),c()(),y(4,"mat-datepicker-toggle",5),d(5,"mat-date-range-picker",null,0),w(7,ee,6,0,"ng-container",6),c()()}if(e&2){let i=f(6);v("width",a.width||100,"%"),p(),l("min",a.minDate)("max",a.maxDate)("rangePicker",i),p(),l("value",a.from),p(),l("value",a.to),p(),l("for",i),p(3),l("ngIf",a.showButtonConfirm)}},dependencies:[S,H,G,z,q,J,U,Q,K,N,L,P],styles:[`mat-form-field.date-range>div.mat-mdc-form-field-wrapper{padding-bottom:0!important}mat-form-field.date-range .mat-mdc-text-field-wrapper.mdc-text-field{padding-left:14px!important}mat-form-field.date-range .mat-mdc-form-field-icon-prefix{padding:0!important}mat-form-field.date-range .mat-date-range-input-container{margin-top:6px;font-size:11px}mat-form-field.date-range .mat-mdc-form-field-icon-suffix{padding:0!important}
|
|
2
2
|
`],encapsulation:2})},$=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=C({type:n});static \u0275inj=_({providers:[M],imports:[b,I,M,O,X,j,R,B]})};export{Z as a,$ as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-DBT3YELG.js";import{b as m}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-DBT3YELG.js";import{b as m}from"./chunk-JKMQSOWD.js";import{G as s,Od as a,ba as p,fa as n,ia as o}from"./chunk-U4MBKXDU.js";var g=class i{constructor(t,e){this.httpService=t;this.toastr=e}_ignoreWarning=!1;_importResponse;get ignoreWarning(){return this._ignoreWarning}get importResponse(){return this._importResponse}generateFormData(t,e){let r=new FormData;return e&&r.append("Data",e),r.append("File",t),r}onSubmitForm(t,e){return this.httpService.postFormData(`/api/${t}`,e).pipe(p(r=>{this._importResponse=r,this.importResponseHandling(r)}),s(r=>(this._importResponse=r.error,this._ignoreWarning=!1,r)))}import(t){return this.httpService.post(c.ImportProduct,t)}previewImport(t,e){return this.httpService.postFormData(t,e)}importResponseHandling(t){t.Issues?(this.toastr.warning(t.Message,"Warning!"),this._ignoreWarning=!0):(this.toastr.success(t.Message,"Success"),this.importResponse.Issues=[],this._ignoreWarning=!1)}static \u0275fac=function(e){return new(e||i)(o(m),o(a))};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as me,s as ce}from"./chunk-35H53ABM.js";import{a as pe}from"./chunk-DVRJAZ2J.js";import{a as P}from"./chunk-DBT3YELG.js";import{c as de}from"./chunk-YT5REVFM.js";import{a as re,b as ae,c as le}from"./chunk-MK7N2B7O.js";import{T as se,c as te,d as ie}from"./chunk-5IPTS6ES.js";import{e as oe,f as ne}from"./chunk-C64I6KJE.js";import{C as x,D as $,c as H,h as q,i as U,k as K,n as z,o as J,u as Q,v as X,x as Y,y as Z}from"./chunk-YJMA7EY3.js";import{a as S}from"./chunk-C34GKBAP.js";import{b as ee}from"./chunk-UTICPSDU.js";import{$b as g,Bb as G,Eb as M,Gb as I,Lc as R,Nc as B,Oc as A,Sa as s,Ta as w,Ub as y,Vb as u,_c as j,ac as C,bc as b,eb as v,fa as O,fc as f,ga as W,ia as _,ib as l,na as L,oa as F,p as V,r as T,ua as c,va as p,vb as i,wb as o,xb as k}from"./chunk-U4MBKXDU.js";var N=class{Label;Groups;DiscountRate;SalesID;Point;PointUsed;Debt;DebtLimit;ExpiryDate;DueDays;DueMonths;PricebookID;TaxTypeId;NationalIDNumber;MemberIdentification;EntityID;Email;Mobile;Name;LoyaltyEnabled;constructor(){this.Label="",this.Point=0,this.PointUsed=0,this.Debt=0,this.EntityID=S.GuidEmpty,this.DueMonths=0,this.DueDays=0,this.LoyaltyEnabled=!1}};var D=class r{constructor(n,a,e){this.httpService=n;this.LocalData=a;this._onlineStatusService=e}Data=new N;addCustomer(n){let a=[];n.Group&&a.push(n.Group);let e={contact:n,type:"customer",groups:a};if(this._onlineStatusService.isOnline)return V(this.httpService.post("/API/Contact/Create",e)).catch(d=>Promise.reject(d))}findCustomerByCode(n){let a={Code:n};return this.httpService.post("/API/Contact/GetByCode",a)}GetPrivilegeByID(n,a){return this.httpService.get(P.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:a}])}getCustomerSuggestionCode(){return this.httpService.get(P.GetCustomerSuggestionCode).pipe(T(n=>n.Code))}static \u0275fac=function(a){return new(a||r)(_(ee),_(de),_(pe))};static \u0275prov=O({token:r,factory:r.\u0275fac,providedIn:"root"})};var h=r=>({selected:r}),he=r=>({"border border-danger":r}),ue=r=>({"is-invalid border border-danger":r}),be=r=>({"has-error":r});function _e(r,n){if(r&1&&k(0,"option",49),r&2){let a=n.$implicit;l("value",a.Name)}}function we(r,n){if(r&1&&(i(0,"div",50)(1,"i",51),u(2," Name is mandatory."),o()()),r&2){I();let a=y(26);l("ngClass",f(1,be,a.touched&&a.invalid))}}function ve(r,n){if(r&1&&(i(0,"div",50)(1,"i",51),u(2," Mobile is mandatory."),o()()),r&2){I();let a=y(38);l("ngClass",f(1,be,a.invalid))}}var ge=class r{constructor(n,a,e){this.dialogRef=n;this.data=a;this._CustomerHttpService=e;this.modalConfig=new re,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";ngOnInit(){this.customer=new E,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(){let n=this.customer.Title?this.customer.Title:"";n+=" "+this.customer.FirstName,n+=" "+(this.customer.LastName?this.customer.LastName:""),n=n.trim(),this.customer.Name=n,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(a=>{this.dialogRef.close({ContactName:n,CustomerID:a.ID})}).catch(a=>{this.dialogRef.close({Error:a})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return S.IsNotEmpty(n)||n==0}static \u0275fac=function(a){return new(a||r)(w(te),w(ie),w(D))};static \u0275cmp=L({type:r,selectors:[["POS-modal-customer"]],decls:89,vars:56,consts:[["f","ngForm"],["FirstName","ngModel"],["Phone","ngModel"],["Email","ngModel"],[3,"onOk","onCancel","onClose","config","dynamicValidated"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass",4,"ngIf"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["placeholder","Birthday","name","orderDate",3,"dateChange","date"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],["type","text","name","code","id","code","placeholder","Member Code",1,"form-control",3,"ngModelChange","ngModel"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control",3,"ngModelChange","rows","ngModel"],["for","address"],["type","text","id","Identification","name","Identification","placeholder","Identification",1,"form-control",3,"ngModelChange","ngModel"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[3,"value"],[3,"ngClass"],[1,"control-label","text-danger"]],template:function(a,e){if(a&1){let d=G();i(0,"modal-material",4),M("onOk",function(){return c(d),p(e.onOk())})("onCancel",function(){return c(d),p(e.dialogRef.close())})("onClose",function(){return c(d),p(e.dialogRef.close())}),i(1,"content")(2,"div",5)(3,"form",6,0)(5,"div",7)(6,"div")(7,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("general"))}),u(8," General "),o(),i(9,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("detail"))}),u(10," Detail "),o(),i(11,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("id"))}),u(12," ID "),o()()(),i(13,"div")(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"input",13),b("ngModelChange",function(t){return c(d),C(e.customer.Title,t)||(e.customer.Title=t),p(t)}),o(),i(19,"label",14),u(20,"Title"),o(),i(21,"datalist",15),v(22,_e,1,1,"option",16),o()()(),i(23,"div",17)(24,"div",12)(25,"input",18,1),b("ngModelChange",function(t){return c(d),C(e.customer.FirstName,t)||(e.customer.FirstName=t),p(t)}),o(),v(27,we,3,3,"div",19),i(28,"label",20),u(29,"First Name"),o()()(),i(30,"div",17)(31,"div",12)(32,"input",21),b("ngModelChange",function(t){return c(d),C(e.customer.LastName,t)||(e.customer.LastName=t),p(t)}),o(),i(33,"label",22),u(34,"Last Name"),o()()(),i(35,"div",23)(36,"div",12)(37,"input",24,2),b("ngModelChange",function(t){return c(d),C(e.customer.Mobile,t)||(e.customer.Mobile=t),p(t)}),o(),v(39,ve,3,3,"div",19),i(40,"label",25),u(41,"Mobile"),o()()(),i(42,"div",23)(43,"div",12)(44,"input",26,3),b("ngModelChange",function(t){return c(d),C(e.customer.Email,t)||(e.customer.Email=t),p(t)}),o(),i(46,"label",27),u(47,"Email"),o()()(),i(48,"div",28)(49,"div",12)(50,"datepicker",29),b("dateChange",function(t){return c(d),C(e.customer.Birthdate,t)||(e.customer.Birthdate=t),p(t)}),o()()(),i(51,"div",23)(52,"ng-select",30),b("ngModelChange",function(t){return c(d),C(e.customer.Gender,t)||(e.customer.Gender=t),p(t)}),o()()(),i(53,"div",31)(54,"div",32)(55,"div",12)(56,"input",33),b("ngModelChange",function(t){return c(d),C(e.customer.Code,t)||(e.customer.Code=t),p(t)}),o(),i(57,"label",34),u(58,"Member Code"),o()()(),i(59,"div",32)(60,"div",35)(61,"ng-select",36),b("ngModelChange",function(t){return c(d),C(e.customer.Group,t)||(e.customer.Group=t),p(t)}),o(),i(62,"label",37),u(63,"Group"),o()()(),i(64,"div",32)(65,"div",35)(66,"ng-select",38),b("ngModelChange",function(t){return c(d),C(e.customer.City,t)||(e.customer.City=t),p(t)}),o(),i(67,"label",39),u(68,"City"),o()()(),i(69,"div",40)(70,"div",12)(71,"textarea",41),b("ngModelChange",function(t){return c(d),C(e.customer.Address,t)||(e.customer.Address=t),p(t)}),o(),i(72,"label",42),u(73,"Address"),o()()()(),i(74,"div",31)(75,"div",23)(76,"div",12)(77,"input",43),b("ngModelChange",function(t){return c(d),C(e.customer.NationalIDNumber,t)||(e.customer.NationalIDNumber=t),p(t)}),o(),i(78,"label",44),u(79,"National ID"),o()()(),i(80,"div",23)(81,"div",12)(82,"input",45),b("ngModelChange",function(t){return c(d),C(e.customer.TaxIDNumber,t)||(e.customer.TaxIDNumber=t),p(t)}),o(),i(83,"label",46),u(84,"Tax ID"),o()()(),i(85,"div",23)(86,"ng-select",47),b("ngModelChange",function(t){return c(d),C(e.customer.NationalityID,t)||(e.customer.NationalityID=t),p(t)}),o()(),i(87,"div",28)(88,"ng-select",48),b("ngModelChange",function(t){return c(d),C(e.customer.RaceID,t)||(e.customer.RaceID=t),p(t)}),o()()()()()()()()()}if(a&2){let d=y(4),m=y(26),t=y(38),fe=y(45);l("config",e.modalConfig)("dynamicValidated",d.valid),s(7),l("ngClass",f(40,h,e.tabState=="general")),s(2),l("ngClass",f(42,h,e.tabState=="detail")),s(2),l("ngClass",f(44,h,e.tabState=="id")),s(4),l("hidden",e.tabState!="general"),s(3),g("ngModel",e.customer.Title),s(4),l("ngForOf",e.options==null?null:e.options.Titles),s(3),l("ngClass",f(46,he,m.touched&&m.invalid)),g("ngModel",e.customer.FirstName),l("required",!0),s(2),l("ngIf",m.touched&&m.invalid),s(5),g("ngModel",e.customer.LastName),s(5),l("ngClass",f(48,ue,t.invalid)),g("ngModel",e.customer.Mobile),l("required",e.config.Advance.RequireContactMobile),s(2),l("ngIf",t.invalid),s(5),l("ngClass",f(50,ue,fe.invalid)),g("ngModel",e.customer.Email),l("required",e.config.Advance.RequireEmailActivation),s(6),g("date",e.customer.Birthdate),s(2),g("ngModel",e.customer.Gender),l("items",e.options==null?null:e.options.Genders),s(),l("hidden",e.tabState!="detail"),s(3),g("ngModel",e.customer.Code),s(4),l("ngClass",f(52,h,e.isNotEmpty(e.customer.Group))),s(),g("ngModel",e.customer.Group),l("items",e.options==null?null:e.options.Groups),s(4),l("ngClass",f(54,h,e.isNotEmpty(e.customer.City))),s(),g("ngModel",e.customer.City),l("items",e.options==null?null:e.options.Cities),s(5),l("rows",6),g("ngModel",e.customer.Address),s(3),l("hidden",e.tabState!="id"),s(3),g("ngModel",e.customer.NationalIDNumber),s(5),g("ngModel",e.customer.TaxIDNumber),s(4),g("ngModel",e.customer.NationalityID),l("items",e.options==null?null:e.options.Nationalities),s(2),g("ngModel",e.customer.RaceID),l("items",e.options==null?null:e.options.Races)}},dependencies:[R,B,A,ae,J,Q,X,H,q,U,Y,Z,z,K,me,oe],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Ce=class r{static \u0275fac=function(a){return new(a||r)};static \u0275mod=F({type:r});static \u0275inj=W({imports:[j,se,le,x,$,ce,ne]})},E=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{N as a,D as b,ge as c,Ce as d,E as e};
|
|
1
|
+
import{r as me,s as ce}from"./chunk-TDKWBH7Q.js";import{a as pe}from"./chunk-WOI6VORS.js";import{a as P}from"./chunk-DBT3YELG.js";import{c as de}from"./chunk-KOA5T4NW.js";import{a as re,b as ae,c as le}from"./chunk-MK7N2B7O.js";import{T as se,c as te,d as ie}from"./chunk-5IPTS6ES.js";import{e as oe,f as ne}from"./chunk-C64I6KJE.js";import{C as x,D as $,c as H,h as q,i as U,k as K,n as z,o as J,u as Q,v as X,x as Y,y as Z}from"./chunk-YJMA7EY3.js";import{a as S}from"./chunk-C34GKBAP.js";import{b as ee}from"./chunk-JKMQSOWD.js";import{$b as g,Bb as G,Eb as M,Gb as I,Lc as R,Nc as B,Oc as A,Sa as s,Ta as w,Ub as y,Vb as u,_c as j,ac as C,bc as b,eb as v,fa as O,fc as f,ga as W,ia as _,ib as l,na as L,oa as F,p as V,r as T,ua as c,va as p,vb as i,wb as o,xb as k}from"./chunk-U4MBKXDU.js";var N=class{Label;Groups;DiscountRate;SalesID;Point;PointUsed;Debt;DebtLimit;ExpiryDate;DueDays;DueMonths;PricebookID;TaxTypeId;NationalIDNumber;MemberIdentification;EntityID;Email;Mobile;Name;LoyaltyEnabled;constructor(){this.Label="",this.Point=0,this.PointUsed=0,this.Debt=0,this.EntityID=S.GuidEmpty,this.DueMonths=0,this.DueDays=0,this.LoyaltyEnabled=!1}};var D=class r{constructor(n,a,e){this.httpService=n;this.LocalData=a;this._onlineStatusService=e}Data=new N;addCustomer(n){let a=[];n.Group&&a.push(n.Group);let e={contact:n,type:"customer",groups:a};if(this._onlineStatusService.isOnline)return V(this.httpService.post("/API/Contact/Create",e)).catch(d=>Promise.reject(d))}findCustomerByCode(n){let a={Code:n};return this.httpService.post("/API/Contact/GetByCode",a)}GetPrivilegeByID(n,a){return this.httpService.get(P.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:a}])}getCustomerSuggestionCode(){return this.httpService.get(P.GetCustomerSuggestionCode).pipe(T(n=>n.Code))}static \u0275fac=function(a){return new(a||r)(_(ee),_(de),_(pe))};static \u0275prov=O({token:r,factory:r.\u0275fac,providedIn:"root"})};var h=r=>({selected:r}),he=r=>({"border border-danger":r}),ue=r=>({"is-invalid border border-danger":r}),be=r=>({"has-error":r});function _e(r,n){if(r&1&&k(0,"option",49),r&2){let a=n.$implicit;l("value",a.Name)}}function we(r,n){if(r&1&&(i(0,"div",50)(1,"i",51),u(2," Name is mandatory."),o()()),r&2){I();let a=y(26);l("ngClass",f(1,be,a.touched&&a.invalid))}}function ve(r,n){if(r&1&&(i(0,"div",50)(1,"i",51),u(2," Mobile is mandatory."),o()()),r&2){I();let a=y(38);l("ngClass",f(1,be,a.invalid))}}var ge=class r{constructor(n,a,e){this.dialogRef=n;this.data=a;this._CustomerHttpService=e;this.modalConfig=new re,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";ngOnInit(){this.customer=new E,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(){let n=this.customer.Title?this.customer.Title:"";n+=" "+this.customer.FirstName,n+=" "+(this.customer.LastName?this.customer.LastName:""),n=n.trim(),this.customer.Name=n,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(a=>{this.dialogRef.close({ContactName:n,CustomerID:a.ID})}).catch(a=>{this.dialogRef.close({Error:a})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return S.IsNotEmpty(n)||n==0}static \u0275fac=function(a){return new(a||r)(w(te),w(ie),w(D))};static \u0275cmp=L({type:r,selectors:[["POS-modal-customer"]],decls:89,vars:56,consts:[["f","ngForm"],["FirstName","ngModel"],["Phone","ngModel"],["Email","ngModel"],[3,"onOk","onCancel","onClose","config","dynamicValidated"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass",4,"ngIf"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["placeholder","Birthday","name","orderDate",3,"dateChange","date"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],["type","text","name","code","id","code","placeholder","Member Code",1,"form-control",3,"ngModelChange","ngModel"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control",3,"ngModelChange","rows","ngModel"],["for","address"],["type","text","id","Identification","name","Identification","placeholder","Identification",1,"form-control",3,"ngModelChange","ngModel"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[3,"value"],[3,"ngClass"],[1,"control-label","text-danger"]],template:function(a,e){if(a&1){let d=G();i(0,"modal-material",4),M("onOk",function(){return c(d),p(e.onOk())})("onCancel",function(){return c(d),p(e.dialogRef.close())})("onClose",function(){return c(d),p(e.dialogRef.close())}),i(1,"content")(2,"div",5)(3,"form",6,0)(5,"div",7)(6,"div")(7,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("general"))}),u(8," General "),o(),i(9,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("detail"))}),u(10," Detail "),o(),i(11,"a",8),M("click",function(){return c(d),p(e.chooiceDetail("id"))}),u(12," ID "),o()()(),i(13,"div")(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"input",13),b("ngModelChange",function(t){return c(d),C(e.customer.Title,t)||(e.customer.Title=t),p(t)}),o(),i(19,"label",14),u(20,"Title"),o(),i(21,"datalist",15),v(22,_e,1,1,"option",16),o()()(),i(23,"div",17)(24,"div",12)(25,"input",18,1),b("ngModelChange",function(t){return c(d),C(e.customer.FirstName,t)||(e.customer.FirstName=t),p(t)}),o(),v(27,we,3,3,"div",19),i(28,"label",20),u(29,"First Name"),o()()(),i(30,"div",17)(31,"div",12)(32,"input",21),b("ngModelChange",function(t){return c(d),C(e.customer.LastName,t)||(e.customer.LastName=t),p(t)}),o(),i(33,"label",22),u(34,"Last Name"),o()()(),i(35,"div",23)(36,"div",12)(37,"input",24,2),b("ngModelChange",function(t){return c(d),C(e.customer.Mobile,t)||(e.customer.Mobile=t),p(t)}),o(),v(39,ve,3,3,"div",19),i(40,"label",25),u(41,"Mobile"),o()()(),i(42,"div",23)(43,"div",12)(44,"input",26,3),b("ngModelChange",function(t){return c(d),C(e.customer.Email,t)||(e.customer.Email=t),p(t)}),o(),i(46,"label",27),u(47,"Email"),o()()(),i(48,"div",28)(49,"div",12)(50,"datepicker",29),b("dateChange",function(t){return c(d),C(e.customer.Birthdate,t)||(e.customer.Birthdate=t),p(t)}),o()()(),i(51,"div",23)(52,"ng-select",30),b("ngModelChange",function(t){return c(d),C(e.customer.Gender,t)||(e.customer.Gender=t),p(t)}),o()()(),i(53,"div",31)(54,"div",32)(55,"div",12)(56,"input",33),b("ngModelChange",function(t){return c(d),C(e.customer.Code,t)||(e.customer.Code=t),p(t)}),o(),i(57,"label",34),u(58,"Member Code"),o()()(),i(59,"div",32)(60,"div",35)(61,"ng-select",36),b("ngModelChange",function(t){return c(d),C(e.customer.Group,t)||(e.customer.Group=t),p(t)}),o(),i(62,"label",37),u(63,"Group"),o()()(),i(64,"div",32)(65,"div",35)(66,"ng-select",38),b("ngModelChange",function(t){return c(d),C(e.customer.City,t)||(e.customer.City=t),p(t)}),o(),i(67,"label",39),u(68,"City"),o()()(),i(69,"div",40)(70,"div",12)(71,"textarea",41),b("ngModelChange",function(t){return c(d),C(e.customer.Address,t)||(e.customer.Address=t),p(t)}),o(),i(72,"label",42),u(73,"Address"),o()()()(),i(74,"div",31)(75,"div",23)(76,"div",12)(77,"input",43),b("ngModelChange",function(t){return c(d),C(e.customer.NationalIDNumber,t)||(e.customer.NationalIDNumber=t),p(t)}),o(),i(78,"label",44),u(79,"National ID"),o()()(),i(80,"div",23)(81,"div",12)(82,"input",45),b("ngModelChange",function(t){return c(d),C(e.customer.TaxIDNumber,t)||(e.customer.TaxIDNumber=t),p(t)}),o(),i(83,"label",46),u(84,"Tax ID"),o()()(),i(85,"div",23)(86,"ng-select",47),b("ngModelChange",function(t){return c(d),C(e.customer.NationalityID,t)||(e.customer.NationalityID=t),p(t)}),o()(),i(87,"div",28)(88,"ng-select",48),b("ngModelChange",function(t){return c(d),C(e.customer.RaceID,t)||(e.customer.RaceID=t),p(t)}),o()()()()()()()()()}if(a&2){let d=y(4),m=y(26),t=y(38),fe=y(45);l("config",e.modalConfig)("dynamicValidated",d.valid),s(7),l("ngClass",f(40,h,e.tabState=="general")),s(2),l("ngClass",f(42,h,e.tabState=="detail")),s(2),l("ngClass",f(44,h,e.tabState=="id")),s(4),l("hidden",e.tabState!="general"),s(3),g("ngModel",e.customer.Title),s(4),l("ngForOf",e.options==null?null:e.options.Titles),s(3),l("ngClass",f(46,he,m.touched&&m.invalid)),g("ngModel",e.customer.FirstName),l("required",!0),s(2),l("ngIf",m.touched&&m.invalid),s(5),g("ngModel",e.customer.LastName),s(5),l("ngClass",f(48,ue,t.invalid)),g("ngModel",e.customer.Mobile),l("required",e.config.Advance.RequireContactMobile),s(2),l("ngIf",t.invalid),s(5),l("ngClass",f(50,ue,fe.invalid)),g("ngModel",e.customer.Email),l("required",e.config.Advance.RequireEmailActivation),s(6),g("date",e.customer.Birthdate),s(2),g("ngModel",e.customer.Gender),l("items",e.options==null?null:e.options.Genders),s(),l("hidden",e.tabState!="detail"),s(3),g("ngModel",e.customer.Code),s(4),l("ngClass",f(52,h,e.isNotEmpty(e.customer.Group))),s(),g("ngModel",e.customer.Group),l("items",e.options==null?null:e.options.Groups),s(4),l("ngClass",f(54,h,e.isNotEmpty(e.customer.City))),s(),g("ngModel",e.customer.City),l("items",e.options==null?null:e.options.Cities),s(5),l("rows",6),g("ngModel",e.customer.Address),s(3),l("hidden",e.tabState!="id"),s(3),g("ngModel",e.customer.NationalIDNumber),s(5),g("ngModel",e.customer.TaxIDNumber),s(4),g("ngModel",e.customer.NationalityID),l("items",e.options==null?null:e.options.Nationalities),s(2),g("ngModel",e.customer.RaceID),l("items",e.options==null?null:e.options.Races)}},dependencies:[R,B,A,ae,J,Q,X,H,q,U,Y,Z,z,K,me,oe],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Ce=class r{static \u0275fac=function(a){return new(a||r)};static \u0275mod=F({type:r});static \u0275inj=W({imports:[j,se,le,x,$,ce,ne]})},E=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{N as a,D as b,ge as c,Ce as d,E as e};
|