favesalon-embed 1.0.16 → 1.0.17
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/dist/favesalon-embed/activate-form.entry.js +1 -1
- package/dist/favesalon-embed/buy-giftcard-form.entry.js +91 -64
- package/dist/favesalon-embed/buy-giftcard-verification.entry.js +3801 -17
- package/dist/favesalon-embed/change-password-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-box.entry.js +1 -1
- package/dist/favesalon-embed/chat-button.entry.js +1 -1
- package/dist/favesalon-embed/chat-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-messages.entry.js +1 -1
- package/dist/favesalon-embed/chat-rooms.entry.js +2 -2
- package/dist/favesalon-embed/favesalon-embed.css +20 -0
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/login-form.entry.js +1 -1
- package/dist/favesalon-embed/register-form.entry.js +1 -1
- package/dist/favesalon-embed/reset-password-form.entry.js +1 -1
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +2 -2
- package/dist/favesalon-embed/salon-latest-styles.entry.js +1 -1
- package/dist/favesalon-embed/salon-locations.entry.js +2 -2
- package/dist/favesalon-embed/salon-lookbook.entry.js +1 -1
- package/dist/favesalon-embed/salon-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
- package/dist/favesalon-embed/salon-services.entry.js +1 -1
- package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
- package/dist/favesalon-embed/{services-45c0e274.js → services-09264f42.js} +133 -123
- package/dist/favesalon-embed/services-1406013d.js +24132 -0
- package/dist/favesalon-embed/{services-935ba09f.js → services-82948efc.js} +135 -130
- package/dist/favesalon-embed/{services-baa3f112.js → services-c2c81c88.js} +9 -1
- package/dist/favesalon-embed/{services-3dd9f820.js → services-ef32efdc.js} +151 -123
- package/dist/favesalon-embed/style-detail.entry.js +1 -1
- package/dist/favesalon-embed/utils-00e4ed17.js +33 -0
- package/dist/favesalon-embed/utils-359c37f7.js +33 -0
- package/dist/favesalon-embed/utils-daaa9ecc.js +34 -0
- package/dist/favesalon-embed/utils-e6e3f132.js +33 -0
- package/dist/favesalon-embed/wizard-existing-user.entry.js +10 -10
- package/dist/favesalon-embed/wizard-new-user.entry.js +10 -10
- package/dist/types/components/buy-giftcard-form/buy-giftcard-form.d.ts +2 -1
- package/dist/types/components/buy-giftcard-verification/buy-giftcard-verification.d.ts +2 -0
- package/dist/types/services/services.d.ts +3 -3
- package/package.json +2 -1
- package/dist/favesalon-embed/services-65861516.js +0 -24095
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, g as get_1 } from './services-
|
|
2
|
+
import { H as HttpService, g as get_1 } from './services-82948efc.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { _ as _root, i as isSymbol_1, a as isObject_1, H as HttpService, d as dayjs_min, b as dateFormat, g as get_1, s as shortDateFormat, c as getSalonImage, e as getSalonAddress } from './services-
|
|
2
|
+
import { _ as _root, i as isSymbol_1, a as isObject_1, H as HttpService, d as dayjs_min, b as dateFormat, g as get_1, s as shortDateFormat, c as getSalonImage, e as getSalonAddress } from './services-82948efc.js';
|
|
3
3
|
import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-9bc404fc.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
5
5
|
|
|
@@ -362,6 +362,11 @@ const customStyles = {
|
|
|
362
362
|
const BuyGiftcardForm = class {
|
|
363
363
|
constructor(hostRef) {
|
|
364
364
|
registerInstance(this, hostRef);
|
|
365
|
+
this.onClickDeliveryDone = () => {
|
|
366
|
+
const targetElement = document.getElementById('page--gift-card-style');
|
|
367
|
+
targetElement && targetElement.scrollIntoView();
|
|
368
|
+
this.isDeliveryDoneVisible = false;
|
|
369
|
+
};
|
|
365
370
|
this.onChangeEmail = debounce_1((recipientEmail) => {
|
|
366
371
|
this.recipientEmail = recipientEmail;
|
|
367
372
|
if (this.recipientEmailConfirm) {
|
|
@@ -379,6 +384,7 @@ const BuyGiftcardForm = class {
|
|
|
379
384
|
}, 300);
|
|
380
385
|
this.onChangeConfirmEmail = debounce_1((recipientEmailConfirm) => {
|
|
381
386
|
this.recipientEmailConfirm = recipientEmailConfirm;
|
|
387
|
+
this.isDeliveryDoneVisible = !!recipientEmailConfirm;
|
|
382
388
|
if (this.recipientEmail) {
|
|
383
389
|
if (this.deliveryType === DeliveryType.Email) {
|
|
384
390
|
this.isInvalidEmails = recipientEmailConfirm !== this.recipientEmail;
|
|
@@ -393,6 +399,7 @@ const BuyGiftcardForm = class {
|
|
|
393
399
|
}
|
|
394
400
|
}, 300);
|
|
395
401
|
this.onSubmitGiftCardForm = async () => {
|
|
402
|
+
this.errorMessage = null;
|
|
396
403
|
const recipientEmailStr = String(this.recipientEmail).replaceAll(' ', '');
|
|
397
404
|
const isInvalidEmailFormats = this.deliveryType === DeliveryType.Email && recipientEmailStr.indexOf('@') === -1;
|
|
398
405
|
if (this.deliveryType === DeliveryType.Email && (!recipientEmailStr || isInvalidEmailFormats || this.isInvalidEmails)) {
|
|
@@ -405,9 +412,24 @@ const BuyGiftcardForm = class {
|
|
|
405
412
|
? 'Inputted phones are invalid'
|
|
406
413
|
: 'Inputted phones are not matched';
|
|
407
414
|
}
|
|
408
|
-
else
|
|
409
|
-
this.
|
|
410
|
-
|
|
415
|
+
else {
|
|
416
|
+
if (this.customAmount || this.selectedAmount) {
|
|
417
|
+
if (this.recipientFirstName && this.recipientLastName) {
|
|
418
|
+
if (this.selectedStyleId) {
|
|
419
|
+
this.step = FormStep.PaymentInfo;
|
|
420
|
+
setTimeout(() => this.initMagensaPayment(), 350);
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
this.errorMessage = 'Please select a gift card style';
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
this.errorMessage = 'Please enter your first & last name';
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
this.errorMessage = 'Please select Gift card amount';
|
|
432
|
+
}
|
|
411
433
|
}
|
|
412
434
|
};
|
|
413
435
|
this.salonId = undefined;
|
|
@@ -432,6 +454,7 @@ const BuyGiftcardForm = class {
|
|
|
432
454
|
this.isInvalidEmails = undefined;
|
|
433
455
|
this.isInvalidPhones = undefined;
|
|
434
456
|
this.selectedStyleId = undefined;
|
|
457
|
+
this.isDeliveryDoneVisible = undefined;
|
|
435
458
|
}
|
|
436
459
|
async componentDidLoad() {
|
|
437
460
|
const promises = [
|
|
@@ -493,7 +516,7 @@ const BuyGiftcardForm = class {
|
|
|
493
516
|
} }, totalAmount > 0 && (h("div", null, h("div", { style: { display: 'flex' } }, recommendAmounts.map((recommendValue, idx) => {
|
|
494
517
|
const isSelected = this.selectedAmount === recommendValue;
|
|
495
518
|
return (h("button", { type: "button", key: `gc--recommend-amount--${recommendValue}`, value: recommendValue, onClick: () => this.selectedAmount = recommendValue, style: {
|
|
496
|
-
border: `1px solid ${Colors.
|
|
519
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
497
520
|
backgroundColor: Colors.White,
|
|
498
521
|
color: Colors.TextColor,
|
|
499
522
|
borderRadius: '0px',
|
|
@@ -504,6 +527,7 @@ const BuyGiftcardForm = class {
|
|
|
504
527
|
justifyContent: 'center',
|
|
505
528
|
alignItems: 'center',
|
|
506
529
|
fontSize: '18px',
|
|
530
|
+
fontWeight: '600',
|
|
507
531
|
padding: '8px 12px',
|
|
508
532
|
...idx === 0 ? { borderRadius: '8px 0 0 8px', } : {},
|
|
509
533
|
...idx === (totalAmount - 1) ? { borderRadius: '0 8px 8px 0' } : {},
|
|
@@ -516,7 +540,7 @@ const BuyGiftcardForm = class {
|
|
|
516
540
|
fontSize: '18px',
|
|
517
541
|
transform: 'translate(0, -50%)',
|
|
518
542
|
} }, "$"), h("input", { type: "number", value: this.customAmount, onInput: (evt) => this.customAmount = evt.target.value, style: {
|
|
519
|
-
border: `1px solid ${Colors.
|
|
543
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
520
544
|
backgroundColor: Colors.White,
|
|
521
545
|
color: Colors.TextColor,
|
|
522
546
|
borderRadius: '8px',
|
|
@@ -539,6 +563,8 @@ const BuyGiftcardForm = class {
|
|
|
539
563
|
padding: '8px 16px',
|
|
540
564
|
height: '48px',
|
|
541
565
|
width: '100%',
|
|
566
|
+
fontSize: '18px',
|
|
567
|
+
fontWeight: '600',
|
|
542
568
|
} })), h("div", { style: { width: '48%', marginLeft: '4%' } }, h("input", { placeholder: "Last name", type: "text", value: this.recipientLastName, onInput: (evt) => {
|
|
543
569
|
this.recipientLastName = evt.target.value.trim();
|
|
544
570
|
}, style: {
|
|
@@ -549,6 +575,8 @@ const BuyGiftcardForm = class {
|
|
|
549
575
|
padding: '8px 16px',
|
|
550
576
|
height: '48px',
|
|
551
577
|
width: '100%',
|
|
578
|
+
fontSize: '18px',
|
|
579
|
+
fontWeight: '600',
|
|
552
580
|
} })))), h("div", { style: { marginTop: '24px' } }, h("div", { style: { fontSize: '18px' } }, "Delivery method?"), h("div", { style: { display: 'flex', marginTop: '12px' } }, h("div", { style: {
|
|
553
581
|
cursor: 'pointer',
|
|
554
582
|
display: 'flex',
|
|
@@ -557,8 +585,9 @@ const BuyGiftcardForm = class {
|
|
|
557
585
|
this.recipientEmail = null;
|
|
558
586
|
this.recipientEmailConfirm = null;
|
|
559
587
|
this.deliveryType = DeliveryType.Email;
|
|
588
|
+
this.isDeliveryDoneVisible = false;
|
|
560
589
|
} }, h("span", { style: {
|
|
561
|
-
border: `1px solid ${Colors.
|
|
590
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
562
591
|
backgroundClip: 'content-box',
|
|
563
592
|
borderRadius: '50%',
|
|
564
593
|
height: '16px',
|
|
@@ -577,8 +606,9 @@ const BuyGiftcardForm = class {
|
|
|
577
606
|
this.recipientEmail = null;
|
|
578
607
|
this.recipientEmailConfirm = null;
|
|
579
608
|
this.deliveryType = DeliveryType.SMS;
|
|
609
|
+
this.isDeliveryDoneVisible = false;
|
|
580
610
|
} }, h("span", { style: {
|
|
581
|
-
border: `1px solid ${Colors.
|
|
611
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
582
612
|
backgroundClip: 'content-box',
|
|
583
613
|
borderRadius: '50%',
|
|
584
614
|
height: '16px',
|
|
@@ -593,22 +623,42 @@ const BuyGiftcardForm = class {
|
|
|
593
623
|
alignItems: 'center',
|
|
594
624
|
marginTop: '24px',
|
|
595
625
|
} }, h("div", { style: { width: '48%' } }, h("input", { placeholder: isDeliveryEmail ? 'Enter email' : 'Enter phone', type: "text", value: this.recipientEmail, onInput: (evt) => this.onChangeEmail(evt.target.value.trim()), style: {
|
|
596
|
-
border: `1px solid ${Colors.
|
|
626
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
597
627
|
backgroundColor: Colors.White,
|
|
598
628
|
color: Colors.TextColor,
|
|
599
629
|
borderRadius: '8px',
|
|
600
630
|
padding: '8px 16px',
|
|
601
631
|
height: '48px',
|
|
602
632
|
width: '100%',
|
|
603
|
-
|
|
604
|
-
|
|
633
|
+
fontSize: '18px',
|
|
634
|
+
fontWeight: '600',
|
|
635
|
+
} })), h("div", { style: { width: '48%', marginLeft: '4%', position: 'relative' } }, h("input", { placeholder: isDeliveryEmail ? 'Re-enter email' : 'Re-enter phone', type: "text", value: this.recipientEmailConfirm, onInput: (evt) => this.onChangeConfirmEmail(evt.target.value.trim()), style: {
|
|
636
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
605
637
|
backgroundColor: Colors.White,
|
|
606
638
|
color: Colors.TextColor,
|
|
607
639
|
borderRadius: '8px',
|
|
608
640
|
padding: '8px 16px',
|
|
609
641
|
height: '48px',
|
|
610
642
|
width: '100%',
|
|
611
|
-
|
|
643
|
+
fontSize: '18px',
|
|
644
|
+
fontWeight: '600',
|
|
645
|
+
} }), this.isDeliveryDoneVisible && (h("button", { type: "button", style: {
|
|
646
|
+
background: Colors.Secondary,
|
|
647
|
+
border: `1px solid ${Colors.Secondary}`,
|
|
648
|
+
borderRadius: '8px',
|
|
649
|
+
cursor: 'pointer',
|
|
650
|
+
color: Colors.White,
|
|
651
|
+
fontSize: '16px',
|
|
652
|
+
fontWeight: '700',
|
|
653
|
+
paddingLeft: '24px',
|
|
654
|
+
paddingRight: '24px',
|
|
655
|
+
height: '48px',
|
|
656
|
+
position: 'absolute',
|
|
657
|
+
marginTop: '2px',
|
|
658
|
+
top: '100%',
|
|
659
|
+
right: '0',
|
|
660
|
+
zIndex: '10',
|
|
661
|
+
}, onClick: () => this.onClickDeliveryDone() }, "Next")))), this.isInvalidEmails && (h("div", { style: {
|
|
612
662
|
color: Colors.Red03,
|
|
613
663
|
fontSize: '90%',
|
|
614
664
|
marginTop: '16px',
|
|
@@ -621,7 +671,7 @@ const BuyGiftcardForm = class {
|
|
|
621
671
|
backgroundColor: Colors.Info01,
|
|
622
672
|
marginTop: '16px',
|
|
623
673
|
padding: '16px',
|
|
624
|
-
} }, "Gift card info will send to your email once it cannot delivery to recipient")), giftCardStyles.length > 0 && (h("div", { style: {
|
|
674
|
+
} }, "Gift card info will send to your email once it cannot delivery to recipient")), h("div", { id: "page--gift-card-style" }), giftCardStyles.length > 0 && (h("div", { style: {
|
|
625
675
|
borderTop: `1px solid ${Colors.Gray02}`,
|
|
626
676
|
marginTop: '24px',
|
|
627
677
|
paddingTop: '16px',
|
|
@@ -667,7 +717,7 @@ const BuyGiftcardForm = class {
|
|
|
667
717
|
this.deliveryDate = evt.target.value.trim();
|
|
668
718
|
}, style: {
|
|
669
719
|
backgroundColor: Colors.White,
|
|
670
|
-
border: `1px solid ${Colors.
|
|
720
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
671
721
|
color: Colors.TextColor,
|
|
672
722
|
borderRadius: '8px',
|
|
673
723
|
padding: '8px 16px',
|
|
@@ -677,7 +727,7 @@ const BuyGiftcardForm = class {
|
|
|
677
727
|
} })), h("div", { style: { marginTop: '16px' } }, h("textarea", { rows: 4, placeholder: "Include a message...", onInput: (evt) => {
|
|
678
728
|
this.recipientMessage = evt.target.value.trim();
|
|
679
729
|
}, style: {
|
|
680
|
-
border: `1px solid ${Colors.
|
|
730
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
681
731
|
background: Colors.White,
|
|
682
732
|
color: Colors.TextColor,
|
|
683
733
|
padding: '16px',
|
|
@@ -703,11 +753,22 @@ const BuyGiftcardForm = class {
|
|
|
703
753
|
backgroundColor: Colors.Red01,
|
|
704
754
|
border: `1px solid ${Colors.Red02}`,
|
|
705
755
|
marginBottom: '24px',
|
|
756
|
+
marginTop: '24px',
|
|
706
757
|
padding: '16px',
|
|
707
758
|
} }, this.errorMessage))));
|
|
708
759
|
}
|
|
709
760
|
renderPaymentSucceed() {
|
|
710
|
-
return (h("div", { style: { paddingTop: '24px', textAlign: 'center' } }, h("div", { style: {
|
|
761
|
+
return (h("div", { style: { paddingTop: '24px', textAlign: 'center' } }, h("div", { style: {
|
|
762
|
+
backgroundColor: Colors.Success01,
|
|
763
|
+
color: Colors.White,
|
|
764
|
+
borderRadius: '50%',
|
|
765
|
+
alignItems: 'center',
|
|
766
|
+
justifyContent: 'center',
|
|
767
|
+
margin: 'auto',
|
|
768
|
+
display: 'flex',
|
|
769
|
+
height: '84px',
|
|
770
|
+
width: '84px',
|
|
771
|
+
} }, h("i", { class: "ri-check-fill", style: { fontSize: '32px', color: Colors.Success03 } })), h("div", { style: { fontSize: '24px', fontWeight: '700', lineHeight: '1.4', marginTop: '24px' } }, "Thank you!"), h("div", { style: { marginTop: '12px' } }, "Your gift card has been purchased successfully")));
|
|
711
772
|
}
|
|
712
773
|
async createCardPayment() {
|
|
713
774
|
try {
|
|
@@ -724,49 +785,13 @@ const BuyGiftcardForm = class {
|
|
|
724
785
|
async processCardToken(Token) {
|
|
725
786
|
const defaultErrorMessage = 'Something went wrong when creating payment transaction';
|
|
726
787
|
try {
|
|
727
|
-
const { MPPGv4WSFault, TransactionOutput } = await HttpService().magensaProcessToken({
|
|
788
|
+
const { MPPGv4WSFault, TransactionOutput } = await HttpService().magensaProcessToken(Number(this.salonId), {
|
|
728
789
|
raw_data: [{
|
|
729
790
|
Token,
|
|
730
|
-
Authentication: {
|
|
731
|
-
CustomerCode: this.magensaCredentials.customerCode,
|
|
732
|
-
Username: this.magensaCredentials.username,
|
|
733
|
-
Password: this.magensaCredentials.password,
|
|
734
|
-
},
|
|
735
791
|
TransactionInput: {
|
|
736
792
|
TransactionType: 1,
|
|
737
793
|
ProcessorName: this.magensaCredentials.processorName,
|
|
738
|
-
Amount: this.customAmount || this.selectedAmount || 1,
|
|
739
|
-
},
|
|
740
|
-
}],
|
|
741
|
-
});
|
|
742
|
-
if (!MPPGv4WSFault && TransactionOutput && TransactionOutput.TransactionID) {
|
|
743
|
-
return Promise.resolve({ transactionID: TransactionOutput.TransactionID });
|
|
744
|
-
}
|
|
745
|
-
let message = MPPGv4WSFault && MPPGv4WSFault.FaultReason;
|
|
746
|
-
if (!message && TransactionOutput && TransactionOutput.TransactionMessage) {
|
|
747
|
-
message = TransactionOutput.TransactionMessage;
|
|
748
|
-
}
|
|
749
|
-
return Promise.reject({ message: message || defaultErrorMessage });
|
|
750
|
-
}
|
|
751
|
-
catch (res) {
|
|
752
|
-
return Promise.reject({ message: res.error || defaultErrorMessage });
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
async voidPaymentRequest(ReferenceTransactionID) {
|
|
756
|
-
const defaultErrorMessage = 'Something went wrong when updating payment transaction status';
|
|
757
|
-
try {
|
|
758
|
-
const { MPPGv4WSFault, TransactionOutput } = await HttpService().magensaConfirmTransaction({
|
|
759
|
-
raw_data: [{
|
|
760
|
-
Authentication: {
|
|
761
|
-
CustomerCode: this.magensaCredentials.customerCode,
|
|
762
|
-
Username: this.magensaCredentials.username,
|
|
763
|
-
Password: this.magensaCredentials.password,
|
|
764
|
-
},
|
|
765
|
-
TransactionInput: {
|
|
766
|
-
ReferenceTransactionID,
|
|
767
|
-
TransactionType: 4,
|
|
768
|
-
ProcessorName: this.magensaCredentials.processorName,
|
|
769
|
-
Amount: this.customAmount || this.selectedAmount || 1,
|
|
794
|
+
Amount: Number(this.customAmount || this.selectedAmount || 1).toFixed(2),
|
|
770
795
|
},
|
|
771
796
|
}],
|
|
772
797
|
});
|
|
@@ -790,7 +815,6 @@ const BuyGiftcardForm = class {
|
|
|
790
815
|
try {
|
|
791
816
|
const { token } = await this.createCardPayment();
|
|
792
817
|
const { transactionID } = await this.processCardToken(token);
|
|
793
|
-
await this.voidPaymentRequest(transactionID);
|
|
794
818
|
if (token) {
|
|
795
819
|
const { giftCardStyles } = this.giftCardSettings || {};
|
|
796
820
|
const selectedGiftCardStyle = this.selectedStyleId
|
|
@@ -798,7 +822,7 @@ const BuyGiftcardForm = class {
|
|
|
798
822
|
const recipientUserEmail = (this.recipientEmail || '').indexOf('@') > -1 ? this.recipientEmail : '';
|
|
799
823
|
const recipientUserPhone = (this.recipientEmail || '').indexOf('@') === -1 ? this.recipientEmail : '';
|
|
800
824
|
await HttpService().onBuyGiftCard(this.salonInfo.id, {
|
|
801
|
-
source:
|
|
825
|
+
source: '',
|
|
802
826
|
amount: this.customAmount || this.selectedAmount || '',
|
|
803
827
|
gift_card_style: selectedGiftCardStyle || '',
|
|
804
828
|
delivery_date: this.deliveryDate ? dayjs_min(this.deliveryDate).format(dateFormat) : dayjs_min().format(dateFormat),
|
|
@@ -818,9 +842,6 @@ const BuyGiftcardForm = class {
|
|
|
818
842
|
payment_valid: {
|
|
819
843
|
type: 'magensa',
|
|
820
844
|
magensa_transaction_id: transactionID,
|
|
821
|
-
magensa_user: this.magensaCredentials.username,
|
|
822
|
-
magensa_password: this.magensaCredentials.password,
|
|
823
|
-
magensa_customer_code: this.magensaCredentials.customerCode,
|
|
824
845
|
},
|
|
825
846
|
});
|
|
826
847
|
this.step = FormStep.PaymentSucceed;
|
|
@@ -848,7 +869,7 @@ const BuyGiftcardForm = class {
|
|
|
848
869
|
fontSize: '18px',
|
|
849
870
|
fontWeight: '700',
|
|
850
871
|
marginLeft: '6px',
|
|
851
|
-
} }, this.deliveryDate ? dayjs_min(this.deliveryDate).format(shortDateFormat) : 'Today')), h("div", { style: { fontSize: '18px', marginTop: '24px' } }, "Payment"), h("div", { style: { marginTop: '8px', marginLeft: '-6px' } }, h("credit-card-types", null)), h("div", { id: "buy-giftcard--payment", style: { height: '300px', maxWidth: '400px', marginTop: '24px' } }), h("button", { type: "button", disabled: this.isSubmitting, style: {
|
|
872
|
+
} }, this.deliveryDate ? dayjs_min(this.deliveryDate).format(shortDateFormat) : 'Today')), h("div", { style: { fontSize: '18px', marginTop: '24px' } }, "Payment"), h("div", { style: { marginTop: '8px', marginLeft: '-6px' } }, h("credit-card-types", null)), h("div", { id: "buy-giftcard--payment", style: { height: '300px', maxWidth: '400px', marginTop: '24px' } }), h("button", { type: "button", disabled: (2 > 1 || this.isSubmitting), style: {
|
|
852
873
|
border: `1px solid ${Colors.Secondary}`,
|
|
853
874
|
background: Colors.Secondary,
|
|
854
875
|
color: Colors.White,
|
|
@@ -860,23 +881,29 @@ const BuyGiftcardForm = class {
|
|
|
860
881
|
paddingRight: '24px',
|
|
861
882
|
height: '44px',
|
|
862
883
|
width: '100%',
|
|
863
|
-
}, onClick: () => this.onSubmitPaymentForm() }, "Submit")))
|
|
884
|
+
}, onClick: () => this.onSubmitPaymentForm() }, "Submit ", (2 > 1 || this.isSubmitting) && (h("span", { class: "fs-spin", style: { marginLeft: '4px' } }, h("i", { class: "ri-loader-4-line" })))), this.errorMessage && (h("div", { style: {
|
|
885
|
+
backgroundColor: Colors.Red01,
|
|
886
|
+
border: `1px solid ${Colors.Red02}`,
|
|
887
|
+
marginBottom: '24px',
|
|
888
|
+
marginTop: '24px',
|
|
889
|
+
padding: '16px',
|
|
890
|
+
} }, this.errorMessage))));
|
|
864
891
|
}
|
|
865
892
|
renderSalonInfo() {
|
|
866
893
|
const salonImageUrl = getSalonImage(this.salonInfo);
|
|
867
894
|
return (h("div", { style: {
|
|
868
895
|
backgroundColor: Colors.White,
|
|
869
|
-
border: `1px solid ${Colors.
|
|
896
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
870
897
|
borderRadius: '8px',
|
|
871
898
|
padding: '24px',
|
|
872
899
|
} }, h("div", { style: { display: 'flex' } }, salonImageUrl && (h("div", { style: { marginRight: '24px' } }, h("img", { src: salonImageUrl, alt: this.salonInfo.businessName, style: { maxWidth: '84px' } }))), h("div", { style: { flexGrow: '1', flexShrink: '1' } }, h("div", { style: {
|
|
873
900
|
fontSize: '24px',
|
|
874
901
|
lineHeight: '1.3',
|
|
875
902
|
} }, this.salonInfo.businessName), h("div", { style: {
|
|
876
|
-
color: Colors.Gray05,
|
|
877
903
|
display: 'flex',
|
|
878
904
|
marginTop: '4px',
|
|
879
905
|
} }, h("i", { class: "ri-map-pin-line", style: {
|
|
906
|
+
color: Colors.Gray05,
|
|
880
907
|
marginRight: '4px',
|
|
881
908
|
fontSize: '20px',
|
|
882
909
|
} }), h("div", { style: {
|
|
@@ -887,9 +914,9 @@ const BuyGiftcardForm = class {
|
|
|
887
914
|
} }, getSalonAddress(this.salonInfo))), h("div", { style: {
|
|
888
915
|
display: 'flex',
|
|
889
916
|
alignItems: 'center',
|
|
890
|
-
color: Colors.Gray05,
|
|
891
917
|
marginTop: '4px',
|
|
892
918
|
} }, h("i", { class: "ri-phone-line", style: {
|
|
919
|
+
color: Colors.Gray05,
|
|
893
920
|
marginRight: '4px',
|
|
894
921
|
fontSize: '20px',
|
|
895
922
|
} }), h("div", { style: {
|