diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue
index df82de29a..c3de94bf5 100644
--- a/src/components/ui/VnSearchbar.vue
+++ b/src/components/ui/VnSearchbar.vue
@@ -65,6 +65,10 @@ const props = defineProps({
type: Function,
default: undefined,
},
+ searchRemoveParams: {
+ type: Boolean,
+ default: true,
+ },
});
const searchText = ref();
@@ -109,17 +113,25 @@ onMounted(() => {
});
async function search() {
- const staticParams = Object.entries(store.userParams);
- arrayData.reset(['skip', 'page']);
+ const staticParams = Object.keys(store.userParams ?? {}).length
+ ? store.userParams
+ : store.defaultParams;
+ arrayData.resetPagination();
const filter = {
params: {
- ...Object.fromEntries(staticParams),
search: searchText.value,
},
- ...{ filter: props.filter },
+ filter: props.filter,
};
+ if (!props.searchRemoveParams || !searchText.value) {
+ filter.params = {
+ ...staticParams,
+ search: searchText.value,
+ };
+ }
+
if (props.whereFilter) {
filter.filter = {
where: props.whereFilter(searchText.value),
@@ -127,6 +139,7 @@ async function search() {
delete filter.params.search;
}
await arrayData.applyFilter(filter);
+ searchText.value = undefined;
}
diff --git a/src/components/ui/VnSms.vue b/src/components/ui/VnSms.vue
index bf6e0695e..8b25ba5da 100644
--- a/src/components/ui/VnSms.vue
+++ b/src/components/ui/VnSms.vue
@@ -54,6 +54,7 @@ function formatNumber(number) {
:offset="100"
:limit="5"
auto-load
+ map-key="smsFk"
>
{
+ arrayData.value = useArrayData(key);
+ });
+
+ watch(
+ () => arrayData.value.store?.currentFilter,
+ (val, oldValue) => (val || oldValue) && setUserParams(val),
+ { immediate: true, deep: true }
+ );
+
+ function parseOrder(urlOrders) {
+ const orderObject = {};
+ if (urlOrders) {
+ if (typeof urlOrders == 'string') urlOrders = [urlOrders];
+ for (const [index, orders] of urlOrders.entries()) {
+ const [name, direction] = orders.split(' ');
+ orderObject[name] = { direction, index: index + 1 };
+ }
+ }
+ orders.value = orderObject;
+ }
+
+ function setUserParams(watchedParams) {
+ if (!watchedParams || Object.keys(watchedParams).length == 0) return;
+
+ if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams);
+ if (typeof watchedParams?.filter == 'string')
+ watchedParams.filter = JSON.parse(watchedParams.filter);
+
+ watchedParams = { ...watchedParams, ...watchedParams.filter?.where };
+ parseOrder(watchedParams.filter?.order);
+
+ delete watchedParams.filter;
+ params.value = sanitizer(watchedParams);
+ }
+
+ function sanitizer(params) {
+ for (const [key, value] of Object.entries(params)) {
+ if (key === 'and' && Array.isArray(value)) {
+ value.forEach((item) => {
+ Object.assign(params, item);
+ });
+ delete params[key];
+ } else if (value && typeof value === 'object') {
+ const param = Object.values(value)[0];
+ if (typeof param == 'string') params[key] = param.replaceAll('%', '');
+ }
+ }
+ return params;
+ }
+
+ return {
+ params,
+ orders,
+ };
+}
diff --git a/src/css/app.scss b/src/css/app.scss
index 19f750ec8..d4790a6b8 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -3,22 +3,23 @@
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.sass';
body.body--light {
- --font-color: black;
--vn-header-color: #cecece;
--vn-page-color: #ffffff;
--vn-section-color: #e0e0e0;
--vn-section-hover-color: #b9b9b9;
- --vn-text-color: var(--font-color);
+ --vn-text-color: black;
--vn-label-color: #5f5f5f;
--vn-accent-color: #e7e3e3;
--vn-search-color: #d4d4d4;
--vn-search-color-hover: #cfcfcf;
--vn-empty-tag: #acacac;
+ --vn-black-text-color: black;
+ --vn-text-color-contrast: white;
background-color: var(--vn-page-color);
.q-header .q-toolbar {
- color: var(--font-color);
+ color: var(--vn-text-color);
}
}
body.body--dark {
@@ -32,6 +33,8 @@ body.body--dark {
--vn-search-color: #4b4b4b;
--vn-search-color-hover: #5b5b5b;
--vn-empty-tag: #2d2d2d;
+ --vn-black-text-color: black;
+ --vn-text-color-contrast: black;
background-color: var(--vn-page-color);
}
@@ -90,6 +93,10 @@ select:-webkit-autofill {
background-color: var(--vn-section-hover-color);
}
+.bg-vn-page {
+ background-color: var(--vn-page-color);
+}
+
.color-vn-label {
color: var(--vn-label-color);
}
@@ -155,7 +162,8 @@ select:-webkit-autofill {
.q-card,
.q-table,
.q-table__bottom,
-.q-drawer {
+.q-drawer,
+.bottomButton {
background-color: var(--vn-section-color);
}
@@ -192,7 +200,7 @@ select:-webkit-autofill {
.q-tooltip {
background-color: var(--vn-page-color);
- color: var(--font-color);
+ color: var(--vn-text-color);
font-size: medium;
}
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 67d7a2bee..33829d98d 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -611,7 +611,7 @@ worker:
fi: DNI/NIE/NIF
birth: Birth
isFreelance: Freelance
- isSsDiscounted: Bonificación SS
+ isSsDiscounted: SS Bonification
hasMachineryAuthorized: Machinery authorized
isDisable: Disable
notificationsManager:
@@ -857,6 +857,7 @@ components:
value: Value
# ItemFixedPriceFilter
buyerFk: Buyer
+ warehouseFk: Warehouse
started: From
ended: To
mine: For me
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 4fa8699c9..f0cbe3543 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -608,6 +608,15 @@ worker:
role: Rol
sipExtension: Extensión
locker: Taquilla
+ fiDueDate: F. caducidad DNI
+ sex: Sexo
+ seniority: Antigüedad
+ fi: DNI/NIE/NIF
+ birth: F. nacimiento
+ isFreelance: Autónomo
+ isSsDiscounted: Bonificación SS
+ hasMachineryAuthorized: Autorizado para maquinaria
+ isDisable: Deshabilitado
notificationsManager:
activeNotifications: Notificaciones activas
availableNotifications: Notificaciones disponibles
@@ -849,10 +858,12 @@ components:
value: Valor
# ItemFixedPriceFilter
buyerFk: Comprador
+ warehouseFk: Almacen
started: Desde
ended: Hasta
mine: Para mi
hasMinPrice: Precio mínimo
+ wareHouseFk: Almacén
# LatestBuysFilter
salesPersonFk: Comprador
active: Activo
diff --git a/src/pages/Account/AccountAcls.vue b/src/pages/Account/AccountAcls.vue
index d80f835ec..6d3571661 100644
--- a/src/pages/Account/AccountAcls.vue
+++ b/src/pages/Account/AccountAcls.vue
@@ -1,16 +1,15 @@
-
-
-
(roles = data)"
/>
-
+ prefix="acls"
+ :array-data-props="{
+ url: 'ACLs',
+ order: 'id DESC',
+ exprBuilder,
+ }"
+ >
+
+
+
+
diff --git a/src/pages/Account/AccountAliasList.vue b/src/pages/Account/AccountAliasList.vue
index c67283297..f6016fb6c 100644
--- a/src/pages/Account/AccountAliasList.vue
+++ b/src/pages/Account/AccountAliasList.vue
@@ -2,21 +2,12 @@
import { useI18n } from 'vue-i18n';
import { ref, computed } from 'vue';
import VnTable from 'components/VnTable/VnTable.vue';
-import VnSearchbar from 'components/ui/VnSearchbar.vue';
-import { useStateStore } from 'stores/useStateStore';
+import VnSection from 'src/components/common/VnSection.vue';
const tableRef = ref();
const { t } = useI18n();
-const stateStore = useStateStore();
+const dataKey = 'AccountAliasList';
-const exprBuilder = (param, value) => {
- switch (param) {
- case 'search':
- return /^\d+$/.test(value)
- ? { id: value }
- : { alias: { like: `%${value}%` } };
- }
-};
const columns = computed(() => [
{
align: 'left',
@@ -40,40 +31,45 @@ const columns = computed(() => [
create: true,
},
]);
+
+const exprBuilder = (param, value) => {
+ switch (param) {
+ case 'search':
+ return /^\d+$/.test(value)
+ ? { id: value }
+ : { alias: { like: `%${value}%` } };
+ }
+};
-
-
-
-
-
-
+ prefix="mailAlias"
+ :array-data-props="{ url: 'MailAliases', order: 'id DESC', exprBuilder }"
+ >
+
+
+
+
-
es:
Id: Id
diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue
index 341dd92a2..c1c75fcee 100644
--- a/src/pages/Account/AccountList.vue
+++ b/src/pages/Account/AccountList.vue
@@ -1,19 +1,20 @@
-
-
-
-
-
-
- (roles = data)" auto-load />
+
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/src/pages/Account/Alias/Card/AliasCard.vue b/src/pages/Account/Alias/Card/AliasCard.vue
index 65951b3bf..3a814edc0 100644
--- a/src/pages/Account/Alias/Card/AliasCard.vue
+++ b/src/pages/Account/Alias/Card/AliasCard.vue
@@ -1,12 +1,12 @@
-
-import { useI18n } from 'vue-i18n';
-import VnCard from 'components/common/VnCard.vue';
+import VnCardBeta from 'components/common/VnCardBeta.vue';
import AccountDescriptor from './AccountDescriptor.vue';
-
-const { t } = useI18n();
-
+
diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue
index 3156f8e1e..8af817fcc 100644
--- a/src/pages/Account/Card/AccountDescriptor.vue
+++ b/src/pages/Account/Card/AccountDescriptor.vue
@@ -41,7 +41,7 @@ const hasAccount = ref(false);
/>
-
-
+
{{ t('account.card.deactivated') }}
@@ -91,10 +90,10 @@ const hasAccount = ref(false);
{{ t('account.card.enabled') }}
diff --git a/src/pages/Account/Card/AccountSummary.vue b/src/pages/Account/Card/AccountSummary.vue
index 5a21e18a5..e6c21ed34 100644
--- a/src/pages/Account/Card/AccountSummary.vue
+++ b/src/pages/Account/Card/AccountSummary.vue
@@ -30,7 +30,7 @@ const filter = {
$props.id || route.params.id);
-const { viewSummary } = useSummaryDialog();
const columns = computed(() => [
{
align: 'left',
@@ -81,30 +85,32 @@ const exprBuilder = (param, value) => {
-
-
+ prefix="role"
+ :array-data-props="{ url, exprBuilder, order: 'id ASC' }"
+ >
+
+
+
+
diff --git a/src/pages/Account/Role/Card/RoleCard.vue b/src/pages/Account/Role/Card/RoleCard.vue
index a2d5710f4..7664deca8 100644
--- a/src/pages/Account/Role/Card/RoleCard.vue
+++ b/src/pages/Account/Role/Card/RoleCard.vue
@@ -1,20 +1,7 @@
-
+
diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue
index 693fcdf48..0a555346d 100644
--- a/src/pages/Account/Role/Card/RoleDescriptor.vue
+++ b/src/pages/Account/Role/Card/RoleDescriptor.vue
@@ -43,14 +43,14 @@ const removeRole = async () => {
:filter="filter"
module="Role"
@on-fetch="setData"
- data-key="accountData"
+ data-key="Role"
:title="data.title"
:subtitle="data.subtitle"
:summary="$props.summary"
>
- {{ t('Delete') }}
+ {{ t('globals.delete') }}
diff --git a/src/pages/Account/Role/Card/RoleSummary.vue b/src/pages/Account/Role/Card/RoleSummary.vue
index fef85f919..f0daa77fb 100644
--- a/src/pages/Account/Role/Card/RoleSummary.vue
+++ b/src/pages/Account/Role/Card/RoleSummary.vue
@@ -27,10 +27,10 @@ const filter = {
(role = data)"
- data-key="RoleSummary"
+ data-key="Role"
>
{{ role.id }} - {{ role.name }}
diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml
index f2f563923..88a6b11e9 100644
--- a/src/pages/Account/locale/en.yml
+++ b/src/pages/Account/locale/en.yml
@@ -66,7 +66,7 @@ account:
mailInputInfo: All emails will be forwarded to the specified address.
role:
newRole: New role
- searchRoles: Search role
+ search: Search role
searchInfo: Search role by id or name
description: Description
id: Id
diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue
index e288d8614..d17c6b4e6 100644
--- a/src/pages/Claim/Card/ClaimDevelopment.vue
+++ b/src/pages/Claim/Card/ClaimDevelopment.vue
@@ -164,19 +164,7 @@ const columns = computed(() => [
:autofocus="col.tabIndex == 1"
input-debounce="0"
hide-selected
- >
-
-
-
- {{ scope.opt?.name }}
-
- {{ scope.opt?.nickname }}
- {{ scope.opt?.code }}
-
-
-
-
-
+ />
-
+
{{ value }}
{{ formatFn(tag.value) }}
-
+
+
@@ -153,6 +146,7 @@ en:
created: Created
myTeam: My team
itemFk: Item
+ zoneFk: Zone
es:
params:
search: Contiene
@@ -165,6 +159,7 @@ es:
created: Creada
myTeam: Mi equipo
itemFk: Artículo
+ zoneFk: Zona
Client Name: Nombre del cliente
Salesperson: Comercial
Item: Artículo
diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue
index 5f61db5c0..bb97162d8 100644
--- a/src/pages/Claim/ClaimList.vue
+++ b/src/pages/Claim/ClaimList.vue
@@ -10,6 +10,7 @@ import ClaimSummary from './Card/ClaimSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
+import ZoneDescriptorProxy from '../Zone/Card/ZoneDescriptorProxy.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -95,7 +96,12 @@ const columns = computed(() => [
optionLabel: 'description',
},
},
- orderBy: 'priority',
+ orderBy: 'cs.priority',
+ },
+ {
+ align: 'left',
+ label: t('claim.zone'),
+ name: 'zoneFk',
},
{
align: 'right',
@@ -132,7 +138,7 @@ const STATE_COLOR = {
+
+
+ {{ row.zoneName }}
+
+
+
diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue
index 712be5e09..04ef5f882 100644
--- a/src/pages/Customer/Card/CustomerBalance.vue
+++ b/src/pages/Customer/Card/CustomerBalance.vue
@@ -84,6 +84,7 @@ const columns = computed(() => [
label: t('Creation date'),
format: ({ created }) => toDateHourMin(created),
cardVisible: true,
+ style: 'color: var(--vn-label-color)',
},
{
align: 'left',
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index 768c66f32..e9a349e0b 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -16,14 +16,17 @@ const { t } = useI18n();
const businessTypes = ref([]);
const contactChannels = ref([]);
-const handleSalesModelValue = (val) => ({
- or: [
- { id: val },
- { name: val },
- { nickname: { like: '%' + val + '%' } },
- { code: { like: `${val}%` } },
- ],
-});
+const handleSalesModelValue = (val) => {
+ if (!val) val = '';
+ return {
+ or: [
+ { id: val },
+ { name: val },
+ { nickname: { like: '%' + val + '%' } },
+ { code: { like: `${val}%` } },
+ ],
+ };
+};
const exprBuilder = (param, value) => {
return {
diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue
index 35f366e47..640e37ed3 100644
--- a/src/pages/Customer/Card/CustomerConsumption.vue
+++ b/src/pages/Customer/Card/CustomerConsumption.vue
@@ -2,7 +2,7 @@
import { ref, computed, onBeforeMount } from 'vue';
import axios from 'axios';
import { useI18n } from 'vue-i18n';
-import { toDate } from 'src/filters/index';
+import { dateRange, toDate } from 'src/filters/index';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue';
@@ -104,18 +104,12 @@ function getParams() {
};
}
const userParams = computed(() => {
- const minDate = Date.vnNew();
- minDate.setHours(0, 0, 0, 0);
- minDate.setMonth(minDate.getMonth() - 2);
-
- const maxDate = Date.vnNew();
- maxDate.setHours(23, 59, 59, 59);
-
- return {
- campaign: campaignList.value[0]?.id,
- from: minDate,
- to: maxDate,
+ const campaign = campaignList.value[0]?.id;
+ const userParams = {
+ campaign,
+ ...updateDateParams(campaign, { from: Date.vnNew(), to: Date.vnNew() }),
};
+ return userParams;
});
const openReportPdf = () => {
openReport(`Clients/${route.params.id}/campaign-metrics-pdf`, getParams());
@@ -134,6 +128,23 @@ const sendCampaignMetricsEmail = ({ address }) => {
...getParams(),
});
};
+
+const updateDateParams = (value, params) => {
+ if (!value) {
+ params.from = null;
+ params.to = null;
+ return;
+ }
+ const campaign = campaignList.value.find((c) => c.id === value);
+ if (!campaign) return;
+
+ const { dated, previousDays, scopeDays } = campaign;
+ const _date = new Date(dated);
+ const [from, to] = dateRange(_date);
+ params.from = new Date(from.setDate(from.getDate() - previousDays)).toISOString();
+ params.to = new Date(to.setDate(to.getDate() + scopeDays)).toISOString();
+ return params;
+};
@@ -144,7 +155,6 @@ const sendCampaignMetricsEmail = ({ address }) => {
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
:columns="columns"
search-url="consumption"
- :filter="filter"
:user-params="userParams"
:default-remove="false"
:default-reset="false"
@@ -201,6 +211,7 @@ const sendCampaignMetricsEmail = ({ address }) => {
class="q-px-sm q-pt-none fit"
dense
option-label="code"
+ @update:model-value="(data) => updateDateParams(data, params)"
>
diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index 98e53d568..dc5f08d37 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -1,5 +1,5 @@
@@ -173,13 +174,10 @@ const fetchEntryBuys = async () => {
-
+
{
/>
-
+
@@ -212,61 +207,42 @@ const fetchEntryBuys = async () => {
:label="t('entry.summary.travelAgency')"
:value="entry.travel.agency?.name"
/>
-
+
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-import { onMounted, ref, computed } from 'vue';
+import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import EntryFilter from './EntryFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
-import { useStateStore } from 'stores/useStateStore';
import VnTable from 'components/VnTable/VnTable.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import { toDate } from 'src/filters';
@@ -12,7 +11,6 @@ import EntrySummary from './Card/EntrySummary.vue';
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
-const stateStore = useStateStore();
const { t } = useI18n();
const tableRef = ref();
diff --git a/src/pages/Entry/EntryStockBoughtFilter.vue b/src/pages/Entry/EntryStockBoughtFilter.vue
index e59332064..136881f17 100644
--- a/src/pages/Entry/EntryStockBoughtFilter.vue
+++ b/src/pages/Entry/EntryStockBoughtFilter.vue
@@ -65,6 +65,6 @@ onMounted(async () => {
es:
Date: Fecha
params:
- dated: Date
+ dated: Fecha
workerFk: Trabajador
diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
index fd5ea0931..83b1aa25e 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
@@ -116,6 +116,7 @@ function deleteFile(dmsFk) {
[
[
},
format: (row) => row.code,
},
- {
- name: 'companyFk',
- label: t('globals.company'),
- columnFilter: {
- component: 'select',
- attrs: {
- url: 'Companies',
- fields: ['id', 'code'],
- optionLabel: 'code',
- },
- },
- format: (row) => row.code,
- },
{
align: 'right',
name: 'tableActions',
diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue
index 89b109c3c..0dc3c04fa 100644
--- a/src/pages/InvoiceOut/InvoiceOutList.vue
+++ b/src/pages/InvoiceOut/InvoiceOutList.vue
@@ -126,6 +126,13 @@ const columns = computed(() => [
columnField: { component: null },
format: (row) => toDate(row.dued),
},
+ {
+ align: 'left',
+ name: 'customsAgentFk',
+ label: t('invoiceOutList.tableVisibleColumns.customsAgent'),
+ cardVisible: true,
+ format: (row, dashIfEmpty) => dashIfEmpty(row.customsAgentName),
+ },
{
align: 'right',
name: 'tableActions',
@@ -346,7 +353,7 @@ watchEffect(selectedRows);
{
v-model="data.hasKgPrice"
:label="t('item.basicData.hasKgPrice')"
/>
+
+
+
-
+
{
switch (param) {
@@ -49,10 +40,6 @@ const where = {
itemFk: route.params.id,
};
-if (hideInventory.value) {
- where.supplierFk = { neq: inventorySupplierFk };
-}
-
const arrayData = useArrayData('ItemLastEntries', {
url: 'Items/lastEntriesFilter',
order: ['landed DESC', 'buyFk DESC'],
@@ -110,7 +97,7 @@ const columns = computed(() => [
format: (val) => dashIfEmpty(val),
},
{
- label: t('shelvings.packing'),
+ label: 'Packing',
name: 'packing',
field: 'packing',
align: 'center',
@@ -182,15 +169,11 @@ const updateFilter = async () => {
const userFilter = arrayData.store.userFilter.where;
userFilter.landed = filter;
- if (hideInventory.value) userFilter.supplierFk = { neq: inventorySupplierFk };
- else delete userFilter.supplierFk;
await fetchItemLastEntries();
};
onMounted(async () => {
- await getInventorySupplier();
-
const _from = Date.vnNew();
_from.setDate(_from.getDate() - 75);
from.value = getDate(_from, 'from');
@@ -200,12 +183,16 @@ onMounted(async () => {
updateFilter();
- watch([from, to, hideInventory], ([nFrom, nTo], [oFrom, oTo]) => {
+ watch([from, to], ([nFrom, nTo], [oFrom, oTo]) => {
if (nFrom && nFrom != oFrom) nFrom = getDate(new Date(nFrom), 'from');
if (nTo && nTo != oTo) nTo = getDate(new Date(nTo), 'to');
updateFilter();
});
});
+
+function getBadgeClass(groupingMode, expectedGrouping) {
+ return groupingMode === expectedGrouping ? 'accent-badge' : 'simple-badge';
+}
@@ -224,13 +211,6 @@ onMounted(async () => {
class="q-mr-lg"
data-cy="to"
/>
-
@@ -249,6 +229,11 @@ onMounted(async () => {
/>
+
+
+ {{ row.warehouse }}
+
+
@@ -262,32 +247,37 @@ onMounted(async () => {
+
+
+ {{ value }}
+ {{ t('lastEntries.grouping') }}/Packing
+
+
+
+
+ {{ row.printedStickers }}
+
+
{{ dashIfEmpty(row.packing) }}
- {{ t('lastEntries.packing') }}
+ Packing
-
-
- {{ value }}
-
- {{ t('lastEntries.grouping') }}/{{ t('lastEntries.packing') }}
-
-
{{ dashIfEmpty(row.grouping) }}
{{ t('lastEntries.grouping') }}
@@ -315,13 +305,16 @@ onMounted(async () => {
-
-
+
- {{ row.supplier }}
+ >
+
+ {{ row.supplier }}
+
@@ -349,4 +342,13 @@ onMounted(async () => {
background-color: red;
}
}
+.accent-badge {
+ background-color: var(--vn-label-color);
+ color: var(--vn-text-color-contrast);
+}
+.simple-badge {
+ background-color: transparent;
+ color: var(--vn-text-color);
+ font-size: 14px;
+}
diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue
index fbb0e01a7..93d4b9a71 100644
--- a/src/pages/Item/Card/ItemTags.vue
+++ b/src/pages/Item/Card/ItemTags.vue
@@ -128,7 +128,7 @@ const submitTags = async (data) => {
[
name: 'itemFk',
...defaultColumnAttrs,
isId: true,
- cardVisible: true,
columnField: {
component: 'input',
type: 'number',
@@ -65,14 +64,12 @@ const columns = computed(() => [
name: 'name',
...defaultColumnAttrs,
create: true,
- cardVisible: true,
},
{
label: t('item.fixedPrice.groupingPrice'),
field: 'rate2',
name: 'rate2',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -81,7 +78,6 @@ const columns = computed(() => [
field: 'rate3',
name: 'rate3',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -91,7 +87,6 @@ const columns = computed(() => [
field: 'minPrice',
name: 'minPrice',
...defaultColumnAttrs,
- cardVisible: true,
component: 'input',
type: 'number',
},
@@ -100,7 +95,6 @@ const columns = computed(() => [
field: 'started',
name: 'started',
format: ({ started }) => toDate(started),
- cardVisible: true,
...defaultColumnAttrs,
columnField: {
component: 'date',
@@ -116,7 +110,6 @@ const columns = computed(() => [
field: 'ended',
name: 'ended',
...defaultColumnAttrs,
- cardVisible: true,
columnField: {
component: 'date',
class: 'shrink',
@@ -251,11 +244,14 @@ const upsertPrice = async (props, resetMinPrice = false) => {
}
if (!changes.updates && !changes.creates) return;
const data = await upsertFixedPrice(row);
- tableRef.value.CrudModelRef.formData[props.rowIndex] = data;
+ Object.assign(tableRef.value.CrudModelRef.formData[props.rowIndex], data);
+ notify(t('globals.dataSaved'), 'positive');
+ tableRef.value.reload();
};
async function upsertFixedPrice(row) {
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
+ data.hasMinPrice = data.hasMinPrice ? 1 : 0;
return data;
}
@@ -395,18 +391,12 @@ function handleOnDataSave({ CrudModelRef }) {
- data.forEach((item) => {
- item.hasMinPrice = `${item.hasMinPrice !== 0}`;
- })
- "
:default-remove="false"
:default-reset="false"
:default-save="false"
data-key="ItemFixedPrices"
url="FixedPrices/filter"
- :order="['itemFk DESC', 'name DESC']"
+ :order="['name DESC', 'itemFk DESC']"
save-url="FixedPrices/crud"
ref="tableRef"
dense
@@ -498,14 +488,15 @@ function handleOnDataSave({ CrudModelRef }) {
diff --git a/src/pages/Item/ItemFixedPriceFilter.vue b/src/pages/Item/ItemFixedPriceFilter.vue
index a8f7d0c5f..531c7e09e 100644
--- a/src/pages/Item/ItemFixedPriceFilter.vue
+++ b/src/pages/Item/ItemFixedPriceFilter.vue
@@ -32,7 +32,7 @@ const itemTypeWorkersOptions = ref([]);
+
+en:
+ params:
+ buyerFk: Buyer
+ warehouseFk: Warehouse
+ started: Started
+ ended: Ended
+ mine: Mine
+ showBadDates: Show future items
+ hasMinPrice: Has Min Price
+es:
+ params:
+ buyerFk: Comprador
+ warehouseFk: Almacén
+ started: Desde
+ ended: Hasta
+ mine: Para mi
+ showBadDates: Ver items a futuro
+ hasMinPrice: Precio mínimo
+
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 4aa3b13fe..5119b5177 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -376,6 +376,8 @@ const columns = computed(() => [
es:
New item: Nuevo artículo
+ Create Item: Crear artículo
+ You can search by id: Puedes buscar por id
Preview: Vista previa
Regularize stock: Regularizar stock
diff --git a/src/pages/Item/ItemRequestFilter.vue b/src/pages/Item/ItemRequestFilter.vue
index 4e8ae0d42..f23cadcad 100644
--- a/src/pages/Item/ItemRequestFilter.vue
+++ b/src/pages/Item/ItemRequestFilter.vue
@@ -201,6 +201,7 @@ en:
to: To
mine: For me
state: State
+ daysOnward: Days onward
myTeam: My team
dateFiltersTooltip: Cannot choose a range of dates and days onward at the same time
denied: Denied
@@ -218,6 +219,7 @@ es:
to: Hasta
mine: Para mi
state: Estado
+ daysOnward: Días en adelante
myTeam: Mi equipo
dateFiltersTooltip: No se puede seleccionar un rango de fechas y días en adelante a la vez
denied: Denegada
diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml
index 74feb512b..ac5010a12 100644
--- a/src/pages/Item/locale/en.yml
+++ b/src/pages/Item/locale/en.yml
@@ -158,6 +158,7 @@ item:
isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
isPhotoRequested: Do photo
isPhotoRequestedTooltip: This item does need a photo
+ isCustomInspectionRequired: Needs physical inspection (PIF)
description: Description
fixedPrice:
itemFk: Item ID
diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml
index 3f2a06f1f..96c8cbc9a 100644
--- a/src/pages/Item/locale/es.yml
+++ b/src/pages/Item/locale/es.yml
@@ -160,6 +160,7 @@ item:
isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
isPhotoRequested: Hacer foto
isPhotoRequestedTooltip: Este artículo necesita una foto
+ isCustomInspectionRequired: Necesita inspección física (PIF)
description: Descripción
fixedPrice:
itemFk: ID Artículo
diff --git a/test/vitest/__tests__/pages/Login/Login.spec.js b/src/pages/Login/__tests__/Login.spec.js
similarity index 100%
rename from test/vitest/__tests__/pages/Login/Login.spec.js
rename to src/pages/Login/__tests__/Login.spec.js
diff --git a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
index 82578a61f..48710d696 100644
--- a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
+++ b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
@@ -281,6 +281,7 @@ en:
problems: With problems
pending: Pending
alertLevel: Grouped State
+ department: Department
FREE: Free
DELIVERED: Delivered
ON_PREPARATION: On preparation
@@ -300,6 +301,7 @@ es:
problems: Con problemas
pending: Pendiente
alertLevel: Estado agrupado
+ department: Departamento
FREE: Libre
DELIVERED: Servido
ON_PREPARATION: En preparación
diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue
index 4ad009133..da2e88aa9 100644
--- a/src/pages/Order/Card/OrderCatalog.vue
+++ b/src/pages/Order/Card/OrderCatalog.vue
@@ -86,6 +86,7 @@ watch(
url="Orders/CatalogFilter"
:label="t('Search items')"
:info="t('You can search items by name or id')"
+ :search-remove-params="false"
/>
import toCurrency from 'src/filters/toCurrency';
-import { computed, inject, ref } from 'vue';
+import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import { useRoute } from 'vue-router';
diff --git a/src/pages/Order/Card/OrderFilter.vue b/src/pages/Order/Card/OrderFilter.vue
index dc86600ac..fcd1ef2e4 100644
--- a/src/pages/Order/Card/OrderFilter.vue
+++ b/src/pages/Order/Card/OrderFilter.vue
@@ -128,6 +128,7 @@ en:
from: From
to: To
orderFk: Order
+ workerFk: Worker
sourceApp: Application
myTeam: My Team
isConfirmed: Is Confirmed
@@ -151,6 +152,7 @@ es:
from: Desde
to: Hasta
orderFk: Cesta
+ workerFk: Trabajador
sourceApp: Aplicación
myTeam: Mi Equipo
isConfirmed: Confirmado
diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue
index b8016abac..ad06dfe43 100644
--- a/src/pages/Order/Card/OrderSummary.vue
+++ b/src/pages/Order/Card/OrderSummary.vue
@@ -221,7 +221,7 @@ async function handleConfirm() {
-