mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
WIP(teams): partial single-assign Dailies styling
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mr-auto ml-2"
|
class="mr-auto ml-2"
|
||||||
:class="{'green-10': showGreen}"
|
:class="{'green-10': showGreen && task.type === 'todo'}"
|
||||||
v-html="message"
|
v-html="message"
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
@@ -81,6 +81,12 @@
|
|||||||
{{ $t('close') }}
|
{{ $t('close') }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="assignedUsersCount === 1 && task.type === 'daily'"
|
||||||
|
:class="{'green-10': showGreen}"
|
||||||
|
>
|
||||||
|
{{ formattedCompletionTime }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -264,7 +270,7 @@ export default {
|
|||||||
);
|
);
|
||||||
const userName = this.group.members[index].auth.local.username;
|
const userName = this.group.members[index].auth.local.username;
|
||||||
|
|
||||||
if (this.task.group.assignedUsers[userId].completed) { // completed
|
if (this.task.type === 'todo' && this.task.group.assignedUsers[userId].completed) { // completed
|
||||||
const { completedDate } = this.task.group.assignedUsers[userId];
|
const { completedDate } = this.task.group.assignedUsers[userId];
|
||||||
if (this.userIsAssigned) {
|
if (this.userIsAssigned) {
|
||||||
if (moment().diff(completedDate, 'days') > 0) {
|
if (moment().diff(completedDate, 'days') > 0) {
|
||||||
@@ -290,6 +296,14 @@ export default {
|
|||||||
const completion = this.task.group.assignedUsers[userId];
|
const completion = this.task.group.assignedUsers[userId];
|
||||||
return completion.completed && moment().diff(completion.completedDate, 'days') < 1;
|
return completion.completed && moment().diff(completion.completedDate, 'days') < 1;
|
||||||
},
|
},
|
||||||
|
formattedCompletionTime () {
|
||||||
|
const userId = this.assignedUsersKeys[0];
|
||||||
|
const completion = this.task.group.assignedUsers[userId];
|
||||||
|
if (!completion.completed) return '';
|
||||||
|
const { completedDate } = completion;
|
||||||
|
if (moment().diff(completedDate, 'days') < 1) return moment(completedDate).format('h:mm A');
|
||||||
|
return moment(completedDate).format('M/D/YY');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
iconClass (completion) {
|
iconClass (completion) {
|
||||||
|
|||||||
Reference in New Issue
Block a user