fix: refs #8647 remove comment
This commit is contained in:
parent
ccf7e5dfad
commit
ba31e98b8a
|
@ -26,7 +26,12 @@ function columnName(col) {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnFilterPanel v-bind="$attrs" :search-button="true" :data-key="$attrs['data-key']">
|
<VnFilterPanel
|
||||||
|
v-bind="$attrs"
|
||||||
|
:search-button="true"
|
||||||
|
:disable-submit-event="true"
|
||||||
|
:data-key="$attrs['data-key']"
|
||||||
|
>
|
||||||
<template #body="{ params, orders, searchFn }">
|
<template #body="{ params, orders, searchFn }">
|
||||||
<div
|
<div
|
||||||
class="container"
|
class="container"
|
||||||
|
|
|
@ -40,7 +40,9 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
isId: true,
|
isId: true,
|
||||||
columnFilter: false,
|
columnFilter: {
|
||||||
|
component: 'date',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
|
@ -50,7 +52,9 @@ const columns = computed(() => [
|
||||||
format: ({ timed }) => toHour(timed),
|
format: ({ timed }) => toHour(timed),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: false,
|
columnFilter: {
|
||||||
|
component: 'time',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
|
@ -62,7 +66,6 @@ const columns = computed(() => [
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
inWhere: false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -91,12 +94,6 @@ const columns = computed(() => [
|
||||||
field: ({ inkFk }) => inkFk,
|
field: ({ inkFk }) => inkFk,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
|
||||||
component: 'input',
|
|
||||||
inWhere: false,
|
|
||||||
|
|
||||||
columnClass: 'shrink',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'size',
|
name: 'size',
|
||||||
|
@ -108,8 +105,6 @@ const columns = computed(() => [
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
inWhere: false,
|
|
||||||
|
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useQuasar } from 'quasar';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import notifyResults from 'src/utils/notifyResults';
|
import notifyResults from 'src/utils/notifyResults';
|
||||||
import { showResultsAsTable } from 'src/composables/showResultsTable';
|
|
||||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
|
||||||
import HandleSplitDialog from './HandleSplitDialog.vue';
|
|
||||||
const { openTable } = showResultsAsTable();
|
|
||||||
const emit = defineEmits(['update-item']);
|
const emit = defineEmits(['update-item']);
|
||||||
const quasar = useQuasar();
|
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
const showChangeItemDialog = ref(false);
|
const showChangeItemDialog = ref(false);
|
||||||
const newItem = ref(null);
|
const newItem = ref(null);
|
||||||
|
@ -26,17 +17,15 @@ const $props = defineProps({
|
||||||
const updateItem = async () => {
|
const updateItem = async () => {
|
||||||
try {
|
try {
|
||||||
showChangeItemDialog.value = true;
|
showChangeItemDialog.value = true;
|
||||||
// const rowsToUpdate = $props.selectedRows.map(({ saleFk, quantity }) =>
|
const rowsToUpdate = $props.selectedRows.map(({ saleFk, quantity }) =>
|
||||||
// axios.post(`Sales/replaceItem`, {
|
axios.post(`Sales/replaceItem`, {
|
||||||
// saleFk,
|
saleFk,
|
||||||
// substitutionFk: newItem.value,
|
substitutionFk: newItem.value,
|
||||||
// quantity,
|
quantity,
|
||||||
// }),
|
}),
|
||||||
// );
|
);
|
||||||
// const result = await Promise.allSettled(rowsToUpdate);
|
const result = await Promise.allSettled(rowsToUpdate);
|
||||||
|
notifyResults(result, 'saleFk');
|
||||||
openTable(HandleSplitDialog, [], 'saleFk');
|
|
||||||
// notifyResults(result, 'saleFk');
|
|
||||||
emit('update-item', newItem.value);
|
emit('update-item', newItem.value);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error updating item:', err);
|
console.error('Error updating item:', err);
|
||||||
|
|
|
@ -18,10 +18,7 @@ describe('useStateQueryStore', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
stateQueryStore = useStateQueryStore();
|
stateQueryStore = useStateQueryStore();
|
||||||
({ add, isLoading, remove, reset } = useStateQueryStore());
|
({ add, isLoading, remove, reset } = useStateQueryStore());
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
// setActivePinia(createPinia());
|
|
||||||
expect(getQueries().size).toBeFalsy();
|
expect(getQueries().size).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue