generated from staticwebdev/vue-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated list view. Updated details view. Updated the edit form. Cleanup and refactoring.
- Loading branch information
1 parent
5f36b01
commit 95b384d
Showing
39 changed files
with
713 additions
and
681 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import workItems from "./workItemsAgent"; | ||
import tasks from "./tasksAgent"; | ||
import phases from "./phasesAgent"; | ||
import matters from "./mattersAgent"; | ||
import bookmarks from "./bookmarksAgent"; | ||
import chronology from "./chronologyAgent"; | ||
import comments from "./commentsAgent"; | ||
import notifications from "./notificationsAgent"; | ||
import participants from "./participantsAgent"; | ||
import profile from "./profileAgent"; | ||
import relatedDocuments from "./relatedDocumentsAgent"; | ||
import search from "./searchAgent"; | ||
import time from "./timeAgent"; | ||
|
||
export { | ||
tasks, | ||
workItems, | ||
phases, | ||
matters, | ||
bookmarks, | ||
chronology, | ||
comments, | ||
notifications, | ||
participants, | ||
profile, | ||
relatedDocuments, | ||
search, | ||
time | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { SharedoFetch } from "@sharedo/mobile-core"; | ||
|
||
const save = (id, workItem) => { | ||
const payload = { | ||
...workItem.workItem, | ||
aspectData: {} | ||
}; | ||
|
||
Reflect.ownKeys(workItem.aspectData).forEach(key => { | ||
payload.aspectData[key] = JSON.stringify(workItem.aspectData[key]); | ||
}); | ||
|
||
return SharedoFetch.post(`/api/aspects/sharedos/${id}`, payload); // Not using the public API as it is broken. | ||
} | ||
|
||
export default { | ||
save | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const TASK = "TASK"; | ||
const MATTER = "MATTER"; | ||
|
||
export { | ||
TASK, | ||
MATTER | ||
} | ||
|
||
export default { | ||
TASK, | ||
MATTER | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,123 @@ | ||
import Vue from 'vue'; | ||
import VueRouter from 'vue-router'; | ||
import TaskList from "@/views/Tasks/TaskList.vue" | ||
import WorkItemList from "@/views/WorkItems/WorkItemList"; | ||
import { TASK, MATTER } from "@/constants/workItemTypes"; | ||
|
||
Vue.use(VueRouter); | ||
|
||
const routes = [ | ||
{ | ||
// Tab 1 | ||
path: '/tasks', | ||
alias: '/', // <= default page | ||
name: 'tasks', | ||
component: TaskList | ||
}, | ||
{ | ||
path: "/profile", | ||
name: "profile", | ||
component: () => import("@/views/Profile/Profile.vue") | ||
}, | ||
{ | ||
// Tab 1 -> Detail | ||
path: "/tasks/:id", | ||
name: "task-detail", | ||
props: true, | ||
component: () => import("@/views/Tasks/TaskDetail.vue") | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Time Entries | ||
path: "/tasks/:id/time", | ||
name: "task-time-entries", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Time/TimeEntryList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Participants | ||
path: "/tasks/:id/participants", | ||
name: "task-participants", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Participants/ParticipantList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Chronology | ||
path: "/tasks/:id/chronology", | ||
name: "task-chronology", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Chronology/ChronologyList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Comments | ||
path: "/tasks/:id/comments", | ||
name: "task-comments", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Comments/CommentList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Bookmarks | ||
path: "/bookmarks", | ||
name: "bookmarks", | ||
component: () => import('@/views/Bookmarks/BookmarkList.vue') | ||
}, | ||
{ | ||
// Tab 2 | ||
path: '/new-task', | ||
name: 'new-task', | ||
component: () => import("@/views/Tabs/NewTask.vue") | ||
}, | ||
{ | ||
// Tab 3 | ||
path: '/search', | ||
name: 'search', | ||
component: () => import("@/views/Tabs/Search.vue") | ||
}, | ||
{ | ||
path: "/work-items", | ||
name: "matters", | ||
component: () => import("@/views/Matters/MatterList.vue") | ||
}, | ||
{ | ||
path: "/work-items/:id", | ||
name: "matter-detail", | ||
props: true, | ||
component: () => import("@/views/Matters/MatterDetail.vue") | ||
}, | ||
{ | ||
path: '/notifications', | ||
name: 'notifications', | ||
component: () => import('@/views/Notifications/NotificationList.vue') | ||
}, | ||
{ | ||
path: "/notifications/settings", | ||
name: "notification-settings", | ||
component: () => import("@/views/Notifications/NotificationSettings.vue") | ||
} | ||
{ | ||
// Tab 1 | ||
path: '/tasks', | ||
alias: '/', // <= default page | ||
name: 'tasks', | ||
props: () => ({ | ||
type: TASK | ||
}), | ||
component: WorkItemList | ||
}, | ||
{ | ||
path: "/profile", | ||
name: "profile", | ||
component: () => import("@/views/Profile/Profile.vue") | ||
}, | ||
{ | ||
// Tab 1 -> Detail | ||
path: "/tasks/:id", | ||
name: "task-detail", | ||
props: ({ params }) => ({ | ||
id: params.id, | ||
type: TASK | ||
}), | ||
component: () => import("@/views/WorkItems/WorkItemDetail.vue") | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Time Entries | ||
path: "/tasks/:id/time", | ||
name: "task-time-entries", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Time/TimeEntryList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Participants | ||
path: "/tasks/:id/participants", | ||
name: "task-participants", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Participants/ParticipantList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Chronology | ||
path: "/tasks/:id/chronology", | ||
name: "task-chronology", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Chronology/ChronologyList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Detail -> Comments | ||
path: "/tasks/:id/comments", | ||
name: "task-comments", | ||
props: ({ params }) => ({ | ||
sharedoId: params.id | ||
}), | ||
component: () => import('@/views/Comments/CommentList.vue') | ||
}, | ||
{ | ||
// Tab 1 -> Bookmarks | ||
path: "/bookmarks", | ||
name: "bookmarks", | ||
component: () => import('@/views/Bookmarks/BookmarkList.vue') | ||
}, | ||
{ | ||
// Tab 2 | ||
path: '/new-task', | ||
name: 'new-task', | ||
component: () => import("@/views/Tabs/NewTask.vue") | ||
}, | ||
{ | ||
// Tab 3 | ||
path: '/search', | ||
name: 'search', | ||
component: () => import("@/views/Tabs/Search.vue") | ||
}, | ||
{ | ||
path: "/work-items", | ||
name: "matters", | ||
props: () => ({ | ||
type: MATTER | ||
}), | ||
component: WorkItemList | ||
}, | ||
{ | ||
path: "/work-items/:id", | ||
name: "matter-detail", | ||
props: ({ params }) => ({ | ||
id: params.id, | ||
type: MATTER | ||
}), | ||
component: () => import("@/views/WorkItems/WorkItemDetail.vue") | ||
}, | ||
{ | ||
path: '/notifications', | ||
name: 'notifications', | ||
component: () => import('@/views/Notifications/NotificationList.vue') | ||
}, | ||
{ | ||
path: "/notifications/settings", | ||
name: "notification-settings", | ||
component: () => import("@/views/Notifications/NotificationSettings.vue") | ||
} | ||
] | ||
|
||
const router = new VueRouter({ | ||
mode: 'history', | ||
base: process.env.BASE_URL, | ||
routes: routes, | ||
mode: 'history', | ||
base: process.env.BASE_URL, | ||
routes: routes, | ||
}); | ||
|
||
export default router; |
Oops, something went wrong.