cardus 0.0.102 → 0.0.103
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 +3 -2
- package/index.ts +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -161,11 +161,12 @@ class IntegrationManager {
|
|
|
161
161
|
id_envio: idEnvioTemporal,
|
|
162
162
|
id_usuario: idUsuario
|
|
163
163
|
});
|
|
164
|
+
this.dataToInsert.lines.delete(idEnvioTemporal);
|
|
164
165
|
return;
|
|
165
166
|
}
|
|
166
167
|
if (isTempShipmentModified) {
|
|
167
168
|
delete partialTempShipmentModified.abort_creation; // por si acaso
|
|
168
|
-
yield integrationsService.updateTempShimpment(Object.assign({ id_envio: idEnvioTemporal },
|
|
169
|
+
yield integrationsService.updateTempShimpment(Object.assign({ id_envio: idEnvioTemporal }, partialTempShipmentModified));
|
|
169
170
|
}
|
|
170
171
|
if (arePackagesModified) {
|
|
171
172
|
this.dataToInsert.lines.set(idEnvioTemporal, packagesModified);
|
|
@@ -184,7 +185,7 @@ class IntegrationManager {
|
|
|
184
185
|
user,
|
|
185
186
|
countryName: country.nombre_pais_en
|
|
186
187
|
});
|
|
187
|
-
const arrayPackages =
|
|
188
|
+
const arrayPackages = [...this.dataToInsert.lines.values()].flat().flat();
|
|
188
189
|
yield Promise.allSettled([
|
|
189
190
|
integrationsService.insertTempShipmentMultipleLines(arrayPackages),
|
|
190
191
|
integrationsService.insertTempShipmentMultipleDetails(this.dataToInsert.details),
|
package/index.ts
CHANGED
|
@@ -242,6 +242,8 @@ export class IntegrationManager {
|
|
|
242
242
|
id_usuario: idUsuario
|
|
243
243
|
});
|
|
244
244
|
|
|
245
|
+
this.dataToInsert.lines.delete(idEnvioTemporal);
|
|
246
|
+
|
|
245
247
|
return;
|
|
246
248
|
}
|
|
247
249
|
|
|
@@ -250,7 +252,7 @@ export class IntegrationManager {
|
|
|
250
252
|
|
|
251
253
|
await integrationsService.updateTempShimpment({
|
|
252
254
|
id_envio: idEnvioTemporal,
|
|
253
|
-
...
|
|
255
|
+
...partialTempShipmentModified
|
|
254
256
|
});
|
|
255
257
|
}
|
|
256
258
|
|
|
@@ -275,9 +277,7 @@ export class IntegrationManager {
|
|
|
275
277
|
countryName: country.nombre_pais_en
|
|
276
278
|
});
|
|
277
279
|
|
|
278
|
-
const arrayPackages
|
|
279
|
-
Object.values(this.dataToInsert.lines)
|
|
280
|
-
).flat();
|
|
280
|
+
const arrayPackages = [...this.dataToInsert.lines.values()].flat().flat();
|
|
281
281
|
|
|
282
282
|
await Promise.allSettled([
|
|
283
283
|
integrationsService.insertTempShipmentMultipleLines(arrayPackages),
|