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 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 }, tempShipmentData));
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 = Array.from(Object.values(this.dataToInsert.lines)).flat();
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
- ...tempShipmentData
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: InsertContentShipmentLine[] = Array.from(
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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",