Skip to content

Commit

Permalink
Merge pull request ProcessMaker#3820 from ProcessMaker/bugfix/FOUR-3144
Browse files Browse the repository at this point in the history
Show Task Info for Self Service
  • Loading branch information
boliviacoca authored May 20, 2021
2 parents cf4e164 + bd4c84f commit 3645fe1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1470,5 +1470,6 @@
"Bottom Right": "Bottom Right",
"Left Top": "Left Top",
"Left Bottom": "Left Bottom",
"Claim the Task to continue.": "Claim the Task to continue.",
"View Collection": "View Collection"
}
28 changes: 16 additions & 12 deletions resources/views/tasks/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function() use ($task) {
<button type="button" class="btn btn-primary" @click="claimTask">{{__('Claim Task')}}</button>
{{__('This task is unassigned, click Claim Task to assign yourself.')}}
</div>
<div v-else class="container-fluid h-100 d-flex flex-column">
<div class="container-fluid h-100 d-flex flex-column">
@can('editData', $task->processRequest)
<ul v-if="task.process_request.status === 'ACTIVE'" id="tabHeader" role="tablist" class="nav nav-tabs">
<li class="nav-item"><a id="pending-tab" data-toggle="tab" href="#tab-form" role="tab"
Expand Down Expand Up @@ -430,17 +430,21 @@ class="d-inline-flex pull-left align-items-center"
this.$set(this, 'task', val);
},
submit(task) {
let message = this.$t('Task Completed Successfully');
const taskId = task.id;
ProcessMaker.apiClient
.put("tasks/" + taskId, {status:"COMPLETED", data: this.formData})
.then(() => {
window.ProcessMaker.alert(message, 'success', 5, true);
})
.catch(error => {
// If there are errors, the user will be redirected to the request page
// to view error details. This is done in loadTask in Task.vue
});
if (this.isSelfService) {
ProcessMaker.alert(this.$t('Claim the Task to continue.'), 'warning');
} else {
let message = this.$t('Task Completed Successfully');
const taskId = task.id;
ProcessMaker.apiClient
.put("tasks/" + taskId, {status:"COMPLETED", data: this.formData})
.then(() => {
window.ProcessMaker.alert(message, 'success', 5, true);
})
.catch(error => {
// If there are errors, the user will be redirected to the request page
// to view error details. This is done in loadTask in Task.vue
});
}
},
taskUpdated(task) {
Expand Down

0 comments on commit 3645fe1

Please sign in to comment.