cardus 0.0.62 → 0.0.63
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/index.js +0 -6
- package/dist/insertTempShipment/index.js +2 -1
- package/index.ts +0 -13
- package/insertTempShipment/index.ts +2 -1
- package/package.json +1 -1
- package/types/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -193,11 +193,6 @@ class IntegrationManager {
|
|
|
193
193
|
this.dataToInsert.contents.push(Object.assign(Object.assign({}, tempContent), { id_envio: tempShimpmentId }));
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
|
-
// Limpia los contenidos para eliminar valores no deseados
|
|
197
|
-
const cleanContentData = (contents) => {
|
|
198
|
-
const cleanContent = contents.map((content) => (Object.assign(Object.assign({}, content), { peso_bruto: content.peso_bruto < 0.1 ? 1 : content.peso_bruto, peso_neto: content.peso_neto < 0.1 ? 1 : content.peso_neto, valor: content.valor <= 0 ? 1 : content.valor })));
|
|
199
|
-
return cleanContent;
|
|
200
|
-
};
|
|
201
196
|
let userConfiguration = null;
|
|
202
197
|
const userSavedData = (yield configurationService.getDefaultProformaConfiguration(idUsuario)) ||
|
|
203
198
|
[];
|
|
@@ -209,7 +204,6 @@ class IntegrationManager {
|
|
|
209
204
|
userConfiguration = userFakeData;
|
|
210
205
|
}
|
|
211
206
|
if (userConfiguration) {
|
|
212
|
-
userConfiguration = cleanContentData(userConfiguration);
|
|
213
207
|
tempShimpmentIds.forEach((tempShimpmentId) => {
|
|
214
208
|
if (userConfiguration) {
|
|
215
209
|
insert(userConfiguration, tempShimpmentId);
|
|
@@ -66,7 +66,8 @@ const cookTempShipment = (_a) => __awaiter(void 0, [_a], void 0, function* ({ or
|
|
|
66
66
|
cod_pos_llegada: order.codigoPostalLLegada,
|
|
67
67
|
poblacion_llegada: order.ciudadLLegada,
|
|
68
68
|
tlf_llegada: order.telefonoLLegada || 'no informado',
|
|
69
|
-
mail_llegada: order.emailLLegada || 'no informado'
|
|
69
|
+
mail_llegada: order.emailLLegada || 'no informado',
|
|
70
|
+
dni_destinatario: (order === null || order === void 0 ? void 0 : order.numeroIdentificacionLLegada) || null
|
|
70
71
|
});
|
|
71
72
|
});
|
|
72
73
|
const setReembolso = (order) => {
|
package/index.ts
CHANGED
|
@@ -265,18 +265,6 @@ export class IntegrationManager {
|
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
// Limpia los contenidos para eliminar valores no deseados
|
|
269
|
-
const cleanContentData = (contents: UserDefaultConfigurationContent[]) => {
|
|
270
|
-
const cleanContent = contents.map((content) => ({
|
|
271
|
-
...content,
|
|
272
|
-
peso_bruto: content.peso_bruto < 0.1 ? 1 : content.peso_bruto,
|
|
273
|
-
peso_neto: content.peso_neto < 0.1 ? 1 : content.peso_neto,
|
|
274
|
-
valor: content.valor <= 0 ? 1 : content.valor
|
|
275
|
-
}));
|
|
276
|
-
|
|
277
|
-
return cleanContent;
|
|
278
|
-
};
|
|
279
|
-
|
|
280
268
|
let userConfiguration: UserDefaultConfigurationContent[] | null = null;
|
|
281
269
|
const userSavedData =
|
|
282
270
|
(await configurationService.getDefaultProformaConfiguration(idUsuario)) ||
|
|
@@ -292,7 +280,6 @@ export class IntegrationManager {
|
|
|
292
280
|
userConfiguration = userFakeData;
|
|
293
281
|
}
|
|
294
282
|
if (userConfiguration) {
|
|
295
|
-
userConfiguration = cleanContentData(userConfiguration);
|
|
296
283
|
tempShimpmentIds.forEach((tempShimpmentId) => {
|
|
297
284
|
if (userConfiguration) {
|
|
298
285
|
insert(userConfiguration, tempShimpmentId);
|
|
@@ -110,7 +110,8 @@ export const cookTempShipment = async ({
|
|
|
110
110
|
cod_pos_llegada: order.codigoPostalLLegada,
|
|
111
111
|
poblacion_llegada: order.ciudadLLegada,
|
|
112
112
|
tlf_llegada: order.telefonoLLegada || 'no informado',
|
|
113
|
-
mail_llegada: order.emailLLegada || 'no informado'
|
|
113
|
+
mail_llegada: order.emailLLegada || 'no informado',
|
|
114
|
+
dni_destinatario: order?.numeroIdentificacionLLegada || null
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
const setReembolso = (order: ModifiedOrder) => {
|
package/package.json
CHANGED
package/types/index.ts
CHANGED
|
@@ -120,6 +120,7 @@ export type ModifiedOrder = {
|
|
|
120
120
|
agenciaEnvioIntegracion: string | null;
|
|
121
121
|
referenciaCliente?: string;
|
|
122
122
|
etiquetaExtraInfo?: string;
|
|
123
|
+
numeroIdentificacionLLegada?: string | null;
|
|
123
124
|
};
|
|
124
125
|
|
|
125
126
|
export interface ModifiedOrderExtended extends ModifiedOrder {
|