|
|
|
@ -11,18 +11,17 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<div class="q-gutter-sm"> |
|
|
|
<div class="q-gutter-sm"> |
|
|
|
<q-checkbox v-model="item.enabled" :label="$t('Enabled')" /> |
|
|
|
<q-checkbox v-model="item.enabled" :label="$t('Enabled')"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<q-select v-model="item.category" :options="categories" :label="$t('Category')" |
|
|
|
<q-select |
|
|
|
|
|
|
|
v-model="item.category" |
|
|
|
option-value="id" |
|
|
|
:options="categories" :label="$t('Category')" |
|
|
|
option-label="title" |
|
|
|
option-value="id" |
|
|
|
|
|
|
|
option-label="title" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<q-select v-model="item.locale" :options="locales" :label="$t('Locale')" /> |
|
|
|
<q-select v-model="item.locale" :options="locales" :label="$t('Locale')"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TinyEditor |
|
|
|
<TinyEditor |
|
|
|
id="item_content" |
|
|
|
id="item_content" |
|
|
|
@ -58,11 +57,8 @@ import {computed, ref} from "vue"; |
|
|
|
import {mapGetters, useStore} from "vuex"; |
|
|
|
import {mapGetters, useStore} from "vuex"; |
|
|
|
import isEmpty from 'lodash/isEmpty'; |
|
|
|
import isEmpty from 'lodash/isEmpty'; |
|
|
|
|
|
|
|
|
|
|
|
import Dropdown from "primevue/dropdown"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'PageForm', |
|
|
|
name: 'PageForm', |
|
|
|
components:{Dropdown}, |
|
|
|
|
|
|
|
setup () { |
|
|
|
setup () { |
|
|
|
let locales = ref([]); |
|
|
|
let locales = ref([]); |
|
|
|
const store = useStore(); |
|
|
|
const store = useStore(); |
|
|
|
@ -98,7 +94,7 @@ export default { |
|
|
|
title: null, |
|
|
|
title: null, |
|
|
|
content: null, |
|
|
|
content: null, |
|
|
|
locale: null, |
|
|
|
locale: null, |
|
|
|
enabled: null, |
|
|
|
enabled: true, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
@ -110,8 +106,6 @@ export default { |
|
|
|
if (this.values) { |
|
|
|
if (this.values) { |
|
|
|
this.values.creator = this.currentUser['@id']; |
|
|
|
this.values.creator = this.currentUser['@id']; |
|
|
|
this.values.url = '/api/access_urls/' + window.access_url_id; |
|
|
|
this.values.url = '/api/access_urls/' + window.access_url_id; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isEmpty(this.values.category)) { |
|
|
|
if (!isEmpty(this.values.category)) { |
|
|
|
this.values.category = this.values.category['@id']; |
|
|
|
this.values.category = this.values.category['@id']; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -139,6 +133,9 @@ export default { |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
required, |
|
|
|
required, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
enabled: { |
|
|
|
|
|
|
|
required, |
|
|
|
|
|
|
|
}, |
|
|
|
content: { |
|
|
|
content: { |
|
|
|
required, |
|
|
|
required, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|