mautourco-components 0.2.50 → 0.2.51
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/organisms/Table/columns/booking-columns.js +1 -1
- package/dist/components/organisms/Table/columns/quotation-columns.js +1 -1
- package/package.json +1 -1
- package/src/components/organisms/Table/columns/booking-columns.tsx +4 -2
- package/src/components/organisms/Table/columns/quotation-columns.tsx +8 -6
|
@@ -89,7 +89,7 @@ export var bookingColumns = function (_a) {
|
|
|
89
89
|
var _a;
|
|
90
90
|
var handleAction = (_a = onAction === null || onAction === void 0 ? void 0 : onAction(raw)) !== null && _a !== void 0 ? _a : (function () { });
|
|
91
91
|
var actionData = actionDropdownData(handleAction);
|
|
92
|
-
return (_jsxs("div", { className: "flex items-center justify-between gap-x-
|
|
92
|
+
return (_jsxs("div", { className: "flex items-center justify-between gap-x-2", children: [renderStatusContent(raw.status), _jsx("div", { children: _jsx(ActionDropdown, { data: actionData }) })] }));
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
];
|
|
@@ -88,7 +88,7 @@ export var quotationColumns = function (_a) {
|
|
|
88
88
|
var isExpanded = (_a = raw.children) === null || _a === void 0 ? void 0 : _a.some(function (child) { return child.visible; });
|
|
89
89
|
var buttonLabel = isExpanded ? 'See less' : 'See more';
|
|
90
90
|
var isOnRequest = raw.status.toLowerCase() === 'on request';
|
|
91
|
-
return (_jsx("div", { children: hasChildren ? (_jsx(Button, { variant: "outline-primary", size: "sm", trailingIcon: "chevron-down", className: cn('table__button', isExpanded && 'table__button-expanded'), onClick: function () { return onExpand === null || onExpand === void 0 ? void 0 : onExpand(raw, index, childIndex); }, children: buttonLabel })) : (_jsxs("div", { className: "flex items-center gap-x-8", children: [_jsx(Button, { variant: isOnRequest ? 'outline-secondary' : 'secondary', size: "sm", className: "table__button", children: isOnRequest ? 'Request to book' : 'Book now' }), _jsx(ActionDropdown, { data: actionDropdownData((_b = onAction === null || onAction === void 0 ? void 0 : onAction({ isChild: childIndex !== undefined, quote: raw })) !== null && _b !== void 0 ? _b : (function () { })) })] })) }));
|
|
91
|
+
return (_jsx("div", { children: hasChildren ? (_jsx(Button, { variant: "outline-primary", size: "sm", trailingIcon: "chevron-down", className: cn('table__button', isExpanded && 'table__button-expanded'), onClick: function () { return onExpand === null || onExpand === void 0 ? void 0 : onExpand(raw, index, childIndex); }, children: buttonLabel })) : (_jsxs("div", { className: "flex items-center gap-x-8", children: [_jsx(Button, { variant: isOnRequest ? 'outline-secondary' : 'secondary', size: "sm", className: "table__button", children: isOnRequest ? 'Request to book' : 'Book now' }), _jsx("div", { children: _jsx(ActionDropdown, { data: actionDropdownData((_b = onAction === null || onAction === void 0 ? void 0 : onAction({ isChild: childIndex !== undefined, quote: raw })) !== null && _b !== void 0 ? _b : (function () { })) }) })] })) }));
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
];
|
package/package.json
CHANGED
|
@@ -138,9 +138,11 @@ export const bookingColumns: (params: {
|
|
|
138
138
|
const actionData = actionDropdownData(handleAction);
|
|
139
139
|
|
|
140
140
|
return (
|
|
141
|
-
<div className="flex items-center justify-between gap-x-
|
|
141
|
+
<div className="flex items-center justify-between gap-x-2">
|
|
142
142
|
{renderStatusContent(raw.status)}
|
|
143
|
-
<
|
|
143
|
+
<div>
|
|
144
|
+
<ActionDropdown data={actionData} />
|
|
145
|
+
</div>
|
|
144
146
|
</div>
|
|
145
147
|
);
|
|
146
148
|
},
|
|
@@ -171,12 +171,14 @@ export const quotationColumns: (params: {
|
|
|
171
171
|
className="table__button">
|
|
172
172
|
{isOnRequest ? 'Request to book' : 'Book now'}
|
|
173
173
|
</Button>
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
(
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
<div>
|
|
175
|
+
<ActionDropdown
|
|
176
|
+
data={actionDropdownData(
|
|
177
|
+
onAction?.({ isChild: childIndex !== undefined, quote: raw }) ??
|
|
178
|
+
(() => {})
|
|
179
|
+
)}
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
180
182
|
</div>
|
|
181
183
|
)}
|
|
182
184
|
</div>
|