fix(teams): display and logic adjustments

This commit is contained in:
SabreCat
2022-03-01 16:18:57 -06:00
parent 17b93322aa
commit 24349bed0a
3 changed files with 10 additions and 9 deletions

View File

@@ -816,7 +816,7 @@ export default {
const yesterUtcOffset = yesterDay.utcOffset(); const yesterUtcOffset = yesterDay.utcOffset();
dailys.forEach(task => { dailys.forEach(task => {
if (task && task.group.approval && task.group.approval.requested) return; if (task.group && task.group.id) return;
if (task.completed) return; if (task.completed) return;
const due = shouldDo(yesterDay, task, { timezoneUtcOffset: yesterUtcOffset }); const due = shouldDo(yesterDay, task, { timezoneUtcOffset: yesterUtcOffset });
if (task.yesterDaily && due) this.yesterDailies.push(task); if (task.yesterDaily && due) this.yesterDailies.push(task);

View File

@@ -41,6 +41,7 @@
</div> </div>
<div <div
class="claim-bottom-message d-flex align-items-center" class="claim-bottom-message d-flex align-items-center"
v-if="group"
> >
<div <div
class="mr-auto ml-2" class="mr-auto ml-2"
@@ -82,7 +83,8 @@
</a> </a>
</span> </span>
<span <span
v-if="assignedUsersCount === 1 && task.type === 'daily' && !task.completed" v-if="assignedUsersCount === 1 && task.type === 'daily'
&& !task.completed && singleAssignLastDone"
class="mr-1 d-inline-flex" class="mr-1 d-inline-flex"
> >
<span <span
@@ -97,7 +99,7 @@
:class="{'green-10': showGreen}" :class="{'green-10': showGreen}"
> >
{{ formattedCompletionTime }} {{ formattedCompletionTime }}
</span> </span>
</span> </span>
</div> </div>
</div> </div>
@@ -263,7 +265,6 @@ export default {
if (userId !== this.user._id) { if (userId !== this.user._id) {
const index = findIndex(this.group.members, member => member._id === userId); const index = findIndex(this.group.members, member => member._id === userId);
const { completedDate } = this.task.group.assignedUsers[userId]; const { completedDate } = this.task.group.assignedUsers[userId];
if (!completedDate) return [];
let completedDateString; let completedDateString;
if (moment().diff(completedDate, 'days') > 0) { if (moment().diff(completedDate, 'days') > 0) {
completedDateString = `Completed ${moment(completedDate).format('M/D/YY')}`; completedDateString = `Completed ${moment(completedDate).format('M/D/YY')}`;

View File

@@ -175,10 +175,10 @@
"onlyGroupLeaderCanEditTasks": "Not authorized to manage tasks!", "onlyGroupLeaderCanEditTasks": "Not authorized to manage tasks!",
"onlyGroupTasksCanBeAssigned": "Only group tasks can be assigned", "onlyGroupTasksCanBeAssigned": "Only group tasks can be assigned",
"assignedTo": "Assign To", "assignedTo": "Assign To",
"assignedToUser": "Assigned to <strong>@<%- userName %></strong>", "assignedToUser": "Assigned: <strong>@<%- userName %></strong>",
"assignedToMembers": "Assigned to <strong><%= userCount %> users</strong>", "assignedToMembers": "Assigned: <strong><%= userCount %> users</strong>",
"assignedToYouAndMembers": "Assigned to <strong>you and <%= userCount %> users</strong>", "assignedToYouAndMembers": "Assigned: <strong>you + <%= userCount %> users</strong>",
"youAreAssigned": "Assigned to <strong>you</strong>", "youAreAssigned": "Assigned: <strong>you</strong>",
"taskIsUnassigned": "This task is unassigned", "taskIsUnassigned": "This task is unassigned",
"unassigned": "Unassigned", "unassigned": "Unassigned",
"chooseTeamMember": "Search for a team member", "chooseTeamMember": "Search for a team member",
@@ -365,6 +365,6 @@
"assignedDateAndUser": "Assigned by <strong>@<%- username %></strong> on <strong><%= date %></strong>", "assignedDateAndUser": "Assigned by <strong>@<%- username %></strong> on <strong><%= date %></strong>",
"claimRewards": "Claim Rewards", "claimRewards": "Claim Rewards",
"dayStart": "<strong>Day start</strong>: <%= startTime %>", "dayStart": "<strong>Day start</strong>: <%= startTime %>",
"viewStatus": "View Status", "viewStatus": "Status",
"lastCompleted": "Last completed" "lastCompleted": "Last completed"
} }