project-booster-vue 9.43.3 → 9.44.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/cards/PbCard.vue +0 -3
- package/src/components/question/incremental-amount-input/PbIncrementalAmountInput.vue +4 -1
- package/src/components/restitution/PbRestitutionList.vue +70 -27
- package/src/components/restitution/PbRestitutionListBlock.vue +1 -2
- package/src/components/restitution/PbRestitutionListLine.vue +3 -3
- package/src/components/restitution/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-restitution-pb-restitution-/360/237/246/240-feature-conditional-exit-options-1-snap.png +0 -0
- package/src/components/restitution/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-restitution-pb-restitution-/360/237/246/240-features-with-exit-options-1-snap.png +0 -0
- package/src/components/restitution/restitution-list-default.json +4 -0
- package/src/types/pb/Restitution.ts +14 -0
package/package.json
CHANGED
|
@@ -366,8 +366,11 @@ $responsive-breakpoint: 'm';
|
|
|
366
366
|
justify-content: flex-end !important;
|
|
367
367
|
margin-bottom: $mu100;
|
|
368
368
|
position: sticky;
|
|
369
|
-
width: 100%;
|
|
370
369
|
z-index: 1;
|
|
370
|
+
|
|
371
|
+
@include set-from-screen($responsive-breakpoint) {
|
|
372
|
+
width: 100%;
|
|
373
|
+
}
|
|
371
374
|
}
|
|
372
375
|
|
|
373
376
|
&__link {
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<m-flex
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<m-flex align-items="center" direction="column" class="pb-restitution-wrapper">
|
|
3
|
+
<m-flex
|
|
4
|
+
:class="`pb-restitution-list`"
|
|
5
|
+
align-items="center"
|
|
6
|
+
justify-content="center"
|
|
7
|
+
direction="column"
|
|
8
|
+
ref="pbRestitutionList"
|
|
9
|
+
>
|
|
10
|
+
<m-link
|
|
11
|
+
v-if="showBackButton"
|
|
12
|
+
:left-icon="BACK_ICON"
|
|
13
|
+
:label="payload.backLabel || 'Modifier l\'estimation'"
|
|
14
|
+
class="pb-restitution-list__back-button"
|
|
15
|
+
@click.once="callAction(payload.viewModel.backButtonAction)"
|
|
16
|
+
/>
|
|
17
|
+
</m-flex>
|
|
16
18
|
<div class="pb-restitution-list__title">{{ payload?.viewModel?.title }}</div>
|
|
17
19
|
|
|
18
20
|
<div class="pb-restitution-list__line">
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
<div class="pb-restitution-list__modal__details__row">
|
|
79
81
|
<div v-for="component in summary.components" :key="component.details">
|
|
80
82
|
<div class="pb-restitution-list__modal__details__row__title" justify-content="space-between">
|
|
81
|
-
<div v-html="component.title"></div>
|
|
83
|
+
<div v-html="component.title" :class="{ green: component.componentId === 'AID' }"></div>
|
|
82
84
|
<div v-if="component.cost.min != component.cost.max">
|
|
83
85
|
<strong>
|
|
84
86
|
{{ formattedPriceRange(component.cost.min) }} et
|
|
@@ -126,6 +128,12 @@
|
|
|
126
128
|
<strong v-html="formattedPriceRange(summary.cost.max)"></strong>
|
|
127
129
|
</div>
|
|
128
130
|
</div>
|
|
131
|
+
|
|
132
|
+
<div class="pb-restitution-list__modal__details__legal-mentions">
|
|
133
|
+
<p v-for="(mention, index) in payload?.viewModel?.legalMentions" :key="'lm-modal-' + index">
|
|
134
|
+
{{ mention }}
|
|
135
|
+
</p>
|
|
136
|
+
</div>
|
|
129
137
|
</div>
|
|
130
138
|
</template>
|
|
131
139
|
<template #footer>
|
|
@@ -147,7 +155,11 @@ import MLink from '../mozaic/link/MLink.vue';
|
|
|
147
155
|
import PbProjectItemSave from '../projects/project-item-save/PbProjectItemSave.vue';
|
|
148
156
|
import MNotification from '../mozaic/notifications/MNotification.vue';
|
|
149
157
|
import { NotificationOptions } from '@/types/pb/Notification';
|
|
150
|
-
import {
|
|
158
|
+
import {
|
|
159
|
+
RestitutionListPayload,
|
|
160
|
+
RestitutionPayloadAction,
|
|
161
|
+
RestitutionPayloadCallToAction,
|
|
162
|
+
} from '@/types/pb/Restitution';
|
|
151
163
|
import { ScenarioStepAnswer } from '@/types/pb/Scenario';
|
|
152
164
|
import PbRestitutionListBlock from './PbRestitutionListBlock.vue';
|
|
153
165
|
import { Project } from '../../types/pb/Project';
|
|
@@ -183,7 +195,7 @@ export default defineComponent({
|
|
|
183
195
|
* from the default ones.
|
|
184
196
|
*/
|
|
185
197
|
payload: {
|
|
186
|
-
type: Object as PropType<
|
|
198
|
+
type: Object as PropType<RestitutionListPayload>,
|
|
187
199
|
default: () => ({}),
|
|
188
200
|
required: true,
|
|
189
201
|
},
|
|
@@ -235,6 +247,9 @@ export default defineComponent({
|
|
|
235
247
|
this.dialogContent = content;
|
|
236
248
|
this.showDialog = !this.showDialog;
|
|
237
249
|
},
|
|
250
|
+
handleLinkClicked(href: string) {
|
|
251
|
+
window.open(href, '_blank');
|
|
252
|
+
},
|
|
238
253
|
handleItemCreated({
|
|
239
254
|
projectId,
|
|
240
255
|
estimateName,
|
|
@@ -302,16 +317,19 @@ $responsive-breakpoint: 'm';
|
|
|
302
317
|
display: none;
|
|
303
318
|
}
|
|
304
319
|
|
|
320
|
+
.pb-restitution-wrapper {
|
|
321
|
+
height: calc(100vh - 80px);
|
|
322
|
+
}
|
|
323
|
+
|
|
305
324
|
.pb-restitution-list {
|
|
306
325
|
@include set-font-face('regular');
|
|
307
|
-
height: calc(100vh - 120px);
|
|
308
326
|
margin: 0 auto;
|
|
309
|
-
padding-top: $mu250;
|
|
310
327
|
position: relative;
|
|
311
328
|
width: 100%;
|
|
312
329
|
|
|
313
330
|
@include set-from-screen($responsive-breakpoint) {
|
|
314
331
|
justify-content: space-between;
|
|
332
|
+
padding-bottom: $mu250;
|
|
315
333
|
width: calc(100% - #{$mu050} - #{$mu050});
|
|
316
334
|
}
|
|
317
335
|
|
|
@@ -333,16 +351,31 @@ $responsive-breakpoint: 'm';
|
|
|
333
351
|
|
|
334
352
|
&__title {
|
|
335
353
|
@include set-font-face('semi-bold');
|
|
336
|
-
@include set-font-scale('
|
|
337
|
-
left: 0;
|
|
354
|
+
@include set-font-scale('10', 's');
|
|
338
355
|
padding: $mu100 0 $mu100 $mu025;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
356
|
+
text-align: left;
|
|
357
|
+
|
|
358
|
+
&::after {
|
|
359
|
+
background: $color-primary-01-600;
|
|
360
|
+
content: '';
|
|
361
|
+
display: block;
|
|
362
|
+
height: 4px;
|
|
363
|
+
margin-bottom: $mu150;
|
|
364
|
+
margin-top: $mu025;
|
|
365
|
+
width: 100px;
|
|
366
|
+
}
|
|
343
367
|
|
|
344
368
|
@include set-from-screen($responsive-breakpoint) {
|
|
345
|
-
|
|
369
|
+
left: 0;
|
|
370
|
+
position: absolute;
|
|
371
|
+
right: 0;
|
|
372
|
+
text-align: center;
|
|
373
|
+
top: 0px;
|
|
374
|
+
@include set-font-scale('07', 's');
|
|
375
|
+
|
|
376
|
+
&::after {
|
|
377
|
+
display: none;
|
|
378
|
+
}
|
|
346
379
|
}
|
|
347
380
|
}
|
|
348
381
|
|
|
@@ -364,7 +397,11 @@ $responsive-breakpoint: 'm';
|
|
|
364
397
|
}
|
|
365
398
|
|
|
366
399
|
&__line {
|
|
367
|
-
|
|
400
|
+
padding: 8px;
|
|
401
|
+
|
|
402
|
+
@include set-from-screen($responsive-breakpoint) {
|
|
403
|
+
margin-top: $mu250;
|
|
404
|
+
}
|
|
368
405
|
}
|
|
369
406
|
|
|
370
407
|
&__modal {
|
|
@@ -511,6 +548,12 @@ $responsive-breakpoint: 'm';
|
|
|
511
548
|
}
|
|
512
549
|
}
|
|
513
550
|
}
|
|
551
|
+
|
|
552
|
+
&__legal-mentions {
|
|
553
|
+
color: $color-grey-600;
|
|
554
|
+
@include set-font-face('regular');
|
|
555
|
+
@include set-font-scale('04', 'm');
|
|
556
|
+
}
|
|
514
557
|
}
|
|
515
558
|
|
|
516
559
|
&__footer {
|
|
@@ -109,7 +109,6 @@ $responsive-breakpoint: 'm';
|
|
|
109
109
|
@include set-box-shadow('l');
|
|
110
110
|
margin-bottom: $mu100;
|
|
111
111
|
padding: $mu150;
|
|
112
|
-
width: 80%;
|
|
113
112
|
|
|
114
113
|
@include set-from-screen($responsive-breakpoint) {
|
|
115
114
|
padding: $mu250;
|
|
@@ -211,7 +210,7 @@ $responsive-breakpoint: 'm';
|
|
|
211
210
|
border-bottom: 1px solid $color-grey-500;
|
|
212
211
|
display: flex;
|
|
213
212
|
flex-direction: column;
|
|
214
|
-
padding: $mu150
|
|
213
|
+
padding: $mu150 8px $mu075 8px;
|
|
215
214
|
|
|
216
215
|
@include set-from-screen($responsive-breakpoint) {
|
|
217
216
|
flex-direction: row;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<div class="pb-restitution-list-line__title" v-html="line.text || line.title"></div>
|
|
4
4
|
<div class="pb-restitution-list-line__price" v-if="!renovAid">
|
|
5
5
|
<div class="pb-restitution-list-line__price__min">
|
|
6
|
-
{{
|
|
6
|
+
{{ formattedPriceRange(line.cost.min) }} et {{ formattedPriceRange(line.cost.max) }}
|
|
7
7
|
</div>
|
|
8
|
-
<div class="pb-restitution-list-line__price__max">{{
|
|
8
|
+
<div class="pb-restitution-list-line__price__max">{{ formattedPriceRange(line.cost.max) }}</div>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="pb-restitution-list-line__price">
|
|
11
|
-
<span v-if="line.cost.min === line.cost.max">{{
|
|
11
|
+
<span v-if="line.cost.min === line.cost.max">{{ formattedPriceRange(line.cost.min) }}</span>
|
|
12
12
|
<span v-else>{{ formattedPriceRange(line.cost.min) }} et {{ formattedPriceRange(line.cost.max) }}</span>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"viewModel": {
|
|
3
3
|
"title": "Votre estimation par travaux",
|
|
4
|
+
"backButtonAction": {
|
|
5
|
+
"type": "STEP",
|
|
6
|
+
"code": "STEP_CODE"
|
|
7
|
+
},
|
|
4
8
|
"legalMentions": [
|
|
5
9
|
"* Montant estimatif établi selon les réponses renseignées dans le questionnaire et susceptible d'être ajusté lors du devis définitif. Ce montant n’engage pas Leroy Merlin."
|
|
6
10
|
]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { array } from 'yup';
|
|
2
|
+
|
|
1
3
|
export interface RestitutionCost {
|
|
2
4
|
min: number;
|
|
3
5
|
max: number;
|
|
@@ -81,3 +83,15 @@ export interface RestitutionPayload {
|
|
|
81
83
|
callToActions: RestitutionPayloadCallToAction[];
|
|
82
84
|
exitOptions: RestitutionExitOptions;
|
|
83
85
|
}
|
|
86
|
+
|
|
87
|
+
export interface RestitutionListPayload {
|
|
88
|
+
viewModel: RestitutionListViewModelPayload;
|
|
89
|
+
callToActions: RestitutionPayloadCallToAction[];
|
|
90
|
+
exitOptions: RestitutionExitOptions;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface RestitutionListViewModelPayload {
|
|
94
|
+
title: string;
|
|
95
|
+
backButtonAction: any;
|
|
96
|
+
legalMentions?: string[];
|
|
97
|
+
}
|