@infosoftas/s4-orders-js-sdk 0.1.14 → 0.1.16
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/package.json
CHANGED
|
@@ -327,6 +327,10 @@ const useOrderForm = ({
|
|
|
327
327
|
void fetchDenialFallbackOffer(organizationId)
|
|
328
328
|
.then((offer) => {
|
|
329
329
|
setOrderDenialFallbackOffer(offer);
|
|
330
|
+
if (offer?.templatePackageId) {
|
|
331
|
+
fallbackOfferTemplatePackageIdRef.current =
|
|
332
|
+
offer.templatePackageId;
|
|
333
|
+
}
|
|
330
334
|
})
|
|
331
335
|
.catch(() => {
|
|
332
336
|
setOrderDenialFallbackOffer(undefined);
|
package/src/types/general.ts
CHANGED
|
@@ -112,6 +112,11 @@ export const prepareContactModel = ({
|
|
|
112
112
|
data,
|
|
113
113
|
orderFields,
|
|
114
114
|
}: ContactModelType) => {
|
|
115
|
+
const organizationNumber =
|
|
116
|
+
data.paymentMethod === PaymentMethodEnum.OIO
|
|
117
|
+
? data.cvr?.trim() || undefined
|
|
118
|
+
: data.organizationNumber?.trim() || undefined;
|
|
119
|
+
|
|
115
120
|
const model = {
|
|
116
121
|
name: orderFields.find((i) => i.name === 'name')
|
|
117
122
|
? data.name?.trim() || undefined
|
|
@@ -143,6 +148,11 @@ export const prepareContactModel = ({
|
|
|
143
148
|
careOf: orderFields.find((i) => i.name === 'careOf')
|
|
144
149
|
? data.careOf?.trim() || undefined
|
|
145
150
|
: undefined,
|
|
151
|
+
organizationNumber,
|
|
152
|
+
gln:
|
|
153
|
+
data.paymentMethod === PaymentMethodEnum.OIO
|
|
154
|
+
? data.gln?.trim() || undefined
|
|
155
|
+
: undefined,
|
|
146
156
|
};
|
|
147
157
|
|
|
148
158
|
return model;
|