Fix invalid requests to fetch points for text tasks
This commit is contained in:
parent
9092f6c137
commit
158a4a6545
1 changed files with 10 additions and 7 deletions
|
@ -204,16 +204,19 @@ import TaskDetailEditor from "./TaskDetailEditor.svelte";
|
||||||
$: {
|
$: {
|
||||||
if (hoveredTask != null) {
|
if (hoveredTask != null) {
|
||||||
const status = $taskStatuses.get(hoveredTask.id);
|
const status = $taskStatuses.get(hoveredTask.id);
|
||||||
if (status == null) {
|
if (status) {
|
||||||
const id = hoveredTask.id;
|
|
||||||
grabAssignment(hoveredTask.id).then(e => {
|
|
||||||
if (hoveredTask && hoveredTask.id == id)
|
|
||||||
tooltipMaxPoints = e.points;
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
tooltipMaxPoints = status.maxPoints;
|
tooltipMaxPoints = status.maxPoints;
|
||||||
tooltipCurrPoints = status.points;
|
tooltipCurrPoints = status.points;
|
||||||
}
|
}
|
||||||
|
else if (hoveredTask.type == 'open-data') {
|
||||||
|
const id = hoveredTask.id;
|
||||||
|
grabAssignment(hoveredTask.taskReference).then(e => {
|
||||||
|
if (hoveredTask?.id == id) {
|
||||||
|
tooltipMaxPoints = e.points
|
||||||
|
resizeTooltipBox()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
resizeTooltipBox();
|
resizeTooltipBox();
|
||||||
} else {
|
} else {
|
||||||
tooltipMaxPoints = null;
|
tooltipMaxPoints = null;
|
||||||
|
|
Reference in a new issue