Skip to content

Commit

Permalink
Consolidated task and matter views.
Browse files Browse the repository at this point in the history
Updated list view.

Updated details view.

Updated the edit form.

Cleanup and refactoring.
  • Loading branch information
jameshall-slicedbread committed Oct 3, 2023
1 parent 5f36b01 commit 95b384d
Show file tree
Hide file tree
Showing 39 changed files with 713 additions and 681 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions src/agents/index.js
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
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const list = (page, pageSize) => {
{ path: "type.name" },
{ path: "type.iconClass" },
{ path: "phase.name" },
{ path: "roles.primary-owner.ods.name" },
{ path: "roles.primary-owner.participantType.iconClass" },
{ path: "documents!1.title" },
]
};

Expand Down
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.
18 changes: 18 additions & 0 deletions src/agents/workItemsAgent.js
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
}
12 changes: 12 additions & 0 deletions src/constants/workItemTypes.js
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
}
82 changes: 41 additions & 41 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,58 @@ Vue.config.productionTip = false

// Keep same signature as Vue 3's createApp()
var createApp = function (view, opts) {
return new Vue({
...opts,
render: h => h(view),
});
return new Vue({
...opts,
render: h => h(view),
});
};

// This needs to be a promise, as we call Azure Functions API to get Static Web App configuration
var l = CoreUi.loading();
settings.get().then(function (config) {
l.dismiss();
l.dismiss();

const vuetify = useVuetify({
theme: {
options: {
customProperties: true, // Generate CSS variables
},
themes: {
light: {
primary: '#27aa5e',
secondary: '#b0bec5',
accent: '#8c9eff',
error: '#b71c1c',
grey: '#9E9E9E',
},
},
const vuetify = useVuetify({
theme: {
options: {
customProperties: true, // Generate CSS variables
},
themes: {
light: {
primary: '#27aa5e',
secondary: '#b0bec5',
accent: '#8c9eff',
error: '#b71c1c',
grey: '#9E9E9E',
},
});
},
},
});

useTipTapVuetify(vuetify);
useTipTapVuetify(vuetify);

Vue.use(SharedoMobileCore, config);
Vue.use(SharedoMobileCore, config);

Vue.component("AppMenu", Menu);
Vue.component("AppMenu", Menu);

var notLoggedIn = function () {
const app = createApp(NotLoggedIn, {
router,
store,
vuetify,
});
app.$mount("#app");
}
var notLoggedIn = function () {
const app = createApp(NotLoggedIn, {
router,
store,
vuetify,
});
app.$mount("#app");
}

// Catch oauth reply
SharedoAuth.initialise(notLoggedIn).then(() => {
SharedoProfile.loadProfile().then(() => {
createApp(Main, {
router,
store,
vuetify
}).$mount('#app');
}, err => { document.write("<div>" + err + "</div>"); })
// Catch oauth reply
SharedoAuth.initialise(notLoggedIn).then(() => {
SharedoProfile.loadProfile().then(() => {
createApp(Main, {
router,
store,
vuetify
}).$mount('#app');
}, err => { document.write("<div>" + err + "</div>"); })

});
});
});
209 changes: 111 additions & 98 deletions src/router/index.js
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;
Loading

0 comments on commit 95b384d

Please sign in to comment.