diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue index 1272a3c19..51bda315e 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflows.vue @@ -1,88 +1,25 @@ - - + \ No newline at end of file diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue new file mode 100644 index 000000000..f98d7a5cb --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorkflowsTable.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js index edc781087..697074671 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/i18n.js @@ -24,7 +24,8 @@ const appMessages = { }, my_workflows: { tab: "Mes workflows", - description: "Liste des workflows en attente d'une action." + description: "Liste des workflows en attente d'une action.", + description_cc: "Liste des workflows dont je suis en copie." }, opening_date: "Date d'ouverture", social_issues: "Problématiques sociales", diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js index 44127da1c..088cb93b7 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/js/store.js @@ -22,6 +22,7 @@ const store = createStore({ accompanyingCourses: {}, notifications: {}, workflows: {}, + workflowsCc: {}, errorMsg: [], loading: false }, @@ -87,6 +88,9 @@ const store = createStore({ addWorkflows(state, workflows) { state.workflows = workflows; }, + addWorkflowsCc(state, workflows) { + state.workflowsCc = workflows; + }, setLoading(state, bool) { state.loading = bool; }, @@ -195,17 +199,23 @@ const store = createStore({ case 'MyWorkflows': if (!getters.isWorflowsLoaded) { commit('setLoading', true); - const url = '/api/1.0/main/workflow/my'; - makeFetch('GET', url) - .then((response) => { - console.log('workflows', response) - commit('addWorkflows', response); - commit('setLoading', false); - }) - .catch((error) => { - commit('catchError', error); - throw error; - }); + makeFetch('GET', '/api/1.0/main/workflow/my') + .then((response) => { + commit('addWorkflows', response); + makeFetch('GET', '/api/1.0/main/workflow/my-cc') + .then((response) => { + commit('addWorkflowsCc', response); + commit('setLoading', false); + }) + .catch((error) => { + commit('catchError', error); + throw error; + }); + }) + .catch((error) => { + commit('catchError', error); + throw error; + }); } break; default: