@licklist/design 0.44.471 → 0.44.473
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/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts +6 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/sales/manual-booking/formatDays.js +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/package.json +1 -1
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +6 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +20 -1
- package/src/sales/manual-booking/formatDays.ts +2 -2
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,eAAe,qEAKzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,eAAe,qEAKzB,oBAAoB,gBAwKtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),t=e(r),i=require("@licklist/core/dist/Config"),n=require("react-i18next"),a=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),o=e(require("clsx")),s=require("react-intl"),u=require("../../../event/ticket-description/TicketDescription.js"),d=require("./components/ProductQuantityInput/ProductQuantityInput.js");exports.CategoryProduct=function(e){var l=e.product,m=e.category,p=e.canExpandDescription,y=void 0===p||p,f=e.productsWithErrors,v=s.useIntl().formatNumber,E=n.useTranslation(["Design","Validation"]).t,g=a.useFormContext(),q=g.control,x=g.clearErrors,N=g.setError,_=r.useMemo((function(){if(f){var e=f.find((function(e){return e.product_id===l.id}));return null==e?void 0:e.message}}),[f,l.id]),A=r.useMemo((function(){if(m.allowDeposits&&l.deposit&&!(null==l?void 0:l.isSoldOut))return l.deposit}),[m,l]);return r.useEffect((function(){_&&N("".concat(l.id),{message:_,type:"validate"})}),[_,l.id]),t.createElement(a.Controller,{control:q,name:"".concat(l.id),rules:{required:l.isRequired,validate:function(e){if(!e)return!0;var r=l.isRequired,t=void 0!==r&&r,i=l.maxAmount,n=void 0===i?0:i,a=l.minAmount,c=void 0===a?0:a,o=e.quantity,s=void 0===o?0:o;return!s&&!t||(!s&&t?E("Design:pleaseSelectAtLeastFrom",{min:1,type:"item",from:"this category"}):s<c?E("Validation:fieldMinNumber",{min:l.minAmount,attribute:l.name}):!(n&&s>=c&&n<s)||E("Validation:quantityMaxNumber",{max:l.maxAmount}))}},render:function(e){var r=e.field,n=r.onChange,a=r.value,s=void 0===a?{}:a,p=r.ref,f=e.fieldState,g=f.invalid,q=f.error;return t.createElement("div",{id:String(l.id),className:"iframe-event__category-product"},t.createElement("div",{className:o("iframe-event__product",g&&"error")},t.createElement(u.TicketDescription,{title:l.name,description:l.description,className:o("iframe-event__product-description"),images:l.images,isRequired:l.isRequired,canExpand:y})),t.createElement("div",{className:"iframe-event__product-price-wrapper"},t.createElement("span",{className:"product-price"},v(null!=A?A:l.price,{style:"currency",currency:i.Currency.GBP})),t.createElement(d.ProductQuantityInput,{onChange:n,productInfo:s,ref:p,clearErrors:x,product:l,category:m,invalid:g,deposit:A})),A&&!(null==m?void 0:m.remainderExpireAfter)&&t.createElement("div",{className:"mt-4"},E("Design:payNowAndUponArrival",{deposit:v(A,{style:"currency",currency:i.Currency.GBP}),remainder:v(l.price-A,{style:"currency",currency:i.Currency.GBP})})),A&&(null==m?void 0:m.remainderExpireAfter)>0&&t.createElement("div",{className:"mt-4"},E("Design:payNowAndReminderDays",{deposit:v(A,{style:"currency",currency:i.Currency.GBP}),remainder:v(l.price-A,{style:"currency",currency:i.Currency.GBP}),days:null==m?void 0:m.remainderExpireAfter})),g&&t.createElement("div",{className:"d-flex mt-3 w-100"},t.createElement("p",{className:"iframe-event__message-error"},c.hasError(q,"required")&&E("Design:pleaseSelectAtLeastFrom",{min:1,type:"item",from:"this category"}),c.hasError(q,"validate")&&q.message)))}})};
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),t=e(r),i=require("@licklist/core/dist/Config"),n=require("react-i18next"),a=require("react-hook-form"),c=e(require("@licklist/plugins/dist/services/Form/HookFormService")),o=e(require("clsx")),s=require("react-intl"),u=require("../../../event/ticket-description/TicketDescription.js"),d=require("./components/ProductQuantityInput/ProductQuantityInput.js");exports.CategoryProduct=function(e){var l=e.product,m=e.category,p=e.canExpandDescription,y=void 0===p||p,f=e.productsWithErrors,v=s.useIntl().formatNumber,E=n.useTranslation(["Design","Validation"]).t,g=a.useFormContext(),q=g.control,x=g.clearErrors,N=g.setError,_=r.useMemo((function(){if(f){var e=f.find((function(e){return e.product_id===l.id}));return null==e?void 0:e.message}}),[f,l.id]),A=r.useMemo((function(){if(m.allowDeposits&&l.deposit&&!(null==l?void 0:l.isSoldOut)&&!(l.deposit>=l.price))return l.deposit}),[m,l]);return r.useEffect((function(){_&&N("".concat(l.id),{message:_,type:"validate"})}),[_,l.id]),t.createElement(a.Controller,{control:q,name:"".concat(l.id),rules:{required:l.isRequired,validate:function(e){if(!e)return!0;var r=l.isRequired,t=void 0!==r&&r,i=l.maxAmount,n=void 0===i?0:i,a=l.minAmount,c=void 0===a?0:a,o=e.quantity,s=void 0===o?0:o;return!s&&!t||(!s&&t?E("Design:pleaseSelectAtLeastFrom",{min:1,type:"item",from:"this category"}):s<c?E("Validation:fieldMinNumber",{min:l.minAmount,attribute:l.name}):!(n&&s>=c&&n<s)||E("Validation:quantityMaxNumber",{max:l.maxAmount}))}},render:function(e){var r=e.field,n=r.onChange,a=r.value,s=void 0===a?{}:a,p=r.ref,f=e.fieldState,g=f.invalid,q=f.error;return t.createElement("div",{id:String(l.id),className:"iframe-event__category-product"},t.createElement("div",{className:o("iframe-event__product",g&&"error")},t.createElement(u.TicketDescription,{title:l.name,description:l.description,className:o("iframe-event__product-description"),images:l.images,isRequired:l.isRequired,canExpand:y})),t.createElement("div",{className:"iframe-event__product-price-wrapper"},t.createElement("span",{className:"product-price"},v(null!=A?A:l.price,{style:"currency",currency:i.Currency.GBP})),t.createElement(d.ProductQuantityInput,{onChange:n,productInfo:s,ref:p,clearErrors:x,product:l,category:m,invalid:g,deposit:A})),A&&!(null==m?void 0:m.remainderExpireAfter)&&t.createElement("div",{className:"mt-4"},E("Design:payNowAndUponArrival",{deposit:v(A,{style:"currency",currency:i.Currency.GBP}),remainder:v(l.price-A,{style:"currency",currency:i.Currency.GBP})})),A&&(null==m?void 0:m.remainderExpireAfter)>0&&t.createElement("div",{className:"mt-4"},E("Design:payNowAndReminderDays",{deposit:v(A,{style:"currency",currency:i.Currency.GBP}),remainder:v(l.price-A,{style:"currency",currency:i.Currency.GBP}),days:null==m?void 0:m.remainderExpireAfter})),g&&t.createElement("div",{className:"d-flex mt-3 w-100"},t.createElement("p",{className:"iframe-event__message-error"},c.hasError(q,"required")&&E("Design:pleaseSelectAtLeastFrom",{min:1,type:"item",from:"this category"}),c.hasError(q,"validate")&&q.message)))}})};
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
import { PaymentLinkResponse } from "@licklist/plugins/dist/hooks/Api/usePaymentApi";
|
|
3
3
|
import { BookingSummaryProps } from "src/iframe/order-process/components/BookingSummary/types";
|
|
4
4
|
import { RyftPaymentFormProps } from "../../ryft/RyftPaymentForm";
|
|
5
|
+
export interface PaymentMetadata {
|
|
6
|
+
total: number;
|
|
7
|
+
paid: number;
|
|
8
|
+
}
|
|
5
9
|
interface PaymentProps extends RyftPaymentFormProps {
|
|
6
10
|
onCloseIframePayment?: () => void;
|
|
7
11
|
onFailIframePayment?: () => void;
|
|
8
12
|
data?: PaymentLinkResponse;
|
|
9
13
|
isLoading: boolean;
|
|
10
14
|
bookingSummaryProps: Omit<BookingSummaryProps, "totallWithDiscount">;
|
|
15
|
+
paymentMetadata?: PaymentMetadata;
|
|
11
16
|
}
|
|
12
|
-
export declare const PaymentPage: ({ onCloseIframePayment, onFailIframePayment, data, isLoading, bookingSummaryProps, ...ryftPaymentFormProps }: PaymentProps) => JSX.Element;
|
|
17
|
+
export declare const PaymentPage: ({ onCloseIframePayment, onFailIframePayment, data, isLoading, bookingSummaryProps, paymentMetadata, ...ryftPaymentFormProps }: PaymentProps) => JSX.Element;
|
|
13
18
|
export {};
|
|
14
19
|
//# sourceMappingURL=PaymentPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAKpC,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACrE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,gBAqHd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),o=require("react"),a=(e=o)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-router-dom"),n=require("../../../static/loader/LoaderIndicator.js"),m=require("react-i18next"),s=require("react-bootstrap");require("../../../static/index.js"),require("../../order-process/components/NavigationFooter/NavigationFooter.js");var i=require("../../page/components/PageHeader/PageHeader.js"),l=require("@licklist/plugins/dist/context/payment/PaymentSessionContext"),c=require("../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js"),u=require("../../ryft/RyftPaymentForm.js"),d=require("../../order-process/components/BookingSummary/BookingSummary.js");require("../../order-process/components/NavigationSteps/NavigationSteps.js"),require("../../order-process/components/StepsForm/StepsForm.js"),require("../../order-process/components/Timer/Timer.js"),require("../../order-process/components/PaymentCard/PaymentCard.js");var p=require("../../order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),y=require("../../page/components/PageBody/PageBody.js");require("../../order-process/components/CalendarStepsForm/CalendarStepsForm.js");var g=require("./PaymentTimer.js"),f=require("../../page/Page.js");exports.PaymentPage=function(e){var B=e.onCloseIframePayment,P=e.onFailIframePayment,k=e.data,E=e.isLoading,S=e.bookingSummaryProps,q=e.paymentMetadata,j=t.__rest(e,["onCloseIframePayment","onFailIframePayment","data","isLoading","bookingSummaryProps","paymentMetadata"]),v=m.useTranslation("Design").t,x=r.useLocation().search,C=o.useContext(l.PaymentSessionContext).isPaymentSessionExpired,b=Boolean(new URLSearchParams(x).get("isIframePayment")),w=function(){window.close()};return o.useEffect((function(){b&&B&&window.addEventListener("beforeunload",(function(){B()}))}),[]),o.useEffect((function(){C&&b&&P&&P()}),[C]),E?a.createElement(n.LoaderIndicator,{isLoaded:!1}):null===k?a.createElement(f.Page,null,a.createElement(y.PageBody,{leftBlock:a.createElement(y.PageBody.LeftBlock,null,a.createElement("div",{className:"d-flex h-100 w-100 justify-content-center align-items-center flex-column"},a.createElement("h6",null,v("linkNotActiveOrExpired")),a.createElement(s.Col,{xs:12,md:3},a.createElement(s.Button,{className:"mt-5 w-20",onClick:function(){window.location.href="https://booked.it/"}},v("backToSite")))))})):a.createElement(f.Page,{className:"payment_link",headerBlock:a.createElement(i.PageHeader,{showBackButton:b,onBackButtonClick:b?w:void 0,showCloseButton:b,onCloseButtonClick:b?w:void 0},b&&a.createElement(g.PaymentTimer,null),a.createElement("div",{className:"d-flex align-items-center justify-content-center w-100"},v("paymentDetails")))},a.createElement(y.PageBody,{leftBlock:a.createElement(y.PageBody.LeftBlock,null,a.createElement(u.RyftPaymentForm,t.__assign({},j))),rightBlock:a.createElement(y.PageBody.RightBlock,{bottomBlock:a.createElement(p.BookingSummaryFooter,{showButton:!1},a.createElement("div",{className:"d-flex flex-column justify-content-between"},q&&a.createElement(a.Fragment,null,a.createElement(c.SummaryTotalBlock,{label:v("total"),amount:q.total||0}),a.createElement(c.SummaryTotalBlock,{label:v("paidSum"),amount:q.paid||0})),a.createElement(c.SummaryTotalBlock,{label:v(q?"remaining":"total"),amount:(null==k?void 0:k.amount)||0})))},a.createElement("h6",null,v("paymentDetails")),a.createElement(d.BookingSummary,t.__assign({},S)))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@licklist/core/dist/Config"),e=require("luxon");exports.formatToDays=function(r){if(!r)return null;if(7===r.length)return"Everyday";var e=!0,t=r.map((function(t,n){switch(n>0&&r[n-1]!==t-1&&(e=!1),t){case 0:return"Mon";case 1:return"Tue";case 2:return"Wed";case 3:return"Thu";case 4:return"Fri";case 5:return"Sat";case 6:return"Sun";default:return""}}));return r.length>3&&e?"".concat(t[0]," - ").concat(t[t.length-1]):t.join(", ")},exports.formatToHours=function(t,n){var o=e.DateTime.fromISO(t).
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@licklist/core/dist/Config"),e=require("luxon");exports.formatToDays=function(r){if(!r)return null;if(7===r.length)return"Everyday";var e=!0,t=r.map((function(t,n){switch(n>0&&r[n-1]!==t-1&&(e=!1),t){case 0:return"Mon";case 1:return"Tue";case 2:return"Wed";case 3:return"Thu";case 4:return"Fri";case 5:return"Sat";case 6:return"Sun";default:return""}}));return r.length>3&&e?"".concat(t[0]," - ").concat(t[t.length-1]):t.join(", ")},exports.formatToHours=function(t,n){var o=e.DateTime.fromISO(t).toFormat(r.TIME_FORMAT),u=e.DateTime.fromISO(n).toFormat(r.TIME_FORMAT);return"".concat(o," - ").concat(u)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAUnG,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,sFAO9B,yBAAyB,gBAyE3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var n=require("../../../static/loader/BlockLoader.js"),l=require("react-i18next");require("../../../static/loader/ButtonLoader.js"),require("../../../static/loader/SnippetLoader.js"),require("../../../static/loader/PaymentLoader.js");var c=require("luxon"),i=require("react-intl")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var n=require("../../../static/loader/BlockLoader.js"),l=require("react-i18next");require("../../../static/loader/ButtonLoader.js"),require("../../../static/loader/SnippetLoader.js"),require("../../../static/loader/PaymentLoader.js");var c=require("luxon"),i=require("react-intl");exports.ManualBookingSummary=function(e){var t=e.eventName,m=e.orders,s=e.ordersSum,o=e.orderSumIncludingFee,u=e.isFeeFetching,d=e.orderDate,y=l.useTranslation(["Design","Sale"]).t,v=i.useIntl().formatNumber,E=c.DateTime.fromISO(d),N=E.toFormat(a.DATE_TIME_MANUAL_BOOKING_FORMAT),p=E.toFormat(a.TIME_FORMAT);return r.createElement("div",{className:"manual-booking-summary"},r.createElement("div",{className:"receipt-title"},y("Sale:receipt")),r.createElement("div",{className:"event-name border-summary-item"},t),r.createElement("div",{className:"border-summary-item"},N),r.createElement("div",{className:"border-summary-item"},p),m.length>0?r.createElement("div",{className:"summary-item-container"},m.map((function(e){return r.createElement("div",{key:e.id,className:"d-flex justify-content-between border-summary-item"},r.createElement("div",null,e.name),r.createElement("div",null,e.isRelyOnPeople?"x ".concat(e.quantity," People"):""),r.createElement("div",null,v(e.quantity*e.price,{style:"currency",currency:a.Currency.GBP})))})),r.createElement("div",null,r.createElement("div",{className:"total-container"},r.createElement("div",null,y("Sale:total")),r.createElement("div",{className:"total-amount"},v(s,{style:"currency",currency:a.Currency.GBP}))),o&&r.createElement("div",{className:"total-container ".concat(u?"mt-6":"mt-4")},u||!o?r.createElement(n.BlockLoader,null):r.createElement(r.Fragment,null,r.createElement("div",null,y("Sale:includingOperationalCost")),r.createElement("div",{className:"total-amount"},v(o,{style:"currency",currency:a.Currency.GBP})))))):r.createElement("div",{className:"cart-items"},r.createElement("p",{className:"empty-cart"},y("Design:emptyBasket"))))};
|
package/package.json
CHANGED
|
@@ -38,7 +38,12 @@ export const CategoryProduct = ({
|
|
|
38
38
|
}, [productsWithErrors, product.id]);
|
|
39
39
|
|
|
40
40
|
const deposit = useMemo(() => {
|
|
41
|
-
if (
|
|
41
|
+
if (
|
|
42
|
+
!category.allowDeposits ||
|
|
43
|
+
!product.deposit ||
|
|
44
|
+
product?.isSoldOut ||
|
|
45
|
+
product.deposit >= product.price
|
|
46
|
+
) {
|
|
42
47
|
return undefined;
|
|
43
48
|
}
|
|
44
49
|
return product.deposit;
|
|
@@ -16,12 +16,18 @@ import { PaymentTimer } from "./PaymentTimer";
|
|
|
16
16
|
import { Page, PageBody, PageHeader } from "../../page";
|
|
17
17
|
import { BookingSummary, BookingSummaryFooter } from "../../order-process";
|
|
18
18
|
|
|
19
|
+
export interface PaymentMetadata {
|
|
20
|
+
total: number;
|
|
21
|
+
paid: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
19
24
|
interface PaymentProps extends RyftPaymentFormProps {
|
|
20
25
|
onCloseIframePayment?: () => void;
|
|
21
26
|
onFailIframePayment?: () => void;
|
|
22
27
|
data?: PaymentLinkResponse;
|
|
23
28
|
isLoading: boolean;
|
|
24
29
|
bookingSummaryProps: Omit<BookingSummaryProps, "totallWithDiscount">;
|
|
30
|
+
paymentMetadata?: PaymentMetadata;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
export const PaymentPage = ({
|
|
@@ -30,6 +36,7 @@ export const PaymentPage = ({
|
|
|
30
36
|
data,
|
|
31
37
|
isLoading,
|
|
32
38
|
bookingSummaryProps,
|
|
39
|
+
paymentMetadata,
|
|
33
40
|
...ryftPaymentFormProps
|
|
34
41
|
}: PaymentProps) => {
|
|
35
42
|
const { t } = useTranslation("Design");
|
|
@@ -121,8 +128,20 @@ export const PaymentPage = ({
|
|
|
121
128
|
bottomBlock={
|
|
122
129
|
<BookingSummaryFooter showButton={false}>
|
|
123
130
|
<div className="d-flex flex-column justify-content-between">
|
|
131
|
+
{paymentMetadata && (
|
|
132
|
+
<>
|
|
133
|
+
<SummaryTotalBlock
|
|
134
|
+
label={t("total")}
|
|
135
|
+
amount={paymentMetadata.total || 0}
|
|
136
|
+
/>
|
|
137
|
+
<SummaryTotalBlock
|
|
138
|
+
label={t("paidSum")}
|
|
139
|
+
amount={paymentMetadata.paid || 0}
|
|
140
|
+
/>
|
|
141
|
+
</>
|
|
142
|
+
)}
|
|
124
143
|
<SummaryTotalBlock
|
|
125
|
-
label={t("total")}
|
|
144
|
+
label={t(paymentMetadata ? "remaining" : "total")}
|
|
126
145
|
amount={data?.amount || 0}
|
|
127
146
|
/>
|
|
128
147
|
</div>
|
|
@@ -40,7 +40,7 @@ export const formatToDays = (daysInWeek?: number[]): string | null => {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export const formatToHours = (startAt: string, endAt: string) => {
|
|
43
|
-
const firstTime = DateTime.fromISO(startAt).
|
|
44
|
-
const lastTime = DateTime.fromISO(endAt).
|
|
43
|
+
const firstTime = DateTime.fromISO(startAt).toFormat(TIME_FORMAT);
|
|
44
|
+
const lastTime = DateTime.fromISO(endAt).toFormat(TIME_FORMAT);
|
|
45
45
|
return `${firstTime} - ${lastTime}`;
|
|
46
46
|
};
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
} from "@licklist/core/dist/Config";
|
|
9
9
|
import { useIntl } from "react-intl";
|
|
10
10
|
import * as Config from "@licklist/core/dist/Config";
|
|
11
|
-
import { TIMEZONE } from "@licklist/core/dist/Config/Date";
|
|
12
11
|
import { BlockLoader } from "../../../static/loader";
|
|
13
12
|
|
|
14
13
|
export interface ManualBookingSummaryProps {
|
|
@@ -31,7 +30,7 @@ export const ManualBookingSummary = ({
|
|
|
31
30
|
const { t } = useTranslation(["Design", "Sale"]);
|
|
32
31
|
const { formatNumber } = useIntl();
|
|
33
32
|
|
|
34
|
-
const currentDate = DateTime.fromISO(orderDate
|
|
33
|
+
const currentDate = DateTime.fromISO(orderDate);
|
|
35
34
|
const date = currentDate.toFormat(DATE_TIME_MANUAL_BOOKING_FORMAT);
|
|
36
35
|
const time = currentDate.toFormat(TIME_FORMAT);
|
|
37
36
|
|