bukazu-portal-react 2.0.17 → 2.0.21
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/.vscode/settings.json +4 -1
- package/build/calendar.html +2 -1
- package/build/index.js +19 -25
- package/package.json +1 -1
- package/src/_lib/queries.js +6 -0
- package/src/components/CalendarPage/FormCreator.js +5 -16
- package/src/components/CalendarPage/Summary/CostSummary.js +1 -1
- package/src/components/CalendarPage/Summary/index.js +1 -0
- package/src/components/CalendarPage/formParts/discount.js +33 -26
package/.vscode/settings.json
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"titleBar.activeBackground": "#8fb2e3",
|
|
15
15
|
"titleBar.activeForeground": "#15202b",
|
|
16
16
|
"titleBar.inactiveBackground": "#8fb2e399",
|
|
17
|
-
"titleBar.inactiveForeground": "#15202b99"
|
|
17
|
+
"titleBar.inactiveForeground": "#15202b99",
|
|
18
|
+
"sash.hoverBorder": "#b8ceed",
|
|
19
|
+
"statusBarItem.remoteBackground": "#8fb2e3",
|
|
20
|
+
"statusBarItem.remoteForeground": "#15202b"
|
|
18
21
|
},
|
|
19
22
|
"peacock.color": "#8fb2e3"
|
|
20
23
|
}
|
package/build/calendar.html
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
<body>
|
|
9
9
|
<h1>Bukazu Test Calendar</h1>
|
|
10
10
|
|
|
11
|
-
<div class="bukazu-app" id="bukazu-app" portal-code="050497a0" object-code="DE0002" language='nl' filters='123'></div>
|
|
11
|
+
<!-- <div class="bukazu-app" id="bukazu-app" portal-code="050497a0" object-code="DE0002" language='nl' filters='123'></div> -->
|
|
12
12
|
<!-- <div class="bukazu-app" id="bukazu-app" portal-code="72902823" object-code="NL1443" language='nl' filters='123'></div> -->
|
|
13
|
+
<div id='bukazu-app' class='bukazu-app' portal-code="2b063dcd" object-code="AT0047" language="nl"></div>
|
|
13
14
|
|
|
14
15
|
<script src="./index.js"></script>
|
|
15
16
|
</body>
|
package/build/index.js
CHANGED
|
@@ -14896,7 +14896,7 @@ var _templateObject$5, _templateObject2$1, _templateObject3, _templateObject4;
|
|
|
14896
14896
|
var PORTAL_QUERY = gql(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n query PortalSiteQuery($id: ID!) {\n PortalSite(id: $id) {\n portal_code\n options\n countries {\n id\n name\n }\n regions {\n id\n name\n country_id\n }\n cities {\n id\n name\n region\n country_id\n }\n extra_search\n max_bathrooms\n max_bedrooms\n max_nights\n max_persons\n max_weekprice\n country_placeholder\n categories\n countries_label\n country_placeholder\n regions_label\n cities_label\n arrival_date_label\n departure_date_label\n max_weekprice_label\n persons_min_label\n persons_max_label\n bedrooms_min_label\n bathrooms_min_label\n weekprice_max_label\n no_nights_label\n extra_search_label\n properties_label\n }\n }\n"])));
|
|
14897
14897
|
var CALENDAR_QUERY$1 = gql(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n query PortalSiteHousesQuery(\n $id: ID!\n $house_id: String!\n $starts_at: Date!\n $ends_at: Date!\n ) {\n PortalSite(id: $id) {\n houses(house_code: $house_id) {\n id\n name\n last_minute_days\n availabilities(starts_at: $starts_at, ends_at: $ends_at) {\n arrival\n arrival_time_from\n arrival_time_to\n date\n departure\n departure_time\n max_nights\n min_nights\n special_offer\n }\n }\n }\n Discounts(\n house_code: $house_id\n discount_starts_at: $ends_at\n discount_ends_at: $starts_at\n active_today: true\n ) {\n name\n discount_starts_at\n discount_ends_at\n }\n }\n "])));
|
|
14898
14898
|
var BOOKING_PRICE_QUERY = gql(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n query BookingPriceQuery(\n $id: ID!\n $house_id: String!\n $starts_at: Date!\n $ends_at: Date!\n ) {\n PortalSite(id: $id) {\n options\n first_name_label\n preposition_label\n last_name_label\n email_label\n zipcode_label\n city_label\n address_label\n house_number_label\n phone_label\n phone_mobile_label\n country_label\n iban_label\n holder_label\n bic_label\n comment_label\n company_name_label\n extra_fields_drivers_license_label\n extra_fields_destination_label\n booking_fields {\n id\n label\n field_type\n options\n placeholder\n }\n houses(house_code: $house_id) {\n id\n name\n code\n allow_option\n persons\n image_url\n discounts\n discounts_info\n house_type\n rental_terms\n cancel_insurance\n damage_insurance\n damage_insurance_required\n travel_insurance\n babies_extra\n booking_price(starts_at: $starts_at, ends_at: $ends_at)\n }\n }\n }\n"])));
|
|
14899
|
-
var CREATE_BOOKING_MUTATION = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation CreateBooking(\n $first_name: String!\n $preposition: String\n $last_name: String!\n $company_name: String\n $is_option: Boolean!\n $address: String\n $house_number: String\n $zipcode: String\n $city: String\n $phone: String\n $phone_mobile: String\n $email: String!\n $house_code: String!\n $portal_code: String\n $language: String\n $country: String!\n $adults: Int!\n $children: Int\n $babies: Int\n $discount: Int\n $damage_insurance: Int\n $cancel_insurance: Int\n $travel_insurance: Int\n $discount_reason: String\n $discount_code: String\n $comment: String\n $arrival_date: String!\n $departure_date: String!\n $costs: Json\n $extra_fields: String\n ) {\n createBooking(\n first_name: $first_name\n preposition: $preposition\n company_name: $company_name\n last_name: $last_name\n is_option: $is_option\n address: $address\n house_number: $house_number\n zipcode: $zipcode\n city: $city\n phone: $phone\n phone_mobile: $phone_mobile\n email: $email\n house_code: $house_code\n portal_code: $portal_code\n language: $language\n country: $country\n adults: $adults\n children: $children\n babies: $babies\n discount: $discount\n discount_code: $discount_code\n damage_insurance: $damage_insurance\n cancel_insurance: $cancel_insurance\n travel_insurance: $travel_insurance\n discount_reason: $discount_reason\n arrival_date: $arrival_date\n departure_date: $departure_date\n comment: $comment\n costs: $costs\n extra_fields: $extra_fields\n ) {\n booking_nr\n }\n }\n"])));
|
|
14899
|
+
var CREATE_BOOKING_MUTATION = gql(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n mutation CreateBooking(\n $first_name: String!\n $preposition: String\n $last_name: String!\n $company_name: String\n $is_option: Boolean!\n $address: String\n $house_number: String\n $zipcode: String\n $city: String\n $phone: String\n $phone_mobile: String\n $iban: String\n $bic: String\n $holder: String\n $email: String!\n $house_code: String!\n $portal_code: String\n $language: String\n $country: String!\n $adults: Int!\n $children: Int\n $babies: Int\n $discount: Int\n $damage_insurance: Int\n $cancel_insurance: Int\n $travel_insurance: Int\n $discount_reason: String\n $discount_code: String\n $comment: String\n $arrival_date: String!\n $departure_date: String!\n $costs: Json\n $extra_fields: String\n ) {\n createBooking(\n first_name: $first_name\n preposition: $preposition\n company_name: $company_name\n last_name: $last_name\n is_option: $is_option\n address: $address\n house_number: $house_number\n zipcode: $zipcode\n city: $city\n phone: $phone\n phone_mobile: $phone_mobile\n iban: $iban\n bic: $bic\n holder: $holder\n email: $email\n house_code: $house_code\n portal_code: $portal_code\n language: $language\n country: $country\n adults: $adults\n children: $children\n babies: $babies\n discount: $discount\n discount_code: $discount_code\n damage_insurance: $damage_insurance\n cancel_insurance: $cancel_insurance\n travel_insurance: $travel_insurance\n discount_reason: $discount_reason\n arrival_date: $arrival_date\n departure_date: $departure_date\n comment: $comment\n costs: $costs\n extra_fields: $extra_fields\n ) {\n booking_nr\n }\n }\n"])));
|
|
14900
14900
|
|
|
14901
14901
|
var entry$1 = {};
|
|
14902
14902
|
|
|
@@ -41345,18 +41345,20 @@ function DiscountCode(_ref) {
|
|
|
41345
41345
|
var CHECK_DISCOUNT_CODE = gql(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n mutation CheckDiscountCode($code: String!, $house_code: String!) {\n checkDiscountCode(code: $code, house_code: $house_code) {\n name\n use_price\n percentage\n price\n }\n }\n"])));
|
|
41346
41346
|
|
|
41347
41347
|
var Discount = function Discount(_ref) {
|
|
41348
|
+
var _options$bookingForm;
|
|
41349
|
+
|
|
41348
41350
|
var errors = _ref.errors,
|
|
41349
41351
|
house = _ref.house,
|
|
41350
41352
|
options = _ref.options,
|
|
41351
41353
|
values = _ref.values;
|
|
41352
41354
|
|
|
41353
|
-
if (house.discounts && house.discounts !== '0') {
|
|
41354
|
-
var _options$
|
|
41355
|
+
if (house.discounts && house.discounts !== '0' || (_options$bookingForm = options.bookingForm) !== null && _options$bookingForm !== void 0 && _options$bookingForm.showDiscountCode) {
|
|
41356
|
+
var _options$bookingForm2;
|
|
41355
41357
|
|
|
41356
|
-
var discounts = house.discounts.split(',');
|
|
41358
|
+
var discounts = house.discounts ? house.discounts.split(',') : [];
|
|
41357
41359
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
41358
41360
|
className: "form-section"
|
|
41359
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
41361
|
+
}, house.discounts && house.discounts !== '0' && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
41360
41362
|
className: "form-row inline"
|
|
41361
41363
|
}, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
41362
41364
|
htmlFor: "discount"
|
|
@@ -41384,7 +41386,7 @@ var Discount = function Discount(_ref) {
|
|
|
41384
41386
|
style: {
|
|
41385
41387
|
fontSize: 14
|
|
41386
41388
|
}
|
|
41387
|
-
}, house.discounts_info)), ((_options$
|
|
41389
|
+
}, house.discounts_info))), ((_options$bookingForm2 = options.bookingForm) === null || _options$bookingForm2 === void 0 ? void 0 : _options$bookingForm2.showDiscountCode) && /*#__PURE__*/React__default['default'].createElement(DiscountCode, {
|
|
41388
41390
|
errors: errors,
|
|
41389
41391
|
house: house,
|
|
41390
41392
|
values: values
|
|
@@ -41786,7 +41788,7 @@ function CostSummary(_ref) {
|
|
|
41786
41788
|
var persons = Number(values.children) + Number(values.adults) + babies;
|
|
41787
41789
|
|
|
41788
41790
|
var _useQuery = useQuery(BOOKING_PRICE_TOTAL_QUERY, {
|
|
41789
|
-
variables:
|
|
41791
|
+
variables: {
|
|
41790
41792
|
id: values.portalCode,
|
|
41791
41793
|
persons: persons,
|
|
41792
41794
|
house_id: values.objectCode,
|
|
@@ -41794,8 +41796,9 @@ function CostSummary(_ref) {
|
|
|
41794
41796
|
ends_at: JSON.stringify(values.departureDate.date),
|
|
41795
41797
|
costs: JSON.stringify(values.costs),
|
|
41796
41798
|
discount: Number(values.discount),
|
|
41799
|
+
discount_code: values.discount_code,
|
|
41797
41800
|
cancel_insurance: Number(values.cancel_insurance)
|
|
41798
|
-
}
|
|
41801
|
+
},
|
|
41799
41802
|
fetchPolicy: 'network-only'
|
|
41800
41803
|
}),
|
|
41801
41804
|
loading = _useQuery.loading,
|
|
@@ -41855,6 +41858,9 @@ function Summary(_ref) {
|
|
|
41855
41858
|
var values = _ref.values,
|
|
41856
41859
|
house = _ref.house,
|
|
41857
41860
|
locale = _ref.locale;
|
|
41861
|
+
console.log({
|
|
41862
|
+
values: values
|
|
41863
|
+
});
|
|
41858
41864
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Object$1, {
|
|
41859
41865
|
house: house,
|
|
41860
41866
|
values: values
|
|
@@ -48320,9 +48326,6 @@ var FormCreator = /*#__PURE__*/function (_React$Component) {
|
|
|
48320
48326
|
});
|
|
48321
48327
|
}
|
|
48322
48328
|
|
|
48323
|
-
console.log({
|
|
48324
|
-
errors: errors
|
|
48325
|
-
});
|
|
48326
48329
|
return errors;
|
|
48327
48330
|
});
|
|
48328
48331
|
|
|
@@ -48378,18 +48381,9 @@ var FormCreator = /*#__PURE__*/function (_React$Component) {
|
|
|
48378
48381
|
}),
|
|
48379
48382
|
onSubmit: function onSubmit(values, _ref2) {
|
|
48380
48383
|
_ref2.setSubmitting;
|
|
48381
|
-
|
|
48382
|
-
|
|
48383
|
-
preposition: values.preposition,
|
|
48384
|
-
last_name: values.last_name,
|
|
48385
|
-
company_name: values.company_name,
|
|
48384
|
+
|
|
48385
|
+
var variables = _objectSpread2(_objectSpread2({}, values), {}, {
|
|
48386
48386
|
is_option: JSON.parse(values.is_option),
|
|
48387
|
-
address: values.address || '',
|
|
48388
|
-
zipcode: values.zipcode || '',
|
|
48389
|
-
city: values.city || '',
|
|
48390
|
-
phone: values.phone || '',
|
|
48391
|
-
phone_mobile: values.phone_mobile || '',
|
|
48392
|
-
email: values.email,
|
|
48393
48387
|
house_code: values.objectCode,
|
|
48394
48388
|
portal_code: values.portalCode,
|
|
48395
48389
|
comment: values.comment || '',
|
|
@@ -48403,12 +48397,12 @@ var FormCreator = /*#__PURE__*/function (_React$Component) {
|
|
|
48403
48397
|
damage_insurance: Number(values.damage_insurance) || 0,
|
|
48404
48398
|
cancel_insurance: Number(values.cancel_insurance) || 0,
|
|
48405
48399
|
travel_insurance: Number(values.travel_insurance) || 0,
|
|
48406
|
-
discount_reason: values.discount_reason || '',
|
|
48407
48400
|
arrival_date: values.arrivalDate.date,
|
|
48408
48401
|
departure_date: values.departureDate.date,
|
|
48409
48402
|
costs: JSON.stringify(values.costs),
|
|
48410
48403
|
extra_fields: JSON.stringify(values.extra_fields)
|
|
48411
|
-
};
|
|
48404
|
+
});
|
|
48405
|
+
|
|
48412
48406
|
createBooking({
|
|
48413
48407
|
variables: variables
|
|
48414
48408
|
}).then(function () {
|
|
@@ -48741,7 +48735,7 @@ var ReviewsPage = /*#__PURE__*/function (_Component) {
|
|
|
48741
48735
|
|
|
48742
48736
|
var pjson = {
|
|
48743
48737
|
name: "bukazu-portal-react",
|
|
48744
|
-
version: "2.0.
|
|
48738
|
+
version: "2.0.21",
|
|
48745
48739
|
description: "A package for loading the calendar and search module from bukazu loading into a react app.",
|
|
48746
48740
|
main: "build/index.js",
|
|
48747
48741
|
repository: "https://github.com/BUKAZU/React-portal",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bukazu-portal-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"description": "A package for loading the calendar and search module from bukazu loading into a react app.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"repository": "https://github.com/BUKAZU/React-portal",
|
package/src/_lib/queries.js
CHANGED
|
@@ -154,6 +154,9 @@ export const CREATE_BOOKING_MUTATION = gql`
|
|
|
154
154
|
$city: String
|
|
155
155
|
$phone: String
|
|
156
156
|
$phone_mobile: String
|
|
157
|
+
$iban: String
|
|
158
|
+
$bic: String
|
|
159
|
+
$holder: String
|
|
157
160
|
$email: String!
|
|
158
161
|
$house_code: String!
|
|
159
162
|
$portal_code: String
|
|
@@ -186,6 +189,9 @@ export const CREATE_BOOKING_MUTATION = gql`
|
|
|
186
189
|
city: $city
|
|
187
190
|
phone: $phone
|
|
188
191
|
phone_mobile: $phone_mobile
|
|
192
|
+
iban: $iban
|
|
193
|
+
bic: $bic
|
|
194
|
+
holder: $holder
|
|
189
195
|
email: $email
|
|
190
196
|
house_code: $house_code
|
|
191
197
|
portal_code: $portal_code
|
|
@@ -41,13 +41,13 @@ class FormCreator extends React.Component {
|
|
|
41
41
|
if (field.required) {
|
|
42
42
|
if (isInt(field.id)) {
|
|
43
43
|
const validateValue = byString(values, `extra_fields.booking_field_${field.id}`);
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
if (!validateValue || validateValue === '') {
|
|
46
46
|
errors[field.id] = <FormattedMessage id="required" />;
|
|
47
47
|
}
|
|
48
48
|
} else {
|
|
49
49
|
const validateValue = byString(values, field.id);
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
if (!validateValue || validateValue === '') {
|
|
52
52
|
errors[field.id] = <FormattedMessage id="required" />;
|
|
53
53
|
}
|
|
@@ -91,7 +91,6 @@ class FormCreator extends React.Component {
|
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
console.log({ errors });
|
|
95
94
|
return errors;
|
|
96
95
|
};
|
|
97
96
|
|
|
@@ -127,17 +126,8 @@ class FormCreator extends React.Component {
|
|
|
127
126
|
}}
|
|
128
127
|
onSubmit={(values, { setSubmitting }) => {
|
|
129
128
|
let variables = {
|
|
130
|
-
|
|
131
|
-
preposition: values.preposition,
|
|
132
|
-
last_name: values.last_name,
|
|
133
|
-
company_name: values.company_name,
|
|
129
|
+
...values,
|
|
134
130
|
is_option: JSON.parse(values.is_option),
|
|
135
|
-
address: values.address || '',
|
|
136
|
-
zipcode: values.zipcode || '',
|
|
137
|
-
city: values.city || '',
|
|
138
|
-
phone: values.phone || '',
|
|
139
|
-
phone_mobile: values.phone_mobile || '',
|
|
140
|
-
email: values.email,
|
|
141
131
|
house_code: values.objectCode,
|
|
142
132
|
portal_code: values.portalCode,
|
|
143
133
|
comment: values.comment || '',
|
|
@@ -151,7 +141,6 @@ class FormCreator extends React.Component {
|
|
|
151
141
|
damage_insurance: Number(values.damage_insurance) || 0,
|
|
152
142
|
cancel_insurance: Number(values.cancel_insurance) || 0,
|
|
153
143
|
travel_insurance: Number(values.travel_insurance) || 0,
|
|
154
|
-
discount_reason: values.discount_reason || '',
|
|
155
144
|
arrival_date: values.arrivalDate.date,
|
|
156
145
|
departure_date: values.departureDate.date,
|
|
157
146
|
costs: JSON.stringify(values.costs),
|
|
@@ -214,7 +203,7 @@ class FormCreator extends React.Component {
|
|
|
214
203
|
</div>
|
|
215
204
|
)}
|
|
216
205
|
</div>
|
|
217
|
-
<Discount errors={errors} house={house} options={options} values={values} />
|
|
206
|
+
<Discount errors={errors} house={house} options={options} values={values} />
|
|
218
207
|
|
|
219
208
|
<Insurances house={house} values={values} />
|
|
220
209
|
|
|
@@ -229,7 +218,7 @@ class FormCreator extends React.Component {
|
|
|
229
218
|
/>
|
|
230
219
|
</div>
|
|
231
220
|
|
|
232
|
-
<div className="form-sum">
|
|
221
|
+
<div className="form-sum">
|
|
233
222
|
<Summary house={house} values={values} />
|
|
234
223
|
{status && status.msg && <div>{status.msg}</div>}
|
|
235
224
|
<div className="terms">
|
|
@@ -16,7 +16,6 @@ function CostSummary({ values, house }) {
|
|
|
16
16
|
|
|
17
17
|
const { loading, error, data } = useQuery(BOOKING_PRICE_TOTAL_QUERY, {
|
|
18
18
|
variables: {
|
|
19
|
-
...values,
|
|
20
19
|
id: values.portalCode,
|
|
21
20
|
persons: persons,
|
|
22
21
|
house_id: values.objectCode,
|
|
@@ -24,6 +23,7 @@ function CostSummary({ values, house }) {
|
|
|
24
23
|
ends_at: JSON.stringify(values.departureDate.date),
|
|
25
24
|
costs: JSON.stringify(values.costs),
|
|
26
25
|
discount: Number(values.discount),
|
|
26
|
+
discount_code: values.discount_code,
|
|
27
27
|
cancel_insurance: Number(values.cancel_insurance),
|
|
28
28
|
},
|
|
29
29
|
fetchPolicy: 'network-only',
|
|
@@ -5,34 +5,41 @@ import { Field } from 'formik';
|
|
|
5
5
|
import DiscountCode from './DiscountCode';
|
|
6
6
|
|
|
7
7
|
const Discount = ({ errors, house, options, values }) => {
|
|
8
|
-
if (
|
|
9
|
-
|
|
8
|
+
if (
|
|
9
|
+
(house.discounts && house.discounts !== '0') ||
|
|
10
|
+
options.bookingForm?.showDiscountCode
|
|
11
|
+
) {
|
|
12
|
+
let discounts = house.discounts ? house.discounts.split(',') : [];
|
|
10
13
|
return (
|
|
11
14
|
<div className="form-section">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
{discount
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
{house.discounts && house.discounts !== '0' && (
|
|
16
|
+
<>
|
|
17
|
+
<div className="form-row inline">
|
|
18
|
+
<label htmlFor="discount">
|
|
19
|
+
<FormattedMessage id="discount" />
|
|
20
|
+
</label>
|
|
21
|
+
<Field component="select" name="discount">
|
|
22
|
+
{discounts.map((discount) => (
|
|
23
|
+
<option value={discount} key={discount}>
|
|
24
|
+
{discount}%
|
|
25
|
+
</option>
|
|
26
|
+
))}
|
|
27
|
+
</Field>
|
|
28
|
+
</div>
|
|
29
|
+
<div className="form-row inline">
|
|
30
|
+
<label htmlFor="discount_reason">
|
|
31
|
+
<FormattedMessage id="discount_reason" />
|
|
32
|
+
</label>
|
|
33
|
+
<Field name="discount_reason" />
|
|
34
|
+
{errors.discount_reason && (
|
|
35
|
+
<div className="error-message">{errors.discount_reason}</div>
|
|
36
|
+
)}
|
|
37
|
+
</div>
|
|
38
|
+
<div>
|
|
39
|
+
<i style={{ fontSize: 14 }}>{house.discounts_info}</i>
|
|
40
|
+
</div>
|
|
41
|
+
</>
|
|
42
|
+
)}
|
|
36
43
|
{options.bookingForm?.showDiscountCode && (
|
|
37
44
|
<DiscountCode errors={errors} house={house} values={values} />
|
|
38
45
|
)}
|