vtb-appit 0.1.23 → 0.1.25
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-notify.js +3 -3
- package/appit.js +2 -2
- package/package.json +1 -1
package/appit-notify.js
CHANGED
|
@@ -4,12 +4,12 @@ const {readFileSync} = require('fs');
|
|
|
4
4
|
class AppitNotify {
|
|
5
5
|
async exec(status, token, workspaceId, excursionId, messages) {
|
|
6
6
|
let query = '';
|
|
7
|
-
let
|
|
7
|
+
let branch = process.env.PROPOSAL_BRANCH.split('-');
|
|
8
8
|
if(status === 'done') {
|
|
9
9
|
query = `
|
|
10
10
|
mutation {
|
|
11
11
|
proposalbuildUpdate(input: {
|
|
12
|
-
id: "${
|
|
12
|
+
id: "${branch[1]}",
|
|
13
13
|
status: "done",
|
|
14
14
|
url: "https://portal.appit4travel.com/en/admin/workspaces/${workspaceId}/excursions/${excursionId}/edit"
|
|
15
15
|
}) {
|
|
@@ -30,7 +30,7 @@ class AppitNotify {
|
|
|
30
30
|
query = `
|
|
31
31
|
mutation {
|
|
32
32
|
proposalbuildUpdate(input: {
|
|
33
|
-
id: "${
|
|
33
|
+
id: "${branch[1]}",
|
|
34
34
|
status: "failed",
|
|
35
35
|
url: "${url}",
|
|
36
36
|
messages: [${messages.map(msg =>
|
package/appit.js
CHANGED
|
@@ -198,7 +198,7 @@ class Appit {
|
|
|
198
198
|
if(step.name == 'excursion' && !this.history.excursionId) {
|
|
199
199
|
if(!this.transformer.vtbMessages.length) {
|
|
200
200
|
this.transformer.vtbMessages.push({
|
|
201
|
-
'message': 'Reis kon niet worden aangemaakt in Appit, neem contact op met <a href=\\"support@3rdfloorcoding.nl\\">support@3rdfloorcoding.nl.</a>'
|
|
201
|
+
'message': 'Reis kon niet worden aangemaakt in Appit, neem contact op met <a href=\\"mailto:support@3rdfloorcoding.nl\\">support@3rdfloorcoding.nl.</a>'
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
break;
|
|
@@ -990,7 +990,7 @@ class Appit {
|
|
|
990
990
|
let accommodation = this.clean(JSON.parse(JSON.stringify(accommodations[i])));
|
|
991
991
|
let labels = this.getLabels(accommodations[i]);
|
|
992
992
|
|
|
993
|
-
const images = (accommodation.images && accommodation.images.length) ? await this.getImages(accommodation.images, 'original/
|
|
993
|
+
const images = (accommodation.images && accommodation.images.length) ? await this.getImages(accommodation.images, 'original/original') : {};
|
|
994
994
|
delete accommodation.images;
|
|
995
995
|
|
|
996
996
|
const accommodationData = {...accommodation, ...images, labels: labels, excursion_id: this.history.excursionId};
|