dealpos 25.40.0 → 25.40.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-3JE7W7SE.js → chunk-2U2JYZ76.js} +1 -1
- package/browser/{chunk-YHUI7RQU.js → chunk-2VDAFJY7.js} +1 -1
- package/browser/{chunk-635ZDHSK.js → chunk-45OAODEJ.js} +2 -2
- package/browser/{chunk-SAMB3PL6.js → chunk-4LSMOT7D.js} +2 -2
- package/browser/{chunk-75GCAMUG.js → chunk-53QBOLTA.js} +1 -1
- package/browser/{chunk-GVBPGOE7.js → chunk-5A5UJCA3.js} +1 -1
- package/browser/{chunk-QNTE2LGU.js → chunk-5DNCP5FC.js} +1 -1
- package/browser/{chunk-WNN2QQ2E.js → chunk-5JB63L7E.js} +1 -1
- package/browser/{chunk-QVS25HHW.js → chunk-5MB35RTV.js} +1 -1
- package/browser/{chunk-T66DKYFZ.js → chunk-5SSHZYTK.js} +1 -1
- package/browser/{chunk-HQQ77WPJ.js → chunk-5UKMHAPS.js} +1 -1
- package/browser/{chunk-YAT62P4U.js → chunk-6MBVF5PK.js} +3 -3
- package/browser/chunk-6UVOVZTG.js +112 -0
- package/browser/{chunk-JHXGTHND.js → chunk-7XCJGHOF.js} +1 -1
- package/browser/{chunk-F3TAAANQ.js → chunk-7YRIEIEL.js} +1 -1
- package/browser/{chunk-PO6IBZGK.js → chunk-AB7FXZGQ.js} +1 -1
- package/browser/{chunk-DNYXHG4D.js → chunk-AIWMAX5H.js} +1 -1
- package/browser/{chunk-IBBZCB6S.js → chunk-ARPTC7FZ.js} +1 -1
- package/browser/{chunk-MBJEISU5.js → chunk-AWEVLUH4.js} +1 -1
- package/browser/{chunk-YBAZUK5O.js → chunk-BO5RZFDE.js} +1 -1
- package/browser/{chunk-C74OK6IO.js → chunk-CSH47SQR.js} +2 -2
- package/browser/{chunk-TF5EIKOX.js → chunk-DCFP5QGY.js} +1 -1
- package/browser/{chunk-HF4JUBJ3.js → chunk-DIYOL4ZX.js} +1 -1
- package/browser/{chunk-FF3AT4ZZ.js → chunk-DLVA7JPN.js} +1 -1
- package/browser/{chunk-KISK5Y3K.js → chunk-E3OGY6ES.js} +1 -1
- package/browser/{chunk-GFJRKEBT.js → chunk-ECGRTGGV.js} +1 -1
- package/browser/{chunk-DL2KKY4K.js → chunk-ELMKQ62C.js} +1 -1
- package/browser/{chunk-FQDWWSFZ.js → chunk-ENLZCSWK.js} +1 -1
- package/browser/{chunk-V5YHCHGS.js → chunk-FDV5CP2Q.js} +1 -1
- package/browser/{chunk-PO6NDTPF.js → chunk-FLA5R3YT.js} +1 -1
- package/browser/{chunk-D2FDNKXB.js → chunk-FPUXX3LP.js} +1 -1
- package/browser/{chunk-FG7XUKIO.js → chunk-FVQ5OKEX.js} +1 -1
- package/browser/{chunk-KAILKU7Z.js → chunk-G2IRE4PI.js} +1 -1
- package/browser/{chunk-FMUENILI.js → chunk-IK57DV5O.js} +1 -1
- package/browser/{chunk-WRBL5J73.js → chunk-IP6QBHGH.js} +2 -2
- package/browser/{chunk-E7AAHH2H.js → chunk-IVT2LRG6.js} +13 -13
- package/browser/{chunk-6WKS4NBT.js → chunk-J5VIKO3U.js} +1 -1
- package/browser/{chunk-4VQB3RCY.js → chunk-JGKII6F2.js} +1 -1
- package/browser/{chunk-26RUS7IT.js → chunk-KFPPOQTN.js} +2 -2
- package/browser/{chunk-GIEZY27V.js → chunk-KUYSSX54.js} +1 -1
- package/browser/{chunk-SZGPES6H.js → chunk-L4YRSIVP.js} +1 -1
- package/browser/{chunk-NZDREZVN.js → chunk-LGCPZ7ZC.js} +1 -1
- package/browser/{chunk-SSVZIUYC.js → chunk-LWQPQ3JP.js} +1 -1
- package/browser/{chunk-2FQZ67ZX.js → chunk-M37QLVGO.js} +2 -2
- package/browser/{chunk-4ZNRLNQI.js → chunk-MB3355JD.js} +1 -1
- package/browser/{chunk-IMLG5BJ7.js → chunk-NC4J2MQI.js} +1 -1
- package/browser/{chunk-2S3RIVNA.js → chunk-O3CGA22W.js} +1 -1
- package/browser/chunk-OKMUB3IV.js +1 -0
- package/browser/{chunk-R7LAPYIP.js → chunk-P3P25EOJ.js} +1 -1
- package/browser/{chunk-AK4ZY2E5.js → chunk-P4TN4CJP.js} +1 -1
- package/browser/{chunk-5QW6ZGAI.js → chunk-QRBKKDQD.js} +1 -1
- package/browser/{chunk-DDK45GSM.js → chunk-R37DRT32.js} +1 -1
- package/browser/{chunk-FMGNA4IZ.js → chunk-RJFQ65N4.js} +2 -2
- package/browser/{chunk-M2BWMQEH.js → chunk-RML6TDRD.js} +1 -1
- package/browser/{chunk-MS5DBZJS.js → chunk-TBACZZO3.js} +1 -1
- package/browser/{chunk-ADURXNZF.js → chunk-TJTZCCBT.js} +1 -1
- package/browser/{chunk-CDW6OCYP.js → chunk-TXSBSJRQ.js} +1 -1
- package/browser/{chunk-XFUISODZ.js → chunk-TZATTV7L.js} +1 -1
- package/browser/{chunk-E55NVZSM.js → chunk-TZSF5N2H.js} +1 -1
- package/browser/{chunk-FXSXZS6W.js → chunk-UTUWSXWI.js} +1 -1
- package/browser/{chunk-3VVEN3CF.js → chunk-UV5IDNL4.js} +1 -1
- package/browser/{chunk-GSZX7WS2.js → chunk-VAIGUQRA.js} +1 -1
- package/browser/{chunk-NRCWDBAJ.js → chunk-VBMJL2DU.js} +1 -1
- package/browser/{chunk-JGWDQEEO.js → chunk-VDL2LTQ4.js} +1 -1
- package/browser/{chunk-YZLZXXPA.js → chunk-W2RTV2OX.js} +1 -1
- package/browser/{chunk-LUTFUKOO.js → chunk-XDVE4QHG.js} +1 -1
- package/browser/{chunk-CWVLKA3Y.js → chunk-XH6XJ3KM.js} +1 -1
- package/browser/{chunk-RWU6A6Q3.js → chunk-XI5VA4B3.js} +3 -3
- package/browser/{chunk-BS5CESBY.js → chunk-XINIQJMX.js} +1 -1
- package/browser/{chunk-BAOWCY34.js → chunk-XSODSITQ.js} +1 -1
- package/browser/{chunk-SF3HNXGC.js → chunk-XUZNEAQL.js} +1 -1
- package/browser/{chunk-GXTAGWTL.js → chunk-YGN464UA.js} +1 -1
- package/browser/{chunk-3VCFKFUX.js → chunk-YYIP7MBV.js} +1 -1
- package/browser/{chunk-WEKOCTBY.js → chunk-ZBF3KNJZ.js} +1 -1
- package/browser/chunk-ZFRM7OST.js +1 -0
- package/browser/{chunk-GFRO6FJS.js → chunk-ZOS6KCAU.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-PULVISV3.js → main-7F6JKYCX.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-CGF5Z4D5.js +0 -1
- package/browser/chunk-GMN3233I.js +0 -1
- package/browser/chunk-UH3YL7ES.js +0 -112
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as de}from"./chunk-
|
|
1
|
+
import{a as de}from"./chunk-5MB35RTV.js";import{d as me,e as se}from"./chunk-FDV5CP2Q.js";import"./chunk-DCFP5QGY.js";import{b as le}from"./chunk-BO5RZFDE.js";import"./chunk-OI2RWAOV.js";import"./chunk-7LXPGNYF.js";import{u as ae,v as ne,w as re}from"./chunk-B4IX7BMU.js";import"./chunk-XOQ4SW2R.js";import"./chunk-A7ZWFYP4.js";import{e as te,f as ie,g as oe}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-T2PMKO3M.js";import{a as ee}from"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{A as Q,E as X,F as Z,c as G,h as z,o as J}from"./chunk-CB33ZMNF.js";import"./chunk-ZOS6KCAU.js";import"./chunk-FVQ5OKEX.js";import{a as W}from"./chunk-TKBUOGER.js";import"./chunk-KUYSSX54.js";import{$a as m,Ac as B,Db as F,E as A,Ib as o,Jb as a,Kb as w,Lb as T,Ma as Y,Mb as g,Ob as y,Od as H,Qb as _,Rb as u,Vd as q,Wc as U,Yc as j,Yd as $,Zc as v,db as f,dc as O,ec as r,fc as R,gc as x,gd as K,jc as E,jd as h,kb as b,kc as M,lc as P,ob as L,qb as S,rc as D,va as d,vb as c,wa as p,zc as k}from"./chunk-DJOHANFC.js";import"./chunk-7DCB7DB2.js";var I=(s=>(s.TRANSACTIONS="TRANSACTIONS",s.PRODUCTS="PRODUCTS",s.CONTACTS="CONTACTS",s.LOYALTY_POINTS="LOYALTY_POINTS",s.RECYCLE_BIN="RECYCLE_BIN",s.INVENTORY="INVENTORY",s))(I||{});function _e(n,l){if(n&1&&(T(0),o(1,"div",4)(2,"div",5)(3,"div",16),w(4,"i",17),o(5,"span"),r(6),a()()()(),g()),n&2){let i=u();m(6),x(" ",i.selectedClearData.message," ")}}function Se(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Subdomain is required "),a(),g())}function Te(n,l){n&1&&(T(0),o(1,"small",18),r(2," *Password is required "),a(),g())}function ge(n,l){n&1&&w(0,"i",14)}function be(n,l){n&1&&w(0,"i",15)}var N=class n{constructor(l,i,t){this.data=l;this.dialogRef=i;this.fb=t;this.modalConfig.title=this.modalTitle[this.data.type],this.subdomain="",this.subdomainPlaceholder=l.subDomain}clearData=[{type:"TRANSACTIONS",api:"Setup/Data/ClearTransaction",message:"Your Invoice, Bill, Adjustment, TransferOrder will be deleted"},{type:"PRODUCTS",api:"Setup/Data/ClearProduct",message:"Your Category, Product and Variant will be deleted"},{type:"LOYALTY_POINTS",api:"Setup/Data/ClearLoyaltyPoint"},{type:"RECYCLE_BIN",api:"Setup/Data/ClearRecycleBin"},{type:"INVENTORY",api:"Setup/Data/ClearInventory",message:"Your Product Inventory will be set to 0"},{type:"CONTACTS",api:"Setup/Data/ClearContact",message:"Your Customer, Supplier and Sales Person will be deleted"}];selectedClearData;modalConfig=new ae;modalTitle={TRANSACTIONS:"Clear Transactions",PRODUCTS:"Clear Products",LOYALTY_POINTS:"Clear Loyalty Points",RECYCLE_BIN:"Clear Recycle Bin",CONTACTS:"Clear Contacts",INVENTORY:"Clear Inventory"};subdomain;subdomainPlaceholder;password;form;passwordVisibility=Y(!1);ngOnInit(){this.initSelectedClearData(),this.form=this.fb.group({subdomain:[""],password:[""]})}initSelectedClearData(){this.selectedClearData=this.clearData.find(l=>l.type===this.data.type)}onSubmit(){let l={password:this.password,subdomain:this.subdomain,apiUrl:this.selectedClearData.api};this.dialogRef.close(l)}static \u0275fac=function(i){return new(i||n)(f(ie),f(te),f(X))};static \u0275cmp=b({type:n,selectors:[["app-confirmation-modal"]],decls:24,vars:10,consts:[["subdomainCtrl","ngModel"],["passwordCtrl","ngModel"],[3,"onOk","onClose","onCancel","config","dynamicValidated"],[4,"ngIf"],[1,"row"],[1,"col-12"],[1,"form-floating-outline","mt-5"],["type","text","id","subdomain","placeholder","Subdomain","name","subdomain","autofocus","","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"form-floating-outline"],["id","pass","placeholder","Password","name","password","required","",1,"form-control",3,"ngModelChange","type","ngModel"],["for","pass"],[1,"password-visibility"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-eye"],[1,"fa-solid","fa-eye-slash"],[1,"alert","alert-warning","cursor","w-100"],[1,"fa-solid","fa-circle-exclamation","me-2"],[1,"control-label","text-danger"]],template:function(i,t){if(i&1){let e=y();o(0,"modal-material",2),_("onOk",function(){return d(e),p(t.onSubmit())})("onClose",function(){return d(e),p(t.dialogRef.close())})("onCancel",function(){return d(e),p(t.dialogRef.close())}),o(1,"content"),S(2,_e,7,1,"ng-container",3),o(3,"div",4)(4,"div",5)(5,"strong"),r(6),a(),o(7,"div",6)(8,"input",7,0),P("ngModelChange",function(s){return d(e),M(t.subdomain,s)||(t.subdomain=s),p(s)}),a(),o(10,"label",8),r(11,"Subdomain"),a(),S(12,Se,3,0,"ng-container",3),a()(),o(13,"div",5)(14,"div",9)(15,"input",10,1),P("ngModelChange",function(s){return d(e),M(t.password,s)||(t.password=s),p(s)}),a(),o(17,"label",11),r(18,"Password"),a(),S(19,Te,3,0,"ng-container",3),o(20,"div",12)(21,"button",13),_("click",function(){return d(e),p(t.passwordVisibility.set(!t.passwordVisibility()))}),S(22,ge,1,0,"i",14)(23,be,1,0,"i",15),a()()()()()()()}if(i&2){let e=O(9),C=O(16);c("config",t.modalConfig)("dynamicValidated",t.password&&t.subdomain),m(2),c("ngIf",t.selectedClearData.message),m(4),x("Enter the following subdomain to confirm: ",t.subdomainPlaceholder,""),m(2),E("ngModel",t.subdomain),m(4),c("ngIf",e.invalid&&(e.dirty||e.touched)),m(3),c("type",t.passwordVisibility()?"text":"password"),E("ngModel",t.password),m(4),c("ngIf",C.invalid&&(C.dirty||C.touched)),m(3),F(t.passwordVisibility()?22:23)}},dependencies:[h,v,re,ne,Z,G,z,Q,J],styles:[".password-visibility[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);cursor:pointer;font-size:1.5rem}"]})};var V=n=>({"border border-0":n});function we(n,l){if(n&1&&(T(0),o(1,"tr",23)(2,"td",23),r(3),a(),o(4,"td",24),r(5),k(6,"number"),a()(),g()),n&2){let i=l.$implicit,t=l.index,e=u(2);m(),c("ngClass",D(7,V,t==e.data.Data.length-1)),m(),c("ngClass",D(9,V,t==e.data.Data.length-1)),m(),R(i.Key),m(),c("ngClass",D(11,V,t==e.data.Data.length-1)),m(),R(B(6,5,i.Value))}}function ye(n,l){if(n&1){let i=y();o(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"div",3)(4,"button",4),r(5," Format Data "),a(),o(6,"ul",5)(7,"li")(8,"a",6),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.TRANSACTIONS))}),r(9," 1. Clear Transactions "),a()(),o(10,"li")(11,"a",7),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.INVENTORY))}),r(12," 2. Clear Inventory "),a()(),o(13,"li")(14,"a",8),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.PRODUCTS))}),r(15," 3. Clear Products "),a()(),o(16,"li")(17,"a",9),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.CONTACTS))}),r(18," 4. Clear Contacts "),a()(),o(19,"li")(20,"a",10),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.LOYALTY_POINTS))}),r(21," 5. Clear Loyalty Point "),a()(),o(22,"li")(23,"a",11),_("click",function(){d(i);let e=u();return p(e.onClearRecord(e.clearDataType.RECYCLE_BIN))}),r(24," 6. Clear Recycle Bin "),a()()()()()(),o(25,"content")(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5"),r(30,"Database Records"),a(),o(31,"i"),r(32,"Current data count"),a()(),o(33,"div",15)(34,"div",16)(35,"div",17)(36,"table",18)(37,"thead",19)(38,"tr",20)(39,"th"),r(40,"Table"),a(),o(41,"th",21),r(42,"Rows"),a()()(),o(43,"tbody"),S(44,we,7,13,"ng-container",22),a()()()()()()()()()}if(n&2){let i=u();c("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),m(44),c("ngForOf",i.data.Data)}}var pe=class n extends de{constructor(i,t,e,C,s){super(i,t,"Setup/DataLoader/clearformatdata",e);this.httpService=t;this.activatedRoute=e;this.toaster=C;this.dialog=s}clearDataType=I;onClearRecord(i){this.dialog.open(N,{data:{type:i,subDomain:this.data.SubDomain}}).afterClosed().pipe(A(t=>W.IsNotEmpty(t))).subscribe(t=>{this.formData={Subdomain:t.subdomain,Password:t.password},this.onSubmit(t.apiUrl),i=="PRODUCTS"?this.data.Data.find(e=>e.Key=="Product").Value=0:i=="CONTACTS"?this.data.Data.find(e=>e.Key=="Customer").Value=0:i=="INVENTORY"?this.data.Data.find(e=>e.Key=="ItemTransfer").Value=0:i=="LOYALTY_POINTS"?this.data.Data.find(e=>e.Key=="JournalHeader").Value=0:i=="RECYCLE_BIN"?this.data.Data.find(e=>e.Key=="Recycle Bin").Value=0:i=="TRANSACTIONS"&&(this.data.Data.find(e=>e.Key=="SalesOrder").Value=0)})}onSubmitSuccess(i){this.toaster.success(i.Message,ee.Success)}static \u0275fac=function(t){return new(t||n)(f(le),f($),f(H),f(q),f(oe))};static \u0275cmp=b({type:n,selectors:[["POS-format-data"]],features:[L],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex"],[1,"dropdown"],["type","button","data-bs-toggle","dropdown","aria-expanded","false","confirm-message","Are you sure you want to clear the record?",1,"btn","btn-outline-secondary","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end"],["role","button","matTooltipPosition","above","matTooltip","Clear Transaction",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Inventory",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Products",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Contacts",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Loyalty Point",1,"dropdown-item",3,"click"],["role","button","matTooltipPosition","above","matTooltip","Clear Recycle Bin",1,"dropdown-item",3,"click"],[1,"container","pt-3"],[1,"row","border-bottom","mt-10","ms-2"],[1,"col-sm-2"],[1,"col-sm-10"],[1,"row"],[1,"col-md-12"],["id","tableGrid",1,"table",2,"width","250px"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-end"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-end",3,"ngClass"]],template:function(t,e){t&1&&S(0,ye,45,4,"mainpanel-cmp",0),t&2&&c("ngIf",e.formData)},dependencies:[h,U,j,v,K,se,me],encapsulation:2})};export{pe as FormatDataComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O as b}from"./chunk-A7ZWFYP4.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-
|
|
1
|
+
import{O as b}from"./chunk-A7ZWFYP4.js";import{a as m}from"./chunk-2FWFPV5I.js";import{a as u}from"./chunk-KUYSSX54.js";import{Vd as d,Yd as h,ja as n,na as c}from"./chunk-DJOHANFC.js";import{j as l}from"./chunk-7DCB7DB2.js";var p=class a{constructor(){}copy(t){return new Promise((o,r)=>{try{if(navigator.clipboard)navigator.clipboard.writeText(t).then(o,r);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")?o():r(new Error("Failed to copy with execCommand"))}catch(i){r(i)}finally{document.body.removeChild(e)}}}catch(e){r(e)}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};var y=class a{toastr=c(d);httpService=c(h);copyToClipBoard=c(p);createCustomerFromNewNumberAndSendReceipt(t,o,r,e,i){r==0?this.httpService.post(b.CreateCustomerInvoice,{InvoiceID:e.ObjectID,Mobile:t}).subscribe(s=>l(this,null,function*(){this.toastr.success(s.Message,m.Success),yield this.sendReceiptToWhatsapp(t,e,o,i)})):this.toastr.info("WABA is not supported yet",m.Info)}createWhatsappReceipt(t,o,r){let e=I=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(I).replace("Rp","").trim().split(",00")?.[0],i=JSON.parse(localStorage.getItem("AccountInfo"))?.BrandName,{ObjectID:s,Final:g,InvoiceNumber:f}=t,v=window.location.host,w=`https://receipt.dealpos.app/s?Data=${window.btoa(`${s}_${v}`)}`;return this.convertWhatsappTemplateMessage({Amount:e(g),Brand:i,Currency:o,Number:f,ReceiptLink:w},r)}convertWhatsappTemplateMessage(t,o){let r=o||u?.whatsappTemplateMessage,e=["Brand","Number","Currency","Amount","ReceiptLink"],i=r;return e.forEach(s=>i=i.replace(`{${s}}`,t[s])),i}redirectToWhatsapp(t,o){let r=t;r=r[0]==="0"?`62${r.slice(1)}`:r;let e=`whatsapp://send?phone=${r}&text=${encodeURIComponent(o)}`;window.location.href=e,this.showToastrWhatsappNoInstalled()}showToastrWhatsappNoInstalled(){let t=!1;window.onblur=function(){t=!0},setTimeout(()=>{t||this.toastr.warning(`Currently, sending an e-receipt automatically opens WhatsApp Desktop, provided the device has the app installed
|
|
2
2
|
`,"WhatsApp not installed")},2e3)}copyToClipboard(t){return new Promise((o,r)=>this.copyToClipBoard.copy(t).then(()=>{this.toastr.info("Message copied to clipboard. If WhatsApp doesn't show the message, please paste it manually.","Receipt Ready",{timeOut:8e3}),o("Copied to clipboard")}).catch(e=>{console.log(e),this.toastr.warning("Could not copy message to clipboard","Clipboard Error",{timeOut:8e3}),r(e)}))}sendReceiptToWhatsapp(t,o,r,e){return l(this,null,function*(){try{let i=this.createWhatsappReceipt(o,r,e);try{yield this.copyToClipboard(i)}finally{this.redirectToWhatsapp(t,i)}}catch(i){console.warn(i),this.toastr.error("Failed to send receipt")}})}static \u0275fac=function(o){return new(o||a)};static \u0275prov=n({token:a,factory:a.\u0275fac})};export{y as a};
|