Skip to content
Snippets Groups Projects
Commit 480af1ce authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #1991

Closes #1991

Merge request studip/studip!1299
parent c1f749dd
No related branches found
No related tags found
No related merge requests found
......@@ -328,7 +328,7 @@ class Authority
public static function canDeleteTask(User $user, Task $resource): bool
{
return self::canCreateTasks($user, $resource->structural_element);
return self::canCreateTasks($user, $resource->structural_element) && !$resource->userIsASolver($user);
}
public static function canCreateTaskFeedback(User $user, Task $resource): bool
......
......@@ -33,7 +33,7 @@ class Task extends SchemaProvider
'submission-date' => date('c', $resource['submission_date']),
'submitted' => (bool) $resource['submitted'],
'renewal' => empty($resource['renewal']) ? null : (string) $resource['renewal'],
'renewal-date' => $resource['renewal_date'] ? date('c', $resource['renewal_date']) : null,
'renewal-date' => date('c', $resource['renewal_date']),
'mkdate' => date('c', $resource['mkdate']),
'chdate' => date('c', $resource['chdate']),
];
......
......@@ -355,6 +355,7 @@ export default {
},
solveRenewalRequest(task) {
this.currentDialogTask = _.cloneDeep(task);
this.currentDialogTask.attributes['renewal-date'] = new Date().toISOString();
this.showRenewalDialog = true;
},
updateRenewal() {
......
......@@ -39,7 +39,7 @@
<td>
<a :href="getLinkToElement(element.id)">{{ element.attributes.title }}</a>
</td>
<td>{{ task.attributes.progress.toFixed(2) }}%</td>
<td>{{ task.attributes?.progress?.toFixed(2) || '-'}}%</td>
<td>{{ getReadableDate(task.attributes['submission-date']) }}</td>
<td>
<studip-icon v-if="task.attributes.submitted" shape="accept" role="status-green" />
......@@ -198,7 +198,7 @@ export default {
return menuItems;
},
async renewalRequest(task) {
let attributes = {};
let attributes = task.attributes;
attributes.renewal = 'pending';
await this.updateTask({
attributes: attributes,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment