From cd09e0943125996f453085f6f9ef5a5e7f297c7b Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 29 Apr 2020 23:40:22 +0300 Subject: [PATCH 01/33] Create route for status show --- src/router/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/router/index.js b/src/router/index.js index e8510bb8..40d4d7cd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -172,5 +172,17 @@ export const asyncRouterMap = [ ], hidden: true }, + { + path: '/statuses/:id', + component: Layout, + children: [ + { + path: '', + name: 'StatusShow', + component: () => import('@/views/statuses/show') + } + ], + hidden: true + }, { path: '*', redirect: '/404', hidden: true } ] From 9c0677615496c9ba5c75dc2e59ffd3848f289cb4 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 30 Apr 2020 20:32:37 +0300 Subject: [PATCH 02/33] Create action for fetching single status --- src/store/modules/status.js | 13 ++++++++++++- src/views/statuses/show.vue | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 src/views/statuses/show.vue diff --git a/src/store/modules/status.js b/src/store/modules/status.js index 8847e8bf..78646b12 100644 --- a/src/store/modules/status.js +++ b/src/store/modules/status.js @@ -1,7 +1,8 @@ -import { changeStatusScope, deleteStatus, fetchStatuses, fetchStatusesCount, fetchStatusesByInstance } from '@/api/status' +import { changeStatusScope, deleteStatus, fetchStatus, fetchStatuses, fetchStatusesCount, fetchStatusesByInstance } from '@/api/status' const status = { state: { + fetchedStatus: {}, fetchedStatuses: [], loading: false, statusesByInstance: { @@ -28,6 +29,9 @@ const status = { CHANGE_SELECTED_INSTANCE: (state, instance) => { state.statusesByInstance.selectedInstance = instance }, + SET_STATUS: (state, status) => { + state.fetchedStatus = status + }, SET_STATUSES_BY_INSTANCE: (state, statuses) => { state.fetchedStatuses = statuses }, @@ -68,6 +72,13 @@ const status = { dispatch('FetchStatusesByInstance') } }, + async FetchStatus({ commit, getters }, id) { + commit('SET_LOADING', true) + const status = await fetchStatus(id, getters.authHost, getters.token) + console.log(status) + commit('SET_STATUS', status.data) + commit('SET_LOADING', false) + }, async FetchStatusesCount({ commit, getters }) { commit('SET_LOADING', true) const { data } = await fetchStatusesCount(getters.authHost, getters.token) diff --git a/src/views/statuses/show.vue b/src/views/statuses/show.vue new file mode 100644 index 00000000..60a6cfe7 --- /dev/null +++ b/src/views/statuses/show.vue @@ -0,0 +1,39 @@ + + + From ca8df9e7263eb4c1f9fd3a12961e6654fa80f895 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 30 Apr 2020 23:56:44 +0300 Subject: [PATCH 03/33] Render status-card --- src/views/statuses/show.vue | 95 +++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) diff --git a/src/views/statuses/show.vue b/src/views/statuses/show.vue index 60a6cfe7..4018c4e2 100644 --- a/src/views/statuses/show.vue +++ b/src/views/statuses/show.vue @@ -1,19 +1,49 @@ + + From 005c8ff161b837e2e973bb551f7b0f056fcdbbe5 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 1 May 2020 00:52:32 +0300 Subject: [PATCH 04/33] Update initial values for users module state --- src/store/modules/users.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/store/modules/users.js b/src/store/modules/users.js index 2a1540e3..b2822e86 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -24,6 +24,7 @@ const users = { searchQuery: '', totalUsersCount: 0, currentPage: 1, + pageSize: 50, filters: { local: false, external: false, @@ -73,9 +74,6 @@ const users = { }, SET_USERS_FILTERS: (state, filters) => { state.filters = filters - }, - SET_USER_PROFILE: (state, user) => { - state.userProfile = user } }, actions: { From 0a4ddd3e6fd467a71d0a2b916deabd8f04f8545f Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 1 May 2020 01:24:43 +0300 Subject: [PATCH 05/33] Fix mounting component --- src/views/statuses/show.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/statuses/show.vue b/src/views/statuses/show.vue index 4018c4e2..1d29d2d6 100644 --- a/src/views/statuses/show.vue +++ b/src/views/statuses/show.vue @@ -1,5 +1,5 @@ - diff --git a/src/views/users/index.vue b/src/views/users/index.vue index 6d6deb47..79a02d39 100644 --- a/src/views/users/index.vue +++ b/src/views/users/index.vue @@ -81,19 +81,9 @@ - -
-

Password reset token was generated: {{ passwordResetToken }}

-

You can also use this link to reset password: - {{ passwordResetLink }} -

-
-
+ - -
-

Password reset token was generated: {{ passwordResetToken }}

-

You can also use this link to reset password: - {{ passwordResetLink }} -

-
-
+