Skip to content

Commit

Permalink
fixed logic and style of editUserTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jvJUCA committed Jun 10, 2024
1 parent 50d1d08 commit 27a52da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/components/molecules/ListTasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="ma-0 pa-0">
<v-data-table
height="420"
style="background: #f5f7ff"
style="background: #f5f7ff; border-radius: 20px;"
:headers="headers"
:items="allTasks"
:items-per-page="5"
Expand All @@ -19,6 +19,7 @@
<v-col>
<v-row justify="end" class="mx-0">
<v-btn
depressed
rounded
color="#f9a826"
class="white--text"
Expand Down Expand Up @@ -139,8 +140,9 @@ export default {
},
deleteItem(item) {
const index = this.allTasks.indexOf(item)
confirm('Are you sure you want to delete this task?')
this.allTasks.splice(index, 1)
if (confirm('Are you sure you want to delete this task?')) {
this.allTasks.splice(index, 1)
}
},
addTask() {
if (this.editedIndex > -1) {
Expand Down
14 changes: 7 additions & 7 deletions src/components/organisms/EditUserTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</v-tabs>

<v-col v-else-if="type == 'content'" cols="12">
<v-card v-if="index == 0" style="background: #f5f7ff">
<v-card rounded="xxl" v-if="index == 0" style="background: #f5f7ff">
<v-card-title class="subtitleView">
{{ $t('UserTestTable.titles.consentForm') }}
</v-card-title>
Expand All @@ -33,7 +33,7 @@
</v-row>
</v-card>

<v-card v-if="index == 1" style="background: #f5f7ff">
<v-card rounded="xxl" v-if="index == 1" style="background: #f5f7ff">
<v-card-title class="subtitleView">
{{ $t('UserTestTable.titles.userVariables') }}
</v-card-title>
Expand All @@ -52,7 +52,7 @@
@input="updateData"
/>

<v-card v-if="index == 3" style="background: #f5f7ff">
<v-card rounded="xxl" v-if="index == 3" style="background: #f5f7ff">
<v-card-title class="subtitleView">
{{ $t('UserTestTable.titles.postForm') }}
</v-card-title>
Expand Down Expand Up @@ -111,14 +111,14 @@ export default {
if (this.type !== 'content' && this.type != 'tabs') {
console.error(this.type + ' type in EditUserTest.vue is not valid.')
}
if(this.testStructure.postTest) {
if (this.testStructure.postTest) {
this.$store.dispatch('setPostTest', this.testStructure.postTest)
}
if(this.testStructure.preTest) {
if (this.testStructure.preTest) {
this.$store.dispatch('setPreTest', this.testStructure.preTest)
}
if(this.testStructure.consent) {
this.$store.dispatch('setConsent', this.testStructure.consent)
if (this.testStructure.consent) {
this.$store.dispatch('setConsent', this.testStructure.consent)
}
},
Expand Down

0 comments on commit 27a52da

Please sign in to comment.