@redneckz/wildless-cms-uni-blocks 0.14.690 → 0.14.691

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.
@@ -6607,23 +6607,32 @@
6607
6607
 
6608
6608
  const getDeliveryData = (formData) => {
6609
6609
  const { methodObtain, deliveryDate = '' } = formData;
6610
- return {
6611
- courierDeliveryFlg: methodObtain === 'courier',
6612
- deliveryDate: dateToISO(deliveryDate),
6613
- deliveryTimeCd: { value: 'TIME_2' },
6614
- };
6610
+ const isCourierDelivery = methodObtain === 'courier';
6611
+ return isCourierDelivery
6612
+ ? {
6613
+ courierDeliveryFlg: isCourierDelivery,
6614
+ deliveryDate: dateToISO(deliveryDate),
6615
+ deliveryTimeCd: { value: 'TIME_2' },
6616
+ }
6617
+ : {};
6615
6618
  };
6616
6619
  const getOfficeCode = (formData) => {
6617
- const { addressRetail } = formData;
6618
- return {
6619
- office: addressRetail?.key ? { id: addressRetail.key } : undefined,
6620
- };
6620
+ const { addressRetail, methodObtain } = formData;
6621
+ const isOfficeObtain = addressRetail?.key && methodObtain === 'office';
6622
+ return isOfficeObtain
6623
+ ? {
6624
+ office: { id: addressRetail.key },
6625
+ }
6626
+ : {};
6621
6627
  };
6622
6628
  const getSixthStepData = (formData) => {
6623
- const { addressCourier } = formData;
6624
- return {
6625
- participantAddresses: getParticipantAddresses({ addressCourier }),
6626
- };
6629
+ const { addressCourier, methodObtain } = formData;
6630
+ const isCourierDelivery = methodObtain === 'courier';
6631
+ return isCourierDelivery
6632
+ ? {
6633
+ participantAddresses: getParticipantAddresses({ addressCourier }),
6634
+ }
6635
+ : {};
6627
6636
  };
6628
6637
 
6629
6638
  const getThirdStepData$1 = (formData) => {
@@ -10354,7 +10363,7 @@
10354
10363
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10355
10364
  });
10356
10365
 
10357
- const packageVersion = "0.14.689";
10366
+ const packageVersion = "0.14.690";
10358
10367
 
10359
10368
  exports.Blocks = Blocks;
10360
10369
  exports.ContentPage = ContentPage;