project-booster-vue 9.65.0 → 10.0.0-beta.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.
Files changed (65) hide show
  1. package/package.json +1 -1
  2. package/src/components/landing/PbProjectsLanding.vue +0 -13
  3. package/src/components/projects/project-hub/PbProjectHub-Collaborator.stories.mdx +1 -5
  4. package/src/components/projects/project-hub/PbProjectHub.stories.mdx +0 -24
  5. package/src/components/projects/project-hub/PbProjectHub.vue +0 -120
  6. package/src/components/projects/projects/PbProjects.stories.mdx +0 -3
  7. package/src/components/projects/projects-list/PbProjectHub.vue +0 -119
  8. package/src/services/api/mocks/jsons/products.json +0 -14
  9. package/src/stores/state.ts +0 -2
  10. package/src/stores/store.ts +0 -2
  11. package/src/components/projects/project-hub/PbProjectHub-Features-Planner.stories.mdx +0 -120
  12. package/src/components/projects/project-hub/plannerTask.json +0 -51
  13. package/src/components/tasks/PbTasks.stories.mdx +0 -164
  14. package/src/components/tasks/PbTasks.vue +0 -453
  15. package/src/components/tasks/PbTasksPage.vue +0 -102
  16. package/src/components/tasks/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-/360/237/246/240-101-sandbox-1-snap.png +0 -0
  17. package/src/components/tasks/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-/360/237/246/240-demo-generic-planner-1-snap.png +0 -0
  18. package/src/components/tasks/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-/360/237/246/240-demo-generic-planner-read-only-1-snap.png +0 -0
  19. package/src/components/tasks/contentul-preview/ContenfulPlanner.ts +0 -442
  20. package/src/components/tasks/contentul-preview/PbTasksContentfulFilter.vue +0 -252
  21. package/src/components/tasks/contentul-preview/PbTasksContentfulPreview.stories.mdx +0 -53
  22. package/src/components/tasks/contentul-preview/PbTasksContentfulPreview.vue +0 -528
  23. package/src/components/tasks/demo-task.json +0 -244
  24. package/src/components/tasks/details/PbTaskDetails-Features-101.stories.mdx +0 -144
  25. package/src/components/tasks/details/PbTaskDetails-Features-Form.stories.mdx +0 -434
  26. package/src/components/tasks/details/PbTaskDetails-Features-ReadOnly.stories.mdx +0 -614
  27. package/src/components/tasks/details/PbTaskDetails.vue +0 -752
  28. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-101-sandbox-1-snap.png +0 -0
  29. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-demo-task-attributes-1-snap.png +0 -0
  30. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-demo-task-option-values-1-snap.png +0 -0
  31. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-form-demo-card-select-1-snap.png +0 -0
  32. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-form-demo-select-1-snap.png +0 -0
  33. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-form-demo-text-input-1-snap.png +0 -0
  34. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-form-demo-textarea-1-snap.png +0 -0
  35. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-completions-1-snap.png +0 -0
  36. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-bullets-1-snap.png +0 -0
  37. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-card-links-1-snap.png +0 -0
  38. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-image-1-snap.png +0 -0
  39. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-image-banner-1-snap.png +0 -0
  40. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-links-1-snap.png +0 -0
  41. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-multiple-card-links-1-snap.png +0 -0
  42. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-multiple-links-1-snap.png +0 -0
  43. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-one-link-1-snap.png +0 -0
  44. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-text-1-snap.png +0 -0
  45. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-section-title-1-snap.png +0 -0
  46. package/src/components/tasks/details/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-task-details-/360/237/246/240-read-only-demo-title-1-snap.png +0 -0
  47. package/src/components/tasks/list/PbTasksList.vue +0 -271
  48. package/src/components/tasks/list/PbTasksLists.stories.mdx +0 -39
  49. package/src/components/tasks/list/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-list-/360/237/247/254-101-sandbox-1-snap.png +0 -0
  50. package/src/components/tasks/preview/PbTasksPreview.stories.mdx +0 -113
  51. package/src/components/tasks/preview/PbTasksPreview.vue +0 -207
  52. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-101-sandbox-1-snap.png +0 -0
  53. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-no-active-tasks-1-snap.png +0 -0
  54. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-no-tasks-1-snap.png +0 -0
  55. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-read-only-no-active-tasks-1-snap.png +0 -0
  56. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-read-only-no-tasks-1-snap.png +0 -0
  57. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-read-only-tasks-list-1-snap.png +0 -0
  58. package/src/components/tasks/preview/__snapshots__/storyshots-puppeteer-test-puppeteer-ts-image-storyshots-project-booster-components-tasks-pb-tasks-preview-/360/237/246/240-feature-tasks-list-1-snap.png +0 -0
  59. package/src/components/tasks/task-to-create-generic-planner.json +0 -45
  60. package/src/components/tasks/tasks-generic-planner.json +0 -136
  61. package/src/components/tasks/tasks.json +0 -352
  62. package/src/firebase-init.ts +0 -46
  63. package/src/stores/modules/plannerStore.ts +0 -329
  64. package/src/types/contentful.d.ts +0 -5294
  65. package/src/types/pb/Task.ts +0 -147
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.65.0",
3
+ "version": "10.0.0-beta.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -343,19 +343,6 @@ export default defineComponent({
343
343
  image: 'https://storage.googleapis.com/project-booster-media/landing-projet/solution_projet-conception.png',
344
344
  href: '/outils/',
345
345
  },
346
- {
347
- title: 'Planifier les étapes de votre projet',
348
- image: 'https://storage.googleapis.com/project-booster-media/landing-projet/solution_projet-planner.png',
349
- href: '/espace-perso/declaration-de-projet.html#/?skipLanding=true&leadSource=Landing_Acquisition&leadSourceDetail=Generic',
350
- dialog: {
351
- imageUrl: 'https://storage.googleapis.com/project-booster-media/planner/planner.svg',
352
- title: 'Décrivez votre projet en quelques questions et créez la liste des étapes de votre projet',
353
- text: 'Ces questions nous permettront de mieux comprendre votre projet afin de vous proposer des outils et contenus utiles à sa réalisation',
354
- buttonLabel: 'Commencer',
355
- linkLabel: 'J’ai déjà créé un projet',
356
- href: '/espace-perso/espace-projets.html#/projects',
357
- },
358
- },
359
346
  {
360
347
  title: 'Apprendre à réaliser',
361
348
  image: 'https://storage.googleapis.com/project-booster-media/landing-projet/solution_projet-realiser.png',
@@ -3,7 +3,6 @@ import { nestedAppDecorator } from '../../../../.storybook/nested-app-decorator'
3
3
  import { useStore } from 'vuex';
4
4
  import PbMedia from '../../media/PbMedia';
5
5
  import PbProjectHub from './PbProjectHub';
6
- import PbTasksPage from '../../../components/tasks/PbTasksPage';
7
6
  import store from '../../../stores/store';
8
7
  import { rest } from 'msw';
9
8
  import {
@@ -49,7 +48,7 @@ import {
49
48
  getDocumentsImageFileResolver,
50
49
  uploadDocumentResolver,
51
50
  } from '../../../services/api/mocks/documentsMock';
52
- import TASK_TO_CREATE_MODEL from '../../../components/tasks/task-to-create-generic-planner.json';
51
+
53
52
  import DOCUMENT_DETAIL_PAYLOAD from '../../media/detail/document-detail-payload.json';
54
53
  import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.json';
55
54
 
@@ -95,9 +94,6 @@ import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.
95
94
  },
96
95
  beforeEnter: async (to, from, next, store) => {
97
96
  const projectId = to.params.projectId;
98
- if (store.getters['tasks/getCurrentProjectId'] !== projectId) {
99
- store.dispatch('tasks/loadPlanner', { projectId, buId: 'bu-dev-planner' });
100
- }
101
97
  if (store.getters['configurations/getCurrentProjectId'] !== projectId) {
102
98
  store.dispatch('configurations/loadConfigurations', { projectId: projectId, forceNoPriceUpdate: true });
103
99
  store.dispatch('configurations/searchConfigurations', projectId);
@@ -4,7 +4,6 @@ import { nestedAppDecorator } from '../../../../.storybook/nested-app-decorator'
4
4
  import { useStore } from 'vuex';
5
5
  import PbMedia from '../../media/PbMedia';
6
6
  import PbProjectHub from './PbProjectHub';
7
- import PbTasksPage from '../../../components/tasks/PbTasksPage';
8
7
  import store from '../../../stores/store';
9
8
  import { rest } from 'msw';
10
9
  import {
@@ -52,7 +51,6 @@ import {
52
51
  uploadDocumentResolver,
53
52
  } from '../../../services/api/mocks/documentsMock';
54
53
  import { getInhabitantByIdResolver, getCompanyByIdResolver } from '../../../services/api/mocks/inhabitantsMock';
55
- import TASK_TO_CREATE_MODEL from '../../../components/tasks/task-to-create-generic-planner.json';
56
54
  import DOCUMENT_DETAIL_PAYLOAD from '../../media/detail/document-detail-payload.json';
57
55
  import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.json';
58
56
 
@@ -78,9 +76,6 @@ import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.
78
76
  component: PbProjectHub,
79
77
  beforeEnter: async (to, from, next, store) => {
80
78
  const projectId = to.params.projectId;
81
- if (store.getters['tasks/getCurrentProjectId'] !== projectId) {
82
- store.dispatch('tasks/loadPlanner', { projectId, buId: 'bu-dev-planner' });
83
- }
84
79
  if (store.getters['configurations/getCurrentProjectId'] !== projectId) {
85
80
  store.dispatch('configurations/loadConfigurations', { projectId: projectId });
86
81
  store.dispatch('configurations/searchConfigurations', projectId);
@@ -152,25 +147,6 @@ import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.
152
147
  next();
153
148
  },
154
149
  },
155
- {
156
- name: 'Planner',
157
- path: '/projects/:projectId/planner',
158
- component: PbTasksPage,
159
- props: {
160
- title: 'Les étapes de votre projet',
161
- taskToCreateModel: TASK_TO_CREATE_MODEL,
162
- },
163
- beforeEnter: async (to, from, next, store) => {
164
- const projectId = to.params.projectId;
165
- if (store.getters['projects/getCurrentProjectId'] !== projectId) {
166
- store.dispatch('projects/loadProject', projectId);
167
- }
168
- if (store.getters['tasks/getCurrentProjectId']?.inhabitantProjectId !== projectId) {
169
- store.dispatch('tasks/loadPlanner', { projectId, buId: 'bu-dev-planner' });
170
- }
171
- next();
172
- },
173
- },
174
150
  ]),
175
151
  ]}
176
152
  ></Meta>
@@ -395,36 +395,6 @@
395
395
  </m-flex>
396
396
  </div>
397
397
  </m-flex>
398
- <m-flex
399
- v-if="isPlannerDisplayed"
400
- class="pb-project-hub__section pb-project-hub__planner-section"
401
- direction="column"
402
- full-width
403
- >
404
- <pb-tasks-preview
405
- v-if="!plannerError"
406
- class="pb-project-hub__planner"
407
- :tasks="tasks"
408
- :tasks-number="3"
409
- :read-only="readOnly"
410
- @show-task-details="handleShowTaskDetails"
411
- @create-task="handleCreateTask"
412
- @view-tasks="handleViewTasks"
413
- @task-completed="handleCompleteTask"
414
- />
415
- <m-flex
416
- v-else-if="plannerError"
417
- class="pb-project-hub__planner--error"
418
- direction="column"
419
- align-items="center"
420
- justify-content="center"
421
- gap="2rem"
422
- full-width
423
- >
424
- <div>Une erreur est survenue lors du chargement des étapes</div>
425
- <m-button label="Réessayer" @click="$store.dispatch('tasks/reloadPlanner')" />
426
- </m-flex>
427
- </m-flex>
428
398
  <m-flex v-if="isMailConsentDisplayed" class="pb-project-hub__section" direction="column" full-width>
429
399
  <div class="pb-project-hub__section-header">
430
400
  <div class="pb-project-hub__section-title" ref="pbConsent">Souscription newsletter</div>
@@ -734,15 +704,11 @@ import PbLoader from '../../loader/PbLoader.vue';
734
704
  import PbMOpinion from '../../mopinion/PbMOpinion.vue';
735
705
  import PbProjectAttributes from '../project-attributes/PbProjectAttributes.vue';
736
706
  import PbRestitution from '../../restitution/PbRestitution.vue';
737
- import PbTasksPreview from '../../tasks/preview/PbTasksPreview.vue';
738
707
  import PbConsent from '../../consent/PbConsent.vue';
739
- import TASK_MODEL from './plannerTask.json';
740
708
  import ESTIMATES_PAYLOAD from './../../estimates/estimates-payload.json';
741
- import cloneDeep from 'lodash.clonedeep';
742
709
  import { Tool } from '@/types/pb/Tool';
743
710
  import { Configuration } from '@/types/pb/Configuration';
744
711
  import { Estimate } from '@/types/pb/Estimate';
745
- import { Task } from '@/types/pb/Task';
746
712
  import PbMediaUpload from '@/components/media/upload/PbMediaUpload.vue';
747
713
  import DOCUMENT_UPLOAD_PAYLOAD from '@/components/media/upload/document-upload-payload.json';
748
714
 
@@ -807,7 +773,6 @@ export default defineComponent({
807
773
  PbMOpinion,
808
774
  PbProjectAttributes,
809
775
  PbRestitution,
810
- PbTasksPreview,
811
776
  PbConsent,
812
777
  },
813
778
 
@@ -869,7 +834,6 @@ export default defineComponent({
869
834
  clickedConfiguration: null as unknown as Configuration,
870
835
  showMoreButtonAnimationDelay: 0,
871
836
  BACK_ICON,
872
- TASK_MODEL,
873
837
  DOCUMENT_UPLOAD_PAYLOAD,
874
838
  displayCategoriesDialog: false,
875
839
  }),
@@ -920,14 +884,6 @@ export default defineComponent({
920
884
  toolsLoadError: 'getToolsLoadError',
921
885
  }),
922
886
 
923
- ...mapGetters('tasks', {
924
- isPlannerDisplayed: 'isDisplayed',
925
- tasks: 'getTasks',
926
- tasksLoaded: 'areTasksLoaded',
927
- tasksCount: 'getTasksCount',
928
- plannerError: 'getPlannerError',
929
- }),
930
-
931
887
  ...mapGetters('configurations', {
932
888
  isConfigurationsDisplayed: 'isDisplayed',
933
889
  isImportingConfiguration: 'isImportingConfiguration',
@@ -1179,10 +1135,6 @@ export default defineComponent({
1179
1135
  this.$router.push({ name: 'PbDocuments', params: { projectId: this.project.id } });
1180
1136
  },
1181
1137
 
1182
- createTask() {
1183
- this.$refs.PbTasksList.openCreateDialog();
1184
- },
1185
-
1186
1138
  deleteProject() {
1187
1139
  this.showDeleteDialog = false;
1188
1140
  this.$store.dispatch('projects/deleteProject', this.project.id);
@@ -1228,46 +1180,6 @@ export default defineComponent({
1228
1180
  return true;
1229
1181
  },
1230
1182
 
1231
- handleShowTaskDetails(task: Task) {
1232
- setTimeout(() => {
1233
- this.$store.dispatch('sendEventToBus', {
1234
- code: 'taskDetailsDisplayed',
1235
- payload: { origin: 'projectSpace', task: task },
1236
- });
1237
- }, 500);
1238
- this.$router.push({ path: `/projects/${this.project.id}/planner`, query: { display: task.id } });
1239
- },
1240
-
1241
- handleCreateTask() {
1242
- this.$store.dispatch('sendEventToBus', { code: 'taskCreationRequested', payload: { origin: 'projectSpace' } });
1243
- this.$router.push({ path: `/projects/${this.project.id}/planner`, query: { create: 'true' } });
1244
- },
1245
-
1246
- handleViewTasks(event: Event) {
1247
- this.$store.dispatch('sendEventToBus', { code: 'goToTasks', payload: { origin: 'projectSpace', ...event } });
1248
- this.$router.push({ name: 'Planner', params: { projectId: this.project.id } });
1249
- },
1250
-
1251
- async handleCompleteTask({ task }: { task: Task }) {
1252
- const taskToSave = cloneDeep(task);
1253
- taskToSave.state.done = true;
1254
- await this.saveTask(taskToSave);
1255
- this.$store.dispatch('sendEventToBus', {
1256
- code: 'taskCompleted',
1257
- payload: { origin: 'projectSpace', task: taskToSave },
1258
- });
1259
- },
1260
-
1261
- async saveTask(task: Task) {
1262
- /**
1263
- * Emitted when a task is updated
1264
- * @event update-task
1265
- * @type {Event}
1266
- */
1267
- this.$emit('updateTask', task);
1268
- await this.$store.dispatch('tasks/updateTask', task);
1269
- },
1270
-
1271
1183
  handleShowImportConfigurationDialog() {
1272
1184
  this.$store.dispatch('sendEventToBus', { code: 'importConfigurationRequested', payload: {} });
1273
1185
  this.showImportConfigurationDialog = true;
@@ -1367,14 +1279,6 @@ $appear-duration: 100ms;
1367
1279
  width: 100%;
1368
1280
  }
1369
1281
 
1370
- &__planner {
1371
- width: 100%;
1372
-
1373
- &-section {
1374
- min-height: 140px;
1375
- }
1376
- }
1377
-
1378
1282
  @include set-from-screen($responsive-breakpoint) {
1379
1283
  padding: 0 $mu200 $mu250 $mu200;
1380
1284
  }
@@ -1577,30 +1481,6 @@ $appear-duration: 100ms;
1577
1481
  }
1578
1482
  }
1579
1483
 
1580
- // Override tasks list styles
1581
- & :deep(.pb-tasks-list) {
1582
- padding: 0;
1583
- }
1584
-
1585
- & :deep(.pb-tasks-list__header),
1586
- & :deep(.pb-tasks-list__add-button) {
1587
- padding-bottom: $mu100;
1588
- padding-top: 0;
1589
- }
1590
-
1591
- & :deep(.pb-tasks-list__category) {
1592
- padding: 0;
1593
- }
1594
-
1595
- & :deep(.pb-tasks-list__category-done-button),
1596
- & :deep(.pb-tasks-list__category-done-label) {
1597
- width: 100% !important;
1598
-
1599
- @include set-from-screen($responsive-breakpoint) {
1600
- width: auto !important;
1601
- }
1602
- }
1603
-
1604
1484
  &__action-dialog {
1605
1485
  & :deep(.m-dialog) {
1606
1486
  margin: 0 auto;
@@ -44,9 +44,6 @@ import { getEstimatesByProjectIdResolver } from '../../../services/api/mocks/est
44
44
  component: PbProjectHub,
45
45
  props: { showBackButton: true },
46
46
  beforeEnter: async (to, from, next, store) => {
47
- if (store.getters['tasks/getCurrentProjectId'] !== to.params.projectId) {
48
- store.dispatch('tasks/loadPlanner', { projectId: to.params.projectId, buId: 'bu-dev-planner' });
49
- }
50
47
  await store.dispatch('projects/loadProject', to.params.projectId);
51
48
  await store.dispatch('estimates/loadEstimates', to.params.projectId);
52
49
  if (store.getters['projects/getProjects']?.length === 0) {
@@ -395,36 +395,6 @@
395
395
  </m-flex>
396
396
  </div>
397
397
  </m-flex>
398
- <m-flex
399
- v-if="isPlannerDisplayed"
400
- class="pb-project-hub__section pb-project-hub__planner-section"
401
- direction="column"
402
- full-width
403
- >
404
- <pb-tasks-preview
405
- v-if="!plannerError"
406
- class="pb-project-hub__planner"
407
- :tasks="tasks"
408
- :tasks-number="3"
409
- :read-only="readOnly"
410
- @show-task-details="handleShowTaskDetails"
411
- @create-task="handleCreateTask"
412
- @view-tasks="handleViewTasks"
413
- @task-completed="handleCompleteTask"
414
- />
415
- <m-flex
416
- v-else-if="plannerError"
417
- class="pb-project-hub__planner--error"
418
- direction="column"
419
- align-items="center"
420
- justify-content="center"
421
- gap="2rem"
422
- full-width
423
- >
424
- <div>Une erreur est survenue lors du chargement des étapes</div>
425
- <m-button label="Réessayer" @click="$store.dispatch('tasks/reloadPlanner')" />
426
- </m-flex>
427
- </m-flex>
428
398
  <m-flex v-if="isMailConsentDisplayed" class="pb-project-hub__section" direction="column" full-width>
429
399
  <div class="pb-project-hub__section-header">
430
400
  <div class="pb-project-hub__section-title" ref="pbConsent">Souscription newsletter</div>
@@ -734,15 +704,12 @@ import PbLoader from '../../loader/PbLoader.vue';
734
704
  import PbMOpinion from '../../mopinion/PbMOpinion.vue';
735
705
  import PbProjectAttributes from '../project-attributes/PbProjectAttributes.vue';
736
706
  import PbRestitution from '../../restitution/PbRestitution.vue';
737
- import PbTasksPreview from '../../tasks/preview/PbTasksPreview.vue';
738
707
  import PbConsent from '../../consent/PbConsent.vue';
739
- import TASK_MODEL from './plannerTask.json';
740
708
  import ESTIMATES_PAYLOAD from './../../estimates/estimates-payload.json';
741
709
  import cloneDeep from 'lodash.clonedeep';
742
710
  import { Tool } from '@/types/pb/Tool';
743
711
  import { Configuration } from '@/types/pb/Configuration';
744
712
  import { Estimate } from '@/types/pb/Estimate';
745
- import { Task } from '@/types/pb/Task';
746
713
  import PbMediaUpload from '@/components/media/upload/PbMediaUpload.vue';
747
714
  import DOCUMENT_UPLOAD_PAYLOAD from '@/components/media/upload/document-upload-payload.json';
748
715
 
@@ -807,7 +774,6 @@ export default defineComponent({
807
774
  PbMOpinion,
808
775
  PbProjectAttributes,
809
776
  PbRestitution,
810
- PbTasksPreview,
811
777
  PbConsent,
812
778
  },
813
779
 
@@ -869,7 +835,6 @@ export default defineComponent({
869
835
  clickedConfiguration: null as unknown as Configuration,
870
836
  showMoreButtonAnimationDelay: 0,
871
837
  BACK_ICON,
872
- TASK_MODEL,
873
838
  DOCUMENT_UPLOAD_PAYLOAD,
874
839
  displayCategoriesDialog: false,
875
840
  }),
@@ -920,14 +885,6 @@ export default defineComponent({
920
885
  toolsLoadError: 'getToolsLoadError',
921
886
  }),
922
887
 
923
- ...mapGetters('tasks', {
924
- isPlannerDisplayed: 'isDisplayed',
925
- tasks: 'getTasks',
926
- tasksLoaded: 'areTasksLoaded',
927
- tasksCount: 'getTasksCount',
928
- plannerError: 'getPlannerError',
929
- }),
930
-
931
888
  ...mapGetters('configurations', {
932
889
  isConfigurationsDisplayed: 'isDisplayed',
933
890
  isImportingConfiguration: 'isImportingConfiguration',
@@ -1179,10 +1136,6 @@ export default defineComponent({
1179
1136
  this.$router.push({ name: 'PbDocuments', params: { projectId: this.project.id } });
1180
1137
  },
1181
1138
 
1182
- createTask() {
1183
- this.$refs.PbTasksList.openCreateDialog();
1184
- },
1185
-
1186
1139
  deleteProject() {
1187
1140
  this.showDeleteDialog = false;
1188
1141
  this.$store.dispatch('projects/deleteProject', this.project.id);
@@ -1228,46 +1181,6 @@ export default defineComponent({
1228
1181
  return true;
1229
1182
  },
1230
1183
 
1231
- handleShowTaskDetails(task: Task) {
1232
- setTimeout(() => {
1233
- this.$store.dispatch('sendEventToBus', {
1234
- code: 'taskDetailsDisplayed',
1235
- payload: { origin: 'projectSpace', task: task },
1236
- });
1237
- }, 500);
1238
- this.$router.push({ path: `/projects/${this.project.id}/planner`, query: { display: task.id } });
1239
- },
1240
-
1241
- handleCreateTask() {
1242
- this.$store.dispatch('sendEventToBus', { code: 'taskCreationRequested', payload: { origin: 'projectSpace' } });
1243
- this.$router.push({ path: `/projects/${this.project.id}/planner`, query: { create: 'true' } });
1244
- },
1245
-
1246
- handleViewTasks(event: Event) {
1247
- this.$store.dispatch('sendEventToBus', { code: 'goToTasks', payload: { origin: 'projectSpace', ...event } });
1248
- this.$router.push({ name: 'Planner', params: { projectId: this.project.id } });
1249
- },
1250
-
1251
- async handleCompleteTask({ task }: { task: Task }) {
1252
- const taskToSave = cloneDeep(task);
1253
- taskToSave.state.done = true;
1254
- await this.saveTask(taskToSave);
1255
- this.$store.dispatch('sendEventToBus', {
1256
- code: 'taskCompleted',
1257
- payload: { origin: 'projectSpace', task: taskToSave },
1258
- });
1259
- },
1260
-
1261
- async saveTask(task: Task) {
1262
- /**
1263
- * Emitted when a task is updated
1264
- * @event update-task
1265
- * @type {Event}
1266
- */
1267
- this.$emit('updateTask', task);
1268
- await this.$store.dispatch('tasks/updateTask', task);
1269
- },
1270
-
1271
1184
  handleShowImportConfigurationDialog() {
1272
1185
  this.$store.dispatch('sendEventToBus', { code: 'importConfigurationRequested', payload: {} });
1273
1186
  this.showImportConfigurationDialog = true;
@@ -1363,14 +1276,6 @@ $appear-duration: 100ms;
1363
1276
  width: 100%;
1364
1277
  }
1365
1278
 
1366
- &__planner {
1367
- width: 100%;
1368
-
1369
- &-section {
1370
- min-height: 140px;
1371
- }
1372
- }
1373
-
1374
1279
  @include set-from-screen($responsive-breakpoint) {
1375
1280
  padding: 0 $mu200 $mu250 $mu200;
1376
1281
  }
@@ -1569,30 +1474,6 @@ $appear-duration: 100ms;
1569
1474
  }
1570
1475
  }
1571
1476
 
1572
- // Override tasks list styles
1573
- & :deep(.pb-tasks-list) {
1574
- padding: 0;
1575
- }
1576
-
1577
- & :deep(.pb-tasks-list__header),
1578
- & :deep(.pb-tasks-list__add-button) {
1579
- padding-bottom: $mu100;
1580
- padding-top: 0;
1581
- }
1582
-
1583
- & :deep(.pb-tasks-list__category) {
1584
- padding: 0;
1585
- }
1586
-
1587
- & :deep(.pb-tasks-list__category-done-button),
1588
- & :deep(.pb-tasks-list__category-done-label) {
1589
- width: 100% !important;
1590
-
1591
- @include set-from-screen($responsive-breakpoint) {
1592
- width: auto !important;
1593
- }
1594
- }
1595
-
1596
1477
  &__action-dialog {
1597
1478
  & :deep(.m-dialog) {
1598
1479
  margin: 0 auto;
@@ -103,20 +103,6 @@
103
103
  "saleUnit": "NIU"
104
104
  }
105
105
  },
106
- {
107
- "type": "ProjectPlannerCardContent",
108
- "url": "https://www.leroymerlin.fr/services/location/location-de-materiel/location-de-ponceuse-a-parquet-largeur-200-mm.html",
109
- "id": "3pHvSN3RLLzWgh096jdOPa",
110
- "label": "Location de ponceuse à parquet, largeur 200 mm",
111
- "imageUrl": "https://images.ctfassets.net/8q8qvv8j6cpk/5wjwoolRFph2eBPDgAnNS0/2c5ed62e76219d97e9ce31406d6e0b7e/jpeg.jfif",
112
- "pricing": {
113
- "currency": "EUR",
114
- "price": 325,
115
- "pricePerCapacityUnit": 34.9,
116
- "capacityUnit": "PCE",
117
- "saleUnit": "NIU"
118
- }
119
- },
120
106
  {
121
107
  "type": "SERVICE",
122
108
  "id": "490000000",
@@ -4,7 +4,6 @@ import { ConsentState } from '@/stores/modules/consentStore';
4
4
  import { EstimatesState } from '@/stores/modules/estimatesStore';
5
5
  import { InhabitantsState } from '@/stores/modules/inhabitantsStore';
6
6
  import { MetaDataState } from '@/stores/modules/metaDataStore';
7
- import { PlannerState } from '@/stores/modules/plannerStore';
8
7
  import { ProjectsState } from '@/stores/modules/projectsStore';
9
8
  import { ToolsState } from '@/stores/modules/toolsStore';
10
9
  import { ProductState } from './modules/productsStore';
@@ -17,7 +16,6 @@ export interface State {
17
16
  estimates: EstimatesState;
18
17
  inhabitants: InhabitantsState;
19
18
  metaData: MetaDataState;
20
- tasks: PlannerState;
21
19
  projects: ProjectsState;
22
20
  tools: ToolsState;
23
21
  products: ProductState;
@@ -3,7 +3,6 @@ import configurationsStore from './modules/configurationsStore';
3
3
  import estimatesStore from './modules/estimatesStore';
4
4
  import inhabitantsStore from './modules/inhabitantsStore';
5
5
  import metadataStore from './modules/metaDataStore';
6
- import plannerStore from './modules/plannerStore';
7
6
  import projectsStore from './modules/projectsStore';
8
7
  import toolsStore from './modules/toolsStore';
9
8
  import documentsStore from './modules/documentsStore';
@@ -22,7 +21,6 @@ export default {
22
21
  inhabitants: inhabitantsStore,
23
22
  metaData: metadataStore,
24
23
  projects: projectsStore,
25
- tasks: plannerStore,
26
24
  tools: toolsStore,
27
25
  documents: cloneDeep(documentsStore),
28
26
  documentsPlans: cloneDeep(documentsStore),
@@ -1,120 +0,0 @@
1
- import { Story, Meta, Canvas } from '@storybook/addon-docs';
2
- import { nestedAppDecorator } from '../../../../.storybook/nested-app-decorator';
3
- import PbProjectHub from './PbProjectHub';
4
- import PbTasksPage from '../../../components/tasks/PbTasksPage';
5
- import store from '../../../stores/store';
6
- import { rest } from 'msw';
7
- import { getProjectByIdResolver } from '../../../services/api/mocks/projectsMock';
8
- import TASK_TO_CREATE_MODEL from '../../../components/tasks/task-to-create-generic-planner.json';
9
-
10
- <Meta
11
- title="Project Booster/Components/Projects/PbProjectHub 🦠/Features/Planner"
12
- component={PbProjectHub}
13
- parameters={{
14
- layout: 'fullscreen',
15
- }}
16
- decorators={[
17
- nestedAppDecorator(store, [
18
- {
19
- name: 'ProjectHub',
20
- path: '/',
21
- component: PbProjectHub,
22
- beforeEnter: async (to, from, next, store) => {
23
- store.dispatch('projects/loadProject', '001');
24
- next();
25
- },
26
- },
27
- {
28
- name: 'Planner',
29
- path: '/projects/:projectId?/planner',
30
- component: PbTasksPage,
31
- props: {
32
- title: 'Les étapes de votre projet',
33
- taskToCreateModel: TASK_TO_CREATE_MODEL,
34
- },
35
- beforeEnter: async (to, from, next, store) => {
36
- store.dispatch('projects/loadProject', '001');
37
- store.dispatch('tasks/loadPlanner', { projectId: '001', buId: 'bu-dev-planner' });
38
- next();
39
- },
40
- },
41
- ]),
42
- ]}
43
- />
44
-
45
- # 🦠 `PbProjectHub` - Component
46
-
47
- The `PbProjectHub` component to access your project.
48
-
49
- ## Showcase
50
-
51
- <Canvas>
52
- <Story
53
- name="Showcase"
54
- parameters={{
55
- controls: { disable: true },
56
- msw: [rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver)],
57
- }}
58
- height="100vh"
59
- >
60
- {{
61
- created() {
62
- this.$store.dispatch('tasks/loadPlanner', { projectId: '001', buId: 'bu-dev-planner' });
63
- },
64
- template: ` <div style="margin: 0 auto;min-height: 100vh;width: 100%;max-width: 960px;">
65
- <router-view v-slot="{ Component }">
66
- <component :is="Component" :key="$route.fullPath" />
67
- </router-view>
68
- </div>`,
69
- }}
70
- </Story>
71
- </Canvas>
72
-
73
- ## Showcase empty state
74
-
75
- <Canvas>
76
- <Story
77
- name="Showcase empty state"
78
- parameters={{
79
- controls: { disable: true },
80
- msw: [rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver)],
81
- }}
82
- height="100vh"
83
- >
84
- {{
85
- created() {
86
- this.$store.dispatch('tasks/loadPlanner', { projectId: 'EMPTY', buId: 'bu-dev-planner' });
87
- },
88
- template: ` <div style="margin: 0 auto;min-height: 100vh;width: 100%;max-width: 960px;">
89
- <router-view v-slot="{ Component }">
90
- <component :is="Component" :key="$route.fullPath" />
91
- </router-view>
92
- </div>`,
93
- }}
94
- </Story>
95
- </Canvas>
96
-
97
- ## Showcase with error
98
-
99
- <Canvas>
100
- <Story
101
- name="Showcase with tasks load error"
102
- parameters={{
103
- controls: { disable: true },
104
- msw: [rest.get('/api/inhabitant-projects/:projectId', getProjectByIdResolver)],
105
- storyshots: { disable: true },
106
- }}
107
- height="100vh"
108
- >
109
- {{
110
- created() {
111
- this.$store.dispatch('tasks/loadPlanner', { projectId: 'NON_EXIST', buId: 'bu-dev-planner' });
112
- },
113
- template: ` <div style="margin: 0 auto;min-height: 100vh;width: 100%;max-width: 960px;">
114
- <router-view v-slot="{ Component }">
115
- <component :is="Component" :key="$route.fullPath" />
116
- </router-view>
117
- </div>`,
118
- }}
119
- </Story>
120
- </Canvas>