project-booster-vue 8.119.1 → 8.119.2
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/package.json +1 -1
- package/src/services/api/configurationsApi.js +1 -1
- package/src/services/api/documentsApi.js +9 -8
- package/src/services/api/estimatesApi.js +3 -4
- package/src/services/api/eventsApi.js +12 -16
- package/src/services/api/mediaApi.js +9 -9
- package/src/services/api/productsApi.js +3 -4
- package/src/services/api/projectsApi.js +6 -8
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ const getProjectConfigurationsForProjectType = async (inhabitantProjectId, all)
|
|
|
21
21
|
const getAllProjectConfigurations = async (inhabitantProjectId, forceNoPriceUpdate) => {
|
|
22
22
|
let response;
|
|
23
23
|
if (forceNoPriceUpdate) {
|
|
24
|
-
response = await
|
|
24
|
+
response = await axios.get(`/api/inhabitant-projects/${inhabitantProjectId}/simulations`, {
|
|
25
25
|
params: { forceNoPriceUpdate },
|
|
26
26
|
});
|
|
27
27
|
} else {
|
|
@@ -3,11 +3,12 @@ import he from 'he';
|
|
|
3
3
|
|
|
4
4
|
const uploadDocument = async (formData, inhabitantProjectId, correlationId, subType, trackProgress, fileName) => {
|
|
5
5
|
const [name, file] = formData.entries().next().value;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const data = new FormData();
|
|
7
|
+
data.append('document', file);
|
|
8
|
+
data.append('metadata', JSON.stringify({ type: 'PLAN', correlationId, subType, title: fileName }, null, '\t'));
|
|
9
|
+
return await axios.post(`/api/inhabitant-projects/${inhabitantProjectId}/documents`, data, {
|
|
10
|
+
onUploadProgress: trackProgress,
|
|
11
|
+
});
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
const getDocumentsByInhabitantProjectId = async (start, end, inhabitantProjectId) => {
|
|
@@ -35,9 +36,9 @@ const getDocumentThumbnail = async (inhabitantProjectId, documentId) => {
|
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
const updateDocumentName = async (inhabitantProjectId, documentId, documentName) => {
|
|
38
|
-
return await
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
return await axios.patch(`/api/inhabitant-projects/${inhabitantProjectId}/documents/${documentId}`, {
|
|
40
|
+
title: documentName,
|
|
41
|
+
});
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
const deleteDocument = async (inhabitantProjectId, documentId) => {
|
|
@@ -48,10 +48,9 @@ export const saveEstimate = async (estimate) => {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const estimate = async (estimatorId, statelessEstimate) => {
|
|
51
|
-
const response = await
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.send(statelessEstimate);
|
|
51
|
+
const response = await axios.post(`/api/estimators/${estimatorId}:estimate`, statelessEstimate, {
|
|
52
|
+
headers: { 'Content-Type': 'application/json' },
|
|
53
|
+
});
|
|
55
54
|
|
|
56
55
|
return JSON.parse(
|
|
57
56
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -2,10 +2,9 @@ import axios from 'axios';
|
|
|
2
2
|
import he from 'he';
|
|
3
3
|
|
|
4
4
|
export const sendAppointmentQualificationEvent = async (event) => {
|
|
5
|
-
const response = await
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.send(event);
|
|
5
|
+
const response = await axios.post('/api/events/appointment-qualification-events', event, {
|
|
6
|
+
headers: { 'Content-Type': 'application/json' },
|
|
7
|
+
});
|
|
9
8
|
|
|
10
9
|
return JSON.parse(
|
|
11
10
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -15,10 +14,9 @@ export const sendAppointmentQualificationEvent = async (event) => {
|
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export const sendAppointmentQualificationAnswers = async (event) => {
|
|
18
|
-
const response = await
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.send(event);
|
|
17
|
+
const response = await axios.post('/api/events/appointment-qualification-answers', event, {
|
|
18
|
+
headers: { 'Content-Type': 'application/json' },
|
|
19
|
+
});
|
|
22
20
|
|
|
23
21
|
return JSON.parse(
|
|
24
22
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -40,10 +38,9 @@ export const sendDocumentsEvent = async (event) => {
|
|
|
40
38
|
};
|
|
41
39
|
|
|
42
40
|
export const sendCardClickEvent = async (event) => {
|
|
43
|
-
const response = await
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.send(event);
|
|
41
|
+
const response = await axios.post('/api/events/pushed-card-clicks', event, {
|
|
42
|
+
headers: { 'Content-Type': 'application/json' },
|
|
43
|
+
});
|
|
47
44
|
|
|
48
45
|
return JSON.parse(
|
|
49
46
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -53,10 +50,9 @@ export const sendCardClickEvent = async (event) => {
|
|
|
53
50
|
};
|
|
54
51
|
|
|
55
52
|
export const sendDeclarationEvent = async (event) => {
|
|
56
|
-
const response = await
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.send(event);
|
|
53
|
+
const response = await axios.post('/api/events/project-declarations', event, {
|
|
54
|
+
headers: { 'Content-Type': 'application/json' },
|
|
55
|
+
});
|
|
60
56
|
|
|
61
57
|
return JSON.parse(
|
|
62
58
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -23,15 +23,15 @@ const getMediumById = async (mediumId) => {
|
|
|
23
23
|
|
|
24
24
|
const uploadMedia = async (formData, inhabitantProjectId, correlationId, fileName, isRoomPicture, trackProgress) => {
|
|
25
25
|
const [name, file] = formData.entries().next().value;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const data = new FormData();
|
|
27
|
+
data.append(name, file);
|
|
28
|
+
data.append(
|
|
29
|
+
'metadata',
|
|
30
|
+
JSON.stringify({ inhabitantProjectId, correlationId, title: fileName, roomPicture: isRoomPicture }, null, '\t'),
|
|
31
|
+
);
|
|
32
|
+
return await axios.post('/api/media', data, {
|
|
33
|
+
onUploadProgress: trackProgress,
|
|
34
|
+
});
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const updateMediaName = async (mediaId, mediaName) => {
|
|
@@ -32,10 +32,9 @@ export const getProductsFeatureFlag = async (projectTypeId) => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const saveWorkKinds = async (inhabitantProjectId, workKinds) => {
|
|
35
|
-
const response = await
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.send(workKinds);
|
|
35
|
+
const response = await axios.put(`/api/inhabitant-projects/${inhabitantProjectId}/work-kinds`, workKinds, {
|
|
36
|
+
headers: { 'Content-Type': 'application/json' },
|
|
37
|
+
});
|
|
39
38
|
|
|
40
39
|
return JSON.parse(
|
|
41
40
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
@@ -46,18 +46,16 @@ export const deleteProjectById = async (id) => {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export const saveInhabitantProject = async (inhabitantProject) => {
|
|
49
|
-
const response = await
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.send(inhabitantProject);
|
|
49
|
+
const response = await axios.post('/api/inhabitant-projects', inhabitantProject, {
|
|
50
|
+
headers: { 'Content-Type': 'application/json' },
|
|
51
|
+
});
|
|
53
52
|
return response.headers.location;
|
|
54
53
|
};
|
|
55
54
|
|
|
56
55
|
export const saveProjectDeclaration = async (projectDeclaration) => {
|
|
57
|
-
const response = await
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.send(projectDeclaration);
|
|
56
|
+
const response = await axios.post('/api/declarations', projectDeclaration, {
|
|
57
|
+
headers: { 'Content-Type': 'application/json' },
|
|
58
|
+
});
|
|
61
59
|
|
|
62
60
|
return JSON.parse(
|
|
63
61
|
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|