#7283 #7831 itemMigration #553

Merged
carlossa merged 77 commits from 7283-itemMigration into dev 2024-10-25 07:09:13 +00:00
3 changed files with 22 additions and 26 deletions
Showing only changes of commit f678c63043 - Show all commits

View File

@ -1235,7 +1235,7 @@ item:
requester: 'Requester' requester: 'Requester'
requested: 'Requested' requested: 'Requested'
price: 'Price' price: 'Price'
attender: 'Atender' attender: 'Attender'
item: 'Item' item: 'Item'
achieved: 'Achieved' achieved: 'Achieved'
concept: 'Concept' concept: 'Concept'

View File

@ -1,9 +1,8 @@
<script setup> <script setup>
import { onMounted, ref, computed, reactive, onUnmounted } from 'vue'; import { ref, computed, onUnmounted } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import VnImg from 'src/components/ui/VnImg.vue'; import VnImg from 'src/components/ui/VnImg.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
@ -245,8 +244,6 @@ const cloneItem = async (itemFk) => {
console.error('Error cloning item', err); console.error('Error cloning item', err);
} }
}; };
onUnmounted(() => (stateStore.rightDrawer = false));
</script> </script>
<template> <template>
@ -274,7 +271,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:columns="columns" :columns="columns"
auto-load auto-load
redirect="Item" redirect="Item"
:right-search="true"
:is-editable="false" :is-editable="false"
:use-model="true" :use-model="true"
> >

View File

@ -1,24 +1,14 @@
<script setup> <script setup>
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue'; import { ref, computed, onMounted, onBeforeMount, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnInput from 'src/components/common/VnInput.vue';
import ItemRequestDenyForm from './ItemRequestDenyForm.vue';
import ItemRequestFilter from './ItemRequestFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import VnSelect from 'components/common/VnSelect.vue';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
import { toDateFormat } from 'src/filters/date';
import { toCurrency } from 'filters/index'; import { toCurrency } from 'filters/index';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
import axios from 'axios'; import axios from 'axios';
import RightMenu from 'src/components/common/RightMenu.vue';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
import VnTable from 'components/VnTable/VnTable.vue';
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify(); const { notify } = useNotify();
@ -72,16 +62,15 @@ const columns = computed(() => [
}, },
{ {
label: t('item.buyRequest.requester'), label: t('item.buyRequest.requester'),
name: 'requester', field: 'requesterName',
name: 'requesterFk',
align: 'left', align: 'left',
sortable: true,
}, },
{ {
label: t('item.buyRequest.requested'), label: t('item.buyRequest.requested'),
field: 'quantity', field: 'quantity',
name: 'requested', name: 'requested',
align: 'left', align: 'left',
sortable: true,
}, },
{ {
label: t('item.buyRequest.price'), label: t('item.buyRequest.price'),
@ -95,10 +84,6 @@ const columns = computed(() => [
field: 'attender', field: 'attender',
name: 'attender', name: 'attender',
align: 'left', align: 'left',
attrs: {
url: 'Workers',
fields: ['id', 'firstName'],
},
}, },
{ {
label: t('item.buyRequest.item'), label: t('item.buyRequest.item'),
@ -218,7 +203,7 @@ onBeforeMount(() => {
</script> </script>
<template> <template>
<FetchData <!-- <FetchData
url="Workers" url="Workers"
:filter="{ where: { role: 'buyer' } }" :filter="{ where: { role: 'buyer' } }"
order="id" order="id"
@ -350,7 +335,22 @@ onBeforeMount(() => {
@on-data-saved="onDenyAccept" @on-data-saved="onDenyAccept"
/> />
</QDialog> </QDialog>
</QPage> </QPage> -->
<VnTable
ref="tableRef"
data-key="itemRequest"
url="ticketRequests"
order="id DESC"
:columns="columns"
auto-load
>
<template #column-attender="{ row }">
<span class="link" @click.stop>
{{ row.attenderFk }}
<WorkerDescriptorProxy :id="row.attenderFk" />
</span>
</template>
</VnTable>
</template> </template>
<i18n> <i18n>