Rename question_condition to condition_id in SelfServeQuestions for consistency and update related methods, parsing, and table logic
This commit is contained in:
@@ -78,7 +78,7 @@ const onDrop = async (event, newIndex) => {
|
||||
<tr>
|
||||
<th v-if="SessionUser.canAccessAdmin()" style="width: 40px;"></th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.order_priority.label }}</th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.question_condition.label }}</th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.condition_id.label }}</th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.question.label }}</th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.description.label }}</th>
|
||||
<th>{{ SessionUser.objects.self_serve_questions.columns.lane.label }}</th>
|
||||
@@ -112,9 +112,9 @@ const onDrop = async (event, newIndex) => {
|
||||
<EditableTableColumn
|
||||
:object="object"
|
||||
:loadList="loadList"
|
||||
column="question_condition"
|
||||
column="condition_id"
|
||||
:edit-function="SessionUser.objects.self_serve_questions.showEditObjectFieldForm"
|
||||
:parse-function="SessionUser.objects.self_serve_questions.columns.question_condition.parse"
|
||||
:parse-function="SessionUser.objects.self_serve_questions.columns.condition_id.parse"
|
||||
:permission-check-function="SessionUser.canAccessAdmin"
|
||||
/>
|
||||
<EditableTableColumn
|
||||
|
||||
@@ -96,7 +96,7 @@ export const SelfServeQuestions = {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
question_condition: {
|
||||
condition_id: {
|
||||
label: "Betingelse (Hvis)",
|
||||
type: "select",
|
||||
sortable: true,
|
||||
@@ -141,7 +141,7 @@ export const SelfServeQuestions = {
|
||||
}
|
||||
},
|
||||
},
|
||||
add: async (department, lane, product, question, description, question_condition, order_priority) => {
|
||||
add: async (department, lane, product, question, description, condition_id, order_priority) => {
|
||||
return ObjectsGlobal.add.object(
|
||||
SelfServeQuestions.meta.endpoint,
|
||||
{
|
||||
@@ -150,7 +150,7 @@ export const SelfServeQuestions = {
|
||||
product: parseInt(product),
|
||||
question: question,
|
||||
description: description,
|
||||
question_condition: (question_condition && parseInt(question_condition) !== 0) ? parseInt(question_condition) : null,
|
||||
condition_id: (condition_id && parseInt(condition_id) !== 0) ? parseInt(condition_id) : null,
|
||||
order_priority: parseInt(order_priority),
|
||||
}
|
||||
);
|
||||
@@ -180,12 +180,12 @@ export const SelfServeQuestions = {
|
||||
parseInt(order_priority)
|
||||
)
|
||||
},
|
||||
question_condition: async (id, question_condition) => {
|
||||
condition_id: async (id, condition_id) => {
|
||||
return ObjectsGlobal.set.column(
|
||||
SelfServeQuestions.meta.endpoint,
|
||||
id,
|
||||
"question_condition",
|
||||
(question_condition && parseInt(question_condition) !== 0) ? parseInt(question_condition) : null
|
||||
"condition_id",
|
||||
(condition_id && parseInt(condition_id) !== 0) ? parseInt(condition_id) : null
|
||||
)
|
||||
},
|
||||
product: async (id, product) => {
|
||||
|
||||
Reference in New Issue
Block a user