project-booster-vue 8.117.2 → 8.117.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "8.117.2",
3
+ "version": "8.117.3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "test:unit": "vue-cli-service test:unit --forceExit --detectOpenHandles",
@@ -36,7 +36,7 @@ export default {
36
36
  },
37
37
  },
38
38
  computed: {
39
- ...mapGetters(['summary']),
39
+ ...mapGetters('estimates', { summary: 'getSummary' }),
40
40
  },
41
41
  };
42
42
  </script>
@@ -1,5 +1,5 @@
1
1
  import { v4 as uuidv4 } from 'uuid';
2
- import { getAllEstimates, saveEstimate, deleteEstimateById } from '../../services/api/estimatesApi';
2
+ import { getAllEstimates, saveEstimate, deleteEstimateById, estimate } from '../../services/api/estimatesApi';
3
3
 
4
4
  export default {
5
5
  namespaced: true,
@@ -137,16 +137,16 @@ export default {
137
137
  },
138
138
 
139
139
  actions: {
140
- async estimate({ commit, state }, adaptedAnswers) {
140
+ async estimate({ commit, state }, { adaptedAnswers, estimatorId, correlationId }) {
141
141
  const statelessEstimatePayload = {
142
142
  answers: adaptedAnswers,
143
- correlationId: state.sessions.correlationId,
143
+ correlationId: correlationId,
144
144
  };
145
145
 
146
146
  const answerDate = new Date();
147
147
  let summary;
148
148
  try {
149
- summary = await estimate(state.sessions.estimatorId, statelessEstimatePayload);
149
+ summary = await estimate(estimatorId, statelessEstimatePayload);
150
150
  } catch (error) {
151
151
  console.error('Failure to get estimate from answers', error);
152
152
  return;
@@ -155,7 +155,7 @@ export default {
155
155
  return;
156
156
  }
157
157
  commit('setSummary', summary);
158
- commit('updateLastAnswerHavingUpdatedSummaryDate', answerDate);
158
+ commit('setLastAnswerHavingUpdatedSummaryDate', answerDate);
159
159
  },
160
160
  async loadEstimates({ commit, state }, projectId) {
161
161
  commit('setIsDisplayed', true);
@@ -631,6 +631,9 @@ export const projectItemSaveStoreOptions = {
631
631
  getDefaultItemName(state) {
632
632
  return state.defaultItemName;
633
633
  },
634
+ getSessions(state) {
635
+ return state.sessions;
636
+ },
634
637
  },
635
638
  mutations: {
636
639
  setIsCreatingItem(state, isCreatingItem) {