diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index 16dfe5766..ca7043b75 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -372,9 +372,7 @@ function handleOnDataSaved(_) {
ref="CrudModelRef"
@on-fetch="(...args) => emit('onFetch', ...args)"
:search-url="searchUrl"
- :disable-infinite-scroll="
- $attrs['disableInfiniteScroll'] ? isTableMode : !disableInfiniteScroll
- "
+ :disable-infinite-scroll="$attrs['disableInfiniteScroll']"
@save-changes="reload"
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
:auto-load="hasParams || $attrs['auto-load']"
@@ -394,7 +392,7 @@ function handleOnDataSaved(_) {
card-container-class="grid-three"
flat
:style="isTableMode && `max-height: ${tableHeight}`"
- :virtual-scroll="!isTableMode"
+ virtual-scroll
@virtual-scroll="
(event) =>
event.index > rows.length - 2 &&
diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue
index fd8993d6f..a76b8bda1 100644
--- a/src/components/common/VnInputDate.vue
+++ b/src/components/common/VnInputDate.vue
@@ -84,8 +84,12 @@ const styleAttrs = computed(() => {
outlined: true,
rounded: true,
}
- : {};
+ : { eventColor: handleEventColor };
});
+const handleEventColor = (date) => {
+ console.error(date);
+ return date === Date.now() ? null : 'orange';
+};
@@ -139,6 +143,10 @@ const styleAttrs = computed(() => {
:landscape="true"
:today-btn="true"
:options="$attrs.options"
+ color="orange"
+ text-color="black"
+ dark
+ bordered
@update:model-value="
(date) => {
formattedDate = date;
@@ -158,6 +166,12 @@ const styleAttrs = computed(() => {
.vn-input-date.q-field--outlined.q-field--readonly .q-field__control:before {
border-style: solid;
}
+.calendar-event {
+ background-color: red;
+ &.--today {
+ border: 2px solid $info;
+ }
+}
es:
diff --git a/src/pages/Item/components/ItemProposal.vue b/src/pages/Item/components/ItemProposal.vue
index 710be85e6..a8b6c814c 100644
--- a/src/pages/Item/components/ItemProposal.vue
+++ b/src/pages/Item/components/ItemProposal.vue
@@ -63,22 +63,18 @@ const columns = computed(() => [
label: t('proposal.available'),
name: 'available',
field: 'available',
- columnClass: 'shrink',
- columnFilter: {
- component: 'input',
- type: 'number',
- columnClass: 'shrink',
- },
+ component: 'input',
+ type: 'number',
+ class: 'shrink',
},
{
...defaultColumnAttrs,
label: t('proposal.difference'),
name: 'difference',
- columnFilter: {
- component: 'input',
- type: 'number',
- columnClass: 'shrink',
- },
+ component: 'input',
+ type: 'number',
+ class: 'shrink',
+ style: 'background-color:red;max-width: 75px',
},
{
...defaultColumnAttrs,
@@ -92,6 +88,9 @@ const columns = computed(() => [
label: t('proposal.counter'),
name: 'counter',
field: 'counter',
+ component: 'input',
+ type: 'number',
+ class: 'shrink',
},
{
@@ -109,22 +108,18 @@ const columns = computed(() => [
label: t('proposal.price2'),
name: 'price2',
field: 'price2',
- columnFilter: {
- component: 'input',
- type: 'number',
- class: 'expand',
- },
+ component: 'input',
+ type: 'number',
+ class: 'shrink',
},
{
...defaultColumnAttrs,
label: t('proposal.minQuantity'),
name: 'minQuantity',
field: 'minQuantity',
- columnFilter: {
- component: 'input',
- type: 'number',
- class: 'expand',
- },
+ component: 'input',
+ type: 'number',
+ class: 'shrink',
},
{
...defaultColumnAttrs,
@@ -141,11 +136,11 @@ async function confirm() {
newItemFK: proposalSelected.value[0].id,
quantity: quantity.value,
};
- const { data } = await axios.post('Sales/replaceItem', params);
- emit('refreshData', {
+ // const { data } = await axios.post('Sales/replaceItem', params);
+ emit('itemReplaced', {
type: 'refresh',
itemProposal: proposalSelected.value[0],
- ...data,
+ ...params,
});
proposalSelected.value = [];
popupProxyRef.value.hide();
@@ -155,7 +150,7 @@ async function confirm() {
}
// const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
const popupProxyRef = ref(null);
-const emit = defineEmits(['onDialogClosed', 'refreshData']);
+const emit = defineEmits(['onDialogClosed', 'itemReplaced']);
// function onDialogClose() {
// console.log('Dialog has been closed');
@@ -270,7 +265,9 @@ const isSelectionAvailable = (data) => {
}}
-
+
diff --git a/src/pages/Item/components/ItemProposalProxy.vue b/src/pages/Item/components/ItemProposalProxy.vue
index 02dee3d32..077e97208 100644
--- a/src/pages/Item/components/ItemProposalProxy.vue
+++ b/src/pages/Item/components/ItemProposalProxy.vue
@@ -3,6 +3,7 @@ import ItemProposal from './ItemProposal.vue';
import VnImg from 'src/components/ui/VnImg.vue';
import FetchedTags from 'components/ui/FetchedTags.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
+const emit = defineEmits(['onDialogClosed', 'itemReplaced']);
const $props = defineProps({
item: {
@@ -46,7 +47,10 @@ const $props = defineProps({
- emit('itemReplaced', data)"
+ >
diff --git a/src/pages/Route/Roadmap/RoadmapStops.vue b/src/pages/Route/Roadmap/RoadmapStops.vue
index 8ff044d2d..f7bb6ff4e 100644
--- a/src/pages/Route/Roadmap/RoadmapStops.vue
+++ b/src/pages/Route/Roadmap/RoadmapStops.vue
@@ -5,6 +5,7 @@ import FetchData from 'components/FetchData.vue';
import { ref } from 'vue';
import CrudModel from 'components/CrudModel.vue';
import RoadmapAddStopForm from 'pages/Route/Roadmap/RoadmapAddStopForm.vue';
+import { QBtn } from 'quasar';
const { t } = useI18n();
const route = useRoute();
@@ -65,9 +66,10 @@ const updateDefaultStop = (data) => {
- {
{{ t('Add stop') }}
-
+
diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue
index 60cd6770b..553fc0f94 100644
--- a/src/pages/Supplier/Card/SupplierFiscalData.vue
+++ b/src/pages/Supplier/Card/SupplierFiscalData.vue
@@ -19,8 +19,8 @@ const sageTransactionTypesOptions = ref([]);
const supplierActivitiesOptions = ref([]);
function handleLocation(data, location) {
- const { town, label, provinceFk, countryFk } = location ?? {};
- data.postCode = label;
+ const { town, code, provinceFk, countryFk } = location ?? {};
+ data.postCode = code;
data.city = town;
data.provinceFk = provinceFk;
data.countryFk = countryFk;
diff --git a/src/pages/Ticket/Negative/TicketLackDetail.vue b/src/pages/Ticket/Negative/TicketLackDetail.vue
index 8325e1686..a92dbc821 100644
--- a/src/pages/Ticket/Negative/TicketLackDetail.vue
+++ b/src/pages/Ticket/Negative/TicketLackDetail.vue
@@ -12,7 +12,7 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue';
import FetchData from 'src/components/FetchData.vue';
import { useStateStore } from 'stores/useStateStore';
import { useRoute } from 'vue-router';
-import { useArrayData } from 'src/composables/useArrayData';
+// import { useArrayData } from 'src/composables/useArrayData';
import VnImg from 'src/components/ui/VnImg.vue';
import TicketLackTable from './TicketLackTable.vue';
import ItemProposalProxy from 'src/pages/Item/components/ItemProposalProxy.vue';
@@ -23,6 +23,7 @@ const URL_KEY = 'Tickets/ItemLack';
const editableStates = ref([]);
const stateStore = useStateStore();
const proposalDialogRef = ref();
+const tableRef = ref();
const changeStateDialogRef = ref();
const changeQuantityDialogRef = ref();
const showProposalDialog = ref(false);
@@ -54,48 +55,49 @@ const reload = async () => {
defineExpose({ reload });
// FunciĆ³n de comparaciĆ³n
-function freeFirst({ alertLevel: a }, { alertLevel: b }) {
- const DEFAULT = 0;
- // Si el estado de 'a' es 'free' y el de 'b' no lo es, 'a' viene primero
- if (a === DEFAULT && b !== DEFAULT) {
- return -1;
- }
- // Si el estado de 'b' es 'free' y el de 'a' no lo es, 'b' viene primero
- if (b === DEFAULT && a !== DEFAULT) {
- return 1;
- }
- // En cualquier otro caso, no se cambia el orden
- return 0;
-}
-const { store } = useArrayData(URL_KEY);
-const handleRows = (rows) => {
- // rows.forEach((row) => (row.concept = item.value.name));
- rows = rows.sort(freeFirst);
- if (showFree.value) return rows.filter(({ alertLevel }) => alertLevel === 0);
- return rows;
-};
+// function freeFirst({ alertLevel: a }, { alertLevel: b }) {
+// const DEFAULT = 0;
+// // Si el estado de 'a' es 'free' y el de 'b' no lo es, 'a' viene primero
+// if (a === DEFAULT && b !== DEFAULT) {
+// return -1;
+// }
+// // Si el estado de 'b' es 'free' y el de 'a' no lo es, 'b' viene primero
+// if (b === DEFAULT && a !== DEFAULT) {
+// return 1;
+// }
+// // En cualquier otro caso, no se cambia el orden
+// return 0;
+// }
+// const { store } = useArrayData(URL_KEY);
+// const handleRows = (rows) => {
+// // rows.forEach((row) => (row.concept = item.value.name));
+// rows = rows.sort(freeFirst);
+// if (showFree.value) return rows.filter(({ alertLevel }) => alertLevel === 0);
+// return rows;
+// };
const itemProposalEvt = ({ itemProposal }) => {
itemProposalSelected.value = itemProposal;
- replaceItem();
+ tableRef.value.reload();
+ // replaceItem();
};
const itemProposalSelected = ref(null);
-const replaceItem = () => {
- const rows = handleRows(originalRowDataCopy.value).sort((row) => row.quantity);
- for (const ticket of rows) {
- if (ticket.quantity > itemProposalSelected.value.available) continue;
- originalRowDataCopy.value.splice(originalRowDataCopy.value.indexOf(ticket));
- ticket.itemFk = itemProposalSelected.value.id;
- selectedRows.value.push({ ticketFk: ticket.ticketFk });
- itemProposalSelected.value.available -= ticket.quantity;
- itemLack.value.lack += ticket.quantity;
- const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk);
- store.data.splice(index, 1);
- console.log(ticket);
- useArrayData('ItemsGetSimilar').store.data[1].available =
- itemProposalSelected.value.available;
- }
-};
+// const replaceItem = () => {
+// const rows = handleRows(originalRowDataCopy.value).sort((row) => row.quantity);
+// for (const ticket of rows) {
+// if (ticket.quantity > itemProposalSelected.value.available) continue;
+// originalRowDataCopy.value.splice(originalRowDataCopy.value.indexOf(ticket));
+// ticket.itemFk = itemProposalSelected.value.id;
+// selectedRows.value.push({ ticketFk: ticket.ticketFk });
+// itemProposalSelected.value.available -= ticket.quantity;
+// itemLack.value.lack += ticket.quantity;
+// const index = store.data.findIndex((t) => t.ticketFk === ticket.ticketFk);
+// store.data.splice(index, 1);
+// console.log(ticket);
+// useArrayData('ItemsGetSimilar').store.data[1].available =
+// itemProposalSelected.value.available;
+// }
+// };
@@ -178,7 +180,7 @@ const replaceItem = () => {
:item-lack="itemLack"
:replace-action="true"
:tickets="selectedRows"
- @refresh-data="itemProposalEvt"
+ @item-replaced="itemProposalEvt"
>
{{ t('itemProposal') }}
@@ -216,6 +218,7 @@ const replaceItem = () => {
:label="itemLack.lack"
/>
{
(selectedRows = value)"
>
diff --git a/src/pages/Ticket/Negative/TicketLackTable.vue b/src/pages/Ticket/Negative/TicketLackTable.vue
index 79875547a..02c51728f 100644
--- a/src/pages/Ticket/Negative/TicketLackTable.vue
+++ b/src/pages/Ticket/Negative/TicketLackTable.vue
@@ -34,6 +34,7 @@ const filterLack = ref({
},
],
where: { alertLevel: 'FREE' },
+ order: 'ts.alertLevelCODE ASC',
});
const { t } = useI18n();
const URL_KEY = 'Tickets/ItemLack';
@@ -225,6 +226,7 @@ watch(selectedRows, () => emit('update:selection', selectedRows));
:create-as-dialog="false"
:use-model="true"
:filter="filterLack"
+ :order="['ts.alertLevelCode ASC']"
:table="{
'row-key': 'id',
selection: 'multiple',