0
0
Fork 0

refs #7283 fix itemFixed

This commit is contained in:
Carlos Satorres 2024-09-12 07:43:12 +02:00
parent 04070a5a85
commit 04c8481b51
1 changed files with 13 additions and 15 deletions

View File

@ -1,6 +1,5 @@
<script setup> <script setup>
import { onMounted, ref, reactive, onUnmounted, nextTick, computed } from 'vue'; import { onMounted, ref, reactive, onUnmounted, nextTick, computed } from 'vue';
import { ref, reactive, computed, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import FetchedTags from 'components/ui/FetchedTags.vue'; import FetchedTags from 'components/ui/FetchedTags.vue';
@ -27,15 +26,12 @@ import { QCheckbox } from 'quasar';
const quasar = useQuasar(); const quasar = useQuasar();
const stateStore = useStateStore(); const stateStore = useStateStore();
const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const { openConfirmationModal } = useVnConfirm(); const { openConfirmationModal } = useVnConfirm();
const state = useState(); const state = useState();
const { notify } = useNotify(); const { notify } = useNotify();
const tableRef = ref(); const tableRef = ref();
const editTableCellDialogRef = ref(null); const editTableCellDialogRef = ref(null);
const tableRef = ref();
const quasar = useQuasar();
const user = state.getUser(); const user = state.getUser();
const fixedPrices = ref([]); const fixedPrices = ref([]);
const warehousesOptions = ref([]); const warehousesOptions = ref([]);
@ -129,6 +125,7 @@ const columns = computed(() => [
}, },
{ {
label: t('item.fixedPrice.started'), label: t('item.fixedPrice.started'),
field: 'started',
name: 'started', name: 'started',
format: ({ started }) => toDate(started), format: ({ started }) => toDate(started),
cardVisible: true, cardVisible: true,
@ -144,6 +141,7 @@ const columns = computed(() => [
}, },
{ {
label: t('item.fixedPrice.ended'), label: t('item.fixedPrice.ended'),
field: 'ended',
name: 'ended', name: 'ended',
...defaultColumnAttrs, ...defaultColumnAttrs,
cardVisible: true, cardVisible: true,
@ -157,6 +155,7 @@ const columns = computed(() => [
columnClass: 'expand', columnClass: 'expand',
format: (row) => toDate(row.ended), format: (row) => toDate(row.ended),
}, },
{ {
label: t('item.fixedPrice.warehouse'), label: t('item.fixedPrice.warehouse'),
field: 'warehouseFk', field: 'warehouseFk',
@ -223,18 +222,17 @@ const editTableFieldsOptions = [
label: t('item.fixedPrice.ended'), label: t('item.fixedPrice.ended'),
component: 'date', component: 'date',
}, },
]; {
field: 'warehouseFk',
function confirmRemove(row) { label: t('item.fixedPrice.warehouse'),
quasar.dialog({ component: 'select',
component: VnConfirm, attrs: {
componentProps: { options: [],
title: t('confirmDeletion'), 'option-label': 'name',
message: t('confirmDeletionMessage'), 'option-value': 'id',
promise: () => remove(row),
}, },
}), },
}; ];
const getRowUpdateInputEvents = (props, resetMinPrice, inputType = 'text') => { const getRowUpdateInputEvents = (props, resetMinPrice, inputType = 'text') => {
return inputType === 'text' return inputType === 'text'
? { ? {