diff --git a/package.json b/package.json
index ead0193c9..eaaa0b812 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-front",
- "version": "24.40.0",
+ "version": "24.42.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",
diff --git a/src/boot/quasar.js b/src/boot/quasar.js
index e2035c880..5db6edd24 100644
--- a/src/boot/quasar.js
+++ b/src/boot/quasar.js
@@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers';
import qFormMixin from './qformMixin';
import mainShortcutMixin from './mainShortcutMixin';
import keyShortcut from './keyShortcut';
+import useNotify from 'src/composables/useNotify.js';
+const { notify } = useNotify();
export default boot(({ app }) => {
app.mixin(qFormMixin);
app.mixin(mainShortcutMixin);
app.directive('shortcut', keyShortcut);
+ app.config.errorHandler = function (err) {
+ console.error(err);
+ notify('globals.error', 'negative', 'error');
+ };
});
diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue
index 8449f9354..e89d32da4 100644
--- a/src/components/ItemsFilterPanel.vue
+++ b/src/components/ItemsFilterPanel.vue
@@ -297,11 +297,12 @@ const removeTag = (index, params, search) => {
/>
-
diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index ca7043b75..a6c20a75f 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -69,10 +69,7 @@ const $props = defineProps({
type: Boolean,
default: false,
},
- disableInfiniteScroll: {
- type: Boolean,
- default: false,
- },
+
hasSubToolbar: {
type: Boolean,
default: null,
@@ -150,7 +147,7 @@ onMounted(() => {
quasar.platform.is.mobile && !$props.disableOption?.card
? CARD_MODE
: $props.defaultMode;
- stateStore.rightDrawer = true;
+ stateStore.rightDrawer = quasar.screen.gt.xs;
columnsVisibilitySkipped.value = [
...splittedColumns.value.columns
.filter((c) => c.visible == false)
@@ -305,6 +302,7 @@ defineExpose({
redirect: redirectFn,
selected,
CrudModelRef,
+ params,
});
function handleOnDataSaved(_) {
@@ -372,7 +370,7 @@ function handleOnDataSaved(_) {
ref="CrudModelRef"
@on-fetch="(...args) => emit('onFetch', ...args)"
:search-url="searchUrl"
- :disable-infinite-scroll="$attrs['disableInfiniteScroll']"
+ :disable-infinite-scroll="isTableMode"
@save-changes="reload"
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
:auto-load="hasParams || $attrs['auto-load']"
@@ -392,7 +390,7 @@ function handleOnDataSaved(_) {
card-container-class="grid-three"
flat
:style="isTableMode && `max-height: ${tableHeight}`"
- virtual-scroll
+ :virtual-scroll="!isTableMode"
@virtual-scroll="
(event) =>
event.index > rows.length - 2 &&
@@ -428,7 +426,7 @@ function handleOnDataSaved(_) {
@@ -515,8 +513,12 @@ function handleOnDataSaved(_) {
:key="index"
:title="btn.title"
:icon="btn.icon"
- class="q-px-sm text-primary-light"
+ class="q-pa-xs"
flat
+ dense
+ :class="
+ btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
+ "
:style="`visibility: ${
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
}`"
@@ -647,18 +649,10 @@ function handleOnDataSaved(_) {
:key="col?.id"
class="text-center"
>
-
- {{
- rows.reduce(
- (sum, currentRow) => sum + currentRow[col.name],
- 0
- )
- }}
-
+
@@ -775,10 +769,16 @@ es:
}
}
-.q-table th {
- padding: 0;
-}
+.q-table {
+ th {
+ padding: 0;
+ }
+ &__top {
+ padding: 12px 0px;
+ top: 0;
+ }
+}
.vnTable {
thead tr th {
position: sticky;
diff --git a/src/components/VnTable/VnVisibleColumn.vue b/src/components/VnTable/VnVisibleColumn.vue
index 36f5ed7de..f5c3458cd 100644
--- a/src/components/VnTable/VnVisibleColumn.vue
+++ b/src/components/VnTable/VnVisibleColumn.vue
@@ -135,7 +135,7 @@ onMounted(async () => {
});
-
+
diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue
index 16e3c641f..52dd6ef79 100644
--- a/src/components/common/VnDmsList.vue
+++ b/src/components/common/VnDmsList.vue
@@ -400,7 +400,14 @@ defineExpose({
/>
-
+
{{ t('Upload file') }}
diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue
index b6cbfbafd..e5ed14a40 100644
--- a/src/components/common/VnLocation.vue
+++ b/src/components/common/VnLocation.vue
@@ -14,11 +14,11 @@ const props = defineProps({
});
const modelValue = ref(
props.location
- ? `${props.location?.postcode} - ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
+ ? `${props.location?.postcode}, ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
: null
);
function showLabel(data) {
- return `${data.code} - ${data.town}(${data.province}), ${data.country}`;
+ return `${data.code}, ${data.town}(${data.province}), ${data.country}`;
}
const handleModelValue = (data) => {
emit('update:model-value', data);
diff --git a/src/components/common/VnSectionMain.vue b/src/components/common/VnSectionMain.vue
index 9975b1011..15be6ad9a 100644
--- a/src/components/common/VnSectionMain.vue
+++ b/src/components/common/VnSectionMain.vue
@@ -2,6 +2,7 @@
import { useStateStore } from 'stores/useStateStore';
import LeftMenu from 'components/LeftMenu.vue';
import { onMounted } from 'vue';
+import { useQuasar } from 'quasar';
const stateStore = useStateStore();
const $props = defineProps({
@@ -10,7 +11,9 @@ const $props = defineProps({
default: true,
},
});
-onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
+onMounted(
+ () => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false)
+);
diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue
index ca0a3277c..6c72e906c 100644
--- a/src/components/common/VnSelect.vue
+++ b/src/components/common/VnSelect.vue
@@ -38,6 +38,10 @@ const $props = defineProps({
type: [Array],
default: () => [],
},
+ exprBuilder: {
+ type: Function,
+ default: null,
+ },
isClearable: {
type: Boolean,
default: true,
@@ -183,6 +187,7 @@ async function fetchFilter(val) {
}, {});
} else defaultWhere = { [key]: getVal(val) };
const where = { ...(val ? defaultWhere : {}), ...$props.where };
+ $props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
const fetchOptions = { where, include, limit };
if (fields) fetchOptions.fields = fields;
if (sortBy) fetchOptions.order = sortBy;
diff --git a/src/components/common/VnSelectEnum.vue b/src/components/common/VnSelectEnum.vue
new file mode 100644
index 000000000..b9db67c37
--- /dev/null
+++ b/src/components/common/VnSelectEnum.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index 68338a1dc..88bef77f4 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -135,9 +135,8 @@ async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip']);
await arrayData.fetch({ append: false });
- if (!store.hasMoreData) {
- isLoading.value = false;
- }
+ if (!store.hasMoreData) isLoading.value = false;
+
emit('onFetch', store.data);
return store.data;
}
diff --git a/src/composables/usePrintService.js b/src/composables/usePrintService.js
index 68a009d7b..c6c212ad8 100644
--- a/src/composables/usePrintService.js
+++ b/src/composables/usePrintService.js
@@ -1,15 +1,18 @@
import { useSession } from './useSession';
import axios from 'axios';
import { useQuasar } from 'quasar';
+import { useI18n } from 'vue-i18n';
export function usePrintService() {
const quasar = useQuasar();
+ const { t } = useI18n();
+
const { getTokenMultimedia } = useSession();
function sendEmail(path, params) {
return axios.post(path, params).then(() =>
quasar.notify({
- message: 'Notification sent',
+ message: t('globals.notificationSent'),
type: 'positive',
icon: 'check',
})
diff --git a/src/css/app.scss b/src/css/app.scss
index 7841276ce..2e7f3401e 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -278,6 +278,7 @@ input::-webkit-inner-spin-button {
max-width: 400px;
}
}
+
.edit-photo-btn {
position: absolute;
right: 12px;
@@ -290,3 +291,10 @@ input::-webkit-inner-spin-button {
color: var(--vn-label-color);
text-transform: uppercase;
}
+
+.q-date {
+ &__today {
+ border: 2px solid $info;
+ color: $info;
+ }
+}
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index a3443d2b7..a36320e21 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -36,7 +36,6 @@ $color-font-secondary: #777;
.bg-success {
background-color: $positive;
}
-
.bg-notice {
background-color: $info;
}
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 8e621a969..5e46b6a4a 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -108,6 +108,7 @@ globals:
ticket: Ticket
campaign: Campaign
weight: Weight
+ error: Ups! Something went wrong
pageTitles:
logIn: Login
addressEdit: Update address
@@ -906,6 +907,7 @@ supplier:
account: Account
payMethod: Pay Method
payDay: Pay Day
+ country: Country
summary:
responsible: Responsible
notes: Notes
@@ -1079,7 +1081,7 @@ item:
producer: Producer
landed: Landed
fixedPrice:
- itemId: Item ID
+ itemFk: Item ID
groupingPrice: Grouping price
packingPrice: Packing price
hasMinPrice: Has min price
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 3bbb1d0c6..5f8247246 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -110,6 +110,7 @@ globals:
ticket: Ticket
campaign: Campaña
weight: Peso
+ error: ¡Ups! Algo salió mal
pageTitles:
logIn: Inicio de sesión
addressEdit: Modificar consignatario
@@ -167,6 +168,7 @@ globals:
dms: Gestión documental
entryCreate: Nueva entrada
latestBuys: Últimas compras
+ reserves: Reservas
tickets: Tickets
ticketCreate: Nuevo ticket
boxing: Encajado
@@ -890,6 +892,7 @@ supplier:
account: Cuenta
payMethod: Método de pago
payDay: Dia de pago
+ country: País
summary:
responsible: Responsable
notes: Notas
@@ -1063,7 +1066,7 @@ item:
producer: Productor
landed: F. entrega
fixedPrice:
- itemId: ID Artículo
+ itemFk: ID Artículo
groupingPrice: Precio grouping
packingPrice: Precio packing
hasMinPrice: Tiene precio mínimo
diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue
index f38299f9e..f1cdaf9df 100644
--- a/src/pages/Account/Card/AccountBasicData.vue
+++ b/src/pages/Account/Card/AccountBasicData.vue
@@ -2,6 +2,7 @@
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import VnSelect from 'src/components/common/VnSelect.vue';
+import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
import FormModel from 'components/FormModel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import { ref, watch } from 'vue';
@@ -24,7 +25,7 @@ watch(
+
diff --git a/src/pages/Account/Role/Card/SubRoles.vue b/src/pages/Account/Role/Card/SubRoles.vue
index 7a0088bac..d17f96dd8 100644
--- a/src/pages/Account/Role/Card/SubRoles.vue
+++ b/src/pages/Account/Role/Card/SubRoles.vue
@@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) =>
-
+
{{ t('warehouses.add') }}
diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml
index 3cf861fb2..fe8707eb8 100644
--- a/src/pages/Account/locale/en.yml
+++ b/src/pages/Account/locale/en.yml
@@ -35,6 +35,7 @@ account:
willDeactivated: User will be deactivated
activated: User activated!
deactivated: User deactivated!
+ twoFactor: Two factor
actions:
setPassword: Set password
disableAccount:
diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml
index b53a0153c..112ffe9cc 100644
--- a/src/pages/Account/locale/es.yml
+++ b/src/pages/Account/locale/es.yml
@@ -32,6 +32,7 @@ account:
activated: ¡Usuario activado!
deactivated: ¡Usuario desactivado!
newUser: Nuevo usuario
+ twoFactor: Doble factor
privileges:
delegate: Puede delegar privilegios
actions:
diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue
index b1d3e24cd..63b0b7c0d 100644
--- a/src/pages/Claim/Card/ClaimBasicData.vue
+++ b/src/pages/Claim/Card/ClaimBasicData.vue
@@ -3,58 +3,18 @@ import { ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import VnSelect from 'src/components/common/VnSelect.vue';
+import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
-import axios from 'axios';
import VnAvatar from 'src/components/ui/VnAvatar.vue';
const route = useRoute();
const { t } = useI18n();
-
-const claimStates = ref([]);
-const claimStatesCopy = ref([]);
-const optionsList = ref([]);
-
const workersOptions = ref([]);
-
-function setClaimStates(data) {
- claimStates.value = data;
- claimStatesCopy.value = data;
-}
-
-async function getEnumValues() {
- optionsList.value = [{ id: null, description: t('claim.null') }];
- const { data } = await axios.get(`Applications/get-enum-values`, {
- params: {
- schema: 'vn',
- table: 'claim',
- column: 'pickup',
- },
- });
- for (let value of data)
- optionsList.value.push({ id: value, description: t(`claim.${value}`) });
-}
-
-getEnumValues();
-
-const statesFilter = {
- options: claimStates,
- filterFn: (options, value) => {
- const search = value.toLowerCase();
-
- if (value === '') return claimStatesCopy.value;
-
- return options.value.filter((row) => {
- const description = row.description.toLowerCase();
-
- return description.indexOf(search) > -1;
- });
- },
-};
-
+
- filter(value, update, statesFilter)"
+ option-label="description"
:rules="validate('claim.claimStateFk')"
:input-debounce="0"
- >
-
+ />
-
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index 77c7dacf1..60c470d22 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -317,7 +317,7 @@ async function saveWhenHasChanges() {
-
+
diff --git a/src/pages/Claim/Card/ClaimPhoto.vue b/src/pages/Claim/Card/ClaimPhoto.vue
index 21f1be6ed..ec619cc7d 100644
--- a/src/pages/Claim/Card/ClaimPhoto.vue
+++ b/src/pages/Claim/Card/ClaimPhoto.vue
@@ -246,7 +246,13 @@ function onDrag() {
diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index d0898a798..8b15e5261 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -206,6 +206,18 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
>
{{ t('Go to user') }}
+
+ {{ t('Go to supplier') }}
+
@@ -220,6 +232,7 @@ es:
Customer ticket list: Listado de tickets del cliente
Customer invoice out list: Listado de facturas del cliente
Go to user: Ir al usuario
+ Go to supplier: Ir al proveedor
Customer unpaid: Cliente impago
Unpaid: Impagado
unpaidDated: 'Fecha {dated}'
diff --git a/src/pages/Customer/Card/CustomerFileManagement.vue b/src/pages/Customer/Card/CustomerFileManagement.vue
index 43aacf6a0..134d8dbd6 100644
--- a/src/pages/Customer/Card/CustomerFileManagement.vue
+++ b/src/pages/Customer/Card/CustomerFileManagement.vue
@@ -236,6 +236,7 @@ const toCustomerFileManagementCreate = () => {
@click.stop="toCustomerFileManagementCreate()"
color="primary"
fab
+ shortcut="+"
icon="add"
/>
diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue
index d8c07a46f..300d275c0 100644
--- a/src/pages/Customer/Card/CustomerFiscalData.vue
+++ b/src/pages/Customer/Card/CustomerFiscalData.vue
@@ -134,15 +134,17 @@ function handleLocation(data, location) {
-
+
-
diff --git a/src/pages/Customer/Card/CustomerSamples.vue b/src/pages/Customer/Card/CustomerSamples.vue
index 8e2ab92a0..f12691112 100644
--- a/src/pages/Customer/Card/CustomerSamples.vue
+++ b/src/pages/Customer/Card/CustomerSamples.vue
@@ -99,7 +99,13 @@ const tableRef = ref();
-
+
{{ t('Send sample') }}
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index 043bcdadb..6c50cc9df 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -1,35 +1,20 @@
- (provinces = data)" auto-load />
- (zones = data)" auto-load />
- (workers = data)"
- auto-load
- />
-
+
{{ t(`params.${tag.label}`) }}:
@@ -65,15 +50,14 @@ const zones = ref();
-
-
-
-
+
-
-
-
-
-
@@ -135,25 +117,21 @@ const zones = ref();
-
-
-
-
-
-
+
diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue
index f6758bf4e..5e24a1c2d 100644
--- a/src/pages/Customer/CustomerList.vue
+++ b/src/pages/Customer/CustomerList.vue
@@ -8,10 +8,10 @@ import VnLocation from 'src/components/common/VnLocation.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import CustomerSummary from './Card/CustomerSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
-
+import RightMenu from 'src/components/common/RightMenu.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
-
import { toDate } from 'src/filters';
+import CustomerFilter from './CustomerFilter.vue';
const { t } = useI18n();
const router = useRouter();
@@ -397,6 +397,11 @@ function handleLocation(data, location) {
:label="t('Search customer')"
data-key="Customer"
/>
+
+
+
+
+
@@ -423,9 +429,10 @@ function handleLocation(data, location) {
:params="{
departmentCodes: ['VT', 'shopping'],
}"
+ option-label="nickname"
+ option-value="id"
:fields="['id', 'nickname']"
sort-by="nickname ASC"
- :use-like="false"
emit-value
auto-load
>
diff --git a/src/pages/Customer/components/CustomerAddressCreate.vue b/src/pages/Customer/components/CustomerAddressCreate.vue
index 7826c3579..659114744 100644
--- a/src/pages/Customer/components/CustomerAddressCreate.vue
+++ b/src/pages/Customer/components/CustomerAddressCreate.vue
@@ -134,6 +134,7 @@ function handleLocation(data, location) {
option-label="fiscalName"
option-value="id"
v-model="data.customsAgentFk"
+ :tooltip="t('Create a new expense')"
>
diff --git a/src/pages/Customer/components/CustomerAddressEdit.vue b/src/pages/Customer/components/CustomerAddressEdit.vue
index 2252a96dc..606867388 100644
--- a/src/pages/Customer/components/CustomerAddressEdit.vue
+++ b/src/pages/Customer/components/CustomerAddressEdit.vue
@@ -11,7 +11,7 @@ import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
-import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
+import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
const { t } = useI18n();
const route = useRoute();
@@ -226,9 +226,10 @@ function handleLocation(data, location) {
option-label="fiscalName"
option-value="id"
v-model="data.customsAgentFk"
+ :tooltip="t('New customs agent')"
>
-
+
@@ -272,16 +273,17 @@ function handleLocation(data, location) {
-
{{ t('Add note') }}
-
+
@@ -308,6 +310,7 @@ es:
Mobile: Movíl
Incoterms: Incoterms
Customs agent: Agente de aduanas
+ New customs agent: Nuevo agente de aduanas
Notes: Notas
Observation type: Tipo de observación
Description: Descripción
diff --git a/src/pages/Customer/components/CustomerChangePassword.vue b/src/pages/Customer/components/CustomerChangePassword.vue
index 1bfc5e103..d92a10c5c 100644
--- a/src/pages/Customer/components/CustomerChangePassword.vue
+++ b/src/pages/Customer/components/CustomerChangePassword.vue
@@ -46,7 +46,6 @@ const onSubmit = async () => {
};
try {
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
- await $props.promise();
} catch (error) {
notify('errors.create', 'negative');
} finally {
diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue
index 374769a57..946296e67 100644
--- a/src/pages/Customer/components/CustomerSummaryTable.vue
+++ b/src/pages/Customer/components/CustomerSummaryTable.vue
@@ -35,6 +35,7 @@ const filter = {
],
where: { clientFk: route.params.id },
order: ['shipped DESC', 'id'],
+ limit: 30,
};
const columns = computed(() => [
@@ -149,7 +150,6 @@ const setShippedColor = (date) => {
auto-load
order="shipped DESC, id"
:disable-option="{ card: true, table: true }"
- limit="5"
class="full-width"
:disable-infinite-scroll="true"
>
diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml
index 4fcbe3fa2..451784425 100644
--- a/src/pages/Customer/locale/es.yml
+++ b/src/pages/Customer/locale/es.yml
@@ -58,7 +58,7 @@ customer:
vies: VIES
payMethod: Método de pago
bankAccount: Cuenta bancaria
- dueDay: Día de pago
+ dueDay: Vencimiento
hasLcr: Recibido LCR
hasCoreVnl: Recibido core VNL
hasB2BVnl: Recibido B2B VNL
diff --git a/src/pages/Entry/Card/EntryNotes.vue b/src/pages/Entry/Card/EntryNotes.vue
index f07d0b233..55cac0437 100644
--- a/src/pages/Entry/Card/EntryNotes.vue
+++ b/src/pages/Entry/Card/EntryNotes.vue
@@ -138,7 +138,13 @@ const columns = computed(() => [
-
+
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index 379be1d2f..58a5c2e1b 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
import { toDate, toCurrency } from 'src/filters';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
+import FetchedTags from 'src/components/ui/FetchedTags.vue';
const route = useRoute();
const { t } = useI18n();
@@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
>
-
+
{
{
{
>
-
+
{{ col.value }}
diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue
index 7c4354b65..61c430b23 100644
--- a/src/pages/Entry/EntryLatestBuys.vue
+++ b/src/pages/Entry/EntryLatestBuys.vue
@@ -1,16 +1,17 @@
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
index 5b4d43e06..4750a8417 100644
--- a/src/pages/Entry/EntryStockBought.vue
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -54,10 +54,9 @@ const columns = [
create: true,
component: 'number',
summation: true,
- cardVisible: true,
},
{
- align: 'left',
+ align: 'center',
label: t('Bought'),
name: 'bought',
summation: true,
@@ -101,14 +100,9 @@ const travel = ref(null);
const userParams = ref({
dated: Date.vnNew(),
});
+
const filter = ref({
- where: {
- shipped: (userParams.value.dated
- ? new Date(userParams.value.dated)
- : Date.vnNew()
- ).setHours(0, 0, 0, 0),
- m3: { neq: null },
- },
+ fields: ['id', 'm3', 'warehouseInFk'],
include: [
{
relation: 'warehouseIn',
@@ -117,6 +111,13 @@ const filter = ref({
},
},
],
+ where: {
+ shipped: (userParams.value.dated
+ ? new Date(userParams.value.dated)
+ : Date.vnNew()
+ ).setHours(0, 0, 0, 0),
+ m3: { neq: null },
+ },
});
const setUserParams = async ({ dated }) => {
@@ -128,6 +129,18 @@ const setUserParams = async ({ dated }) => {
function openDialog() {
travelDialogRef.value = true;
}
+
+function setFooter(data) {
+ const footer = {
+ bought: 0,
+ reserve: 0,
+ };
+ data.forEach((row) => {
+ footer.bought += row?.bought;
+ footer.reserve += row?.reserve;
+ });
+ tableRef.value.footer = footer;
+}
@@ -139,7 +152,7 @@ function openDialog() {
:filter="filter"
@on-fetch="
(data) => {
- travel = data.filter((data) => data.warehouseIn.code === 'VNH');
+ travel = data.find((data) => data.warehouseIn.code === 'VNH');
}
"
/>
@@ -149,10 +162,10 @@ function openDialog() {
{{ t('Booked trucks') }}:
- {{ travel[0]?.m3 }}
+ {{ travel?.m3 }}
@@ -192,51 +205,80 @@ function openDialog() {
/>
-
-
-
-
- {{ row?.worker?.user?.name }}
-
-
-
-
-
+
+
+ setFooter(data)"
+ :create="{
+ urlCreate: 'StockBoughts',
+ title: t('Reserve some space'),
+ onDataSaved: () => tableRef.reload(),
+ formInitialData: {
+ workerFk: user.id,
+ dated: Date.vnNow(),
+ },
+ }"
+ :columns="columns"
+ :user-params="userParams"
+ :footer="true"
+ auto-load
+ >
+
+
+ {{ row?.worker?.user?.name }}
+
+
+
+
+
+ {{ row?.bought }}
+
+
+
+
+ {{ tableRef.footer.reserve }}
+
+
+
+
+ {{ tableRef.footer.bought }}
+
+
+
+
+
-
- en:
- Buyer: Buyer
- Reserve: Reserve
- Bought: Bought
- More: More
- Date: Date
- This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
es:
Edit travel: Editar envío
Travel: Envíos
diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue
index 744b9d3fe..2c1a5a47e 100644
--- a/src/pages/Entry/EntryStockBoughtDetail.vue
+++ b/src/pages/Entry/EntryStockBoughtDetail.vue
@@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
const columns = [
{
align: 'left',
- label: 'Entry',
+ label: t('Entry'),
name: 'entryFk',
isTitle: true,
isId: true,
@@ -41,29 +41,33 @@ const columns = [
create: true,
columnClass: 'expand',
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
name: 'volume',
label: t('Volume'),
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
label: t('Packaging'),
name: 'packagingFk',
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
label: 'Packing',
name: 'packing',
columnFilter: false,
+ cardVisible: true,
},
];
-
+
+
+
+
-
+
{{ row?.entryFk }}
-
+
{{ row?.itemName }}
@@ -93,11 +105,10 @@ const columns = [
-
diff --git a/src/pages/Monitor/MonitorOrders.vue b/src/pages/Monitor/MonitorOrders.vue
index eb455a239..52d442d0a 100644
--- a/src/pages/Monitor/MonitorOrders.vue
+++ b/src/pages/Monitor/MonitorOrders.vue
@@ -132,7 +132,6 @@ const openTab = (id) =>
:table="{
'row-key': 'id',
selection: 'multiple',
- 'hide-bottom': true,
}"
default-mode="table"
:row-click="({ id }) => openTab(id)"
diff --git a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
index 3c95f5cdd..57248d580 100644
--- a/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
+++ b/src/pages/Monitor/Ticket/MonitorTicketFilter.vue
@@ -11,7 +11,7 @@ import FetchData from 'src/components/FetchData.vue';
import { dateRange } from 'src/filters';
defineProps({ dataKey: { type: String, required: true } });
-const { t } = useI18n();
+const { t, te } = useI18n();
const warehouses = ref();
const groupedStates = ref();
@@ -26,6 +26,12 @@ const handleScopeDays = (params, days, callback) => {
}
if (callback) callback();
};
+
+const getLocale = (label) => {
+ const param = label.split('.').at(-1);
+ const globalLocale = `globals.params.${param}`;
+ return te(globalLocale) ? t(globalLocale) : t(`params.${param}`);
+};
(warehouses = data)" />
@@ -43,10 +49,11 @@ const handleScopeDays = (params, days, callback) => {
:hidden-tags="['from', 'to', 'search']"
:custom-tags="['scopeDays']"
:unremovable-params="['from', 'to', 'scopeDays']"
+ search-url="saleMonitorTickets"
>
-
+
@@ -110,7 +117,7 @@ const handleScopeDays = (params, days, callback) => {
url="Workers/search"
:params="{ departmentCodes: ['VT'] }"
is-outlined
- option-value="code"
+ option-value="id"
option-label="name"
:no-one="true"
>
diff --git a/src/pages/Monitor/Ticket/MonitorTickets.vue b/src/pages/Monitor/Ticket/MonitorTickets.vue
index 258b5022f..16d5abffb 100644
--- a/src/pages/Monitor/Ticket/MonitorTickets.vue
+++ b/src/pages/Monitor/Ticket/MonitorTickets.vue
@@ -54,7 +54,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.problems'),
name: 'totalProblems',
align: 'left',
-
columnFilter: false,
attrs: {
dense: true,
@@ -65,7 +64,6 @@ const columns = computed(() => [
name: 'id',
field: 'id',
align: 'left',
-
columnFilter: {
component: 'number',
name: 'id',
@@ -108,9 +106,7 @@ const columns = computed(() => [
{
label: t('salesTicketsTable.date'),
name: 'shippedDate',
- style: { 'max-width': '100px' },
align: 'left',
-
columnFilter: {
component: 'date',
name: 'shippedDate',
@@ -164,7 +160,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.state'),
name: 'state',
align: 'left',
- style: { 'max-width': '100px' },
columnFilter: {
component: 'select',
name: 'stateFk',
@@ -193,7 +188,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.zone'),
name: 'zoneFk',
align: 'left',
-
columnFilter: {
component: 'select',
name: 'zoneFk',
@@ -210,8 +204,6 @@ const columns = computed(() => [
name: 'totalWithVat',
field: 'totalWithVat',
align: 'left',
- style: { 'max-width': '75px' },
-
columnFilter: {
component: 'number',
name: 'totalWithVat',
@@ -370,7 +362,7 @@ const openTab = (id) =>
-
+
>
{{ $t('salesTicketsTable.tooLittle') }}
-
+
-
-
- {{ row.id }}
-
-
-
+
+ {{ row.id }}
+
+
-
- {{ row.nickname }}
+
+
-
+
-
+
-
+
-
-
- {{ formatShippedDate(row.shippedDate) }}
-
-
+
+ {{ formatShippedDate(row.shippedDate) }}
+
-
-
-
+
-
+
{{ row.refFk }}
@@ -477,32 +463,33 @@ const openTab = (id) =>
>
{{ row.state }}
-
+
-
-
- {{ $t('salesTicketsTable.isFragile') }}
-
-
+
+ {{ $t('salesTicketsTable.isFragile') }}
+
-
+
{{ row.zoneName }}
-
+
-
-
- {{ toCurrency(row.totalWithVat) }}
-
-
+
+ {{ toCurrency(row.totalWithVat) }}
+
+
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
index 938cc4fe2..354c44747 100644
--- a/src/pages/Order/Card/OrderCatalogFilter.vue
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -374,8 +374,10 @@ function addOrder(value, field, params) {
/>
-
diff --git a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
index 3531ad288..1f3cab5d0 100644
--- a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
+++ b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue
@@ -88,7 +88,7 @@ async function deleteWorCenter(id) {
-
+
es:
Carrier: Transportista
- Tractor Plate: Matrícula tractor
- Trailer Plate: Matrícula trailer
+ Tractor Plate: Matrícula tractora
+ Trailer Plate: Matrícula remolque
Phone: Teléfono
Worker: Trabajador
Observations: Observaciones
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index 306387cbe..d921dab1f 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -237,4 +237,5 @@ es:
Price: Precio
Observations: Observaciones
Preview: Vista previa
+ Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
index 9356f7590..5960636b0 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -396,7 +396,7 @@ const openSmsDialog = async () => {
-
+
{{ t('Add ticket') }}
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index b0e8b06e8..f8fbba0e4 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -102,9 +102,7 @@ const setWireTransfer = async () => {
- {{
- t('components.iban_tooltip')
- }}
+ {{ t('components.iban_tooltip') }}
@@ -165,9 +163,10 @@ const setWireTransfer = async () => {
- {
{{ t('Add account') }}
-
+
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
index 35e8b98fc..3f2063784 100644
--- a/src/pages/Supplier/Card/SupplierContacts.vue
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -84,9 +84,10 @@ const insertRow = () => {
- {
{{ t('Add contact') }}
-
+
diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue
index 6e60a336c..5754031b3 100644
--- a/src/pages/Supplier/Card/SupplierDescriptor.vue
+++ b/src/pages/Supplier/Card/SupplierDescriptor.vue
@@ -109,7 +109,7 @@ const getEntryQueryParams = (supplier) => {
:subtitle="data.subtitle"
:filter="filter"
@on-fetch="setData"
- data-key="supplier"
+ data-key="supplierDescriptor"
:summary="$props.summary"
>
diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue
index d8404632c..ad668f0c0 100644
--- a/src/pages/Supplier/SupplierList.vue
+++ b/src/pages/Supplier/SupplierList.vue
@@ -75,6 +75,19 @@ const columns = computed(() => [
},
visible: false,
},
+ {
+ align: 'left',
+ label: t('supplier.list.tableVisibleColumns.country'),
+ name: 'country',
+ columnFilter: {
+ component: 'select',
+ name: 'countryFk',
+ attrs: {
+ url: 'countries',
+ fields: ['id', 'name'],
+ },
+ },
+ },
]);
diff --git a/src/pages/Ticket/Card/TicketNotes.vue b/src/pages/Ticket/Card/TicketNotes.vue
index cfc0c2431..1b9d98a8b 100644
--- a/src/pages/Ticket/Card/TicketNotes.vue
+++ b/src/pages/Ticket/Card/TicketNotes.vue
@@ -87,17 +87,18 @@ watch(
-
{{ t('ticketNotes.addNote') }}
-
+
diff --git a/src/pages/Ticket/Card/TicketPackage.vue b/src/pages/Ticket/Card/TicketPackage.vue
index a76fce2b6..c071d4f7f 100644
--- a/src/pages/Ticket/Card/TicketPackage.vue
+++ b/src/pages/Ticket/Card/TicketPackage.vue
@@ -114,17 +114,20 @@ watch(
-
-
- {{ t('package.addPackage') }}
-
-
+
+
+
+ {{ t('package.addPackage') }}
+
+
+
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index 02f9c59c5..7cdee7847 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -736,6 +736,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
size="md"
round
flat
+ shortcut="+"
:disable="!isTicketEditable"
@click="insertRow()"
>
@@ -747,7 +748,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
-
+
{{ t('Add item to basket') }}
diff --git a/src/pages/Ticket/Card/TicketService.vue b/src/pages/Ticket/Card/TicketService.vue
index 63dd454ba..873051676 100644
--- a/src/pages/Ticket/Card/TicketService.vue
+++ b/src/pages/Ticket/Card/TicketService.vue
@@ -184,6 +184,12 @@ const columns = computed(() => [
-
+
diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml
index 5db64da6f..3fcaba0bd 100644
--- a/src/pages/Ticket/locale/en.yml
+++ b/src/pages/Ticket/locale/en.yml
@@ -40,6 +40,7 @@ ticketSale:
address: Address
transferLines: Transfer lines
advanceTickets:
+ preparation: Preparation
origin: Origin
destination: Destination
originAgency: 'Origin agency: {agency}'
diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml
index 4b246df3a..106b6c487 100644
--- a/src/pages/Ticket/locale/es.yml
+++ b/src/pages/Ticket/locale/es.yml
@@ -86,6 +86,7 @@ weeklyTickets:
search: Buscar por tickets programados
searchInfo: Buscar tickets programados por el identificador o el identificador del cliente
advanceTickets:
+ preparation: Preparación
origin: Origen
destination: Destinatario
originAgency: 'Agencia origen: {agency}'
diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue
index 7f40873b1..4f16b0a49 100644
--- a/src/pages/Travel/Card/TravelThermographsForm.vue
+++ b/src/pages/Travel/Card/TravelThermographsForm.vue
@@ -28,18 +28,8 @@ const route = useRoute();
const router = useRouter();
const state = useState();
const { notify } = useNotify();
-
-const thermographFilter = {
- fields: ['thermographFk'],
- where: {
- travelFk: null,
- },
- order: 'thermographFk ASC',
-};
-const fetchTravelThermographsRef = ref(null);
const allowedContentTypes = ref('');
const user = state.getUser();
-const thermographsOptions = ref([]);
const dmsTypesOptions = ref([]);
const companiesOptions = ref([]);
const warehousesOptions = ref([]);
@@ -168,24 +158,15 @@ const updateThermograph = async () => {
};
const onThermographCreated = async (data) => {
- await fetchTravelThermographsRef.value.fetch();
- thermographForm.thermographId = data.thermographId;
+ thermographForm.thermographId = data.id;
};
-
(allowedContentTypes = data.join(', '))"
auto-load
/>
- (thermographsOptions = data)"
- :filter="thermographFilter"
- auto-load
- />
{
(thermographForm.thermographId = data.id)
+ "
/>
@@ -323,7 +309,6 @@ const onThermographCreated = async (data) => {
-
es:
Select files: Selecciona ficheros
diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue
index a8bbde75b..75b744168 100644
--- a/src/pages/Travel/ExtraCommunityFilter.vue
+++ b/src/pages/Travel/ExtraCommunityFilter.vue
@@ -112,6 +112,7 @@ warehouses();
$props.id || route.params.id);
+
+onMounted(async () => {
+ stateStore.rightDrawer = true;
+ handleScopeDays();
+});
+
const cloneTravel = (travelData) => {
const stringifiedTravelData = JSON.stringify(travelData);
redirectToCreateView(stringifiedTravelData);
};
+function handleScopeDays(days = 7) {
+ days = +days;
+ tableRef.value.params.scopeDays = days;
+ const [landedFrom, landedTo] = dateRange(Date.vnNew());
+ landedTo.setDate(landedTo.getDate() + days);
+
+ tableRef.value.params.landedFrom = landedFrom;
+ tableRef.value.params.landedTo = landedTo;
+}
+
const redirectToCreateView = (queryParams) => {
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
};
@@ -37,10 +56,6 @@ const redirectCreateEntryView = (travelData) => {
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
};
-onMounted(async () => {
- stateStore.rightDrawer = true;
-});
-
const columns = computed(() => [
{
align: 'left',
@@ -241,6 +256,17 @@ const columns = computed(() => [
:class="{ 'is-active': row.isReceived }"
/>
+
+ handleScopeDays(evt.target.value)"
+ @remove="handleScopeDays()"
+ class="q-px-xs q-pr-lg"
+ filled
+ dense
+ />
+
diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue
index 2f0d55fbe..c0943c58e 100644
--- a/src/pages/Wagon/Type/WagonTypeList.vue
+++ b/src/pages/Wagon/Type/WagonTypeList.vue
@@ -103,7 +103,7 @@ async function remove(row) {
url-create="WagonTypes"
model="WagonType"
:form-initial-data="initialData"
- @on-data-saved="window.location.reload()"
+ @on-data-saved="tableRef.reload()"
auto-load
>
diff --git a/src/pages/Wagon/WagonList.vue b/src/pages/Wagon/WagonList.vue
index 129e803f5..02e3b6d16 100644
--- a/src/pages/Wagon/WagonList.vue
+++ b/src/pages/Wagon/WagonList.vue
@@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import VnTable from 'src/components/VnTable/VnTable.vue';
-import { computed } from 'vue';
+import { computed, ref } from 'vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
@@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
const store = arrayData.store;
const router = useRouter();
const { t } = useI18n();
-
+const tableRef = ref();
const filter = {
include: {
relation: 'type',
@@ -107,9 +107,7 @@ async function remove(row) {
:create="{
urlCreate: 'Wagons',
title: t('Create new wagon'),
- onDataSaved: () => {
- window.location.reload();
- },
+ onDataSaved: () => tableRef.reload(),
formInitialData: {},
}"
>
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index be30537df..3675d40f8 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -152,7 +152,11 @@ const refetch = async () => await cardDescriptorRef.value.getData();
-
+
-import { ref, onMounted, computed } from 'vue';
+import { ref, onBeforeMount, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
+import axios from 'axios';
import { dashIfEmpty, toDate } from 'src/filters';
-import { getUrl } from 'src/composables/getUrl';
import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import CardSummary from 'components/ui/CardSummary.vue';
@@ -11,6 +11,7 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
+import { useRole } from 'src/composables/useRole';
const route = useRoute();
const { t } = useI18n();
@@ -23,64 +24,27 @@ const $props = defineProps({
});
const entityId = computed(() => $props.id || route.params.id);
-const workerUrl = ref();
+const basicDataUrl = ref(null);
+const isHr = computed(() => useRole().hasAny(['hr']));
+const advancedSummary = ref();
-onMounted(async () => {
- workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
+onBeforeMount(async () => {
+ if (isHr.value) {
+ advancedSummary.value = (
+ await axios.get('Workers/advancedSummary', {
+ params: { filter: { where: { id: entityId.value } } },
+ })
+ ).data[0];
+ basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
+ }
});
-
-const filter = {
- include: [
- {
- relation: 'user',
- scope: {
- fields: ['name', 'nickname', 'roleFk'],
-
- include: [
- {
- relation: 'role',
- scope: {
- fields: ['name'],
- },
- },
- {
- relation: 'emailUser',
- scope: {
- fields: ['email'],
- },
- },
- ],
- },
- },
- {
- relation: 'department',
- scope: {
- include: {
- relation: 'department',
- scope: {
- fields: ['name'],
- },
- },
- },
- },
- {
- relation: 'boss',
- },
- {
- relation: 'client',
- },
- {
- relation: 'sip',
- },
- ],
-};
@@ -88,10 +52,7 @@ const filter = {
-
+
@@ -128,13 +89,9 @@ const filter = {
-
-
-
+
+
-
{
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
-
{{ t('Add time') }}
-
+
diff --git a/src/pages/Worker/WorkerDepartmentTree.vue b/src/pages/Worker/WorkerDepartmentTree.vue
index 392539c86..c73cb59b9 100644
--- a/src/pages/Worker/WorkerDepartmentTree.vue
+++ b/src/pages/Worker/WorkerDepartmentTree.vue
@@ -180,17 +180,18 @@ function handleEvent(type, event, node) {
{{ t('Remove') }}
-
{{ t('Create') }}
-
+
diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue
index 512d07636..535f2393d 100644
--- a/src/pages/Zone/Card/ZoneBasicData.vue
+++ b/src/pages/Zone/Card/ZoneBasicData.vue
@@ -64,6 +64,15 @@ const agencyOptions = ref([]);
type="number"
min="0"
/>
+
+
@@ -128,4 +137,5 @@ es:
Bonus: Bonificación
Inflation: Inflación
Volumetric: Volumétrico
+ Max length m³: Medida máxima tumbado
diff --git a/src/pages/Zone/Delivery/ZoneDeliveryList.vue b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
index ca87dbd84..975cbdb67 100644
--- a/src/pages/Zone/Delivery/ZoneDeliveryList.vue
+++ b/src/pages/Zone/Delivery/ZoneDeliveryList.vue
@@ -74,7 +74,7 @@ async function remove(row) {
-
+
diff --git a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue
index 89e53132e..5a7f0bb4c 100644
--- a/src/pages/Zone/Upcoming/ZoneUpcomingList.vue
+++ b/src/pages/Zone/Upcoming/ZoneUpcomingList.vue
@@ -74,7 +74,7 @@ async function remove(row) {
-
+
diff --git a/test/cypress/integration/claim/claimDevelopment.spec.js b/test/cypress/integration/claim/claimDevelopment.spec.js
index 3b73a24d9..81fc33ecd 100755
--- a/test/cypress/integration/claim/claimDevelopment.spec.js
+++ b/test/cypress/integration/claim/claimDevelopment.spec.js
@@ -37,7 +37,7 @@ describe('ClaimDevelopment', () => {
cy.wait(['@workers', '@workers']);
cy.addCard();
- cy.get(thirdRow).should('exist');
+ cy.waitForElement(thirdRow);
const rowData = [
false,
diff --git a/test/cypress/integration/entry/stockBought.spec.js b/test/cypress/integration/entry/stockBought.spec.js
index b93afa520..66e06b79e 100644
--- a/test/cypress/integration/entry/stockBought.spec.js
+++ b/test/cypress/integration/entry/stockBought.spec.js
@@ -6,7 +6,6 @@ describe('EntryStockBought', () => {
});
it('Should edit the reserved space', () => {
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
- cy.get('tBody > tr').its('length').should('eq', 2);
cy.get('input[name="reserve"]').type('10{enter}');
cy.get('button[title="Save"]').click();
cy.get('.q-notification__message').should('have.text', 'Data saved');
@@ -18,7 +17,6 @@ describe('EntryStockBought', () => {
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
cy.get('.q-notification__message').should('have.text', 'Data created');
- cy.get('tBody > tr').its('length').should('eq', 3);
});
it('Should check detail for the buyer', () => {
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 3533a3c1f..1872d3591 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -34,22 +34,25 @@ describe('VnLocation', () => {
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
cy.waitForElement('.q-form');
});
- it('Fin by postalCode', () => {
+ it('Find by postalCode', () => {
const postCode = '46600';
+ const postCodeLabel = '46600, Valencia(Province one), España';
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type(postCode);
- cy.get(locationOptions).should('have.length.at.least', 2);
+ cy.get(locationOptions)
+ .get(':nth-child(1)')
+ .should('have.length.at.least', 2);
+ cy.get(
+ firstOption.concat(' > .q-item__section > .q-item__label--caption')
+ ).should('have.text', postCodeLabel);
cy.get(firstOption).click();
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
cy.reload();
cy.waitForElement('.q-form');
- cy.get(inputLocation).should(
- 'have.value',
- '46600 - Valencia(Province one), España'
- );
+ cy.get(inputLocation).should('have.value', postCodeLabel);
});
it('Create postCode', () => {
diff --git a/test/cypress/integration/wagon/wagonCreate.spec.js b/test/cypress/integration/wagon/wagonCreate.spec.js
index 9aff3a819..cd248d1bb 100644
--- a/test/cypress/integration/wagon/wagonCreate.spec.js
+++ b/test/cypress/integration/wagon/wagonCreate.spec.js
@@ -11,7 +11,9 @@ describe('WagonCreate', () => {
cy.get('input').eq(1).type('1234ABCD');
cy.get('input').eq(2).type('100');
cy.get('input').eq(3).click();
- cy.get('div[role="listbox"]').find('div.q-item').click();
+ cy.get('.q-select > .q-field__inner > .q-field__control').type(
+ '{downarrow}{enter}'
+ );
// Save
cy.get('button[type="submit"]').click();
@@ -19,12 +21,22 @@ describe('WagonCreate', () => {
// Check data has been saved successfully
cy.waitForElement('.q-card');
- cy.get('.title').should('have.text', '1234');
- cy.get('[title-label="Plate"] > .value > span').should('have.text', '1234ABCD');
- cy.get(':nth-child(2) > .value > span').should('have.text', '100');
- cy.get(':nth-child(3) > .value > span').should('have.text', 'Wagon Type #1');
+ cy.get(
+ '[to="/null/1"] > .q-card > .no-padding > .q-py-none > .cursor-text'
+ ).should('have.text', '1234');
+ cy.get(
+ '[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(1) > .vn-label-value > .value > :nth-child(1) > .row > span'
+ ).should('have.text', '1234ABCD');
+ cy.get(
+ '[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(2) > .vn-label-value > .value > :nth-child(1) > .row > span'
+ ).should('have.text', '100');
+ cy.get(
+ '[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(3) > .vn-label-value > .value > :nth-child(1) > .row > span'
+ ).should('have.text', 'Wagon Type #1');
// Delete wagon type created
- cy.get('.actions > .q-btn--standard').click();
+ cy.get(
+ '[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
+ ).click();
});
});
diff --git a/test/cypress/integration/wagonType/wagonTypeCreate.spec.js b/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
index cd7ffa58f..0ad98e597 100644
--- a/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
+++ b/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
@@ -13,7 +13,7 @@ describe('WagonTypeCreate', () => {
});
it('delete a wagon type', () => {
cy.get(
- ':nth-child(2) > :nth-child(1) > .card-list-body > .actions > .q-btn--standard'
+ '[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
).click();
});
});
diff --git a/test/cypress/integration/wagonType/wagonTypeEdit.spec.js b/test/cypress/integration/wagonType/wagonTypeEdit.spec.js
index 6e5816e51..36dd83411 100644
--- a/test/cypress/integration/wagonType/wagonTypeEdit.spec.js
+++ b/test/cypress/integration/wagonType/wagonTypeEdit.spec.js
@@ -4,7 +4,7 @@ describe('WagonTypeEdit', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
- cy.visit('/#/wagon/type/2/edit');
+ cy.visit('/#/wagon/type/1/edit');
});
it('should edit the name and the divisible field of the wagon type', () => {
@@ -14,14 +14,14 @@ describe('WagonTypeEdit', () => {
cy.get('.q-btn--standard').click();
});
- it('should create a tray', () => {
- cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').click();
- cy.get('input').last().type('150');
- cy.get(trayColorRow).type('{downArrow}{downArrow}{enter}');
- });
-
it('should delete a tray', () => {
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
cy.reload();
});
+
+ it('should create a tray', () => {
+ cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').last().click();
+ cy.get('input').last().type('150');
+ cy.get(trayColorRow).type('{downArrow}{downArrow}{downArrow}{enter}');
+ });
});
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index a9a405313..43788f59f 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -140,6 +140,7 @@ Cypress.Commands.add('removeCard', () => {
});
Cypress.Commands.add('addCard', () => {
cy.waitForElement('tbody');
+ cy.waitForElement('.q-page-sticky > div > .q-btn');
cy.get('.q-page-sticky > div > .q-btn').click();
});
Cypress.Commands.add('clickConfirm', () => {