project-booster-vue 9.33.0 → 9.34.0
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/appointment/PbAppointment.stories.mdx +1 -1
- package/src/components/appointment/PbAppointmentForm.stories.mdx +1 -1
- package/src/components/appointment/PbAppointmentForm.vue +2 -2
- package/src/components/media/PbMedia.stories.mdx +3 -3
- package/src/components/media/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-documents-media-pb-media-/360/237/246/240-with-media-1-snap.png +0 -0
- package/src/components/media/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-documents-media-pb-media-/360/237/246/240-with-media-read-only-1-snap.png +0 -0
- package/src/components/mozaic/layer/MLayer.vue +1 -1
- package/src/components/pedagogy/PbPedagogy.vue +1 -1
- package/src/components/projects/project-hub/PbProjectHub.stories.mdx +13 -10
- package/src/components/projects/projects-list/PbProjectsList.stories.mdx +3 -3
- package/src/components/projects/projects-list/PbProjectsList.vue +29 -1
- package/src/services/api/documentsApi.ts +1 -1
- package/src/stores/modules/documentsStore.ts +4 -2
package/package.json
CHANGED
|
@@ -65,7 +65,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
|
|
|
65
65
|
businessUnit: '001',
|
|
66
66
|
correlationId: uuidv4(),
|
|
67
67
|
groupId: 'groupId',
|
|
68
|
-
|
|
68
|
+
calendarId: 'calendarId',
|
|
69
69
|
appointmentId: 'appointmentId',
|
|
70
70
|
sourceDetail: 'Appointment_email',
|
|
71
71
|
});
|
|
@@ -55,7 +55,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
55
55
|
businessUnit: '001',
|
|
56
56
|
source: 'APPOINTMENT_QUALIFICATION',
|
|
57
57
|
sourceDetail: 'KITCHEN',
|
|
58
|
-
|
|
58
|
+
calendarId: '375615',
|
|
59
59
|
storeId: '006',
|
|
60
60
|
appointmentQualificationFormStructure: SCENARIO,
|
|
61
61
|
});
|
|
@@ -48,8 +48,8 @@ export default defineComponent({
|
|
|
48
48
|
if (props.payload?.viewModel?.calendarUrlPath) {
|
|
49
49
|
url = `${baseUrl}/${props.payload.viewModel.calendarUrlPath}?`;
|
|
50
50
|
} else {
|
|
51
|
-
url = `${baseUrl}/leroy-merlin-${sessions.storeId}
|
|
52
|
-
url += sessions.
|
|
51
|
+
url = `${baseUrl}/leroy-merlin-${sessions.storeId}`;
|
|
52
|
+
url += `?calendar_id=${sessions.calendarId}`;
|
|
53
53
|
url += `&vevent[str5]=${currentAppointmentQualification.inhabitantProjectId}`;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -73,7 +73,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
|
|
|
73
73
|
controls: { disabled: true },
|
|
74
74
|
msw: [
|
|
75
75
|
rest.post('/api/events/documents', acceptedResolver),
|
|
76
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
76
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
77
77
|
rest.get(
|
|
78
78
|
'/api/inhabitant-projects/:projectId/documents/:documentId/thumbnail',
|
|
79
79
|
getDocumentsImageThumbnailResolver,
|
|
@@ -115,7 +115,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
|
|
|
115
115
|
controls: { disabled: true },
|
|
116
116
|
msw: [
|
|
117
117
|
rest.post('/api/inhabitant-projects/:projectId/documents', uploadDocumentResolver),
|
|
118
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
118
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
119
119
|
rest.get(
|
|
120
120
|
'/api/inhabitant-projects/:projectId/documents/:documentId/thumbnail',
|
|
121
121
|
getDocumentsImageThumbnailResolver,
|
|
@@ -178,7 +178,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
|
|
|
178
178
|
controls: { disabled: true },
|
|
179
179
|
msw: [
|
|
180
180
|
rest.post('/api/inhabitant-projects/:projectId/documents', uploadDocumentResolver),
|
|
181
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
181
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
182
182
|
rest.get(
|
|
183
183
|
'/api/inhabitant-projects/:projectId/documents/:documentId/thumbnail',
|
|
184
184
|
getDocumentsImageThumbnailResolver,
|
|
@@ -200,13 +200,13 @@ The `PbProjectHub` component to access your project.
|
|
|
200
200
|
'/api/inhabitant-projects/:inhabitantProjectId/simulations',
|
|
201
201
|
getConfigurationsWithUpdatedPricesByProjectIdResolver,
|
|
202
202
|
),
|
|
203
|
-
rest.get('
|
|
203
|
+
rest.get('/api/simulations?inhabitantProjectId=:projectId', getConfigurationsByProjectIdResolver),
|
|
204
204
|
rest.get(
|
|
205
205
|
'https://storage.googleapis.com/pb-dev-adeo-disp-project-tools/:id.json',
|
|
206
206
|
getToolsByProjectTypeResolver,
|
|
207
207
|
),
|
|
208
208
|
rest.get('/api/project-types/:projectTypeId/products-feature-flag', getEnabledProductsFeatureFlagResolver),
|
|
209
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
209
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
210
210
|
rest.get('/api/inhabitant-projects/:projectId/documents/:documentId', getDocumentByIdResolver),
|
|
211
211
|
rest.delete('/api/inhabitant-projects/:projectId/documents/:documentId', successResolver),
|
|
212
212
|
rest.get(
|
|
@@ -256,13 +256,13 @@ The `PbProjectHub` component to access your project.
|
|
|
256
256
|
'/api/inhabitant-projects/:inhabitantProjectId/simulations',
|
|
257
257
|
getConfigurationsWithUpdatedPricesByProjectIdResolver,
|
|
258
258
|
),
|
|
259
|
-
rest.get('/api/simulations', getConfigurationsByProjectIdResolver),
|
|
259
|
+
rest.get('/api/simulations?inhabitantProjectId=:projectId', getConfigurationsByProjectIdResolver),
|
|
260
260
|
rest.get(
|
|
261
261
|
'https://storage.googleapis.com/pb-dev-adeo-disp-project-tools/:id.json',
|
|
262
262
|
getToolsByProjectTypeResolver,
|
|
263
263
|
),
|
|
264
264
|
rest.get('/api/project-types/:projectTypeId/products-feature-flag', getEnabledProductsFeatureFlagResolver),
|
|
265
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
265
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
266
266
|
rest.get('/api/inhabitant-projects/:projectId/documents/:documentId', getDocumentByIdResolver),
|
|
267
267
|
rest.delete('/api/inhabitant-projects/:projectId/documents/:documentId', successResolver),
|
|
268
268
|
rest.get(
|
|
@@ -383,13 +383,13 @@ The `PbProjectHub` component to access your project.
|
|
|
383
383
|
'/api/inhabitant-projects/:inhabitantProjectId/simulations',
|
|
384
384
|
getConfigurationsWithUpdatedPricesByProjectIdResolver,
|
|
385
385
|
),
|
|
386
|
-
rest.get('/api/simulations', getConfigurationsByProjectIdResolver),
|
|
386
|
+
rest.get('/api/simulations?inhabitantProjectId=:projectId', getConfigurationsByProjectIdResolver),
|
|
387
387
|
rest.get(
|
|
388
388
|
'https://storage.googleapis.com/pb-dev-adeo-disp-project-tools/:id.json',
|
|
389
389
|
getToolsByProjectTypeResolver,
|
|
390
390
|
),
|
|
391
391
|
rest.get('/api/project-types/:projectTypeId/products-feature-flag', getEnabledProductsFeatureFlagResolver),
|
|
392
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
392
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
393
393
|
rest.get('/api/inhabitant-projects/:projectId/documents/:documentId', getDocumentByIdResolver),
|
|
394
394
|
rest.delete('/api/inhabitant-projects/:projectId/documents/:documentId', successResolver),
|
|
395
395
|
rest.get(
|
|
@@ -464,13 +464,13 @@ The `PbProjectHub` component to access your project.
|
|
|
464
464
|
'/api/inhabitant-projects/:inhabitantProjectId/simulations',
|
|
465
465
|
getConfigurationsWithUpdatedPricesByProjectIdResolver,
|
|
466
466
|
),
|
|
467
|
-
rest.get('/api/simulations', getConfigurationsByProjectIdResolver),
|
|
467
|
+
rest.get('/api/simulations?inhabitantProjectId=:projectId', getConfigurationsByProjectIdResolver),
|
|
468
468
|
rest.get(
|
|
469
469
|
'https://storage.googleapis.com/pb-dev-adeo-disp-project-tools/:id.json',
|
|
470
470
|
getToolsByProjectTypeResolver,
|
|
471
471
|
),
|
|
472
472
|
rest.get('/api/project-types/:projectTypeId/products-feature-flag', getEnabledProductsFeatureFlagResolver),
|
|
473
|
-
rest.get('/api/inhabitant-projects/:projectId/documents
|
|
473
|
+
rest.get('/api/inhabitant-projects/:projectId/documents?range=0-5', getDocumentsByInhabitantProjectIdResolver),
|
|
474
474
|
rest.get('/api/inhabitant-projects/:projectId/documents/:documentId', getDocumentByIdResolver),
|
|
475
475
|
rest.delete('/api/inhabitant-projects/:projectId/documents/:documentId', successResolver),
|
|
476
476
|
rest.get(
|
|
@@ -518,13 +518,16 @@ The `PbProjectHub` component to access your project.
|
|
|
518
518
|
'/api/inhabitant-projects/:inhabitantProjectId/simulations',
|
|
519
519
|
getEmptyConfigurationsByProjectIdResolver,
|
|
520
520
|
),
|
|
521
|
-
rest.get('/api/simulations', getEmptyConfigurationsByProjectIdResolver),
|
|
521
|
+
rest.get('/api/simulations?inhabitantProjectId=:projectId', getEmptyConfigurationsByProjectIdResolver),
|
|
522
522
|
rest.get(
|
|
523
523
|
'https://storage.googleapis.com/pb-dev-adeo-disp-project-tools/:id.json',
|
|
524
524
|
getEmptyToolsByProjectTypeResolver,
|
|
525
525
|
),
|
|
526
526
|
rest.get('/api/project-types/:projectTypeId/products-feature-flag', getEnabledProductsFeatureFlagResolver),
|
|
527
|
-
rest.get(
|
|
527
|
+
rest.get(
|
|
528
|
+
'/api/inhabitant-projects/:projectId/documents?range=0-5',
|
|
529
|
+
getEmptyDocumentsByInhabitantProjectIdResolver,
|
|
530
|
+
),
|
|
528
531
|
rest.get('/api/inhabitant-projects/:projectId/documents/:documentId', getDocumentByIdResolver),
|
|
529
532
|
rest.delete('/api/inhabitant-projects/:projectId/documents/:documentId', successResolver),
|
|
530
533
|
rest.get(
|
|
@@ -64,7 +64,7 @@ The `PbProjectsList` component to access your project.
|
|
|
64
64
|
name="Showcase"
|
|
65
65
|
parameters={{
|
|
66
66
|
controls: { disable: true },
|
|
67
|
-
msw: [rest.get('/api/inhabitant-projects', getProjectsResolver)],
|
|
67
|
+
msw: [rest.get('/api/inhabitant-projects?range=0-5&status=ACTIVE', getProjectsResolver)],
|
|
68
68
|
}}
|
|
69
69
|
height="100vh"
|
|
70
70
|
>
|
|
@@ -79,7 +79,7 @@ The `PbProjectsList` component to access your project.
|
|
|
79
79
|
name="Showcase empty state"
|
|
80
80
|
parameters={{
|
|
81
81
|
controls: { disable: true },
|
|
82
|
-
msw: [rest.get('/api/inhabitant-projects', getEmptyProjectsResolver)],
|
|
82
|
+
msw: [rest.get('/api/inhabitant-projects?range=0-5&status=ACTIVE', getEmptyProjectsResolver)],
|
|
83
83
|
}}
|
|
84
84
|
height="100vh"
|
|
85
85
|
>
|
|
@@ -94,7 +94,7 @@ The `PbProjectsList` component to access your project.
|
|
|
94
94
|
name="Showcase with error"
|
|
95
95
|
parameters={{
|
|
96
96
|
controls: { disable: true },
|
|
97
|
-
msw: [rest.get('/api/inhabitant-projects', internalServerErrorResolver)],
|
|
97
|
+
msw: [rest.get('/api/inhabitant-projects?range=0-5&status=ACTIVE', internalServerErrorResolver)],
|
|
98
98
|
storyshots: { disable: true },
|
|
99
99
|
}}
|
|
100
100
|
height="100vh"
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<m-flex class="pb-projects-list" ref="pbProjectsList" direction="column">
|
|
3
|
+
<m-link
|
|
4
|
+
:label="linkLabel"
|
|
5
|
+
class="pb-projects-list__back-button"
|
|
6
|
+
:left-icon="BACK_ICON"
|
|
7
|
+
@click.prevent="window.history.go(-1)"
|
|
8
|
+
/>
|
|
3
9
|
<m-flex class="pb-projects-list__title-container" direction="column">
|
|
4
|
-
<m-flex justify-content="space-between" wrap full-width>
|
|
10
|
+
<m-flex justify-content="space-between" align-items="center" wrap full-width>
|
|
5
11
|
<m-heading :label="title" size="s" underline-color="primary-01" />
|
|
6
12
|
<m-button
|
|
7
13
|
class="pb-projects-list__hero-button"
|
|
@@ -182,6 +188,7 @@ import MButton from '../../../components/mozaic/buttons/MButton.vue';
|
|
|
182
188
|
import MContainer from '../../../components/mozaic/grid/MContainer.vue';
|
|
183
189
|
import MFlex from './../../../components/mozaic/flex/MFlex.vue';
|
|
184
190
|
import MFlexy from '../../../components/mozaic/grid/MFlexy.vue';
|
|
191
|
+
import MLink from './../../../components/mozaic/link/MLink.vue';
|
|
185
192
|
import MFlexyCol from '../../../components/mozaic/grid/MFlexyCol.vue';
|
|
186
193
|
import MHeading from '../../../components/mozaic/heading/MHeading.vue';
|
|
187
194
|
import MIcon from '../../../components/mozaic/icon/MIcon.vue';
|
|
@@ -190,6 +197,9 @@ import PbAnimableLoader from '../../../components/loader/PbAnimableLoader.vue';
|
|
|
190
197
|
import PbCard from '../../../components/cards/PbCard.vue';
|
|
191
198
|
import { Project } from '@/types/pb/Project';
|
|
192
199
|
|
|
200
|
+
const BACK_ICON =
|
|
201
|
+
'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
|
|
202
|
+
|
|
193
203
|
const PLUS_ICON =
|
|
194
204
|
'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Control_More_32px.svg';
|
|
195
205
|
const PROJECT_ICON =
|
|
@@ -210,6 +220,7 @@ export default defineComponent({
|
|
|
210
220
|
MNotification,
|
|
211
221
|
PbAnimableLoader,
|
|
212
222
|
PbCard,
|
|
223
|
+
MLink,
|
|
213
224
|
},
|
|
214
225
|
|
|
215
226
|
props: {
|
|
@@ -234,6 +245,13 @@ export default defineComponent({
|
|
|
234
245
|
type: Boolean,
|
|
235
246
|
default: true,
|
|
236
247
|
},
|
|
248
|
+
/**
|
|
249
|
+
* Link label
|
|
250
|
+
*/
|
|
251
|
+
linkLabel: {
|
|
252
|
+
type: String,
|
|
253
|
+
default: 'Retour',
|
|
254
|
+
},
|
|
237
255
|
},
|
|
238
256
|
|
|
239
257
|
data: () => ({
|
|
@@ -243,6 +261,7 @@ export default defineComponent({
|
|
|
243
261
|
showProjectDialog: false,
|
|
244
262
|
window,
|
|
245
263
|
showMoreButtonAnimationDelay: 0,
|
|
264
|
+
BACK_ICON,
|
|
246
265
|
}),
|
|
247
266
|
|
|
248
267
|
computed: {
|
|
@@ -353,6 +372,15 @@ $responsive-breakpoint: 'm';
|
|
|
353
372
|
padding-right: 0;
|
|
354
373
|
}
|
|
355
374
|
|
|
375
|
+
&__back-button {
|
|
376
|
+
justify-content: flex-start;
|
|
377
|
+
margin-top: $mu200;
|
|
378
|
+
|
|
379
|
+
@include set-from-screen($responsive-breakpoint) {
|
|
380
|
+
margin-top: 0;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
356
384
|
&--fade {
|
|
357
385
|
&-enter-active {
|
|
358
386
|
transition: opacity 0.3s;
|
|
@@ -372,11 +372,12 @@ export const mediaDocumentsListStoreOptions = {
|
|
|
372
372
|
? 0
|
|
373
373
|
: (state.mediaPerPageCount - (state.mediaList.length % state.mediaPerPageCount)) % state.mediaPerPageCount;
|
|
374
374
|
const mediaNumberToAdd = mediaNumberToAddOffset + state.mediaPerPageCount;
|
|
375
|
+
const subType = state.context ? state.context.subType : undefined;
|
|
375
376
|
let media = await getDocumentsByInhabitantProjectId(
|
|
376
377
|
state.currentMediaPage * state.mediaPerPageCount,
|
|
377
378
|
state.currentMediaPage * state.mediaPerPageCount + mediaNumberToAdd - 1,
|
|
378
379
|
state.currentProjectId,
|
|
379
|
-
|
|
380
|
+
subType,
|
|
380
381
|
);
|
|
381
382
|
commit('addMedia', media.results ? media.results : []);
|
|
382
383
|
|
|
@@ -411,11 +412,12 @@ export const mediaDocumentsListStoreOptions = {
|
|
|
411
412
|
},
|
|
412
413
|
async refreshMediaList({ commit, dispatch, state }: MediaDocumentsContext) {
|
|
413
414
|
if (state.currentMediaPage > 0) {
|
|
415
|
+
const subType = state.context ? state.context.subType : undefined;
|
|
414
416
|
let media = await getDocumentsByInhabitantProjectId(
|
|
415
417
|
0,
|
|
416
418
|
state.currentMediaPage * state.mediaPerPageCount - 1,
|
|
417
419
|
state.currentProjectId,
|
|
418
|
-
|
|
420
|
+
subType,
|
|
419
421
|
);
|
|
420
422
|
commit('setMediaList', media.results);
|
|
421
423
|
|