Skip to content

Commit

Permalink
[concepts] fix task status edition
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoPennec committed Dec 11, 2023
1 parent f0819dd commit 7728e73
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/lists/TaskStatusList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{ $t('task_status.fields.is_feedback_request') }}
</th>
<th scope="col" class="is-concept">
{{ $t('task_status.fields.is_concept') }}
{{ $t('task_status.fields.for_concept') }}
</th>
<th scope="col" class="actions"></th>
</tr>
Expand All @@ -55,7 +55,7 @@
class="is-feedback-request"
:value="entry.is_feedback_request"
/>
<boolean-cell class="is-concept" :value="entry.is_concept" />
<boolean-cell class="is-concept" :value="entry.for_concept" />
<row-actions-cell
:entry-id="entry.id"
:hide-delete="entry.is_default === true"
Expand Down
6 changes: 3 additions & 3 deletions src/components/modals/EditTaskStatusModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
v-if="form.is_default === 'false'"
/>
<boolean-field
:label="$t('task_status.fields.is_concept')"
:label="$t('task_status.fields.for_concept')"
@enter="confirmClicked"
v-model="form.is_concept"
v-model="form.for_concept"
v-if="form.is_default === 'false'"
/>

Expand Down Expand Up @@ -224,7 +224,7 @@ export default {
is_feedback_request: String(
this.taskStatusToEdit.is_feedback_request || false
),
is_concept: String(this.taskStatusToEdit.is_concept || false),
for_concept: String(this.taskStatusToEdit.for_concept || false),
archived: String(this.taskStatusToEdit.archived || false)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Concepts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default {
}
const conceptTaskStatusList = sortByName(
Array.from(this.taskStatusMap.values()).filter(
status => status.is_concept
status => status.for_concept
)
)
return [allStatusItem].concat(conceptTaskStatusList)
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ export default {
title: 'Task Status',
fields: {
color: 'Color',
for_concept: 'For concept',
is_artist_allowed: 'Is artist allowed',
is_client_allowed: 'Is client allowed',
is_concept: 'Is concept',
is_done: 'Is done',
is_feedback_request: 'Is feedback request',
is_retake: 'Has retake value',
Expand Down
1 change: 1 addition & 0 deletions src/store/api/taskstatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const sanitizeTaskStatus = taskStatus => {
return {
name: taskStatus.name,
short_name: taskStatus.short_name,
for_concept: Boolean(taskStatus.for_concept === 'true'),
is_default: Boolean(taskStatus.is_default === 'true'),
is_done: Boolean(taskStatus.is_done === 'true'),
is_retake: Boolean(taskStatus.is_retake === 'true'),
Expand Down

0 comments on commit 7728e73

Please sign in to comment.