project-booster-vue 10.25.14 → 10.26.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
CHANGED
|
@@ -105,6 +105,100 @@ export const summary = {
|
|
|
105
105
|
],
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
+
export const ROISummary = {
|
|
109
|
+
subprojectTemplateId: 'c353f7f8-d405-4000-86a0-63e5053a769e',
|
|
110
|
+
subprojectTemplateLabel: 'Panneaux photovoltaïques',
|
|
111
|
+
businessUnit: 'LMFR',
|
|
112
|
+
summaryDate: '2024-006T20:21:17.313023151Z',
|
|
113
|
+
cost: {
|
|
114
|
+
min: 10734,
|
|
115
|
+
max: 10734,
|
|
116
|
+
currency: 'EURO',
|
|
117
|
+
},
|
|
118
|
+
components: [
|
|
119
|
+
{
|
|
120
|
+
componentId: 'FURNISHING',
|
|
121
|
+
title: 'Panneaux photovoltaïques (hors aides)',
|
|
122
|
+
details:
|
|
123
|
+
"Le prix est estimatif et non contractuel : il est susceptible d'etre revu à la hausse ou à la baisse et sera confirmé par le relevé technique.",
|
|
124
|
+
cost: {
|
|
125
|
+
min: 11800,
|
|
126
|
+
max: 11800,
|
|
127
|
+
currency: 'EURO',
|
|
128
|
+
},
|
|
129
|
+
lines: [
|
|
130
|
+
{
|
|
131
|
+
text: "10 panneaux photovoltaïques + installation (sous réserve d'éligibilité à la TVA réduite)",
|
|
132
|
+
cost: {
|
|
133
|
+
min: 11800,
|
|
134
|
+
max: 11800,
|
|
135
|
+
currency: 'EURO',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
componentId: 'AID',
|
|
142
|
+
title: 'Aides estimées (Leroy Merlin)',
|
|
143
|
+
cost: {
|
|
144
|
+
min: -1066,
|
|
145
|
+
max: -1066,
|
|
146
|
+
currency: 'EURO',
|
|
147
|
+
},
|
|
148
|
+
lines: [
|
|
149
|
+
{
|
|
150
|
+
text: "Prime à l'autoconsommation",
|
|
151
|
+
cost: {
|
|
152
|
+
min: -1066,
|
|
153
|
+
max: -1066,
|
|
154
|
+
currency: 'EURO',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
componentId: 'ROI',
|
|
161
|
+
title: 'Votre installation serait rentabilisée en 10 ans',
|
|
162
|
+
cost: {
|
|
163
|
+
min: 0,
|
|
164
|
+
max: 0,
|
|
165
|
+
currency: 'EURO',
|
|
166
|
+
},
|
|
167
|
+
lines: [
|
|
168
|
+
{
|
|
169
|
+
text: '1125 € de gain annuel (basé sur 0,25 € par kWh)',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
text: "28125 € de gain sur 25 ans (sur base du prix du Kwh d'électricité en 2024)",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
text: '4500 kWh de Production moyenne annuelle',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
text: '19 m² de surface utilisée',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
subprojectAttributes: {
|
|
184
|
+
age: 'NEW',
|
|
185
|
+
housingType: 'HOUSE',
|
|
186
|
+
income: 'MIDDLE',
|
|
187
|
+
inhabitantsCount: 1,
|
|
188
|
+
location: '20137',
|
|
189
|
+
situation: 'OWNER',
|
|
190
|
+
surfaceAreaInSquareMeters: 40,
|
|
191
|
+
},
|
|
192
|
+
suggestedTypologies: [
|
|
193
|
+
{
|
|
194
|
+
domesticSpaceLabel: 'Tout le logement',
|
|
195
|
+
domesticSpaceHref: '/domestic-spaces/59461',
|
|
196
|
+
projectKindHref: '/project-kinds/34048',
|
|
197
|
+
projectTypeHref: '/project-types/61855',
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
};
|
|
201
|
+
|
|
108
202
|
# 🦠 `MPbRestitutionList` - Component
|
|
109
203
|
|
|
110
204
|
The `MPbRestitutionList` component allows to display the summary of an estimate.
|
|
@@ -149,3 +243,42 @@ export const TemplateSandbox = (args, { argTypes }) => ({
|
|
|
149
243
|
{TemplateSandbox.bind({})}
|
|
150
244
|
</Story>
|
|
151
245
|
</Canvas>
|
|
246
|
+
|
|
247
|
+
export const TemplateSandbox2 = (args, { argTypes }) => ({
|
|
248
|
+
props: Object.keys(argTypes),
|
|
249
|
+
components: { MPbRestitutionList },
|
|
250
|
+
setup() {
|
|
251
|
+
const store = useStore();
|
|
252
|
+
store.dispatch('projects/loadProjects');
|
|
253
|
+
store.dispatch('estimates/setSummary', ROISummary);
|
|
254
|
+
store.dispatch('projects/loadTypologies');
|
|
255
|
+
store.dispatch('estimates/initSessions', {
|
|
256
|
+
formId: 'FORM_ID',
|
|
257
|
+
correlationId: 'CORRELATION_ID',
|
|
258
|
+
estimatorId: 'ESTIMATOR_ID',
|
|
259
|
+
businessUnit: 'BU',
|
|
260
|
+
subprojectFormStructure: {},
|
|
261
|
+
source: 'SOURCE',
|
|
262
|
+
sourceDetail: 'SOURCE_DETAIL',
|
|
263
|
+
});
|
|
264
|
+
return { args };
|
|
265
|
+
},
|
|
266
|
+
template: `<m-pb-restitution-list :payload="args.payload" :answers="args.answers" :show-save-estimate="args.showSaveEstimate" :runtime-options="args.runtimeOptions" :show-back-button="args.showBackButton" />`,
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
<Canvas>
|
|
270
|
+
<Story
|
|
271
|
+
name="Features/ROI"
|
|
272
|
+
args={{ payload: DEFAULT_PAYLOAD, runtimeOptions: { isLoggedIn: true, projectMode: true } }}
|
|
273
|
+
parameters={{
|
|
274
|
+
msw: [
|
|
275
|
+
rest.get('/api/inhabitant-projects', getProjectsResolver),
|
|
276
|
+
rest.post('/api/estimates', successResolver),
|
|
277
|
+
rest.post('/api/inhabitant-projects', successResolver),
|
|
278
|
+
],
|
|
279
|
+
storyshots: { disable: true },
|
|
280
|
+
}}
|
|
281
|
+
>
|
|
282
|
+
{TemplateSandbox2.bind({})}
|
|
283
|
+
</Story>
|
|
284
|
+
</Canvas>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<template #beforeLabel>
|
|
4
4
|
<div class="pb-restitution-list-line" :class="{ green: line.componentId == 'AID' }">
|
|
5
5
|
<div class="pb-restitution-list-line__title" v-html="line.title"></div>
|
|
6
|
-
<div class="pb-restitution-list-line__range">
|
|
6
|
+
<div v-if="line.componentId !== 'ROI'" class="pb-restitution-list-line__range">
|
|
7
7
|
<span v-if="line?.cost?.min === line?.cost?.max">{{ formattedPriceRange(line?.cost?.min) }}</span>
|
|
8
8
|
<span v-else>{{ formattedPriceRange(line?.cost?.min) }} et {{ formattedPriceRange(line?.cost?.max) }}</span>
|
|
9
9
|
</div>
|
|
@@ -17,25 +17,22 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
</m-notification>
|
|
19
19
|
|
|
20
|
-
<div
|
|
21
|
-
v-for="detail in line.lines"
|
|
22
|
-
:key="detail.text"
|
|
23
|
-
class="pb-restitution-list-line__row"
|
|
24
|
-
:class="{ ' pb-restitution-list-line__row--reduce': detail.cost.reduce }"
|
|
25
|
-
>
|
|
20
|
+
<div v-for="detail in line.lines" :key="detail.text" class="pb-restitution-list-line__row">
|
|
26
21
|
<ul>
|
|
27
22
|
<div>
|
|
28
23
|
<li>
|
|
29
24
|
<div v-html="detail.text"></div>
|
|
30
25
|
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
26
|
+
<div v-if="line.componentId !== 'ROI'">
|
|
27
|
+
<m-flex v-if="detail.cost.min != detail.cost.max" align-items="center" justify-content="flex-end">
|
|
28
|
+
<span v-html="formattedPriceRange(detail.cost.min)"></span>
|
|
29
|
+
<span> et </span>
|
|
30
|
+
<span v-html="formattedPriceRange(detail.cost.max)"></span>
|
|
31
|
+
</m-flex>
|
|
32
|
+
<m-flex v-else align-items="center" justify-content="flex-end">
|
|
33
|
+
<span v-html="formattedPriceRange(detail.cost.min)"></span>
|
|
34
|
+
</m-flex>
|
|
35
|
+
</div>
|
|
39
36
|
</li>
|
|
40
37
|
</div>
|
|
41
38
|
</ul>
|
|
@@ -97,10 +94,10 @@ $responsive-breakpoint: 'm';
|
|
|
97
94
|
display: flex;
|
|
98
95
|
|
|
99
96
|
div {
|
|
100
|
-
width:
|
|
97
|
+
width: 100%;
|
|
101
98
|
color: $color-grey-600;
|
|
102
99
|
|
|
103
|
-
|
|
100
|
+
span {
|
|
104
101
|
@include set-font-face('semi-bold');
|
|
105
102
|
}
|
|
106
103
|
}
|