Browse Source

Remove unused components

pull/1243/head
Hironsan 3 years ago
parent
commit
17e9ef1aab
2 changed files with 0 additions and 144 deletions
  1. 64
      frontend/components/molecules/BaseModal.vue
  2. 80
      frontend/components/organisms/utils/ConfirmDialog.vue

64
frontend/components/molecules/BaseModal.vue

@ -1,64 +0,0 @@
<template>
<v-dialog
v-model="dialog"
width="800px"
>
<template v-slot:activator="{}">
<v-btn
:class="classObject"
:color="color"
:outlined="isOutlined"
:disabled="disabled"
class="mb-2 text-capitalize"
@click="dialog=true"
>
{{ text }}
</v-btn>
</template>
<slot :close="close" />
</v-dialog>
</template>
<script>
export default {
props: {
text: {
type: String,
default: '',
required: true
},
disabled: {
type: Boolean,
default: false
},
isCreate: {
type: Boolean,
default: false
}
},
data() {
return {
dialog: false
}
},
computed: {
classObject() {
return this.isCreate ? [] : ['ml-2']
},
color() {
return this.isCreate ? 'primary' : ''
},
isOutlined() {
return !this.isCreate
}
},
methods: {
close() {
this.dialog = false
}
}
}
</script>

80
frontend/components/organisms/utils/ConfirmDialog.vue

@ -1,80 +0,0 @@
<template>
<base-modal
:disabled="disabled"
:text="$t('generic.delete')"
>
<template v-slot="slotProps">
<base-card
:title="title"
:agree-text="buttonTrueText"
:cancel-text="buttonFalseText"
@agree="ok(); slotProps.close()"
@cancel="slotProps.close"
>
<template #content>
{{ message }}
<v-list dense>
<v-list-item v-for="(item, i) in items" :key="i">
<v-list-item-content>
<v-list-item-title>{{ item[itemKey] }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</template>
</base-card>
</template>
</base-modal>
</template>
<script>
import BaseCard from '@/components/molecules/BaseCard'
import BaseModal from '@/components/molecules/BaseModal'
export default {
components: {
BaseCard,
BaseModal
},
props: {
title: {
type: String,
default: '',
required: true
},
message: {
type: String,
default: '',
required: true
},
items: {
type: Array,
default: () => [],
required: true
},
itemKey: {
type: String,
default: '',
required: true
},
disabled: {
type: Boolean,
default: false
},
buttonTrueText: {
type: String,
default: 'Yes'
},
buttonFalseText: {
type: String,
default: 'Cancel'
}
},
methods: {
ok() {
this.$emit('ok')
}
}
}
</script>
Loading…
Cancel
Save