mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
* Removed lingering checklist * Added another party data check * Added move cursor on hover * Removed task locally * Prevented user from being able to delete an active challenge task * Reset tasks when viewing member progress * Prevented challenge owners from adding checklists * Hide challenges columns with no tasks * Add error translations * Added markdown to challenge description * Allowed leader to rejoin challenge * Replaced description with summary * Fixed delete logic * Added author * Added loading message * Added load more * Added default sub * Fixed remove all * Added lint
52 lines
1.1 KiB
Vue
52 lines
1.1 KiB
Vue
<template lang="pug">
|
|
b-modal#challenge-member-modal(title="User Progress", size='lg')
|
|
.row
|
|
task-column.col-6(
|
|
v-for="column in columns",
|
|
:type="column",
|
|
:key="column",
|
|
:taskListOverride='tasksByType[column]')
|
|
</template>
|
|
|
|
<script>
|
|
import axios from 'axios';
|
|
import bModal from 'bootstrap-vue/lib/components/modal';
|
|
import Column from '../tasks/column';
|
|
|
|
export default {
|
|
props: ['challengeId', 'memberId'],
|
|
components: {
|
|
bModal,
|
|
TaskColumn: Column,
|
|
},
|
|
data () {
|
|
return {
|
|
columns: ['habit', 'daily', 'todo', 'reward'],
|
|
tasksByType: {
|
|
habit: [],
|
|
daily: [],
|
|
todo: [],
|
|
reward: [],
|
|
},
|
|
};
|
|
},
|
|
watch: {
|
|
async memberId (id) {
|
|
if (!id) return;
|
|
this.tasksByType = {
|
|
habit: [],
|
|
daily: [],
|
|
todo: [],
|
|
reward: [],
|
|
};
|
|
|
|
let response = await axios.get(`/api/v3/challenges/${this.challengeId}/members/${this.memberId}`);
|
|
let tasks = response.data.data.tasks;
|
|
tasks.forEach((task) => {
|
|
this.tasksByType[task.type].push(task);
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|