dealpos 25.46.1 → 25.46.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/browser/{chunk-4JAEMXSQ.js → chunk-2E4N3RZU.js} +1 -1
- package/browser/{chunk-PGCDKIOX.js → chunk-374PEHK3.js} +1 -1
- package/browser/{chunk-V77HSR6D.js → chunk-3BRM3TED.js} +1 -1
- package/browser/chunk-3GPGJFQV.js +1 -0
- package/browser/{chunk-UF4JB7JY.js → chunk-3JKK7ROI.js} +1 -1
- package/browser/{chunk-IR7BRACV.js → chunk-475JSTPA.js} +1 -1
- package/browser/{chunk-LKMXVSXC.js → chunk-4ZWIQZYV.js} +8 -8
- package/browser/{chunk-2BOU7MZT.js → chunk-56D7QEFP.js} +1 -1
- package/browser/chunk-5TOXPQJI.js +16 -0
- package/browser/chunk-66MCBKC7.js +1 -0
- package/browser/{chunk-ZOP4QRJ5.js → chunk-6FM7DAHK.js} +1 -1
- package/browser/chunk-7QGORD2Z.js +2 -0
- package/browser/{chunk-5NDXC2Q2.js → chunk-B3JWFPWO.js} +1 -1
- package/browser/{chunk-YII66PEK.js → chunk-BLG3XERH.js} +1 -1
- package/browser/{chunk-JO2HRK4G.js → chunk-BR3Y2C2F.js} +1 -1
- package/browser/{chunk-HC2WTBU3.js → chunk-C56YPV2G.js} +2 -2
- package/browser/{chunk-PCBQ5MJX.js → chunk-CGISR53W.js} +1 -1
- package/browser/chunk-CLJWABT2.js +4 -0
- package/browser/{chunk-SUIJKKNU.js → chunk-CM7Z6YFA.js} +1 -1
- package/browser/{chunk-4PALKQ75.js → chunk-DGXQDOCM.js} +1 -1
- package/browser/{chunk-H6OK7AN4.js → chunk-DJAISUEF.js} +1 -1
- package/browser/chunk-DLNZDHGS.js +1 -0
- package/browser/{chunk-5KZDUBOJ.js → chunk-ED4WZKA6.js} +1 -1
- package/browser/{chunk-NCBSJKWK.js → chunk-EMJ7V5XH.js} +2 -2
- package/browser/{chunk-ZNSETEMV.js → chunk-F53OD5V2.js} +1 -1
- package/browser/{chunk-NORSMLUM.js → chunk-FNQCKGUC.js} +1 -1
- package/browser/{chunk-R4H3DENZ.js → chunk-FX72NG5O.js} +1 -1
- package/browser/{chunk-DX24F37F.js → chunk-GM6P3WGI.js} +1 -1
- package/browser/{chunk-QQS5ITUF.js → chunk-GMPJ72LI.js} +1 -1
- package/browser/{chunk-34YS4QAG.js → chunk-GNODCFOP.js} +1 -1
- package/browser/chunk-GSFXKVGZ.js +1 -0
- package/browser/{chunk-EWDEAX6M.js → chunk-HIOIFMAE.js} +1 -1
- package/browser/{chunk-6SFTCH6L.js → chunk-HLNB2PE4.js} +1 -1
- package/browser/{chunk-HZQHCXRX.js → chunk-HOBU2OAG.js} +1 -1
- package/browser/{chunk-FV5QAPSD.js → chunk-HYCJCA6A.js} +1 -1
- package/browser/{chunk-QCWVOQ4U.js → chunk-HYCSLDMX.js} +1 -1
- package/browser/chunk-IFOBYW26.js +1 -0
- package/browser/chunk-IGKZJP6R.js +1 -0
- package/browser/{chunk-JGVE3GME.js → chunk-IKA5TDNG.js} +1 -1
- package/browser/{chunk-MJMWJ6KM.js → chunk-ILIZ5NZH.js} +3 -3
- package/browser/{chunk-4UXONUIZ.js → chunk-IMST27WS.js} +1 -1
- package/browser/{chunk-DMQGQTA7.js → chunk-IRDKCXB2.js} +1 -1
- package/browser/{chunk-LKBRVKIZ.js → chunk-JT3HOWQH.js} +10 -10
- package/browser/{chunk-U5KSGGL5.js → chunk-JVFZL3LP.js} +1 -1
- package/browser/{chunk-QIHNG7HJ.js → chunk-KA4G654J.js} +1 -1
- package/browser/{chunk-FHI2YRID.js → chunk-KJLTTTEY.js} +1 -1
- package/browser/{chunk-3KHAUY4Q.js → chunk-KP7OGAMJ.js} +1 -1
- package/browser/{chunk-XNJI57TR.js → chunk-KPVGNOMG.js} +1 -1
- package/browser/{chunk-56HGOK5G.js → chunk-L424UWKA.js} +2 -2
- package/browser/{chunk-IMSP4CUG.js → chunk-L5GSB3ZX.js} +1 -1
- package/browser/{chunk-L75QJKLP.js → chunk-L5ZIS7CJ.js} +1 -1
- package/browser/{chunk-PTLVRO2T.js → chunk-LBXJVRAT.js} +1 -1
- package/browser/{chunk-7JXTBPO6.js → chunk-LK7UQBXO.js} +1 -1
- package/browser/{chunk-Q45XVCPE.js → chunk-LUWTRLMM.js} +1 -1
- package/browser/{chunk-EOQ6TLK6.js → chunk-MD6WWBSZ.js} +1 -1
- package/browser/{chunk-B4CTAXRS.js → chunk-MFBHQLLO.js} +1 -1
- package/browser/{chunk-Q3MH2WHW.js → chunk-MIENCGCQ.js} +1 -1
- package/browser/{chunk-T6SKNBS4.js → chunk-MJIPNN7A.js} +1 -1
- package/browser/{chunk-5UZJWGXF.js → chunk-N6ZNENQU.js} +2 -2
- package/browser/{chunk-F464PNNI.js → chunk-NFFC4KSY.js} +1 -1
- package/browser/{chunk-HUQCWL5X.js → chunk-NMOQIXVY.js} +1 -1
- package/browser/{chunk-MRLNJIME.js → chunk-NQ3LNNVL.js} +1 -1
- package/browser/{chunk-GJZAWVWD.js → chunk-O2K56L4P.js} +1 -1
- package/browser/{chunk-T475ZPAG.js → chunk-O4AM5O5P.js} +16 -16
- package/browser/chunk-ON47ICI3.js +1 -0
- package/browser/{chunk-F7J5TUAB.js → chunk-OQI66KFN.js} +2 -2
- package/browser/{chunk-TXTD756I.js → chunk-OR7B4MQC.js} +1 -1
- package/browser/chunk-P5CBDXUP.js +1 -0
- package/browser/{chunk-K4BVYUUE.js → chunk-PKIK7U7Z.js} +1 -1
- package/browser/{chunk-FDKCQIES.js → chunk-PO6OVC5B.js} +1 -1
- package/browser/chunk-QAQYVKMI.js +24 -0
- package/browser/{chunk-YGE2LJY6.js → chunk-QPN54ILN.js} +1 -1
- package/browser/{chunk-CB4INKRH.js → chunk-QZK5TM5O.js} +1 -1
- package/browser/{chunk-RNEHGC5X.js → chunk-S7N22G4D.js} +1 -1
- package/browser/{chunk-TCCZCKU3.js → chunk-SFQX5FUP.js} +1 -1
- package/browser/chunk-SVAXS2TA.js +1 -0
- package/browser/chunk-TDZ2L7GX.js +1 -0
- package/browser/{chunk-GEGFHXYS.js → chunk-TH6BQXNM.js} +1 -1
- package/browser/{chunk-6CFANTH2.js → chunk-TVWGXKBN.js} +1 -1
- package/browser/{chunk-25YHVZV6.js → chunk-TVZ622KQ.js} +1 -1
- package/browser/{chunk-JBA2HEME.js → chunk-U3B2DTPX.js} +1 -1
- package/browser/{chunk-X4NTI6VE.js → chunk-UDWVWF7E.js} +1 -1
- package/browser/chunk-UPV6MUOR.js +1 -0
- package/browser/chunk-UWWB4ON7.js +1 -0
- package/browser/chunk-VWOX66SZ.js +3 -0
- package/browser/{chunk-2YRHUGAG.js → chunk-WOAUMRNS.js} +2 -2
- package/browser/{chunk-IDKR4Z5E.js → chunk-WRVMZNGD.js} +1 -1
- package/browser/chunk-YEV6AJC2.js +1 -0
- package/browser/chunk-YV6MAUKK.js +1 -0
- package/browser/{chunk-U35DBD6P.js → chunk-ZK32OWP6.js} +1 -1
- package/browser/{chunk-SCBXIGUC.js → chunk-ZVBZGOUU.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/main-ICSDESMZ.js +3 -0
- package/package.json +1 -1
- package/browser/chunk-2WXO2CVP.js +0 -1
- package/browser/chunk-3EJP6UEJ.js +0 -3
- package/browser/chunk-7GUNPVLF.js +0 -1
- package/browser/chunk-AKU4AVU5.js +0 -16
- package/browser/chunk-BNFYSCGM.js +0 -1
- package/browser/chunk-FR3YFIOJ.js +0 -1
- package/browser/chunk-GVPC56QQ.js +0 -4
- package/browser/chunk-J4TPORWI.js +0 -1
- package/browser/chunk-K6ZANPDY.js +0 -1
- package/browser/chunk-LDALTRKQ.js +0 -2
- package/browser/chunk-LEGL2HWF.js +0 -1
- package/browser/chunk-LR6FISWP.js +0 -1
- package/browser/chunk-NA5O2ACR.js +0 -24
- package/browser/chunk-QBUTQU3U.js +0 -1
- package/browser/chunk-TCKWGMV7.js +0 -1
- package/browser/chunk-VV564BYL.js +0 -1
- package/browser/chunk-VVRBBTBO.js +0 -1
- package/browser/chunk-XVDRWDA2.js +0 -1
- package/browser/chunk-YFKW562E.js +0 -1
- package/browser/main-VEM3F6IE.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne}from"./chunk-LEGL2HWF.js";import{d as Se,e as xe}from"./chunk-SO4GMA3Y.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-QZMZBCE7.js";import{N as we,O as q}from"./chunk-NZYZO47Z.js";import{d as R}from"./chunk-7TBS7SPQ.js";import{e as be,f as he}from"./chunk-A45GTZVV.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-RNLSEEMX.js";import{a as ne}from"./chunk-USJ6ILEE.js";import{$ as K,A as k,Ab as Z,Bb as $,Ca as J,Cb as c,D as U,Db as d,Eb as l,Fb as ee,Mb as v,Ob as O,Qb as g,Xa as a,_b as M,be as oe,cd as te,db as P,dc as m,e as j,ee as _e,fc as x,hb as Q,ib as X,ic as _,jc as b,kc as h,la as E,ma as z,oa as S,pc as B,q as A,rd as ie,t as w,ta as u,u as H,ua as p,uc as y,vb as C,xb as f,zb as Y}from"./chunk-JYZTRN6N.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"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"],[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"],["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","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["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"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["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"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["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"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.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-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.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}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
|
|
1
|
+
import{a as Ne}from"./chunk-IFOBYW26.js";import{d as Se,e as xe}from"./chunk-SO4GMA3Y.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-QZMZBCE7.js";import{N as we,O as q}from"./chunk-NZYZO47Z.js";import{d as R}from"./chunk-7TBS7SPQ.js";import{e as be,f as he}from"./chunk-A45GTZVV.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-RNLSEEMX.js";import{a as ne}from"./chunk-USJ6ILEE.js";import{$ as K,A as k,Ab as Z,Bb as $,Ca as J,Cb as c,D as U,Db as d,Eb as l,Fb as ee,Mb as v,Ob as O,Qb as g,Xa as a,_b as M,be as oe,cd as te,db as P,dc as m,e as j,ee as _e,fc as x,hb as Q,ib as X,ic as _,jc as b,kc as h,la as E,ma as z,oa as S,pc as B,q as A,rd as ie,t as w,ta as u,u as H,ua as p,uc as y,vb as C,xb as f,zb as Y}from"./chunk-JYZTRN6N.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"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"],[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"],["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","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["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"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["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"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["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"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.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-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.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}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
|