diff --git a/src/components/EditTableCellValueForm.vue b/src/components/EditTableCellValueForm.vue index 9e48889a0..f79fda444 100644 --- a/src/components/EditTableCellValueForm.vue +++ b/src/components/EditTableCellValueForm.vue @@ -1,9 +1,12 @@ + + + (itemCategories = data)" + /> + (suppliersOptions = data)" + /> + (tagOptions = data)" + /> + + + + {{ t(selectedCategory?.name || '') }} + + + {{ t(selectedType?.name || '') }} + + + {{ t(`components.itemsFilterPanel.${tag.label}`) }}: + {{ formatFn(tag.value) }} + + + + + + + {{ chip.tagName }}: + "{{ chip.value }}" + + + + + + + + + {{ t(category.name) }} + + + + + + { + selectedTypeFk = value; + searchFn(); + } + " + > + + + + {{ opt.name }} + + {{ opt.categoryName }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +en: + params: + supplier: Supplier + from: From + to: To + active: Is active + visible: Is visible + floramondo: Is floramondo + salesPersonFk: Buyer + categoryFk: Category + +es: + params: + supplier: Proveedor + from: Desde + to: Hasta + active: Activo + visible: Visible + floramondo: Floramondo + salesPersonFk: Comprador + categoryFk: Categoría + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 490186e77..525cf6e6b 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -151,9 +151,10 @@ export function useArrayData(key, userOptions) { delete store.userParams[param]; delete params[param]; if (store.filter?.where) { - delete store.filter.where[ - Object.keys(exprBuilder ? exprBuilder(param) : param)[0] - ]; + const key = Object.keys( + exprBuilder && exprBuilder(param) ? exprBuilder(param) : param + ); + if (key[0]) delete store.filter.where[key[0]]; if (Object.keys(store.filter.where).length === 0) { delete store.filter.where; } diff --git a/src/css/app.scss b/src/css/app.scss index 9edf19d06..770df8e01 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -119,6 +119,11 @@ select:-webkit-autofill { font-variation-settings: 'FILL' 1; } +.fill-icon-on-hover:hover { + font-variation-settings: 'FILL' 1; + cursor: pointer; +} + .vn-table-separation-row { height: 16px !important; background-color: var(--vn-section-color) !important; @@ -183,17 +188,6 @@ input::-webkit-inner-spin-button { -moz-appearance: none; } -// Clases para modificar el color de fecha seleccionada en componente QCalendarMonth -.q-dark div .q-calendar-mini .q-calendar-month__day.q-selected .q-calendar__button { - background-color: $primary !important; - color: white !important; -} - -.q-calendar-mini .q-calendar-month__day.q-selected .q-calendar__button { - background-color: $primary !important; - color: white !important; -} - .q-scrollarea__content { max-width: 100%; } diff --git a/src/filters/date.js b/src/filters/date.js index fc341ae32..f9fd1e0b2 100644 --- a/src/filters/date.js +++ b/src/filters/date.js @@ -112,3 +112,21 @@ export function secondsToHoursMinutes(seconds, includeHSuffix = true) { // Return formatted string return formattedHours + ':' + formattedMinutes + suffix; } + +export function getTimeDifferenceWithToday(date) { + let today = Date.vnNew(); + today.setHours(0, 0, 0, 0); + + date = new Date(date); + date.setHours(0, 0, 0, 0); + + return today - date; +} + +export function isLower(date) { + return getTimeDifferenceWithToday(date) > 0; +} + +export function isBigger(date) { + return getTimeDifferenceWithToday(date) < 0; +} diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 1bab871e1..ff57bf968 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1119,6 +1119,7 @@ item: list: List diary: Diary tags: Tags + fixedPrice: Fixed prices wasteBreakdown: Waste breakdown itemCreate: New item descriptor: @@ -1148,6 +1149,15 @@ item: stemMultiplier: Multiplier producer: Producer landed: Landed + fixedPrice: + itemId: Item ID + groupingPrice: Grouping price + packingPrice: Packing price + hasMinPrice: Has min price + minPrice: Min price + started: Started + ended: Ended + warehouse: Warehouse create: name: Name tag: Tag @@ -1157,6 +1167,25 @@ item: origin: Origin components: topbar: {} + itemsFilterPanel: + typeFk: Type + tag: Tag + value: Value + # ItemFixedPriceFilter + buyerFk: Buyer + warehouseFk: Warehouse + started: From + ended: To + mine: For me + hasMinPrice: Minimum price + # LatestBuysFilter + salesPersonFk: Buyer + supplierFk: Supplier + from: From + to: To + active: Is active + visible: Is visible + floramondo: Is floramondo userPanel: copyToken: Token copied to clipboard settings: Settings diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 01775dfee..f9278a9b0 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1118,6 +1118,7 @@ item: list: Listado diary: Histórico tags: Etiquetas + fixedPrice: Precios fijados wasteBreakdown: Deglose de mermas itemCreate: Nuevo artículo descriptor: @@ -1147,6 +1148,15 @@ item: stemMultiplier: Multiplicador producer: Productor landed: F. entrega + fixedPrice: + itemId: ID Artículo + groupingPrice: Precio grouping + packingPrice: Precio packing + hasMinPrice: Tiene precio mínimo + minPrice: Precio min + started: Inicio + ended: Fin + warehouse: Almacén create: name: Nombre tag: Etiqueta @@ -1156,6 +1166,25 @@ item: origin: Origen components: topbar: {} + itemsFilterPanel: + typeFk: Tipo + tag: Etiqueta + value: Valor + # ItemFixedPriceFilter + buyerFk: Comprador + warehouseFk: Almacén + started: Desde + ended: Hasta + mine: Para mi + hasMinPrice: Precio mínimo + # LatestBuysFilter + salesPersonFk: Comprador + supplierFk: Proveedor + from: Desde + to: Hasta + active: Activo + visible: Visible + floramondo: Floramondo userPanel: copyToken: Token copiado al portapapeles settings: Configuración diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index dbfb03f8f..78f578686 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -650,7 +650,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); - + diff --git a/src/pages/Entry/EntryLatestBuysFilter.vue b/src/pages/Entry/EntryLatestBuysFilter.vue index 5eaf001d8..9b2b5ae28 100644 --- a/src/pages/Entry/EntryLatestBuysFilter.vue +++ b/src/pages/Entry/EntryLatestBuysFilter.vue @@ -1,141 +1,26 @@ - (itemCategories = data)" - /> { :filter="{ fields: ['id', 'name', 'nickname'], order: 'name ASC', limit: 30 }" @on-fetch="(data) => (suppliersOptions = data)" /> - (tagOptions = data)" - /> - - - - {{ t(selectedCategory?.name || '') }} - - - {{ t(selectedType?.name || '') }} - - - {{ t(`params.${tag.label}`) }}: - {{ formatFn(tag.value) }} - - - - - - - {{ chip.tagName }}: - "{{ chip.value }}" - - - - + - - - - {{ t(category.name) }} - - - { - selectedTypeFk = value; - searchFn(); - } - " - > - - - - {{ opt.name }} - - {{ opt.categoryName }} - - - - - - - - - - - { { { { { { - - - - - - - - - - - - - - - + - - - - -en: - params: - supplier: Supplier - from: From - to: To - active: Is active - visible: Is visible - floramondo: Is floramondo - salesPersonFk: Buyer - categoryFk: Category - typeFk: Type - tag: Tag - value: Value -es: - params: - supplier: Proveedor - from: Desde - to: Hasta - active: Activo - visible: Visible - floramondo: Floramondo - salesPersonFk: Comprador - categoryFk: Categoría - typeFk: Tipo - tag: Etiqueta - value: Valor - Plant: Planta - Flower: Flor - Handmade: Confección - Green: Verde - Accessories: Complemento - Fruit: Fruta - diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue new file mode 100644 index 000000000..0dd7ca07d --- /dev/null +++ b/src/pages/Item/ItemFixedPrice.vue @@ -0,0 +1,605 @@ + + + + onWarehousesFetched(data)" + /> + (itemsWithNameOptions = data)" + /> + + + + + + {{ t('globals.collapseMenu') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{{ scope.opt?.id }} + {{ scope.opt?.name }} + + + + + + + + + + {{ row.name }} + + + + + + + + + € + + + + + + + € + + + + + + + + + + + + + + + + + + + + + + + + + + + + + removePrice(row.id, rowIndex) + ) + " + > + + {{ t('Delete') }} + + + + + + + + + {{ t('Add fixed price') }} + + + + + + + + + {{ t('Edit fixed price(s)') }} + + + + + + + + + +es: + Add fixed price: Añadir precio fijado + Edit fixed price(s): Editar precio(s) fijado(s) + This row will be removed: Esta linea se eliminará + Are you sure you want to continue?: ¿Seguro que quieres continuar? + Delete: Eliminar + diff --git a/src/pages/Item/ItemFixedPriceFilter.vue b/src/pages/Item/ItemFixedPriceFilter.vue new file mode 100644 index 000000000..cd86b5f71 --- /dev/null +++ b/src/pages/Item/ItemFixedPriceFilter.vue @@ -0,0 +1,108 @@ + + + + (itemTypeWorkersOptions = data)" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 41f3ec92a..2a8e87194 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -10,7 +10,7 @@ export default { component: RouterView, redirect: { name: 'ItemMain' }, menus: { - main: ['ItemList', 'WasteBreakdown'], + main: ['ItemList', 'WasteBreakdown', 'ItemFixedPrice'], card: ['ItemBasicData'], }, children: [ @@ -29,11 +29,20 @@ export default { }, component: () => import('src/pages/Item/ItemList.vue'), }, + { + path: 'fixed-price', + name: 'ItemFixedPrice', + meta: { + title: 'fixedPrice', + icon: 'vn:fixedPrice', + }, + component: () => import('src/pages/Item/ItemFixedPrice.vue'), + }, { path: 'create', name: 'ItemCreate', meta: { - title: 'create', + title: 'itemCreate', }, component: () => import('src/pages/Item/ItemCreate.vue'), },