Skip to content

Commit

Permalink
Fix create/load work item
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Smith committed Mar 19, 2024
1 parent 4daa58e commit 2a72d9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var settings =
api: "https://xyz.sharedo.co.uk",
clientId: "mobile-app",
clientSecret: "not a secret",
redirectUri: "https://localhost:8080/oAuthReply",
redirectUri: "https://localhost:8081/oAuthReply",
}

// DO NOT commit actual configuration to git.
Expand Down
2 changes: 1 addition & 1 deletion src/views/WorkItems/New/NewTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
reference: "",
title: "",
description: "",
dueDate: moment.now(),
dueDate: moment().utc().format(),
matters: [],
loading: true,
selectedMatter: this.parentId
Expand Down
9 changes: 6 additions & 3 deletions src/views/WorkItems/WorkItemDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<script>
import { SharedoProfile } from "@sharedo/mobile-core";
import { tasks, matters, comments, bookmarks, phases } from "@/agents";
import { tasks, matters, comments, bookmarks, phases, participants } from "@/agents";
import { MATTER, TASK } from "@/constants/workItemTypes";
const NewWorkItem = () => import("@/views/WorkItems/New/WorkItemType");
Expand Down Expand Up @@ -110,7 +110,7 @@ export default {
openedPanel: null,
phases: [],
permissions: [],
owner: "",
owner: "", // ODS ID of owner
actions: null,
titleIsUserProvided: false,
referenceIsUserProvided: false
Expand Down Expand Up @@ -180,12 +180,15 @@ export default {
try {
const task = await tasks.getTask(this.id);
const parts = await participants.getParticipantsFor(this.id);
this.reference = task.workItem.reference;
this.title = task.workItem.title;
this.description = task.workItem.description;
this.taskDueDate = task.aspectData.task.dueDateTime;
this.owner = task.aspectData.taskAssignedTo.primaryOwner;
this.owner = (parts.find(p => p.participantRoleType === "primary-owner") || {}).odsId;
this.titleIsUserProvided = task.workItem.titleIsUserProvided;
this.referenceIsUserProvided = task.workItem.referenceIsUserProvided;
Expand Down

0 comments on commit 2a72d9a

Please sign in to comment.