diff --git a/src/components/TicketProblems.vue b/src/components/TicketProblems.vue new file mode 100644 index 000000000..2965396b1 --- /dev/null +++ b/src/components/TicketProblems.vue @@ -0,0 +1,40 @@ + + diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index 86802ee92..999133130 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -143,6 +143,10 @@ function alignRow() { const showFilter = computed( () => $props.column?.columnFilter !== false && $props.column.name != 'tableActions' ); + +const onTabPressed = async () => { + if (model.value) enterEvent['keyup.enter'](); +}; diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 65f716142..30a7e04ad 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -324,6 +324,8 @@ function handleOnDataSaved(_) { } function handleScroll() { + if ($props.crudModel.disableInfiniteScroll) return; + const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); const { scrollHeight, scrollTop, clientHeight } = tMiddle; const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40; diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 227ff9465..f24f054a5 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -202,7 +202,10 @@ async function fetchFilter(val) { if (fields) fetchOptions.fields = fields; if (sortBy) fetchOptions.order = sortBy; arrayData.reset(['skip', 'filter.skip', 'page']); - return (await arrayData.applyFilter({ filter: fetchOptions }))?.data; + + const { data } = await arrayData.applyFilter({ filter: fetchOptions }); + setOptions(data); + return data; } async function filterHandler(val, update) { diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 867965ece..e0d6bec64 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -584,15 +584,15 @@ worker: role: Role sipExtension: Extension locker: Locker - fiDueDate: Fecha de caducidad del DNI - sex: Sexo - seniority: Antigüedad + fiDueDate: FI due date + sex: Sex + seniority: Seniority fi: DNI/NIE/NIF - birth: Fecha de nacimiento - isFreelance: Autónomo + birth: Birth + isFreelance: Freelance isSsDiscounted: Bonificación SS - hasMachineryAuthorized: Autorizado para llevar maquinaria - isDisable: Trabajador desactivado + hasMachineryAuthorized: Machinery authorized + isDisable: Disable notificationsManager: activeNotifications: Active notifications availableNotifications: Available notifications @@ -708,7 +708,7 @@ supplier: supplierName: Supplier name basicData: workerFk: Responsible - isSerious: Verified + isReal: Verified isActive: Active isPayMethodChecked: PayMethod checked note: Notes diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 94bc5a586..1c3e35a97 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -580,9 +580,9 @@ worker: newWorker: Nuevo trabajador summary: boss: Jefe - phoneExtension: Extensión de teléfono - entPhone: Teléfono de empresa - personalPhone: Teléfono personal + phoneExtension: Ext. de teléfono + entPhone: Tel. de empresa + personalPhone: Tel. personal noBoss: Sin jefe userData: Datos de usuario userId: ID del usuario @@ -703,7 +703,7 @@ supplier: supplierName: Nombre del proveedor basicData: workerFk: Responsable - isSerious: Verificado + isReal: Verificado isActive: Activo isPayMethodChecked: Método de pago validado note: Notas diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 95a162670..4fa7b9bdc 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -320,7 +320,7 @@ const sumRisk = ({ clientRisks }) => { :value="entity.recommendedCredit" /> - + diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index 9f15130c0..450efe624 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -12,6 +12,7 @@ import VnImg from 'src/components/ui/VnImg.vue'; const stateStore = useStateStore(); const { t } = useI18n(); +const tableRef = ref(); const columns = [ { align: 'center', @@ -234,7 +235,6 @@ const columns = [ format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landing)), }, ]; -const tableRef = ref(); onMounted(async () => { stateStore.rightDrawer = true; diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index a444d587b..a7abccd4c 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -440,7 +440,7 @@ function handleOnDataSave({ CrudModelRef }) { selection: 'multiple', }" :crud-model="{ - paginate: false, + disableInfiniteScroll: true, }" v-model:selected="rowsSelected" :row-click="saveOnRowChange" diff --git a/src/pages/Monitor/MonitorOrders.vue b/src/pages/Monitor/MonitorOrders.vue index 326fae0ee..8518bd57a 100644 --- a/src/pages/Monitor/MonitorOrders.vue +++ b/src/pages/Monitor/MonitorOrders.vue @@ -27,7 +27,7 @@ function exprBuilder(param, value) { const columns = computed(() => [ { - label: t('salesOrdersTable.dateSend'), + label: t('globals.landed'), name: 'dateSend', field: 'dateSend', align: 'left', diff --git a/src/pages/Monitor/Ticket/MonitorTickets.vue b/src/pages/Monitor/Ticket/MonitorTickets.vue index 406bf5f29..e6bf242ac 100644 --- a/src/pages/Monitor/Ticket/MonitorTickets.vue +++ b/src/pages/Monitor/Ticket/MonitorTickets.vue @@ -15,6 +15,7 @@ import { toCurrency, dateRange, dashIfEmpty } from 'src/filters'; import RightMenu from 'src/components/common/RightMenu.vue'; import MonitorTicketSearchbar from './MonitorTicketSearchbar.vue'; import MonitorTicketFilter from './MonitorTicketFilter.vue'; +import TicketProblems from 'src/components/TicketProblems.vue'; const DEFAULT_AUTO_REFRESH = 2 * 60 * 1000; // 2min in ms const { t } = useI18n(); @@ -23,13 +24,18 @@ const tableRef = ref(null); const provinceOpts = ref([]); const stateOpts = ref([]); const zoneOpts = ref([]); -const visibleColumns = ref([]); const { viewSummary } = useSummaryDialog(); const from = Date.vnNew(); from.setHours(0, 0, 0, 0); const to = new Date(from.getTime()); to.setDate(to.getDate() + 1); to.setHours(23, 59, 59, 999); +const stateColors = { + notice: 'info', + success: 'positive', + warning: 'warning', + alert: 'negative', +}; function exprBuilder(param, value) { switch (param) { @@ -224,7 +230,7 @@ const columns = computed(() => [ { title: t('salesTicketsTable.goToLines'), icon: 'vn:lines', - color: 'priamry', + color: 'primary', action: (row) => openTab(row.id), isPrimary: true, attrs: { @@ -235,7 +241,7 @@ const columns = computed(() => [ { title: t('salesTicketsTable.preview'), icon: 'preview', - color: 'priamry', + color: 'primary', action: (row) => viewSummary(row.id, TicketSummary), isPrimary: true, attrs: { @@ -253,10 +259,10 @@ const getBadgeAttrs = (date) => { let timeTicket = new Date(date); timeTicket.setHours(0, 0, 0, 0); - let comparation = today - timeTicket; + let timeDiff = today - timeTicket; - if (comparation == 0) return { color: 'warning', 'text-color': 'black' }; - if (comparation < 0) return { color: 'success', 'text-color': 'black' }; + if (timeDiff == 0) return { color: 'warning', 'text-color': 'black' }; + if (timeDiff < 0) return { color: 'success', 'text-color': 'black' }; return { color: 'transparent', 'text-color': 'white' }; }; @@ -271,13 +277,6 @@ const autoRefreshHandler = (value) => { } }; -const stateColors = { - notice: 'info', - success: 'positive', - warning: 'warning', - alert: 'negative', -}; - const totalPriceColor = (ticket) => { const total = parseInt(ticket.totalWithVat); if (total > 0 && total < 50) return 'warning'; @@ -285,10 +284,10 @@ const totalPriceColor = (ticket) => { const formatShippedDate = (date) => { if (!date) return '-'; - const split1 = date.split('T'); - const [year, month, day] = split1[0].split('-'); - const _date = new Date(year, month - 1, day); - return toDateFormat(_date); + const dateSplit = date.split('T'); + const [year, month, day] = dateSplit[0].split('-'); + const newDate = new Date(year, month - 1, day); + return toDateFormat(newDate); }; const openTab = (id) => @@ -336,7 +335,6 @@ const openTab = (id) => :expr-builder="exprBuilder" :offset="50" :columns="columns" - :visible-columns="visibleColumns" :right-search="false" default-mode="table" auto-load @@ -366,61 +364,7 @@ const openTab = (id) =>