vtb-appit 0.0.64 → 0.0.66
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/appit.js +11 -2
- package/package.json +1 -1
package/appit.js
CHANGED
|
@@ -71,8 +71,8 @@ class Appit {
|
|
|
71
71
|
await this.members();
|
|
72
72
|
await this.travelInfo();
|
|
73
73
|
await this.accommodations();
|
|
74
|
-
await this.schemes();
|
|
75
74
|
await this.destinations();
|
|
75
|
+
await this.schemes();
|
|
76
76
|
await this.flights();
|
|
77
77
|
await this.flightImages();
|
|
78
78
|
await this.contacts();
|
|
@@ -155,6 +155,7 @@ class Appit {
|
|
|
155
155
|
let id = this.findId('places', places[i].object_id);
|
|
156
156
|
if(!id) {
|
|
157
157
|
let model = await this.createPlace({...place, ...images, excursion_id: this.history.excursionId});
|
|
158
|
+
console.log('place', model);
|
|
158
159
|
placesHistory[places[i].object_id] = model.data.id;
|
|
159
160
|
} else {
|
|
160
161
|
let model = await this.updatePlace(id, {...place, ...images, excursion_id: this.history.excursionId});
|
|
@@ -242,6 +243,7 @@ class Appit {
|
|
|
242
243
|
let id = this.findId('organizations', organizations[i].object_id);
|
|
243
244
|
if(!id) {
|
|
244
245
|
let model = await this.createOrganization(organizations[i]);
|
|
246
|
+
console.log('organization', model);
|
|
245
247
|
organizationsHistory[organizations[i].object_id] = model.data.id;
|
|
246
248
|
} else {
|
|
247
249
|
let model = await this.updateOrganization(id, organizations[i]);
|
|
@@ -289,6 +291,7 @@ class Appit {
|
|
|
289
291
|
let id = this.findId('members', participants[i].id);
|
|
290
292
|
if(!id) {
|
|
291
293
|
let model = await this.createMember({...participant, excursion_id: this.history.excursionId});
|
|
294
|
+
console.log('member', model);
|
|
292
295
|
memberHistory[participants[i].id] = model.data.id;
|
|
293
296
|
} else {
|
|
294
297
|
let model = await this.updateMember(id, {...participant, excursion_id: this.history.excursionId});
|
|
@@ -321,6 +324,7 @@ class Appit {
|
|
|
321
324
|
|
|
322
325
|
if(!id) {
|
|
323
326
|
let model = await this.createTravel({...info, excursion_id: this.history.excursionId});
|
|
327
|
+
console.log('travelInfo', model);
|
|
324
328
|
travelInfoHistory[travelInfo[i].object_id] = model.data.id;
|
|
325
329
|
} else {
|
|
326
330
|
let model = await this.updateTravel(id, {...info, excursion_id: this.history.excursionId});
|
|
@@ -346,6 +350,7 @@ class Appit {
|
|
|
346
350
|
let id = this.findId('documents', documents[i].object_id);
|
|
347
351
|
if(!id) {
|
|
348
352
|
let model = await this.createDocument(documents[i]);
|
|
353
|
+
console.log('documents', model);
|
|
349
354
|
this.history.documents[documents[i].object_id] = model.data.id;
|
|
350
355
|
} else {
|
|
351
356
|
await this.updateDocument(id, documents[i]);
|
|
@@ -369,6 +374,7 @@ class Appit {
|
|
|
369
374
|
let id = this.findId('accommodations', accommodations[i].object_id);
|
|
370
375
|
if(!id) {
|
|
371
376
|
let model = await this.createAccommodation({...accommodation, ...images, labels: labels, excursion_id: this.history.excursionId});
|
|
377
|
+
console.log('accommodations', model);
|
|
372
378
|
accommodationHistory[accommodations[i].object_id] = model.data.id;
|
|
373
379
|
} else {
|
|
374
380
|
let model = await this.updateAccommodation(id, {...accommodation, ...images, labels: labels, excursion_id: this.history.excursionId});
|
|
@@ -400,6 +406,7 @@ class Appit {
|
|
|
400
406
|
let id = this.findId('destinations', destinations[i].object_id);
|
|
401
407
|
if(!id) {
|
|
402
408
|
let model = await this.createDestination({...destination, ...images, labels: labels, excursion_id: this.history.excursionId});
|
|
409
|
+
console.log('destination', model);
|
|
403
410
|
destinationHistory[destinations[i].object_id] = model.data.id;
|
|
404
411
|
} else {
|
|
405
412
|
let model = await this.updateDestination(id, {...destination, ...images, labels: labels, excursion_id: this.history.excursionId});
|
|
@@ -428,6 +435,7 @@ class Appit {
|
|
|
428
435
|
let id = this.findId('schemes', schemes[i].object_id);
|
|
429
436
|
if(!id) {
|
|
430
437
|
let model = await this.createScheme({...scheme, labels: labels, excursion_id: this.history.excursionId});
|
|
438
|
+
console.log('schemes', model);
|
|
431
439
|
schemeHistory[schemes[i].object_id] = model.data.id;
|
|
432
440
|
} else {
|
|
433
441
|
let model = await this.updateScheme(id, {...scheme, labels: labels, excursion_id: this.history.excursionId});
|
|
@@ -455,6 +463,7 @@ class Appit {
|
|
|
455
463
|
let id = this.findId('contacts', contacts[i].object_id);
|
|
456
464
|
if(!id) {
|
|
457
465
|
let model = await this.createContact({...contact, excursion_id: this.history.excursionId});
|
|
466
|
+
console.log('contacts', model);
|
|
458
467
|
contactHistory[contacts[i].object_id] = model.data.id;
|
|
459
468
|
} else {
|
|
460
469
|
let model = await this.updateContact(id, {...contact, excursion_id: this.history.excursionId});
|
|
@@ -706,7 +715,7 @@ class Appit {
|
|
|
706
715
|
return await this.request('PUT', `destinations/${id}`, data);
|
|
707
716
|
}
|
|
708
717
|
|
|
709
|
-
async
|
|
718
|
+
async deleteDestination(id)
|
|
710
719
|
{
|
|
711
720
|
return await this.request('DELETE', `destinations/${id}`);
|
|
712
721
|
}
|