project-booster-vue 10.3.2-beta.1 → 10.3.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/components/scenario/PbScenario-Features-Russian-Playground.stories.mdx +1 -1
- package/src/components/trezor/PbTrezor.vue +7 -7
- package/src/components/trezor/default-payload.json +2 -1
- package/src/services/api/appointmentQualificationsApi.ts +3 -4
- package/src/services/api/configApi.ts +3 -4
- package/src/services/api/configurationsApi.ts +3 -4
- package/src/services/api/consentApi.ts +3 -4
- package/src/services/api/documentsApi.ts +3 -4
- package/src/services/api/estimatesApi.ts +3 -4
- package/src/services/api/eventsApi.ts +3 -4
- package/src/services/api/inhabitantsApi.ts +3 -4
- package/src/services/api/productApi.ts +4 -4
- package/src/services/api/productsApi.ts +4 -4
- package/src/services/api/projectsApi.ts +3 -4
- package/src/services/api/scenarioApi.ts +4 -5
- package/src/services/api/toolsApi.ts +3 -3
- package/src/services/api/trezorApi.ts +7 -7
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
|
|
|
78
78
|
axios.interceptors.request.use(
|
|
79
79
|
function (config) {
|
|
80
80
|
if (!config.url.includes('://') && config.url.indexOf('//') === -1) {
|
|
81
|
-
config.headers['
|
|
81
|
+
config.headers['X-ClientApiKey'] = args.apiKey;
|
|
82
82
|
config.url = config.url.replace('/api/', '/');
|
|
83
83
|
}
|
|
84
84
|
return config;
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<div class="pb-trezor__form__col ml-flexy__col--5of6 no-padding">
|
|
139
139
|
<m-flex v-if="isCollaborator" class="pb-trezor__form__row space" direction="column">
|
|
140
140
|
<label class="pb-trezor__form__label"
|
|
141
|
-
>Partenaire à privilégier<span>
|
|
141
|
+
>Partenaire à privilégier<span> - sous réserve de disponibilité</span></label
|
|
142
142
|
>
|
|
143
143
|
<div class="pb-trezor__form__cards-container">
|
|
144
144
|
<m-pb-card
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
|
|
154
154
|
<m-flex v-if="isCollaborator" class="pb-trezor__form__row space" direction="column">
|
|
155
155
|
<label class="pb-trezor__form__label"
|
|
156
|
-
>Commentaire du collaborateur<span>
|
|
156
|
+
>Commentaire du collaborateur<span> - minimum 10 caractères</span></label
|
|
157
157
|
>
|
|
158
158
|
<div class="pb-trezor__form__textarea-container">
|
|
159
159
|
<textarea
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
:required="false"
|
|
164
164
|
rows="5"
|
|
165
165
|
/>
|
|
166
|
+
<label class="mc-field__error-message">{{ formData.errors.comment }}</label>
|
|
166
167
|
</div>
|
|
167
168
|
</m-flex>
|
|
168
169
|
|
|
@@ -419,8 +420,7 @@ export default defineComponent({
|
|
|
419
420
|
return formData.value.values.optinPartners === true;
|
|
420
421
|
}),
|
|
421
422
|
optinOffers: boolean(),
|
|
422
|
-
|
|
423
|
-
comment: string().notRequired().nullable(true),
|
|
423
|
+
comment: string().notRequired().nullable(true).min(10),
|
|
424
424
|
});
|
|
425
425
|
|
|
426
426
|
const isSubmitDisabled = ref(false);
|
|
@@ -449,8 +449,8 @@ export default defineComponent({
|
|
|
449
449
|
optinPartners: formData.value.values.optinPartners,
|
|
450
450
|
optinOffers: formData.value.values.optinOffers,
|
|
451
451
|
metadata: sendingMetadata,
|
|
452
|
-
description: formData.values.comment,
|
|
453
|
-
preferredCompany: formData.values.selectedPreferredPartner,
|
|
452
|
+
description: formData.value.values.comment,
|
|
453
|
+
preferredCompany: formData.value.values.selectedPreferredPartner,
|
|
454
454
|
},
|
|
455
455
|
typeLead: props.payload.viewModel.typeLead,
|
|
456
456
|
});
|
|
@@ -586,7 +586,7 @@ $responsive-breakpoint: 'm';
|
|
|
586
586
|
|
|
587
587
|
&__textarea-container {
|
|
588
588
|
display: flex;
|
|
589
|
-
flex-direction:
|
|
589
|
+
flex-direction: column;
|
|
590
590
|
width: 100%;
|
|
591
591
|
|
|
592
592
|
&__label {
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"city": "La ville est requise",
|
|
31
31
|
"zipcode": "Le code postal est requis",
|
|
32
32
|
"email": "Votre adresse mail est requise",
|
|
33
|
-
"phone": "Votre numéro de téléphone est requis"
|
|
33
|
+
"phone": "Votre numéro de téléphone est requis",
|
|
34
|
+
"comment": "Le commentaire doit contenir au moins 10 caractères"
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
"callToActions": [
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateAppointmentQualificationClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateAppointmentQualificationClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateConfigApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateConfigApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateConfigurationsApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateConfigurationsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateConsentApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateConsentApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateDocumentsApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateDocumentsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -9,12 +9,11 @@ export const clientApi = axios.create({
|
|
|
9
9
|
|
|
10
10
|
if ((<any>window).config) {
|
|
11
11
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
12
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
export const updateEstimatesApiClient = (config: {
|
|
16
|
-
if (config.
|
|
17
|
-
clientApi.defaults.headers.common['
|
|
14
|
+
export const updateEstimatesApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
15
|
+
if (config.apiKey) {
|
|
16
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
18
17
|
}
|
|
19
18
|
if (config.baseUrl) {
|
|
20
19
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateEventsApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateEventsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,11 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateInhabitantsApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
clientApi.defaults.headers.common['
|
|
12
|
+
export const updateInhabitantsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
16
15
|
}
|
|
17
16
|
if (config.baseUrl) {
|
|
18
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,12 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateProductApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
|
|
12
|
+
export const updateProductApiClient = (config: { apiKey: string; baseUrl: string; apiHeader: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
const header = config.apiHeader ?? 'X-Gateway-ApiKey';
|
|
15
|
+
clientApi.defaults.headers.common[header] = config.apiKey;
|
|
16
16
|
}
|
|
17
17
|
if (config.baseUrl) {
|
|
18
18
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -7,12 +7,12 @@ export const clientApi = axios.create({
|
|
|
7
7
|
|
|
8
8
|
if ((<any>window).config) {
|
|
9
9
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
10
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const updateProductsApiClient = (config: {
|
|
14
|
-
if (config.
|
|
15
|
-
|
|
12
|
+
export const updateProductsApiClient = (config: { apiKey: string; baseUrl: string; apiHeader: string }) => {
|
|
13
|
+
if (config.apiKey) {
|
|
14
|
+
const header = config.apiHeader ?? 'X-Gateway-ApiKey';
|
|
15
|
+
clientApi.defaults.headers.common[header] = config.apiKey;
|
|
16
16
|
}
|
|
17
17
|
if (config.baseUrl) {
|
|
18
18
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -8,12 +8,11 @@ export const clientApi = axios.create({
|
|
|
8
8
|
|
|
9
9
|
if ((<any>window).config) {
|
|
10
10
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
11
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
export const updateProjectsApiClient = (config: {
|
|
15
|
-
if (config.
|
|
16
|
-
clientApi.defaults.headers.common['
|
|
13
|
+
export const updateProjectsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
14
|
+
if (config.apiKey) {
|
|
15
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
17
16
|
}
|
|
18
17
|
if (config.baseUrl) {
|
|
19
18
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -6,19 +6,18 @@ export const clientApi = axios.create({
|
|
|
6
6
|
|
|
7
7
|
if ((<any>window).config) {
|
|
8
8
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
9
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export const updateScenarioApiClient = (config: {
|
|
13
|
-
if (config.
|
|
14
|
-
clientApi.defaults.headers.common['
|
|
11
|
+
export const updateScenarioApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
12
|
+
if (config.apiKey) {
|
|
13
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
15
14
|
}
|
|
16
15
|
if (config.baseUrl) {
|
|
17
16
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
|
|
21
|
-
export const getScenarioById = async (id: string)
|
|
20
|
+
export const getScenarioById = async (id: string) => {
|
|
22
21
|
const response = await clientApi.get(`/scenarios/${id}`);
|
|
23
22
|
return response.data;
|
|
24
23
|
};
|
|
@@ -3,9 +3,9 @@ import { escape } from '../../services/htmlEscape';
|
|
|
3
3
|
|
|
4
4
|
export const clientApi = axios.create({});
|
|
5
5
|
|
|
6
|
-
export const updateToolsApiClient = (config: {
|
|
7
|
-
if (config.
|
|
8
|
-
clientApi.defaults.headers.common['
|
|
6
|
+
export const updateToolsApiClient = (config: { apiKey: string; baseUrl: string }) => {
|
|
7
|
+
if (config.apiKey) {
|
|
8
|
+
clientApi.defaults.headers.common['X-ClientApiKey'] = config.apiKey;
|
|
9
9
|
}
|
|
10
10
|
if (config.baseUrl) {
|
|
11
11
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
@@ -6,19 +6,19 @@ export const clientApi = axios.create({
|
|
|
6
6
|
|
|
7
7
|
if ((<any>window).config) {
|
|
8
8
|
clientApi.defaults.baseURL = (<any>window).config.VUE_APP_DEFAULT_BASE_URL;
|
|
9
|
-
clientApi.defaults.headers.common['x-gateway-apikey'] = (<any>window).config.VUE_APP_DEFAULT_API_KEY;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export const updateTrezorApiClient = (config: {
|
|
13
|
-
if (config.
|
|
14
|
-
|
|
11
|
+
export const updateTrezorApiClient = (config: { apiKey: string; baseUrl: string; apiHeader: string }) => {
|
|
12
|
+
if (config.apiKey) {
|
|
13
|
+
const header = config.apiHeader ?? 'X-Gateway-ApiKey';
|
|
14
|
+
clientApi.defaults.headers.common[header] = config.apiKey;
|
|
15
15
|
}
|
|
16
16
|
if (config.baseUrl) {
|
|
17
17
|
clientApi.defaults.baseURL = config.baseUrl;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export const sendTrezorForm = async (typeLead: string, payload:
|
|
21
|
+
export const sendTrezorForm = async (typeLead: string, payload: object) => {
|
|
22
22
|
const response = await clientApi.post(`leads/${typeLead}`, payload).catch(function (error) {
|
|
23
23
|
return error.response;
|
|
24
24
|
});
|
|
@@ -26,8 +26,8 @@ export const sendTrezorForm = async (typeLead: string, payload: any): Promise<an
|
|
|
26
26
|
return response;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export const getPartners = async (typeLeadSlug: string)
|
|
30
|
-
const response = await clientApi.get(
|
|
29
|
+
export const getPartners = async (typeLeadSlug: string) => {
|
|
30
|
+
const response = await clientApi.get(`leads/partners?typeLeadSlug=` + typeLeadSlug).catch(function (error) {
|
|
31
31
|
throw error;
|
|
32
32
|
});
|
|
33
33
|
|