project-booster-vue 9.5.0 → 9.6.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/projects/project-hub/PbProjectHub-Features-Appointment.stories.mdx +21 -4
- package/src/components/projects/project-hub/PbProjectHub.vue +24 -4
- package/src/services/api/mocks/jsons/projects.json +8 -1
- package/src/services/api/mocks/projectsMock.ts +14 -3
package/package.json
CHANGED
|
@@ -7,7 +7,8 @@ import { successResolver, internalServerErrorResolver } from '../../../services/
|
|
|
7
7
|
import {
|
|
8
8
|
getProjectByIdResolver,
|
|
9
9
|
getDoneAppointmentByIdResolver,
|
|
10
|
-
|
|
10
|
+
getStoreAppointmentByIdResolver,
|
|
11
|
+
getVisioAppointmentByIdResolver,
|
|
11
12
|
} from '../../../services/api/mocks/projectsMock';
|
|
12
13
|
|
|
13
14
|
<Meta
|
|
@@ -54,12 +55,28 @@ The `PbProjectHub` component to access your project.
|
|
|
54
55
|
|
|
55
56
|
<Canvas>
|
|
56
57
|
<Story
|
|
57
|
-
name="Showcase with appointment"
|
|
58
|
+
name="Showcase with store appointment"
|
|
58
59
|
parameters={{
|
|
59
60
|
controls: { disable: true },
|
|
60
61
|
msw: [
|
|
61
62
|
rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver),
|
|
62
|
-
rest.get('/api/inhabitant-projects/:projectId/main-appointment',
|
|
63
|
+
rest.get('/api/inhabitant-projects/:projectId/main-appointment', getStoreAppointmentByIdResolver),
|
|
64
|
+
],
|
|
65
|
+
}}
|
|
66
|
+
height="100vh"
|
|
67
|
+
>
|
|
68
|
+
{TemplateSandbox.bind({})}
|
|
69
|
+
</Story>
|
|
70
|
+
</Canvas>
|
|
71
|
+
|
|
72
|
+
<Canvas>
|
|
73
|
+
<Story
|
|
74
|
+
name="Showcase with visio appointment"
|
|
75
|
+
parameters={{
|
|
76
|
+
controls: { disable: true },
|
|
77
|
+
msw: [
|
|
78
|
+
rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver),
|
|
79
|
+
rest.get('/api/inhabitant-projects/:projectId/main-appointment', getVisioAppointmentByIdResolver),
|
|
63
80
|
],
|
|
64
81
|
}}
|
|
65
82
|
height="100vh"
|
|
@@ -77,7 +94,7 @@ The `PbProjectHub` component to access your project.
|
|
|
77
94
|
controls: { disable: true },
|
|
78
95
|
msw: [
|
|
79
96
|
rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver),
|
|
80
|
-
rest.get('/api/inhabitant-projects/:projectId/main-appointment',
|
|
97
|
+
rest.get('/api/inhabitant-projects/:projectId/main-appointment', getStoreAppointmentByIdResolver),
|
|
81
98
|
],
|
|
82
99
|
}}
|
|
83
100
|
args={{
|
|
@@ -72,12 +72,20 @@
|
|
|
72
72
|
class="pb-project-hub__appointment-notification"
|
|
73
73
|
type="appointment"
|
|
74
74
|
:title="appointment.appointmentDate"
|
|
75
|
-
:
|
|
76
|
-
:link-href="
|
|
75
|
+
:text="
|
|
77
76
|
readOnly
|
|
78
77
|
? ''
|
|
79
|
-
:
|
|
78
|
+
: appointment.appointmentDate.endsWith('en magasin')
|
|
79
|
+
? 'N’oubliez pas !'
|
|
80
|
+
: 'Retrouvez le lien d\'accès à la visio-conférence dans le mail qui vous est envoyé. \n' +
|
|
81
|
+
'N’oubliez pas !'
|
|
80
82
|
"
|
|
83
|
+
:link-label="
|
|
84
|
+
readOnly
|
|
85
|
+
? ''
|
|
86
|
+
: 'Ajoutez des plans aux mesures de votre pièce et des photos pour bien préparer le rendez-vous.'
|
|
87
|
+
"
|
|
88
|
+
@link-click="handleAppointmentLinkClick"
|
|
81
89
|
/>
|
|
82
90
|
</m-flex>
|
|
83
91
|
</m-flex>
|
|
@@ -773,7 +781,7 @@
|
|
|
773
781
|
</template>
|
|
774
782
|
|
|
775
783
|
<script lang="ts">
|
|
776
|
-
import { defineComponent } from 'vue';
|
|
784
|
+
import { defineComponent, nextTick } from 'vue';
|
|
777
785
|
import { format } from 'date-fns';
|
|
778
786
|
import Velocity from 'velocity-animate';
|
|
779
787
|
import { mapGetters } from 'vuex';
|
|
@@ -1370,6 +1378,18 @@ export default defineComponent({
|
|
|
1370
1378
|
handleMediaUploaded() {
|
|
1371
1379
|
this.$store.dispatch('media/refreshMediaList');
|
|
1372
1380
|
},
|
|
1381
|
+
|
|
1382
|
+
handleAppointmentLinkClick() {
|
|
1383
|
+
this.$store.dispatch('sendEventToBus', {
|
|
1384
|
+
code: 'appointmentLinkClicked',
|
|
1385
|
+
payload: this.project.id,
|
|
1386
|
+
});
|
|
1387
|
+
nextTick(() => {
|
|
1388
|
+
(<any>(
|
|
1389
|
+
window
|
|
1390
|
+
)).location = `/projets/preparation-rendez-vous/cuisine.html?inhabitantProjectId=${this.project.id}&appointmentId=${this.appointment.appointmentId}&groupId=${this.appointment.groupId}&calendarId=${this.appointment.calendarId}&leadSourceDetail=Project_Space`;
|
|
1391
|
+
});
|
|
1392
|
+
},
|
|
1373
1393
|
},
|
|
1374
1394
|
});
|
|
1375
1395
|
</script>
|
|
@@ -231,7 +231,14 @@
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
-
"
|
|
234
|
+
"storeAppointment": {
|
|
235
|
+
"groupId": 188921,
|
|
236
|
+
"calendarId": 375614,
|
|
237
|
+
"appointnmentId": 3200901,
|
|
238
|
+
"appointmentDate": "RDV le samedi 4 Décembre à 16h00 en magasin",
|
|
239
|
+
"isPast": false
|
|
240
|
+
},
|
|
241
|
+
"visioAppointment": {
|
|
235
242
|
"groupId": 188921,
|
|
236
243
|
"calendarId": 375614,
|
|
237
244
|
"appointnmentId": 3200901,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { RestRequest, ResponseComposition, RestContext } from 'msw';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
projectsEmpty,
|
|
4
|
+
projects,
|
|
5
|
+
projectAttributes,
|
|
6
|
+
storeAppointment,
|
|
7
|
+
visioAppointment,
|
|
8
|
+
doneAppointment,
|
|
9
|
+
} from './jsons/projects.json';
|
|
3
10
|
|
|
4
11
|
export const getEmptyProjectsResolver = (req: RestRequest, res: ResponseComposition, ctx: RestContext) => {
|
|
5
12
|
return res(
|
|
@@ -57,8 +64,12 @@ export const getProjectAttributesByIdResolver = (req: RestRequest, res: Response
|
|
|
57
64
|
return res(ctx.status(200), ctx.json(projectAttributes));
|
|
58
65
|
};
|
|
59
66
|
|
|
60
|
-
export const
|
|
61
|
-
return res(ctx.status(200), ctx.json(
|
|
67
|
+
export const getStoreAppointmentByIdResolver = (req: RestRequest, res: ResponseComposition, ctx: RestContext) => {
|
|
68
|
+
return res(ctx.status(200), ctx.json(storeAppointment));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const getVisioAppointmentByIdResolver = (req: RestRequest, res: ResponseComposition, ctx: RestContext) => {
|
|
72
|
+
return res(ctx.status(200), ctx.json(visioAppointment));
|
|
62
73
|
};
|
|
63
74
|
|
|
64
75
|
export const getDoneAppointmentByIdResolver = (req: RestRequest, res: ResponseComposition, ctx: RestContext) => {
|