mautourco-components 0.2.29 → 0.2.30
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/components/molecules/DateDisplay/DateDisplay.d.ts +4 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.js +3 -5
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +50 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.d.ts +2 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +3 -2
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +2 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +2 -2
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +2 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +2 -2
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +1 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +14 -11
- package/dist/components/organisms/CancelService/CancelPolicy.d.ts +29 -0
- package/dist/components/organisms/CancelService/CancelPolicy.js +19 -0
- package/dist/components/organisms/CancelService/CancelService.d.ts +14 -0
- package/dist/components/organisms/CancelService/CancelService.js +23 -0
- package/dist/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.css +2143 -0
- package/dist/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.d.ts +14 -0
- package/dist/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.js +35 -0
- package/dist/components/organisms/CancelService/FromList.d.ts +12 -0
- package/dist/components/organisms/CancelService/FromList.js +29 -0
- package/dist/components/organisms/Table/Table.js +1 -1
- package/dist/components/organisms/Table/TableCell.d.ts +2 -1
- package/dist/components/organisms/Table/TableCell.js +2 -2
- package/dist/components/organisms/Table/columns/booking-cancel-service-columns.d.ts +5 -0
- package/dist/components/organisms/Table/columns/booking-cancel-service-columns.js +182 -0
- package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +3 -1
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +5 -3
- package/dist/components/organisms/Table/columns/index.d.ts +6 -1
- package/dist/components/organisms/Table/columns/index.js +2 -0
- package/package.json +1 -1
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +7 -7
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +27 -0
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.tsx +12 -1
- package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +9 -2
- package/src/components/molecules/DialogContentPolicy/DialogCancellationExcursion.tsx +10 -2
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +18 -11
- package/src/components/organisms/CancelService/CancelPolicy.tsx +68 -0
- package/src/components/organisms/CancelService/CancelService.tsx +30 -0
- package/src/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.css +56 -0
- package/src/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.tsx +67 -0
- package/src/components/organisms/CancelService/FromList.tsx +50 -0
- package/src/components/organisms/Table/Table.tsx +6 -1
- package/src/components/organisms/Table/TableCell.tsx +8 -4
- package/src/components/organisms/Table/columns/booking-cancel-service-columns.tsx +242 -0
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +19 -5
- package/src/components/organisms/Table/columns/index.ts +2 -0
|
@@ -12,6 +12,10 @@ export interface DateDisplayProps {
|
|
|
12
12
|
calendarSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
13
13
|
/** Size of the text */
|
|
14
14
|
textSize?: TextProps['size'];
|
|
15
|
+
/** Text color */
|
|
16
|
+
textColor?: TextProps['color'];
|
|
17
|
+
/** Direction of the dates */
|
|
18
|
+
direction?: 'horizontal' | 'vertical';
|
|
15
19
|
/** Color mode: 'black' for default black color, 'green' for accent green color */
|
|
16
20
|
colorMode?: 'black' | 'green';
|
|
17
21
|
/** Custom className */
|
|
@@ -26,11 +26,9 @@ import './DateDisplay.css';
|
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
28
|
export var DateDisplay = function (_a) {
|
|
29
|
-
var
|
|
30
|
-
// Support both new API (date) and old API (dates) for backward compatibility
|
|
31
|
-
var datesToDisplay = date ? [date] : dates || [];
|
|
29
|
+
var _b = _a.dates, dates = _b === void 0 ? [] : _b, _c = _a.arrowSize, arrowSize = _c === void 0 ? 'sm' : _c, _d = _a.calendarSize, calendarSize = _d === void 0 ? 'sm' : _d, _e = _a.textSize, textSize = _e === void 0 ? 'sm' : _e, _f = _a.colorMode, colorMode = _f === void 0 ? 'black' : _f, _g = _a.className, className = _g === void 0 ? '' : _g;
|
|
32
30
|
var formattedDates = useMemo(function () {
|
|
33
|
-
return
|
|
31
|
+
return dates.map(function (d) {
|
|
34
32
|
var dateObj = typeof d === 'string' ? new Date(d) : d;
|
|
35
33
|
// Check if the date is valid then format it to dd/MM/yyyy format
|
|
36
34
|
if (isValid(dateObj)) {
|
|
@@ -39,7 +37,7 @@ export var DateDisplay = function (_a) {
|
|
|
39
37
|
// If the date is not valid, return the original date
|
|
40
38
|
return typeof d === 'string' ? d : d.toString();
|
|
41
39
|
});
|
|
42
|
-
}, [
|
|
40
|
+
}, [dates]);
|
|
43
41
|
var iconColor = colorMode === 'green'
|
|
44
42
|
? 'var(--color-atoll-green-800)'
|
|
45
43
|
: 'var(--color-text-default, #000000)';
|
package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css
CHANGED
|
@@ -2116,11 +2116,61 @@
|
|
|
2116
2116
|
transparent 16px
|
|
2117
2117
|
);
|
|
2118
2118
|
}
|
|
2119
|
+
&:last-child {
|
|
2120
|
+
&::after {
|
|
2121
|
+
display: none;
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2119
2124
|
.chip__label {
|
|
2120
2125
|
column-gap: 1rem;
|
|
2121
2126
|
}
|
|
2122
2127
|
}
|
|
2123
2128
|
|
|
2129
|
+
.cancellation-layout__fee {
|
|
2130
|
+
position: relative;
|
|
2131
|
+
display: flex;
|
|
2132
|
+
align-items: center;
|
|
2133
|
+
justify-content: space-between;
|
|
2134
|
+
padding-top: 0.75rem;
|
|
2135
|
+
padding-bottom: 0.75rem;
|
|
2136
|
+
&::before,
|
|
2137
|
+
&::after {
|
|
2138
|
+
content: '';
|
|
2139
|
+
}
|
|
2140
|
+
&::before,
|
|
2141
|
+
&::after {
|
|
2142
|
+
position: absolute;
|
|
2143
|
+
}
|
|
2144
|
+
&::before,
|
|
2145
|
+
&::after {
|
|
2146
|
+
top: 0px;
|
|
2147
|
+
}
|
|
2148
|
+
&::before,
|
|
2149
|
+
&::after {
|
|
2150
|
+
left: 0px;
|
|
2151
|
+
}
|
|
2152
|
+
&::before,
|
|
2153
|
+
&::after {
|
|
2154
|
+
right: 0px;
|
|
2155
|
+
}
|
|
2156
|
+
&::before,
|
|
2157
|
+
&::after {
|
|
2158
|
+
height: 1px;
|
|
2159
|
+
background-color: transparent;
|
|
2160
|
+
background-image: repeating-linear-gradient(
|
|
2161
|
+
to right,
|
|
2162
|
+
var(--color-surface-300) 0,
|
|
2163
|
+
var(--color-surface-300) 4px,
|
|
2164
|
+
transparent 4px,
|
|
2165
|
+
transparent 8px
|
|
2166
|
+
);
|
|
2167
|
+
}
|
|
2168
|
+
&::after {
|
|
2169
|
+
top: initial;
|
|
2170
|
+
bottom: 0;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2124
2174
|
.cancellation-layout__content {
|
|
2125
2175
|
display: flex;
|
|
2126
2176
|
align-items: flex-start;
|
package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js
CHANGED
|
@@ -10,10 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Text } from '../../../atoms/Typography/Typography';
|
|
13
14
|
import { cn } from '../../../../lib/utils';
|
|
14
15
|
import { ServiceTitle } from '../../ServiceTitle/ServiceTitle';
|
|
15
16
|
import './CancellationLayout.css';
|
|
16
17
|
export var CancellationLayout = function (props) {
|
|
17
|
-
var title = props.title, icon = props.icon, children = props.children, className = props.className, image = props.image;
|
|
18
|
-
return (_jsxs("div", __assign({ className: cn('cancellation-layout', className) }, { children: [_jsx(ServiceTitle, { title: title, icon: icon }), _jsxs("div", __assign({ className: "cancellation-layout__content" }, { children: [_jsx("div", __assign({ className: "cancellation-layout__content-left" }, { children: children })), _jsx("figure", __assign({ className: "cancellation-layout__content-right" }, { children: _jsx("img", { src: image, alt: (title === null || title === void 0 ? void 0 : title.toString()) || '', width: 150, height: 200 }) }))] }))] })));
|
|
18
|
+
var title = props.title, icon = props.icon, children = props.children, className = props.className, image = props.image, cancellationFee = props.cancellationFee, currency = props.currency;
|
|
19
|
+
return (_jsxs("div", __assign({ className: cn('cancellation-layout', className) }, { children: [_jsx(ServiceTitle, { title: title, icon: icon }), _jsxs("div", __assign({ className: "cancellation-layout__content" }, { children: [_jsx("div", __assign({ className: "cancellation-layout__content-left" }, { children: children })), _jsx("figure", __assign({ className: "cancellation-layout__content-right" }, { children: _jsx("img", { src: image, alt: (title === null || title === void 0 ? void 0 : title.toString()) || '', width: 150, height: 200 }) }))] })), cancellationFee && (_jsxs("div", __assign({ className: "cancellation-layout__fee" }, { children: [_jsx(Text, __assign({ variant: "medium" }, { children: "Cancellation fee (VAT Incl) :" })), _jsxs(Text, __assign({ variant: "bold" }, { children: [currency, " ", cancellationFee] }))] })))] })));
|
|
19
20
|
};
|
|
@@ -18,7 +18,7 @@ import { DateDisplay } from '../DateDisplay/DateDisplay';
|
|
|
18
18
|
import TextWithIcon from '../TextWithIcon/TextWithIcon';
|
|
19
19
|
import { CancellationLayout } from './CancellationLayout/CancellationLayout';
|
|
20
20
|
export var DialogCancellationAccom = function (props) {
|
|
21
|
-
var image = props.image, hotelName = props.hotelName, dates = props.dates, rooms = props.rooms;
|
|
21
|
+
var image = props.image, hotelName = props.hotelName, dates = props.dates, rooms = props.rooms, cancellationFee = props.cancellationFee, currency = props.currency;
|
|
22
22
|
var stay = useStays(dates);
|
|
23
|
-
return (_jsx(CancellationLayout, __assign({ title: "Accommodation", icon: "accom", image: image }, { children: _jsxs("div", __assign({ className: "space-y-6" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(Text, __assign({ variant: "bold" }, { children: hotelName })), _jsx(DateDisplay, { dates: dates }), _jsxs(TextWithIcon, __assign({ icon: "night", textLeading: "4" }, { children: [stay, " Nights"] }))] })), _jsx("div", __assign({ className: "" }, { children: rooms.map(function (room, index) { return (_jsxs("div", __assign({ className: "space-y-4" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsxs(TextWithIcon, __assign({ icon: "accom", textLeading: "4" }, { children: [index + 1, " Room"] })), _jsx(Text, __assign({ size: "sm" }, { children: room.RoomName }))] })), room.cancellation_policy.map(function (policy) { return (_jsxs(Fragment, { children: [_jsxs(Chip, __assign({ type: "outline", color: "brand", isBlackText: true }, { children: ["Policy period applies", ' ', _jsx(DateDisplay, { dates: [policy.ValidFrom, policy.ValidTo], textSize: "xs" })] })), _jsxs(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: [policy.Value, " % of total price"] })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policy.Description }))] }, "policy-".concat(index))); })] }), "rm-".concat(index))); }) }))] })) })));
|
|
23
|
+
return (_jsx(CancellationLayout, __assign({ title: "Accommodation", icon: "accom", image: image, cancellationFee: cancellationFee, currency: currency }, { children: _jsxs("div", __assign({ className: "space-y-6" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(Text, __assign({ variant: "bold" }, { children: hotelName })), _jsx(DateDisplay, { dates: dates }), _jsxs(TextWithIcon, __assign({ icon: "night", textLeading: "4" }, { children: [stay, " Nights"] }))] })), _jsx("div", __assign({ className: "" }, { children: rooms.map(function (room, index) { return (_jsxs("div", __assign({ className: "space-y-4" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsxs(TextWithIcon, __assign({ icon: "accom", textLeading: "4" }, { children: [index + 1, " Room"] })), _jsx(Text, __assign({ size: "sm" }, { children: room.RoomName }))] })), room.cancellation_policy.map(function (policy) { return (_jsxs(Fragment, { children: [_jsxs(Chip, __assign({ type: "outline", color: "brand", isBlackText: true }, { children: ["Policy period applies", ' ', _jsx(DateDisplay, { dates: [policy.ValidFrom, policy.ValidTo], textSize: "xs" })] })), _jsxs(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: [policy.Value, " % of total price"] })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policy.Description }))] }, "policy-".concat(index))); })] }), "rm-".concat(index))); }) }))] })) })));
|
|
24
24
|
};
|
|
@@ -15,6 +15,6 @@ import { DateDisplay } from '../DateDisplay/DateDisplay';
|
|
|
15
15
|
import { ServiceInfo } from '../ServiceInfo/ServiceInfo';
|
|
16
16
|
import { CancellationLayout } from './CancellationLayout/CancellationLayout';
|
|
17
17
|
export var DialogCancellationExcursion = function (props) {
|
|
18
|
-
var image = props.image, excursionName = props.excursionName, date = props.date, details = props.details, policy = props.policy;
|
|
19
|
-
return (_jsx(CancellationLayout, __assign({ title: "Excursion", icon: "map", image: image }, { children: _jsxs("div", __assign({ className: "space-y-6" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(Text, __assign({ variant: "bold" }, { children: excursionName })), _jsx(DateDisplay, { dates: [date] })] })), _jsxs(ServiceInfo, { children: [_jsx(ServiceInfo.Item, __assign({ icon: "stopwatch", label: "Duration" }, { children: details.duration })), _jsx(ServiceInfo.Item, __assign({ icon: "utensils", label: "Meal" }, { children: details.meal })), _jsx(ServiceInfo.Item, __assign({ icon: "bike", label: "Difficulty" }, { children: details.accessibility })), _jsx(ServiceInfo.Item, __assign({ icon: "car", label: "Transfer Type" }, { children: details.transferType }))] }), _jsxs("div", __assign({ className: "" }, { children: [_jsx(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: policy.title })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policy.description }))] }))] })) })));
|
|
18
|
+
var image = props.image, excursionName = props.excursionName, date = props.date, details = props.details, policy = props.policy, cancellationFee = props.cancellationFee, currency = props.currency;
|
|
19
|
+
return (_jsx(CancellationLayout, __assign({ title: "Excursion", icon: "map", image: image, cancellationFee: cancellationFee, currency: currency }, { children: _jsxs("div", __assign({ className: "space-y-6" }, { children: [_jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(Text, __assign({ variant: "bold" }, { children: excursionName })), _jsx(DateDisplay, { dates: [date] })] })), _jsxs(ServiceInfo, { children: [_jsx(ServiceInfo.Item, __assign({ icon: "stopwatch", label: "Duration" }, { children: details.duration })), _jsx(ServiceInfo.Item, __assign({ icon: "utensils", label: "Meal" }, { children: details.meal })), _jsx(ServiceInfo.Item, __assign({ icon: "bike", label: "Difficulty" }, { children: details.accessibility })), _jsx(ServiceInfo.Item, __assign({ icon: "car", label: "Transfer Type" }, { children: details.transferType }))] }), _jsxs("div", __assign({ className: "" }, { children: [_jsx(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: policy.title })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policy.description }))] }))] })) })));
|
|
20
20
|
};
|
|
@@ -17,6 +17,7 @@ export interface DialogCancellationListProps {
|
|
|
17
17
|
*/
|
|
18
18
|
cancellations: CancellationItem[];
|
|
19
19
|
}
|
|
20
|
+
export declare const DialogCancellations: (props: DialogCancellationListProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
/**
|
|
21
22
|
* DialogCancellationList is a component that allows the user to display the cancellations.
|
|
22
23
|
*
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { DialogCancellationAccom, } from './DialogCancellationAccom';
|
|
14
14
|
import { DialogCancellationExcursion, } from './DialogCancellationExcursion';
|
|
15
15
|
import { DialogContentPolicy } from './DialogContentPolicy';
|
|
@@ -19,6 +19,18 @@ var isAccommodation = function (data) {
|
|
|
19
19
|
var isExcursion = function (data) {
|
|
20
20
|
return 'excursionName' in data;
|
|
21
21
|
};
|
|
22
|
+
export var DialogCancellations = function (props) {
|
|
23
|
+
var cancellations = props.cancellations;
|
|
24
|
+
return (_jsx(_Fragment, { children: cancellations.map(function (c, index) {
|
|
25
|
+
if (c.type === 'accommodation' && isAccommodation(c.data)) {
|
|
26
|
+
return _jsx(DialogCancellationAccom, __assign({}, c.data), "acc-".concat(index));
|
|
27
|
+
}
|
|
28
|
+
if (c.type === 'excursion' && isExcursion(c.data)) {
|
|
29
|
+
return _jsx(DialogCancellationExcursion, __assign({}, c.data), "exc-".concat(index));
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}) }));
|
|
33
|
+
};
|
|
22
34
|
/**
|
|
23
35
|
* DialogCancellationList is a component that allows the user to display the cancellations.
|
|
24
36
|
*
|
|
@@ -31,14 +43,5 @@ var isExcursion = function (data) {
|
|
|
31
43
|
* @returns The DialogCancellationList component.
|
|
32
44
|
*/
|
|
33
45
|
export var DialogCancellationList = function (props) {
|
|
34
|
-
|
|
35
|
-
return (_jsx(DialogContentPolicy, { children: cancellations.map(function (c, index) {
|
|
36
|
-
if (c.type === 'accommodation' && isAccommodation(c.data)) {
|
|
37
|
-
return _jsx(DialogCancellationAccom, __assign({}, c.data), "acc-".concat(index));
|
|
38
|
-
}
|
|
39
|
-
if (c.type === 'excursion' && isExcursion(c.data)) {
|
|
40
|
-
return _jsx(DialogCancellationExcursion, __assign({}, c.data), "exc-".concat(index));
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}) }));
|
|
46
|
+
return (_jsx(DialogContentPolicy, { children: _jsx(DialogCancellations, __assign({}, props)) }));
|
|
44
47
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CancellationItem } from '../../molecules/DialogContentPolicy/DialogCancellationList';
|
|
3
|
+
export interface CancelPolicyProps {
|
|
4
|
+
/**
|
|
5
|
+
* The cancellations to display.
|
|
6
|
+
*/
|
|
7
|
+
cancellations: CancellationItem[];
|
|
8
|
+
/**
|
|
9
|
+
* Whether the policy is transgressed.
|
|
10
|
+
*/
|
|
11
|
+
isPolicyTransgressed?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The cancellation fee.
|
|
14
|
+
*/
|
|
15
|
+
cancellationFee?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The currency of the cancellation fee.
|
|
18
|
+
*/
|
|
19
|
+
currency?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the policy is being processed.
|
|
22
|
+
*/
|
|
23
|
+
isProcessing?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The callback function to call when the proceed to payment button is clicked.
|
|
26
|
+
*/
|
|
27
|
+
onProceedToPayment?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const CancelPolicy: React.FC<CancelPolicyProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import Button from '../../atoms/Button/Button';
|
|
14
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
15
|
+
import { DialogCancellations, } from '../../molecules/DialogContentPolicy/DialogCancellationList';
|
|
16
|
+
export var CancelPolicy = function (props) {
|
|
17
|
+
var cancellations = props.cancellations, isPolicyTransgressed = props.isPolicyTransgressed, isProcessing = props.isProcessing, onProceedToPayment = props.onProceedToPayment;
|
|
18
|
+
return (_jsxs("div", { children: [isPolicyTransgressed && (_jsx(Text, __assign({ color: "state-error" }, { children: "It appears that removing this item violates one or more cancellation policies. Please settle the cancellation fee if you wish to proceed with this item\u2019s cancellation." }))), _jsx("div", __assign({ className: "max-h-[400px] overflow-y-auto -mr-5 pr-2.5" }, { children: _jsx(DialogCancellations, { cancellations: cancellations }) })), _jsx("div", __assign({ className: "flex justify-end mt-9" }, { children: _jsx(Button, __assign({ variant: "secondary", size: "sm", className: "w-[250px]", disabled: isProcessing, onClick: onProceedToPayment }, { children: "Proceed to payment" })) }))] }));
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CancelServiceProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
setOpen: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CancelService: {
|
|
10
|
+
(props: CancelServiceProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
FromList: <T extends import("../Table").TableRowData<T> = import("../../..").DetailResumeItem>(props: import("./FromList").FromListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Confirm: React.FC<import("./ConfirmDelete/ConfirmDelete").ConfirmDeleteProps>;
|
|
13
|
+
CancelPolicy: React.FC<import("./CancelPolicy").CancelPolicyProps>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { DialogBookingConfirm } from '../DialogBookingConfirm';
|
|
14
|
+
import { CancelPolicy } from './CancelPolicy';
|
|
15
|
+
import { ConfirmDelete } from './ConfirmDelete/ConfirmDelete';
|
|
16
|
+
import { FromList } from './FromList';
|
|
17
|
+
export var CancelService = function (props) {
|
|
18
|
+
var open = props.open, children = props.children, title = props.title, className = props.className, setOpen = props.setOpen;
|
|
19
|
+
return (_jsx(DialogBookingConfirm, __assign({ title: title, open: open, setOpen: setOpen, className: className }, { children: children })));
|
|
20
|
+
};
|
|
21
|
+
CancelService.FromList = FromList;
|
|
22
|
+
CancelService.Confirm = ConfirmDelete;
|
|
23
|
+
CancelService.CancelPolicy = CancelPolicy;
|