This commit is contained in:
parent
face202918
commit
fc5578cb18
|
@ -26,10 +26,6 @@ const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const validPriorities = ref([]);
|
const validPriorities = ref([]);
|
||||||
const itemConfigs = (data) => {
|
|
||||||
const dataRow = data[0];
|
|
||||||
validPriorities.value = dataRow.validPriorities;
|
|
||||||
};
|
|
||||||
const itemFilter = {
|
const itemFilter = {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
@ -308,7 +304,11 @@ const columns = computed(() => [
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="ItemConfigs" @on-fetch="(data) => itemConfigs(data)" auto-load />
|
<FetchData
|
||||||
|
url="ItemConfigs"
|
||||||
|
@on-fetch="(data) => (validPriorities = data[0].validPriorities)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
data-key="ItemList"
|
data-key="ItemList"
|
||||||
:label="t('item.searchbar.label')"
|
:label="t('item.searchbar.label')"
|
||||||
|
@ -466,96 +466,6 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
</template>
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
|
||||||
<VnInput
|
|
||||||
v-model="data.provisionalName"
|
|
||||||
:label="t('globals.description')"
|
|
||||||
:is-required="true"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
|
||||||
url="Tags"
|
|
||||||
v-model="data.tag"
|
|
||||||
:label="t('globals.tag')"
|
|
||||||
:fields="['id', 'name']"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
:is-required="true"
|
|
||||||
:sort-by="['name ASC']"
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption> #{{ scope.opt?.id }} </QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
|
||||||
:options="validPriorities"
|
|
||||||
v-model="data.priority"
|
|
||||||
:label="t('item.create.priority')"
|
|
||||||
:is-required="true"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
|
||||||
url="ItemTypes"
|
|
||||||
v-model="data.typeFk"
|
|
||||||
:label="t('item.list.typeName')"
|
|
||||||
:fields="['id', 'code', 'name']"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
:is-required="true"
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ scope.opt?.code }} #{{ scope.opt?.id }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
|
||||||
url="Intrastats"
|
|
||||||
v-model="data.intrastatFk"
|
|
||||||
:label="t('globals.intrastat')"
|
|
||||||
:fields="['id', 'description']"
|
|
||||||
option-label="description"
|
|
||||||
option-value="id"
|
|
||||||
:is-required="true"
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.description }}</QItemLabel>
|
|
||||||
<QItemLabel caption> #{{ scope.opt?.id }} </QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelect
|
|
||||||
url="Origins"
|
|
||||||
v-model="data.originFk"
|
|
||||||
:label="t('globals.origin')"
|
|
||||||
:fields="['id', 'code', 'name']"
|
|
||||||
option-label="code"
|
|
||||||
option-value="id"
|
|
||||||
:is-required="true"
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ scope.opt?.code }} #{{ scope.opt?.id }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</template>
|
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
Loading…
Reference in New Issue