Skip to content

Commit

Permalink
Rename to overview
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Aug 20, 2020
1 parent 341eb47 commit b199442
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 22 deletions.
8 changes: 4 additions & 4 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
['name' => 'card#removeLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'DELETE'],
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/assign', 'verb' => 'POST'],
['name' => 'card#unassignUser', 'url' => '/cards/{cardId}/unassign', 'verb' => 'PUT'],

// attachments
['name' => 'attachment#getAll', 'url' => '/cards/{cardId}/attachments', 'verb' => 'GET'],
['name' => 'attachment#create', 'url' => '/cards/{cardId}/attachment', 'verb' => 'POST'],
Expand Down Expand Up @@ -136,7 +136,7 @@
['name' => 'comments_api#delete', 'url' => '/api/v1.0/cards/{cardId}/comments/{commentId}', 'verb' => 'DELETE'],

// dashboard
['name' => 'dashboard_api#findAllWithDue', 'url' => '/api/v1.0/dashboard/due', 'verb' => 'GET'],
['name' => 'dashboard_api#findAssignedCards', 'url' => '/api/v1.0/dashboard/assigned', 'verb' => 'GET'],
['name' => 'overview_api#findAllWithDue', 'url' => '/api/v1.0/overview/due', 'verb' => 'GET'],
['name' => 'overview_api#findAssignedCards', 'url' => '/api/v1.0/overview/assigned', 'verb' => 'GET'],
]
];
];
6 changes: 1 addition & 5 deletions src/components/navigation/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
<template>
<AppNavigationVue :class="{'icon-loading': loading}">
<template #list>
<AppNavigationItem
:title="t('deck', 'Due cards')"
icon="icon-calendar-dark"
to="/dashboards/due" />
<AppNavigationItem
:title="t('deck', 'My assigned cards')"
icon="icon-group"
to="/dashboards/assigned" />
to="/overview/assigned" />
<AppNavigationBoardCategory
id="deck-navigation-all"
to="/board"
Expand Down
2 changes: 1 addition & 1 deletion src/components/overview/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const SUPPORTED_FILTERS = [
]
export default {
name: 'Dashboards',
name: 'Overview',
components: {
Controls,
CardItem,
Expand Down
8 changes: 4 additions & 4 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Board from './components/board/Board'
import Sidebar from './components/Sidebar'
import BoardSidebar from './components/board/BoardSidebar'
import CardSidebar from './components/card/CardSidebar'
import Dashboards from './components/dashboards/Dashboards'
import Overview from './components/overview/Overview'

Vue.use(Router)

Expand All @@ -43,10 +43,10 @@ export default new Router({
component: Boards,
},
{
path: '/dashboards/:filter',
name: 'dashboards',
path: '/overview/:filter',
name: 'overview',
components: {
default: Dashboards,
default: Overview,
},
props: {
default: (route) => {
Expand Down
6 changes: 3 additions & 3 deletions src/services/OverviewApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'

export class DashboardApi {
export class OverviewApi {

url(url) {
return generateOcsUrl(`apps/deck/api/v1.0`) + url
}

findAllWithDue(data) {
return axios.get(this.url(`dashboard/due`), {
return axios.get(this.url(`overview/due`), {
headers: { 'OCS-APIRequest': 'true' },
})
.then(
Expand All @@ -42,7 +42,7 @@ export class DashboardApi {
}

findMyAssignedCards(data) {
return axios.get(this.url(`dashboard/assigned`), {
return axios.get(this.url(`overview/assigned`), {
headers: { 'OCS-APIRequest': 'true' },
})
.then(
Expand Down
6 changes: 3 additions & 3 deletions src/store/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import Vue from 'vue'
import Vuex from 'vuex'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { BoardApi } from './../services/BoardApi'
import { BoardApi } from '../services/BoardApi'
import stack from './stack'
import card from './card'
import comment from './comment'
import trashbin from './trashbin'
import attachment from './attachment'
import dashboard from './dashboard'
import overview from './overview'
import debounce from 'lodash/debounce'
Vue.use(Vuex)

Expand All @@ -52,7 +52,7 @@ export default new Vuex.Store({
comment,
trashbin,
attachment,
dashboard,
overview,
},
strict: debug,
state: {
Expand Down
4 changes: 2 additions & 2 deletions src/store/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

import Vue from 'vue'
import Vuex from 'vuex'
import { DashboardApi } from '../services/DashboardApi'
import { OverviewApi } from '../services/OverviewApi'
Vue.use(Vuex)

const apiClient = new DashboardApi()
const apiClient = new OverviewApi()
export default {
state: {
withDue: [],
Expand Down

0 comments on commit b199442

Please sign in to comment.