thm-p3-configurator 0.0.303 → 0.0.305
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/src/shared/__api__/authenticatedProxyApi.js +3 -2
- package/dist/src/shared/__api__/queries.js +5 -3
- package/dist/src/shared/__components__/internal/InternalCustomerDetailsForm.js +1 -0
- package/dist/src/shared/__containers__/internal/InternalAppointmentForm.js +7 -5
- package/dist/src/shared/__containers__/internal/InternalQuotationForm.js +4 -1
- package/dist/src/shared/__helpers__/image.js +1 -1
- package/package.json +1 -1
|
@@ -88,9 +88,10 @@ const authenticatedProxyApi = exports.authenticatedProxyApi = {
|
|
|
88
88
|
ownershipType,
|
|
89
89
|
organisationType,
|
|
90
90
|
searchTerm,
|
|
91
|
-
isTmg = false
|
|
91
|
+
isTmg = false,
|
|
92
|
+
isTowCenterBranch = false
|
|
92
93
|
} = _ref;
|
|
93
|
-
return authenticateClient("api/v1/branches/by-type?searchTerm=".concat(searchTerm, "&formula=").concat(formula, "&ownershipType=").concat(ownershipType, "&organisationType=").concat(organisationType, "&isTmg=").concat(isTmg, "
|
|
94
|
+
return authenticateClient("api/v1/branches/by-type?searchTerm=".concat(searchTerm, "&formula=").concat(formula, "&ownershipType=").concat(ownershipType, "&organisationType=").concat(organisationType, "&isTmg=").concat(isTmg, "&isTowCenterBranch=").concat(isTowCenterBranch), {
|
|
94
95
|
method: 'GET'
|
|
95
96
|
});
|
|
96
97
|
},
|
|
@@ -640,16 +640,18 @@ const useBranchesByType = _ref3 => {
|
|
|
640
640
|
ownershipType,
|
|
641
641
|
organisationType,
|
|
642
642
|
searchTerm,
|
|
643
|
-
isTmg = false
|
|
643
|
+
isTmg = false,
|
|
644
|
+
isTowCenterBranch = false
|
|
644
645
|
} = _ref3;
|
|
645
|
-
const branchesByTypeQuery = (0, _reactQuery.useQuery)(['branchesByType', formula, ownershipType, organisationType, searchTerm, isTmg], {
|
|
646
|
+
const branchesByTypeQuery = (0, _reactQuery.useQuery)(['branchesByType', formula, ownershipType, organisationType, searchTerm, isTmg, isTowCenterBranch], {
|
|
646
647
|
queryFn: async () => {
|
|
647
648
|
const response = await _authenticatedProxyApi.authenticatedProxyApi.getBranchesByType({
|
|
648
649
|
formula,
|
|
649
650
|
ownershipType,
|
|
650
651
|
organisationType,
|
|
651
652
|
searchTerm,
|
|
652
|
-
isTmg
|
|
653
|
+
isTmg,
|
|
654
|
+
isTowCenterBranch
|
|
653
655
|
});
|
|
654
656
|
if (response.data.length === 0) {
|
|
655
657
|
return null;
|
|
@@ -199,6 +199,7 @@ const InternalCustomerDetailsForm = (_ref, ref) => {
|
|
|
199
199
|
isLoadingBranchesByType
|
|
200
200
|
} = (0, _queries.useBranchesByType)({
|
|
201
201
|
isTmg,
|
|
202
|
+
isTowCenterBranch,
|
|
202
203
|
searchTerm: companySearchTerm,
|
|
203
204
|
formula,
|
|
204
205
|
ownershipType: vehicle === null || vehicle === void 0 ? void 0 : vehicle.singleOrderOwnershipType,
|
|
@@ -218,7 +218,8 @@ const InternalAppointmentForm = _ref => {
|
|
|
218
218
|
vehicleCodingDiscountPercentage,
|
|
219
219
|
consumerDiscounts,
|
|
220
220
|
montageRate,
|
|
221
|
-
hasGoedkeuringsnummerActivity
|
|
221
|
+
hasGoedkeuringsnummerActivity,
|
|
222
|
+
isTowCenterBranch
|
|
222
223
|
} = order;
|
|
223
224
|
const [errors, setErrors] = (0, _react.useState)({});
|
|
224
225
|
const [_licensePlate, _setLicensePlate] = (0, _react.useState)();
|
|
@@ -468,7 +469,8 @@ const InternalAppointmentForm = _ref => {
|
|
|
468
469
|
branchesByType,
|
|
469
470
|
isLoadingBranchesByType
|
|
470
471
|
} = (0, _queries.useBranchesByType)({
|
|
471
|
-
isTmg
|
|
472
|
+
isTmg,
|
|
473
|
+
isTowCenterBranch,
|
|
472
474
|
searchTerm: companySearchTerm,
|
|
473
475
|
formula,
|
|
474
476
|
ownershipType: vehicle === null || vehicle === void 0 ? void 0 : vehicle.ownershipType,
|
|
@@ -822,8 +824,8 @@ const InternalAppointmentForm = _ref => {
|
|
|
822
824
|
label: "Factuur betaling door Leasemaatschappij",
|
|
823
825
|
initialValue: invoicePaymentByLeaseCompany,
|
|
824
826
|
onChange: val => {
|
|
825
|
-
// Only allow if
|
|
826
|
-
if (
|
|
827
|
+
// Only allow enabling if hasGoedkeuringsnummerActivity (note with Goedkeuringsnummer attached to dossier)
|
|
828
|
+
if (hasGoedkeuringsnummerActivity) {
|
|
827
829
|
dispatch({
|
|
828
830
|
type: _OrderSessionContext.orderSessionActions.SET_CUSTOMER_INVOICE_PAYMENT_BY_LEASE_COMPANY,
|
|
829
831
|
payload: {
|
|
@@ -833,7 +835,7 @@ const InternalAppointmentForm = _ref => {
|
|
|
833
835
|
}
|
|
834
836
|
},
|
|
835
837
|
isRequired: false,
|
|
836
|
-
isDisabled:
|
|
838
|
+
isDisabled: !hasGoedkeuringsnummerActivity
|
|
837
839
|
}))), /*#__PURE__*/_react.default.createElement("h5", {
|
|
838
840
|
className: (0, _helpers__.withStyle)('my-2')
|
|
839
841
|
}, "Persoonlijke gegevens"), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -185,7 +185,8 @@ const InternalQuotationForm = _ref => {
|
|
|
185
185
|
selectedExtras,
|
|
186
186
|
vehicleCodingDiscountPercentage,
|
|
187
187
|
consumerDiscounts,
|
|
188
|
-
montageRate
|
|
188
|
+
montageRate,
|
|
189
|
+
isTowCenterBranch
|
|
189
190
|
}, dispatch] = (0, _OrderSessionContext.useOrderSession)();
|
|
190
191
|
const [errors, setErrors] = (0, _react.useState)({});
|
|
191
192
|
const [companySearchTerm, setCompanySearchTerm] = (0, _react.useState)('');
|
|
@@ -232,6 +233,8 @@ const InternalQuotationForm = _ref => {
|
|
|
232
233
|
branchesByType,
|
|
233
234
|
isLoadingBranchesByType
|
|
234
235
|
} = (0, _queries.useBranchesByType)({
|
|
236
|
+
isTmg,
|
|
237
|
+
isTowCenterBranch,
|
|
235
238
|
searchTerm: companySearchTerm,
|
|
236
239
|
formula,
|
|
237
240
|
ownershipType: vehicle === null || vehicle === void 0 ? void 0 : vehicle.ownershipType,
|
|
@@ -83,6 +83,6 @@ const getImageFromHyper = _ref => {
|
|
|
83
83
|
},
|
|
84
84
|
outputFormat: 'webp'
|
|
85
85
|
};
|
|
86
|
-
return "https://images.
|
|
86
|
+
return "https://images.hyper1.net/".concat(_buffer.Buffer.from(JSON.stringify(request), 'utf-8').toString('base64'));
|
|
87
87
|
};
|
|
88
88
|
exports.getImageFromHyper = getImageFromHyper;
|