setFooter(data)"
- :create="{
- urlCreate: 'StockBoughts',
- title: t('entryStockBought.reserveSomeSpace'),
- onDataSaved: () => tableRef.reload(),
- formInitialData: {
- workerFk: user.id,
- dated: Date.vnNow(),
- },
- }"
+ @on-fetch="
+ async (data) => {
+ setFooter(data);
+ await fetchDataRef.fetch();
+ }
+ "
:columns="columns"
- :user-params="userParams"
:footer="true"
table-height="80vh"
- auto-load
:column-search="false"
:without-header="true"
+ :user-params="{ dated: Date.vnNew() }"
+ auto-load
>
@@ -253,24 +251,14 @@ function round(value) {
-
-
- {{ row?.bought }}
-
-
- {{ round(tableRef.footer.reserve) }}
+ {{ round(footer.reserve) }}
-
- {{ round(tableRef.footer.bought) }}
+
+ {{ round(footer.bought) }}
@@ -286,11 +274,8 @@ function round(value) {
justify-content: center;
}
.column {
- min-width: 40%;
+ min-width: 35%;
margin-top: 5%;
- display: flex;
- flex-direction: column;
- align-items: center;
}
.text-negative {
color: $negative !important;
diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue
index 1a37994d9..4f002ecb9 100644
--- a/src/pages/Entry/EntryStockBoughtDetail.vue
+++ b/src/pages/Entry/EntryStockBoughtDetail.vue
@@ -14,7 +14,7 @@ const $props = defineProps({
required: true,
},
dated: {
- type: Date,
+ type: [Date, String],
required: true,
},
});
diff --git a/src/pages/Entry/EntryStockBoughtFilter.vue b/src/pages/Entry/EntryStockBoughtFilter.vue
deleted file mode 100644
index 136881f17..000000000
--- a/src/pages/Entry/EntryStockBoughtFilter.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
- {{ t(`params.${tag.label}`) }}:
- {{ formatFn(tag.value) }}
-
-
-
-
-
- {
- params.dated = value;
- setUserParams(params);
- searchFn();
- }
- "
- :label="t('Date')"
- is-outlined
- />
-
-
-
-
-
-
- en:
- params:
- dated: Date
- workerFk: Worker
- es:
- Date: Fecha
- params:
- dated: Fecha
- workerFk: Trabajador
-
diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/EntrySupplier.vue
similarity index 67%
rename from src/pages/Entry/MyEntries.vue
rename to src/pages/Entry/EntrySupplier.vue
index 3f7566ae0..d8b17007f 100644
--- a/src/pages/Entry/MyEntries.vue
+++ b/src/pages/Entry/EntrySupplier.vue
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { toDate } from 'src/filters/index';
import { useQuasar } from 'quasar';
-import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
+import EntrySupplierlDetail from './EntrySupplierlDetail.vue';
import VnTable from 'components/VnTable/VnTable.vue';
const { t } = useI18n();
@@ -18,18 +18,28 @@ const columns = computed(() => [
{
align: 'left',
name: 'id',
- label: t('myEntries.id'),
+ label: t('entrySupplier.id'),
columnFilter: false,
+ isId: true,
+ chip: {
+ condition: () => true,
+ },
+ },
+ {
+ align: 'left',
+ name: 'supplierName',
+ label: t('entrySupplier.supplierName'),
+ cardVisible: true,
isTitle: true,
},
{
visible: false,
align: 'right',
- label: t('myEntries.shipped'),
+ label: t('entrySupplier.shipped'),
name: 'shipped',
columnFilter: {
name: 'fromShipped',
- label: t('myEntries.fromShipped'),
+ label: t('entrySupplier.fromShipped'),
component: 'date',
},
format: ({ shipped }) => toDate(shipped),
@@ -37,26 +47,26 @@ const columns = computed(() => [
{
visible: false,
align: 'left',
- label: t('myEntries.shipped'),
+ label: t('entrySupplier.shipped'),
name: 'shipped',
columnFilter: {
name: 'toShipped',
- label: t('myEntries.toShipped'),
+ label: t('entrySupplier.toShipped'),
component: 'date',
},
format: ({ shipped }) => toDate(shipped),
cardVisible: true,
},
{
- align: 'right',
- label: t('myEntries.shipped'),
+ align: 'left',
+ label: t('entrySupplier.shipped'),
name: 'shipped',
columnFilter: false,
format: ({ shipped }) => toDate(shipped),
},
{
- align: 'right',
- label: t('myEntries.landed'),
+ align: 'left',
+ label: t('entrySupplier.landed'),
name: 'landed',
columnFilter: false,
format: ({ landed }) => toDate(landed),
@@ -64,15 +74,13 @@ const columns = computed(() => [
{
align: 'right',
- label: t('myEntries.wareHouseIn'),
+ label: t('entrySupplier.wareHouseIn'),
name: 'warehouseInFk',
- format: (row) => {
- row.warehouseInName;
- },
+ format: ({ warehouseInName }) => warehouseInName,
cardVisible: true,
columnFilter: {
name: 'warehouseInFk',
- label: t('myEntries.warehouseInFk'),
+ label: t('entrySupplier.warehouseInFk'),
component: 'select',
attrs: {
url: 'warehouses',
@@ -86,13 +94,13 @@ const columns = computed(() => [
},
{
align: 'left',
- label: t('myEntries.daysOnward'),
+ label: t('entrySupplier.daysOnward'),
name: 'daysOnward',
visible: false,
},
{
align: 'left',
- label: t('myEntries.daysAgo'),
+ label: t('entrySupplier.daysAgo'),
name: 'daysAgo',
visible: false,
},
@@ -101,8 +109,8 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('myEntries.printLabels'),
- icon: 'move_item',
+ title: t('entrySupplier.printLabels'),
+ icon: 'search',
isPrimary: true,
action: (row) => printBuys(row.id),
},
@@ -112,7 +120,7 @@ const columns = computed(() => [
const printBuys = (rowId) => {
quasar.dialog({
- component: EntryBuysTableDialog,
+ component: EntrySupplierlDetail,
componentProps: {
id: rowId,
},
@@ -121,19 +129,18 @@ const printBuys = (rowId) => {
diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntrySupplierlDetail.vue
similarity index 87%
rename from src/pages/Entry/EntryBuysTableDialog.vue
rename to src/pages/Entry/EntrySupplierlDetail.vue
index 7a6c4ac43..01f6012c5 100644
--- a/src/pages/Entry/EntryBuysTableDialog.vue
+++ b/src/pages/Entry/EntrySupplierlDetail.vue
@@ -30,7 +30,7 @@ const entriesTableColumns = computed(() => [
align: 'left',
name: 'itemFk',
field: 'itemFk',
- label: t('entry.latestBuys.tableVisibleColumns.itemFk'),
+ label: t('entrySupplier.itemId'),
},
{
align: 'left',
@@ -65,7 +65,15 @@ const entriesTableColumns = computed(() => [
]);
function downloadCSV(rows) {
- const headers = ['id', 'itemFk', 'name', 'stickers', 'packing', 'grouping', 'comment'];
+ const headers = [
+ 'id',
+ 'itemFk',
+ 'name',
+ 'stickers',
+ 'packing',
+ 'grouping',
+ 'comment',
+ ];
const csvRows = rows.map((row) => {
const buy = row;
@@ -119,17 +127,18 @@ function downloadCSV(rows) {
>
{{
- t('myEntries.viewLabel')
+ t('entrySupplier.viewLabel')
}}
diff --git a/src/pages/Entry/EntryWasteRecalc.vue b/src/pages/Entry/EntryWasteRecalc.vue
index 6ae200ed7..2fcd0f843 100644
--- a/src/pages/Entry/EntryWasteRecalc.vue
+++ b/src/pages/Entry/EntryWasteRecalc.vue
@@ -38,7 +38,7 @@ const recalc = async () => {
-
+
{
:label="$t('globals.from')"
rounded
dense
+ data-cy="dateFrom"
/>
{
:disable="!dateFrom"
rounded
dense
+ data-cy="dateTo"
/>
{
:loading="isLoading"
:disable="isLoading || !(dateFrom && dateTo)"
@click="recalc()"
+ data-cy="recalc"
/>
diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml
index 88b16cb03..0bc92a5ea 100644
--- a/src/pages/Entry/locale/en.yml
+++ b/src/pages/Entry/locale/en.yml
@@ -6,7 +6,7 @@ entry:
list:
newEntry: New entry
tableVisibleColumns:
- isExcludedFromAvailable: Exclude from inventory
+ isExcludedFromAvailable: Excluded from available
isOrdered: Ordered
isConfirmed: Ready to label
isReceived: Received
@@ -33,7 +33,7 @@ entry:
invoiceAmount: Invoice amount
ordered: Ordered
booked: Booked
- excludedFromAvailable: Inventory
+ excludedFromAvailable: Excluded
travelReference: Reference
travelAgency: Agency
travelShipped: Shipped
@@ -55,7 +55,7 @@ entry:
commission: Commission
observation: Observation
booked: Booked
- excludedFromAvailable: Inventory
+ excludedFromAvailable: Excluded
initialTemperature: Ini °C
finalTemperature: Fin °C
buys:
@@ -65,27 +65,10 @@ entry:
printedStickers: Printed stickers
notes:
observationType: Observation type
- latestBuys:
- tableVisibleColumns:
- image: Picture
- itemFk: Item ID
- weightByPiece: Weight/Piece
- isActive: Active
- family: Family
- entryFk: Entry
- freightValue: Freight value
- comissionValue: Commission value
- packageValue: Package value
- isIgnored: Is ignored
- price2: Grouping
- price3: Packing
- minPrice: Min
- ektFk: Ekt
- packingOut: Package out
- landing: Landing
- isExcludedFromAvailable: Es inventory
params:
- isExcludedFromAvailable: Exclude from inventory
+ entryFk: Entry
+ observationTypeFk: Observation type
+ isExcludedFromAvailable: Excluded from available
isOrdered: Ordered
isConfirmed: Ready to label
isReceived: Received
@@ -127,13 +110,17 @@ entry:
company_name: Company name
itemTypeFk: Item type
workerFk: Worker id
+ daysAgo: Days ago
+ toShipped: T. shipped
+ fromShipped: F. shipped
+ supplierName: Supplier
search: Search entries
searchInfo: You can search by entry reference
descriptorMenu:
showEntryReport: Show entry report
entryFilter:
params:
- isExcludedFromAvailable: Exclude from inventory
+ isExcludedFromAvailable: Excluded from available
invoiceNumber: Invoice number
travelFk: Travel
companyFk: Company
@@ -155,7 +142,7 @@ entryFilter:
warehouseOutFk: Origin
warehouseInFk: Destiny
entryTypeCode: Entry type
-myEntries:
+entrySupplier:
id: ID
landed: Landed
shipped: Shipped
@@ -170,6 +157,8 @@ myEntries:
downloadCsv: Download CSV
search: Search entries
searchInfo: You can search by entry reference
+ supplierName: Supplier
+ itemId: Item id
entryStockBought:
travel: Travel
editTravel: Edit travel
diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml
index 3025d64cb..10d863ea2 100644
--- a/src/pages/Entry/locale/es.yml
+++ b/src/pages/Entry/locale/es.yml
@@ -6,7 +6,7 @@ entry:
list:
newEntry: Nueva entrada
tableVisibleColumns:
- isExcludedFromAvailable: Excluir del inventario
+ isExcludedFromAvailable: Excluir del disponible
isOrdered: Pedida
isConfirmed: Lista para etiquetar
isReceived: Recibida
@@ -33,7 +33,7 @@ entry:
invoiceAmount: Importe
ordered: Pedida
booked: Contabilizada
- excludedFromAvailable: Inventario
+ excludedFromAvailable: Excluido
travelReference: Referencia
travelAgency: Agencia
travelShipped: F. envio
@@ -56,7 +56,7 @@ entry:
observation: Observación
commission: Comisión
booked: Contabilizada
- excludedFromAvailable: Inventario
+ excludedFromAvailable: Excluido
initialTemperature: Ini °C
finalTemperature: Fin °C
buys:
@@ -66,30 +66,12 @@ entry:
printedStickers: Etiquetas impresas
notes:
observationType: Tipo de observación
- latestBuys:
- tableVisibleColumns:
- image: Foto
- itemFk: Id Artículo
- weightByPiece: Peso (gramos)/tallo
- isActive: Activo
- family: Familia
- entryFk: Entrada
- freightValue: Porte
- comissionValue: Comisión
- packageValue: Embalaje
- isIgnored: Ignorado
- price2: Grouping
- price3: Packing
- minPrice: Min
- ektFk: Ekt
- packingOut: Embalaje envíos
- landing: Llegada
- isExcludedFromAvailable: Es inventario
-
search: Buscar entradas
searchInfo: Puedes buscar por referencia de entrada
params:
- isExcludedFromAvailable: Excluir del inventario
+ entryFk: Entrada
+ observationTypeFk: Tipo de observación
+ isExcludedFromAvailable: Excluir del disponible
isOrdered: Pedida
isConfirmed: Lista para etiquetar
isReceived: Recibida
@@ -131,9 +113,13 @@ entry:
company_name: Nombre empresa
itemTypeFk: Familia
workerFk: Comprador
+ daysAgo: Días atras
+ toShipped: F. salida(hasta)
+ fromShipped: F. salida(desde)
+ supplierName: Proveedor
entryFilter:
params:
- isExcludedFromAvailable: Inventario
+ isExcludedFromAvailable: Excluido
isOrdered: Pedida
isConfirmed: Confirmado
isReceived: Recibida
@@ -149,7 +135,7 @@ entryFilter:
warehouseInFk: Destino
entryTypeCode: Tipo de entrada
hasToShowDeletedEntries: Mostrar entradas eliminadas
-myEntries:
+entrySupplier:
id: ID
landed: F. llegada
shipped: F. salida
@@ -164,10 +150,12 @@ myEntries:
downloadCsv: Descargar CSV
search: Buscar entradas
searchInfo: Puedes buscar por referencia de la entrada
+ supplierName: Proveedor
+ itemId: Id artículo
entryStockBought:
travel: Envío
editTravel: Editar envío
- purchaseSpaces: Espacios de compra
+ purchaseSpaces: Camiones reservados
buyer: Comprador
reserve: Reservado
bought: Comprado
diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
index 905ddebb2..dc963a91b 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
@@ -121,25 +121,40 @@ function deleteFile(dmsFk) {
hide-selected
:is-clearable="false"
:required="true"
+ data-cy="invoiceInBasicDataSupplier"
/>
-
+
-
-
+
+
@@ -182,6 +197,7 @@ function deleteFile(dmsFk) {
padding="xs"
round
@click="downloadFile(data.dmsFk)"
+ data-cy="invoiceInBasicDataDmsDownload"
/>
{{ t('Edit document') }}
@@ -210,6 +227,7 @@ function deleteFile(dmsFk) {
padding="xs"
round
@click="deleteFile(data.dmsFk)"
+ data-cy="invoiceInBasicDataDmsDelete"
/>
{{ t('Create document') }}
@@ -237,9 +255,9 @@ function deleteFile(dmsFk) {
:label="t('Currency')"
v-model="data.currencyFk"
:options="currencies"
- option-value="id"
option-label="code"
sort-by="id"
+ data-cy="invoiceInBasicDataCurrencyFk"
/>
@@ -260,6 +278,7 @@ function deleteFile(dmsFk) {
:options="sageWithholdings"
option-value="id"
option-label="withholding"
+ data-cy="invoiceInBasicDataWithholdingSageFk"
/>
diff --git a/src/pages/InvoiceIn/Card/InvoiceInCard.vue b/src/pages/InvoiceIn/Card/InvoiceInCard.vue
index 34cc26437..a1bae87a6 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInCard.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInCard.vue
@@ -1,5 +1,5 @@
-
import { ref, computed, capitalize } from 'vue';
-import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useArrayData } from 'src/composables/useArrayData';
import CrudModel from 'src/components/CrudModel.vue';
import FetchData from 'src/components/FetchData.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
-const route = useRoute();
const { t } = useI18n();
const arrayData = useArrayData();
const invoiceIn = computed(() => arrayData.store.data);
const invoiceInCorrectionRef = ref();
-const filter = {
- include: { relation: 'invoiceIn' },
- where: { correctingFk: route.params.id },
-};
const columns = computed(() => [
{
name: 'origin',
@@ -92,7 +86,8 @@ const requiredFieldRule = (val) => val || t('globals.requiredField');
v-if="invoiceIn"
data-key="InvoiceInCorrection"
url="InvoiceInCorrections"
- :filter="filter"
+ :user-filter="{ include: { relation: 'invoiceIn' } }"
+ :filter="{ where: { correctingFk: $route.params.id } }"
auto-load
primary-key="correctingFk"
:default-remove="false"
@@ -115,6 +110,7 @@ const requiredFieldRule = (val) => val || t('globals.requiredField');
:option-label="col.optionLabel"
:disable="row.invoiceIn.isBooked"
:filter-options="['description']"
+ data-cy="invoiceInCorrective_type"
>
@@ -137,6 +133,7 @@ const requiredFieldRule = (val) => val || t('globals.requiredField');
:rules="[requiredFieldRule]"
:filter-options="['code', 'description']"
:disable="row.invoiceIn.isBooked"
+ data-cy="invoiceInCorrective_class"
>
@@ -161,6 +158,7 @@ const requiredFieldRule = (val) => val || t('globals.requiredField');
:option-label="col.optionLabel"
:rules="[requiredFieldRule]"
:disable="row.invoiceIn.isBooked"
+ data-cy="invoiceInCorrective_reason"
/>
diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
index 3843f5bf7..e8df27511 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue
@@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n';
import axios from 'axios';
import { toCurrency, toDate } from 'src/filters';
import VnLv from 'src/components/ui/VnLv.vue';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
import filter from './InvoiceInFilter.js';
import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue';
@@ -17,10 +17,6 @@ const { t } = useI18n();
const cardDescriptorRef = ref();
const entityId = computed(() => $props.id || +currentRoute.value.params.id);
const totalAmount = ref();
-const config = ref();
-const cplusRectificationTypes = ref([]);
-const siiTypeInvoiceIns = ref([]);
-const invoiceCorrectionTypes = ref([]);
const invoiceInCorrection = reactive({ correcting: [], corrected: null });
const routes = reactive({
getSupplier: (id) => {
@@ -30,7 +26,7 @@ const routes = reactive({
return {
name: 'InvoiceInList',
query: {
- params: JSON.stringify({ supplierFk: id }),
+ table: JSON.stringify({ supplierFk: id }),
},
};
},
@@ -39,7 +35,7 @@ const routes = reactive({
return {
name: 'InvoiceInList',
query: {
- params: JSON.stringify({ correctedFk: entityId.value }),
+ table: JSON.stringify({ correctedFk: entityId.value }),
},
};
}
@@ -88,7 +84,7 @@ async function setInvoiceCorrection(id) {
}
-
-
+
{{ entity?.supplier?.nickname }}
@@ -163,7 +159,7 @@ async function setInvoiceCorrection(id) {
-
+
-
- es:
- isOwn: Tiene propietario
- isAnyVolumeAllowed: Permite cualquier volumen
- en:
- isOwn: Has owner
- isAnyVolumeAllowed: Allows any volume
-
diff --git a/src/pages/Route/Agency/Card/AgencyBasicData.vue b/src/pages/Route/Agency/Card/AgencyBasicData.vue
index 4270b136c..4f8f17163 100644
--- a/src/pages/Route/Agency/Card/AgencyBasicData.vue
+++ b/src/pages/Route/Agency/Card/AgencyBasicData.vue
@@ -21,7 +21,7 @@ const warehouses = ref([]);
@on-fetch="(data) => (warehouses = data)"
auto-load
/>
-
+
diff --git a/src/pages/Route/Agency/Card/AgencyCard.vue b/src/pages/Route/Agency/Card/AgencyCard.vue
index 7dc31f8ba..c21298470 100644
--- a/src/pages/Route/Agency/Card/AgencyCard.vue
+++ b/src/pages/Route/Agency/Card/AgencyCard.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/src/pages/Route/Agency/Card/AgencyDescriptor.vue b/src/pages/Route/Agency/Card/AgencyDescriptor.vue
index a0472c6c3..64b33cc06 100644
--- a/src/pages/Route/Agency/Card/AgencyDescriptor.vue
+++ b/src/pages/Route/Agency/Card/AgencyDescriptor.vue
@@ -3,7 +3,7 @@ import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import VnLv from 'components/ui/VnLv.vue';
const props = defineProps({
@@ -17,18 +17,19 @@ const props = defineProps({
const { t } = useI18n();
const route = useRoute();
const entityId = computed(() => props.id || route.params.id);
-const { store } = useArrayData('Parking');
+const { store } = useArrayData();
const card = computed(() => store.data);
-
-
+
diff --git a/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue b/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue
new file mode 100644
index 000000000..e5c1249b2
--- /dev/null
+++ b/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/src/pages/Route/Agency/Card/AgencySummary.vue b/src/pages/Route/Agency/Card/AgencySummary.vue
index 71a6d1066..ab274939a 100644
--- a/src/pages/Route/Agency/Card/AgencySummary.vue
+++ b/src/pages/Route/Agency/Card/AgencySummary.vue
@@ -6,29 +6,31 @@ import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'components/ui/VnLv.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
+import VnCheckbox from 'components/common/VnCheckbox.vue';
+const route = useRoute();
const $props = defineProps({ id: { type: Number, default: 0 } });
const { t } = useI18n();
-const entityId = computed(() => $props.id || useRoute().params.id);
+const entityId = computed(() => $props.id || route.params.id);
-
+
{{ agency.name }}
-
-
diff --git a/src/pages/Route/Agency/composables/__tests__/getAgencies.spec.js b/src/pages/Route/Agency/composables/__tests__/getAgencies.spec.js
index ccf7872cb..99966569c 100644
--- a/src/pages/Route/Agency/composables/__tests__/getAgencies.spec.js
+++ b/src/pages/Route/Agency/composables/__tests__/getAgencies.spec.js
@@ -27,14 +27,17 @@ describe('getAgencies', () => {
landed: 'true',
};
const filter = {
- fields: ['nickname', 'street', 'city', 'id'],
+ fields: ['name', 'street', 'city', 'id'],
where: { isActive: true },
- order: 'nickname ASC',
+ order: ['name ASC'],
};
await getAgencies(formData, null, filter);
- expect(axios.get).toHaveBeenCalledWith('Agencies/getAgenciesWithWarehouse', generateParams(formData, filter));
+ expect(axios.get).toHaveBeenCalledWith(
+ 'Agencies/getAgenciesWithWarehouse',
+ generateParams(formData, filter),
+ );
});
it('should not call API when formData is missing required landed field', async () => {
@@ -64,19 +67,19 @@ describe('getAgencies', () => {
it('should return options and agency when default agency is found', async () => {
const formData = { warehouseId: '123', addressId: '456', landed: 'true' };
const client = { defaultAddress: { agencyModeFk: 'Agency1' } };
-
+
const { options, agency } = await getAgencies(formData, client);
-
+
expect(options).toEqual(response.data);
expect(agency).toEqual(response.data[0]);
- });
+ });
- it('should return options and agency when client is not provided', async () => {
+ it('should return options and agency when client is not provided', async () => {
const formData = { warehouseId: '123', addressId: '456', landed: 'true' };
-
+
const { options, agency } = await getAgencies(formData);
-
+
expect(options).toEqual(response.data);
expect(agency).toBeNull();
- });
+ });
});
diff --git a/src/pages/Route/Agency/composables/getAgencies.js b/src/pages/Route/Agency/composables/getAgencies.js
index 850f87456..180ac943e 100644
--- a/src/pages/Route/Agency/composables/getAgencies.js
+++ b/src/pages/Route/Agency/composables/getAgencies.js
@@ -1,14 +1,14 @@
import axios from 'axios';
-import agency from 'src/router/modules/agency';
export async function getAgencies(formData, client, _filter = {}) {
if (!formData.warehouseId || !formData.addressId || !formData.landed) return;
-
+
const filter = {
- ..._filter
+ ..._filter,
+ order: ['name ASC'],
};
- let defaultAgency = null;
+ let agency = null;
let params = {
filter: JSON.stringify(filter),
warehouseFk: formData.warehouseId,
@@ -16,11 +16,15 @@ export async function getAgencies(formData, client, _filter = {}) {
landed: formData.landed,
};
- const { data } = await axios.get('Agencies/getAgenciesWithWarehouse', { params });
+ const { data: options } = await axios.get('Agencies/getAgenciesWithWarehouse', {
+ params,
+ });
- if(data && client) {
- defaultAgency = data.find((agency) => agency.agencyModeFk === client.defaultAddress.agencyModeFk );
- };
-
- return {options: data, agency: defaultAgency}
+ if (options && client) {
+ agency = options.find(
+ ({ agencyModeFk }) => agencyModeFk === client.defaultAddress.agencyModeFk,
+ );
+ }
+
+ return { options, agency };
}
diff --git a/src/pages/Route/Agency/locale/en.yml b/src/pages/Route/Agency/locale/en.yml
index 93f8b4aaa..78a687f2e 100644
--- a/src/pages/Route/Agency/locale/en.yml
+++ b/src/pages/Route/Agency/locale/en.yml
@@ -1,11 +1,12 @@
agency:
search: Search agency
- searchInfo: You can search by name
+ searchInfo: You can search by name and by id
isOwn: Own
isAnyVolumeAllowed: Any volume allowed
+ removeItem: Agency removed successfully
notification:
- removeItemError: Error removing agency
- removeItem: WorkCenter removed successfully
+ removeItemError: Error removing work center
+ removeItem: Work center removed successfully
pageTitles:
agency: Agency
searchBar:
diff --git a/src/pages/Route/Agency/locale/es.yml b/src/pages/Route/Agency/locale/es.yml
index 1efed0e9c..b6237a9f7 100644
--- a/src/pages/Route/Agency/locale/es.yml
+++ b/src/pages/Route/Agency/locale/es.yml
@@ -1,15 +1,14 @@
agency:
search: Buscar agencia
- searchInfo: Puedes buscar por nombre
+ searchInfo: Puedes buscar por nombre y por id
isOwn: Propio
isAnyVolumeAllowed: Cualquier volumen
removeItem: Agencia eliminada correctamente
notification:
- removeItemError: Error al eliminar la agencia
+ removeItemError: Error al eliminar la el centro de trabajo
removeItem: Centro de trabajo eliminado correctamente
pageTitles:
agency: Agencia
searchBar:
info: Puedes buscar por nombre o id
label: Buscar agencia...
-
diff --git a/src/pages/Route/Card/RouteAutonomousFilter.vue b/src/pages/Route/Card/RouteAutonomousFilter.vue
index 3be409ec9..fe631a0be 100644
--- a/src/pages/Route/Card/RouteAutonomousFilter.vue
+++ b/src/pages/Route/Card/RouteAutonomousFilter.vue
@@ -44,8 +44,7 @@ const exprBuilder = (param, value) => {
(agencyList = data)"
auto-load
/>
@@ -72,7 +71,7 @@ const exprBuilder = (param, value) => {
-
+
@@ -84,8 +83,7 @@ const exprBuilder = (param, value) => {
option-value="id"
option-label="name"
dense
- outlined
- rounded
+ filled
emit-value
map-options
use-input
@@ -103,8 +101,7 @@ const exprBuilder = (param, value) => {
option-value="id"
option-label="name"
dense
- outlined
- rounded
+ filled
emit-value
map-options
use-input
@@ -124,8 +121,7 @@ const exprBuilder = (param, value) => {
option-value="name"
option-label="name"
dense
- outlined
- rounded
+ filled
emit-value
map-options
use-input
@@ -136,20 +132,12 @@ const exprBuilder = (param, value) => {
-
+
-
+
@@ -157,7 +145,7 @@ const exprBuilder = (param, value) => {
@@ -167,23 +155,23 @@ const exprBuilder = (param, value) => {
-
+
-
+
-
+
@@ -191,7 +179,7 @@ const exprBuilder = (param, value) => {
diff --git a/src/pages/Route/Card/RouteCard.vue b/src/pages/Route/Card/RouteCard.vue
index c178dc6bf..b71f7d088 100644
--- a/src/pages/Route/Card/RouteCard.vue
+++ b/src/pages/Route/Card/RouteCard.vue
@@ -1,10 +1,10 @@
-
import { ref, computed, onMounted } from 'vue';
import { useRoute } from 'vue-router';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
+import useCardDescription from 'composables/useCardDescription';
import VnLv from 'components/ui/VnLv.vue';
import { dashIfEmpty, toDate } from 'src/filters';
import RouteDescriptorMenu from 'pages/Route/Card/RouteDescriptorMenu.vue';
import filter from './RouteFilter.js';
-import useCardDescription from 'src/composables/useCardDescription';
import axios from 'axios';
const $props = defineProps({
@@ -27,23 +27,26 @@ const getZone = async () => {
const filter = {
where: { routeFk: $props.id ? $props.id : route.params.id },
};
- const { data } = await axios.get('Tickets/findOne', {
+ const { data } = await axios.get('Tickets/filter', {
params: {
filter: JSON.stringify(filter),
},
});
- zoneId.value = data.zoneFk;
+
+ if (!data.length) return;
+ const firstRecord = data[0];
+
+ zoneId.value = firstRecord.zoneFk;
const { data: zoneData } = await axios.get(`Zones/${zoneId.value}`);
zone.value = zoneData.name;
};
const data = ref(useCardDescription());
-const setData = (entity) => (data.value = useCardDescription(entity.code, entity.id));
onMounted(async () => {
getZone();
});
- {
-
+
es:
diff --git a/src/pages/Route/Card/RouteDescriptorProxy.vue b/src/pages/Route/Card/RouteDescriptorProxy.vue
index 1ff39a51e..7553469f3 100644
--- a/src/pages/Route/Card/RouteDescriptorProxy.vue
+++ b/src/pages/Route/Card/RouteDescriptorProxy.vue
@@ -7,6 +7,10 @@ const $props = defineProps({
type: Number,
required: true,
},
+ summary: {
+ type: Object,
+ default: null,
+ },
});
diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue
index 21858102b..f830b83e2 100644
--- a/src/pages/Route/Card/RouteFilter.vue
+++ b/src/pages/Route/Card/RouteFilter.vue
@@ -25,7 +25,7 @@ const emit = defineEmits(['search']);
>
- {{ t(`params.${tag.label}`) }}:
+ {{ t(`route.params.${tag.label}`) }}:
{{ formatFn(tag.value) }}
@@ -33,10 +33,10 @@ const emit = defineEmits(['search']);
@@ -44,15 +44,14 @@ const emit = defineEmits(['search']);
@@ -61,8 +60,8 @@ const emit = defineEmits(['search']);
@@ -72,8 +71,8 @@ const emit = defineEmits(['search']);
@@ -84,8 +83,8 @@ const emit = defineEmits(['search']);
-
+
@@ -136,8 +133,8 @@ const emit = defineEmits(['search']);
@@ -146,7 +143,7 @@ const emit = defineEmits(['search']);
@@ -154,38 +151,3 @@ const emit = defineEmits(['search']);
-
-
-en:
- params:
- warehouseFk: Warehouse
- description: Description
- m3: m³
- scopeDays: Days Onward
- vehicleFk: Vehicle
- agencyModeFk: Agency
- workerFk: Worker
- from: From
- to: To
- Served: Served
-es:
- params:
- warehouseFk: Almacén
- description: Descripción
- m3: m³
- scopeDays: Días en adelante
- vehicleFk: Vehículo
- agencyModeFk: Agencia
- workerFk: Trabajador
- from: Desde
- to: Hasta
- Warehouse: Almacén
- Description: Descripción
- Vehicle: Vehículo
- Agency: Agencia
- Worker: Trabajador
- From: Desde
- To: Hasta
- Served: Servida
- Days Onward: Días en adelante
-
diff --git a/src/pages/Route/Card/RouteSummary.vue b/src/pages/Route/Card/RouteSummary.vue
index 3051972b2..f68628095 100644
--- a/src/pages/Route/Card/RouteSummary.vue
+++ b/src/pages/Route/Card/RouteSummary.vue
@@ -135,7 +135,7 @@ const ticketColumns = ref([
@@ -168,7 +168,7 @@ const ticketColumns = ref([
{{ value }}
@@ -230,7 +230,7 @@ const ticketColumns = ref([
-
+
{{ value }}
@@ -238,7 +238,7 @@ const ticketColumns = ref([
-
+
{{ value }}
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index b3eaf3b48..d0683e481 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -2,28 +2,38 @@
import { onBeforeMount, onMounted, computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Notify } from 'quasar';
+import { useRoute } from 'vue-router';
import { useSession } from 'src/composables/useSession';
import { toDateHourMin } from 'filters/index';
import { useStateStore } from 'src/stores/useStateStore';
-import axios from 'axios';
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnTable from 'components/VnTable/VnTable.vue';
+import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
+const route = useRoute();
const { t } = useI18n();
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
const state = useStateStore();
-const warehouses = ref([]);
const selectedRows = ref([]);
+const dataKey = 'CmrList';
+const shipped = Date.vnNew();
+shipped.setHours(0, 0, 0, 0);
+shipped.setDate(shipped.getDate() - 1);
+const userParams = {
+ shipped: null,
+};
+
+
const columns = computed(() => [
{
align: 'left',
name: 'cmrFk',
- label: t('route.cmr.list.cmrFk'),
+ label: t('route.cmr.params.cmrFk'),
chip: {
condition: () => true,
},
@@ -32,62 +42,67 @@ const columns = computed(() => [
{
align: 'center',
name: 'hasCmrDms',
- label: t('route.cmr.list.hasCmrDms'),
+ label: t('route.cmr.params.hasCmrDms'),
component: 'checkbox',
cardVisible: true,
},
{
align: 'left',
- label: t('route.cmr.list.ticketFk'),
+ label: t('route.cmr.params.ticketFk'),
name: 'ticketFk',
},
{
align: 'left',
- label: t('route.cmr.list.routeFk'),
+ label: t('route.cmr.params.routeFk'),
name: 'routeFk',
},
{
align: 'left',
- label: t('route.cmr.list.clientFk'),
+ label: t('route.cmr.params.clientFk'),
name: 'clientFk',
},
{
align: 'right',
- label: t('route.cmr.list.country'),
+ label: t('route.cmr.params.countryFk'),
name: 'countryFk',
- cardVisible: true,
+ component: 'select',
attrs: {
url: 'countries',
fields: ['id', 'name'],
- optionLabel: 'name',
- optionValue: 'id',
},
columnFilter: {
- inWhere: true,
- component: 'select',
+ name: 'countryFk',
+ attrs: {
+ url: 'countries',
+ fields: ['id', 'name'],
+ },
},
format: ({ countryName }) => countryName,
},
{
align: 'right',
- label: t('route.cmr.list.shipped'),
+ label: t('route.cmr.params.shipped'),
name: 'shipped',
cardVisible: true,
- columnFilter: {
- component: 'date',
- inWhere: true,
- },
+ component: 'date',
format: ({ shipped }) => toDateHourMin(shipped),
},
{
align: 'right',
+ label: t('route.cmr.params.warehouseFk'),
name: 'warehouseFk',
- label: t('globals.warehouse'),
- columnFilter: {
- component: 'select',
- },
+ component: 'select',
attrs: {
- options: warehouses.value,
+ url: 'warehouses',
+ fields: ['id', 'name'],
+ },
+ columnFilter: {
+ inWhere: true,
+ name: 'warehouseFk',
+ attrs: {
+ url: 'warehouses',
+ fields: ['id', 'name'],
+ },
},
format: ({ warehouseName }) => warehouseName,
},
@@ -96,7 +111,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Ver cmr'),
+ title: t('route.cmr.params.viewCmr'),
icon: 'visibility',
isPrimary: true,
action: (row) => window.open(getCmrUrl(row?.cmrFk), '_blank'),
@@ -105,13 +120,17 @@ const columns = computed(() => [
},
]);
-onBeforeMount(async () => {
- const { data } = await axios.get('Warehouses');
- warehouses.value = data;
+onBeforeMount(() => {
+ initializeFromQuery();
});
onMounted(() => (state.rightDrawer = true));
+const initializeFromQuery = () => {
+ const query = route.query.table ? JSON.parse(route.query.table) : {};
+ shipped.value = query.shipped || shipped.toISOString();
+ Object.assign(userParams, { shipped });
+};
function getApiUrl() {
return new URL(window.location).origin;
}
@@ -133,6 +152,11 @@ function downloadPdfs() {
}
+
- {{ t('route.cmr.list.downloadCmrs') }}
+ {{ t('route.cmr.params.downloadCmrs') }}
{
-import VnCardBeta from 'components/common/VnCardBeta.vue';
+import VnCard from 'components/common/VnCard.vue';
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
-
+
diff --git a/src/pages/Route/Roadmap/RoadmapDescriptor.vue b/src/pages/Route/Roadmap/RoadmapDescriptor.vue
index baa864a15..dfa692feb 100644
--- a/src/pages/Route/Roadmap/RoadmapDescriptor.vue
+++ b/src/pages/Route/Roadmap/RoadmapDescriptor.vue
@@ -2,7 +2,7 @@
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import VnLv from 'components/ui/VnLv.vue';
import { dashIfEmpty, toDateHourMin } from 'src/filters';
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
@@ -15,6 +15,10 @@ const $props = defineProps({
required: false,
default: null,
},
+ summary: {
+ type: Object,
+ default: null,
+ },
});
const route = useRoute();
@@ -26,7 +30,13 @@ const entityId = computed(() => {
-
+
@@ -42,7 +52,7 @@ const entityId = computed(() => {
-
+
es:
diff --git a/src/pages/Route/Roadmap/RoadmapFilter.vue b/src/pages/Route/Roadmap/RoadmapFilter.vue
index 982f1efba..9acbfb740 100644
--- a/src/pages/Route/Roadmap/RoadmapFilter.vue
+++ b/src/pages/Route/Roadmap/RoadmapFilter.vue
@@ -31,12 +31,12 @@ const emit = defineEmits(['search']);
-
+
-
+
@@ -44,7 +44,7 @@ const emit = defineEmits(['search']);
@@ -54,7 +54,7 @@ const emit = defineEmits(['search']);
@@ -66,8 +66,7 @@ const emit = defineEmits(['search']);
:fields="['id', 'nickname']"
v-model="params.supplierFk"
dense
- outlined
- rounded
+ filled
emit-value
map-options
use-input
@@ -81,7 +80,7 @@ const emit = defineEmits(['search']);
v-model="params.price"
:label="t('Price')"
type="number"
- is-outlined
+ filled
clearable
/>
@@ -91,7 +90,7 @@ const emit = defineEmits(['search']);
@@ -101,7 +100,7 @@ const emit = defineEmits(['search']);
diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue
index 3047cdf86..15db2a55f 100644
--- a/src/pages/Route/RouteAutonomous.vue
+++ b/src/pages/Route/RouteAutonomous.vue
@@ -13,6 +13,7 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
+import AgencyDescriptorProxy from 'pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnDms from 'components/common/VnDms.vue';
import VnTable from 'components/VnTable/VnTable.vue';
@@ -236,10 +237,16 @@ onUnmounted(() => (stateStore.rightDrawer = false));
selection: 'multiple',
}"
>
-
+
- {{ row.routeFk }}
-
+ {{ row?.agencyModeName }}
+
+
+
+
+
+ {{ row?.agencyAgreement }}
+
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
index a7e192765..b905cfde8 100644
--- a/src/pages/Route/RouteExtendedList.vue
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -38,7 +38,7 @@ const routeFilter = {
};
const columns = computed(() => [
{
- align: 'center',
+ align: 'right',
name: 'id',
label: 'Id',
chip: {
@@ -46,11 +46,11 @@ const columns = computed(() => [
},
isId: true,
columnFilter: false,
+ width: '25px',
},
{
- align: 'center',
name: 'workerFk',
- label: t('route.Worker'),
+ label: t('globals.worker'),
create: true,
component: 'select',
attrs: {
@@ -71,9 +71,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName),
},
{
- align: 'center',
name: 'agencyModeFk',
- label: t('route.Agency'),
+ label: t('globals.agency'),
isTitle: true,
cardVisible: true,
create: true,
@@ -90,9 +89,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName),
},
{
- align: 'center',
name: 'vehicleFk',
- label: t('route.Vehicle'),
+ label: t('globals.vehicle'),
cardVisible: true,
create: true,
component: 'select',
@@ -111,9 +109,8 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber),
},
{
- align: 'center',
name: 'dated',
- label: t('route.Date'),
+ label: t('globals.date'),
columnFilter: false,
cardVisible: true,
create: true,
@@ -122,9 +119,8 @@ const columns = computed(() => [
dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated),
},
{
- align: 'center',
name: 'from',
- label: t('route.From'),
+ label: t('globals.from'),
visible: false,
cardVisible: true,
create: true,
@@ -132,9 +128,8 @@ const columns = computed(() => [
format: ({ from }) => toDate(from),
},
{
- align: 'center',
name: 'to',
- label: t('route.To'),
+ label: t('globals.to'),
visible: false,
cardVisible: true,
create: true,
@@ -142,30 +137,31 @@ const columns = computed(() => [
format: ({ date }) => toDate(date),
},
{
- align: 'center',
+ align: 'right',
name: 'm3',
label: 'm3',
cardVisible: true,
columnClass: 'shrink',
+ width: '50px',
},
{
- align: 'center',
name: 'started',
label: t('route.hourStarted'),
component: 'time',
columnFilter: false,
format: ({ started }) => toHour(started),
+ width: '50px',
},
{
- align: 'center',
name: 'finished',
label: t('route.hourFinished'),
component: 'time',
columnFilter: false,
format: ({ finished }) => toHour(finished),
+ width: '50px',
},
{
- align: 'center',
+ align: 'right',
name: 'kmStart',
label: t('route.KmStart'),
columnClass: 'shrink',
@@ -173,7 +169,7 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'center',
+ align: 'right',
name: 'kmEnd',
label: t('route.KmEnd'),
columnClass: 'shrink',
@@ -181,16 +177,15 @@ const columns = computed(() => [
visible: false,
},
{
- align: 'center',
+ align: 'left',
name: 'description',
- label: t('route.Description'),
+ label: t('globals.description'),
isTitle: true,
create: true,
component: 'input',
field: 'description',
},
{
- align: 'center',
name: 'isOk',
label: t('route.Served'),
component: 'checkbox',
@@ -202,7 +197,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('route.Add tickets'),
+ title: t('route.addTicket'),
icon: 'vn:ticketAdd',
action: (row) => openTicketsDialog(row?.id),
isPrimary: true,
@@ -214,7 +209,7 @@ const columns = computed(() => [
isPrimary: true,
},
{
- title: t('route.Route summary'),
+ title: t('route.routeSummary'),
icon: 'arrow_forward',
action: (row) => navigate(row?.id),
isPrimary: true,
@@ -276,11 +271,13 @@ const openTicketsDialog = (id) => {
- {{ t('route.Select the starting date') }}
+
+ {{ t('route.extendedList.selectStartingDate') }}
+
@@ -288,7 +285,7 @@ const openTicketsDialog = (id) => {
@@ -335,29 +332,34 @@ const openTicketsDialog = (id) => {
- {{ t('route.Clone Selected Routes') }}
+ {{ t('route.extendedList.cloneSelectedRoutes') }}
- {{ t('route.Download selected routes as PDF') }}
+ {{
+ t('route.extendedList.downloadSelectedRoutes')
+ }}
- {{ t('route.Mark as served') }}
+ {{ t('route.extendedList.markServed') }}
diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue
index 5723e2f0d..64e3abcd5 100644
--- a/src/pages/Route/RouteList.vue
+++ b/src/pages/Route/RouteList.vue
@@ -3,14 +3,18 @@ import { computed, ref, markRaw } from 'vue';
import { useI18n } from 'vue-i18n';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { toHour } from 'src/filters';
+import { useRouter } from 'vue-router';
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
+import AgencyDescriptorProxy from 'src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
+import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
const { t } = useI18n();
+const router = useRouter();
const { viewSummary } = useSummaryDialog();
const tableRef = ref([]);
const dataKey = 'RouteList';
@@ -24,6 +28,14 @@ const routeFilter = {
},
],
};
+
+function redirectToTickets(id) {
+ router.push({
+ name: 'RouteTickets',
+ params: { id },
+ });
+}
+
const columns = computed(() => [
{
align: 'right',
@@ -34,25 +46,21 @@ const columns = computed(() => [
condition: () => true,
},
columnFilter: false,
+ width: '25px',
},
{
align: 'left',
name: 'workerFk',
- label: t('route.Worker'),
+ label: t('globals.worker'),
component: markRaw(VnSelectWorker),
create: true,
- cardVisible: true,
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
columnFilter: false,
- },
- {
- align: 'left',
- name: 'agencyName',
- label: t('route.Agency'),
cardVisible: true,
+ width: '100px',
},
{
- label: t('route.Agency'),
+ label: t('globals.agency'),
name: 'agencyModeFk',
component: 'select',
attrs: {
@@ -64,19 +72,13 @@ const columns = computed(() => [
},
},
create: true,
- columnFilter: false,
- visible: false,
- },
- {
- align: 'left',
- name: 'vehiclePlateNumber',
- label: t('route.Vehicle'),
+ columnFilter: true,
cardVisible: true,
+ visible: true,
},
{
name: 'vehicleFk',
- label: t('route.Vehicle'),
- cardVisible: true,
+ label: t('globals.vehicle'),
component: 'select',
attrs: {
url: 'vehicles',
@@ -89,29 +91,32 @@ const columns = computed(() => [
},
},
create: true,
- columnFilter: false,
- visible: false,
+ columnFilter: true,
+ cardVisible: true,
+ visible: true,
},
{
- align: 'left',
+ align: 'center',
name: 'started',
label: t('route.hourStarted'),
cardVisible: true,
columnFilter: false,
- format: (row) => toHour(row.started),
+ format: ({ started }) => toHour(started),
+ width: '50px',
},
{
- align: 'left',
+ align: 'center',
name: 'finished',
label: t('route.hourFinished'),
cardVisible: true,
columnFilter: false,
- format: (row) => toHour(row.started),
+ format: ({ finished }) => toHour(finished),
+ width: '50px',
},
{
align: 'left',
name: 'description',
- label: t('route.Description'),
+ label: t('globals.description'),
cardVisible: true,
isTitle: true,
create: true,
@@ -119,7 +124,6 @@ const columns = computed(() => [
columnFilter: false,
},
{
- align: 'left',
name: 'isOk',
label: t('route.Served'),
component: 'checkbox',
@@ -130,6 +134,12 @@ const columns = computed(() => [
align: 'right',
name: 'tableActions',
actions: [
+ {
+ title: t('globals.pageTitles.tickets'),
+ icon: 'vn:ticket',
+ action: (row) => redirectToTickets(row?.id),
+ isPrimary: true,
+ },
{
title: t('components.smartCard.viewSummary'),
icon: 'preview',
@@ -155,9 +165,10 @@ const columns = computed(() => [
+
+
+ {{ row?.agencyName }}
+
+
+
+
+
+ {{ row?.vehiclePlateNumber }}
+
+
+
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index 23b1b1d5b..c981b86a5 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -2,13 +2,11 @@
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import { dashIfEmpty } from 'src/filters';
-import { toDate, toDateHourMin } from 'filters/index';
+import { toDate, toDateHourMin, toCurrency } from 'filters/index';
import { useQuasar } from 'quasar';
import { useSummaryDialog } from 'composables/useSummaryDialog';
-import toCurrency from 'filters/toCurrency';
import axios from 'axios';
-import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
@@ -17,6 +15,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputTime from 'src/components/common/VnInputTime.vue';
import VnSection from 'src/components/common/VnSection.vue';
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
+import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
+import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
const { viewSummary } = useSummaryDialog();
const { t } = useI18n();
@@ -33,7 +33,7 @@ const columns = computed(() => [
{
align: 'left',
name: 'name',
- label: t('Roadmap'),
+ label: t('route.roadmap.roadmap'),
create: true,
cardVisible: true,
columnFilter: {
@@ -41,9 +41,9 @@ const columns = computed(() => [
},
},
{
- align: 'left',
+ align: 'center',
name: 'etd',
- label: t('ETD'),
+ label: t('route.roadmap.etd'),
component: 'date',
columnFilter: {
inWhere: true,
@@ -54,7 +54,7 @@ const columns = computed(() => [
{
align: 'left',
name: 'supplierFk',
- label: t('Carrier'),
+ label: t('route.roadmap.carrier'),
component: 'select',
attrs: {
url: 'suppliers',
@@ -65,21 +65,21 @@ const columns = computed(() => [
},
{
name: 'tractorPlate',
- label: t('Plate'),
+ label: t('route.roadmap.vehicle'),
field: (row) => row.tractorPlate,
sortable: true,
align: 'left',
},
{
name: 'price',
- label: t('Price'),
- field: (row) => toCurrency(row.price),
+ label: t('route.roadmap.price'),
+ format: ({ price }) => toCurrency(price),
sortable: true,
- align: 'left',
+ align: 'right',
},
{
name: 'observations',
- label: t('Observations'),
+ label: t('route.roadmap.observations'),
field: (row) => dashIfEmpty(row.observations),
sortable: true,
align: 'left',
@@ -89,7 +89,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Ver cmr'),
+ title: t('route.roadmap.seeCmr'),
icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row?.id, RoadmapSummary),
@@ -124,8 +124,8 @@ function confirmRemove() {
.dialog({
component: VnConfirm,
componentProps: {
- title: t('Selected roadmaps will be removed'),
- message: t('Are you sure you want to continue?'),
+ title: t('route.roadmap.selectedRoadmapsRemoved'),
+ message: t('route.roadmap.areYouSure'),
promise: removeSelection,
},
})
@@ -157,15 +157,24 @@ function exprBuilder(param, value) {
- {{ t('Select the estimated date of departure (ETD)') }}
+ {{ t('route.roadmap.selectEtd') }}
-
+
-
+
{{ t('globals.clone') }}
@@ -181,7 +190,7 @@ function exprBuilder(param, value) {
:disable="!selectedRows?.length"
@click="isCloneDialogOpen = true"
>
- {{ t('Clone Selected Routes') }}
+ {{ t('route.roadmap.cloneSelected') }}
- {{ t('Delete roadmap(s)') }}
+ {{ t('route.roadmap.deleteRoadmap') }}
@@ -222,7 +231,7 @@ function exprBuilder(param, value) {
redirect="route/roadmap"
:create="{
urlCreate: 'Roadmaps',
- title: t('Create routemap'),
+ title: t('route.roadmap.createRoadmap'),
onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: {},
}"
@@ -232,7 +241,10 @@ function exprBuilder(param, value) {
{{ toDateHourMin(row.etd) }}
- {{ row.supplierFk }}
+
+ {{ row.driverName }}
+
+
@@ -251,21 +263,3 @@ function exprBuilder(param, value) {
gap: 12px;
}
-
-es:
- Create routemap: Crear troncal
- Search roadmaps: Buscar troncales
- You can search by roadmap reference: Puedes buscar por referencia del troncal
- Delete roadmap(s): Eliminar troncal(es)
- Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados
- Are you sure you want to continue?: ¿Seguro que quieres continuar?
- The date can't be empty: La fecha no puede estar vacía
- Clone Selected Routes: Clonar rutas seleccionadas
- Create roadmap: Crear troncal
- Roadmap: Troncal
- Carrier: Transportista
- Plate: Matrícula
- Price: Precio
- Observations: Observaciones
- 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 adc7dfdaa..5e28bb689 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -30,16 +30,16 @@ const columns = computed(() => [
align: 'center',
},
{
- name: 'street',
- label: t('Street'),
- field: (row) => row?.street,
+ name: 'client',
+ label: t('Client'),
+ field: (row) => row?.nickname,
sortable: false,
align: 'left',
},
{
- name: 'city',
- label: t('City'),
- field: (row) => row?.city,
+ name: 'street',
+ label: t('Street'),
+ field: (row) => row?.street,
sortable: false,
align: 'left',
},
@@ -51,9 +51,9 @@ const columns = computed(() => [
align: 'center',
},
{
- name: 'client',
- label: t('Client'),
- field: (row) => row?.nickname,
+ name: 'city',
+ label: t('City'),
+ field: (row) => row?.city,
sortable: false,
align: 'left',
},
@@ -199,12 +199,22 @@ const confirmRemove = (ticket) => {
const openSmsDialog = async () => {
const clientsId = [];
const clientsPhone = [];
-
+ const clientWithoutPhone = [];
for (let ticket of selectedRows.value) {
clientsId.push(ticket?.clientFk);
const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`);
+ if (!client.phone) {
+ clientWithoutPhone.push(ticket?.clientFk);
+ continue;
+ }
clientsPhone.push(client.phone);
}
+ if (clientWithoutPhone.length) {
+ quasar.notify({
+ type: 'warning',
+ message: t('components.VnNotes.clientWithoutPhone', { clientWithoutPhone }),
+ });
+ }
quasar.dialog({
component: SendSmsDialog,
@@ -319,7 +329,7 @@ const openSmsDialog = async () => {
selection="multiple"
>
-
+
{
-
+
{{ value }}
{{ t('Open buscaman') }}
@@ -349,7 +359,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
diff --git a/src/pages/Route/Vehicle/Card/VehicleCard.vue b/src/pages/Route/Vehicle/Card/VehicleCard.vue
index f59420aa2..b6038c24c 100644
--- a/src/pages/Route/Vehicle/Card/VehicleCard.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleCard.vue
@@ -1,10 +1,10 @@
-
+import { computed } from 'vue';
+import { useRoute } from 'vue-router';
import VnLv from 'src/components/ui/VnLv.vue';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
const { notify } = useNotify();
+
+const props = defineProps({
+ id: {
+ type: Number,
+ required: false,
+ default: null,
+ },
+});
+
+const route = useRoute();
+const entityId = computed(() => props.id || route.params.id);
-
-
+
es:
diff --git a/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue b/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue
new file mode 100644
index 000000000..cc0943cb8
--- /dev/null
+++ b/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/src/pages/Route/Vehicle/Card/VehicleSummary.vue b/src/pages/Route/Vehicle/Card/VehicleSummary.vue
index 981870cb2..13d4bbc9d 100644
--- a/src/pages/Route/Vehicle/Card/VehicleSummary.vue
+++ b/src/pages/Route/Vehicle/Card/VehicleSummary.vue
@@ -13,16 +13,22 @@ const props = defineProps({ id: { type: [Number, String], default: null } });
const route = useRoute();
const entityId = computed(() => props.id || +route.params.id);
+const baseLink = `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}`;
const links = {
- 'basic-data': `#/vehicle/${entityId.value}/basic-data`,
- notes: `#/vehicle/${entityId.value}/notes`,
- dms: `#/vehicle/${entityId.value}/dms`,
- 'invoice-in': `#/vehicle/${entityId.value}/invoice-in`,
- events: `#/vehicle/${entityId.value}/events`,
+ 'basic-data': `${baseLink}/basic-data`,
+ notes: `${baseLink}/notes`,
+ dms: `${baseLink}/dms`,
+ 'invoice-in': `${baseLink}/invoice-in`,
+ events: `${baseLink}/events`,
};
-
+
{{ entity.id }} - {{ entity.numberPlate }}
@@ -49,7 +55,10 @@ const links = {
{{ entity.supplier?.name }}
-
+
@@ -58,6 +67,7 @@ const links = {
{{ entity.supplierCooler?.name }}
diff --git a/src/pages/Route/Vehicle/VehicleList.vue b/src/pages/Route/Vehicle/VehicleList.vue
index e5b945010..a79cc2e35 100644
--- a/src/pages/Route/Vehicle/VehicleList.vue
+++ b/src/pages/Route/Vehicle/VehicleList.vue
@@ -116,6 +116,7 @@ const columns = computed(() => [
title: t('components.smartCard.openSummary'),
icon: 'preview',
action: (row) => viewSummary(row.id, VehicleSummary),
+ isPrimary: true,
},
],
},
diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml
index cc445f412..283b61855 100644
--- a/src/pages/Route/locale/en.yml
+++ b/src/pages/Route/locale/en.yml
@@ -1,48 +1,79 @@
route:
+ filter:
+ Served: Served
+ extendedList:
+ selectStartingDate: Select the starting date
+ startingDate: Starting date
+ cloneSelectedRoutes: Clone selected routes
+ downloadSelectedRoutes: Download selected routes as PDF
+ markServed: Mark as served
roadmap:
+ roadmap: Roadmap
+ carrier: Carrier
+ vehicle: Vehicle
+ price: Price
+ observations: Observations
+ etd: ETD
+ dateCantEmpty: The date can't be empty
+ createRoadmap: Create roadmap
+ deleteRoadmap: Delete roadmap(s)
+ cloneSelected: Clone selected routes
+ selectedRoadmapsRemoved: Selected roadmaps will be removed
+ areYouSure: Are you sure you want to continue?
+ selectEtd: Select the estimated date of departure (ETD)
search: Search roadmap
searchInfo: You can search by roadmap reference
params:
+ warehouseFk: Warehouse
+ description: Description
+ m3: m³
+ scopeDays: Days Onward
+ vehicleFk: Vehicle
+ agencyModeFk: Agency
+ workerFk: Worker
+ from: From
+ to: To
+ isOk: Served
etd: ETD
tractorPlate: Plate
price: Price
observations: Observations
- id: ID
+ id: Id
name: Name
cmrFk: CMR id
hasCmrDms: Attached in gestdoc
ticketFk: Ticketd id
routeFk: Route id
+ clientFk: Client id
+ countryFk: Country
shipped: Shipped
agencyAgreement: Agency agreement
agencyModeName: Agency route
+ isOwn: Own
+ isAnyVolumeallowed: Any volume allowed
Worker: Worker
Agency: Agency
Vehicle: Vehicle
Description: Description
hourStarted: H.Start
hourFinished: H.End
- dated: Dated
- From: From
- To: To
+ createRoute: Create route
Date: Date
KmStart: Km start
KmEnd: Km end
Served: Served
- Clone Selected Routes: Clone selected routes
- Select the starting date: Select the starting date
- Stating date: Starting date
- Cancel: Cancel
- Mark as served: Mark as served
- Download selected routes as PDF: Download selected routes as PDF
- Add ticket: Add ticket
- Summary: Summary
+ addTicket: Add ticket
+ routeSummary: Go to summary
Route is closed: Route is closed
Route is not served: Route is not served
search: Search route
searchInfo: You can search by route reference
+ dated: Dated
+ preview: Preview
cmr:
- list:
+ search: Search Cmr
+ searchInfo: You can search Cmr by Id
+ params:
results: results
cmrFk: CMR id
hasCmrDms: Attached in gestdoc
@@ -50,8 +81,10 @@ route:
'false': 'No'
ticketFk: Ticketd id
routeFk: Route id
- country: Country
+ countryFk: Country
clientFk: Client id
+ warehouseFk: Warehouse
shipped: Preparation date
viewCmr: View CMR
- downloadCmrs: Download CMRs
\ No newline at end of file
+ downloadCmrs: Download CMRs
+ search: General search
diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml
index 51d43774a..2785ded31 100644
--- a/src/pages/Route/locale/es.yml
+++ b/src/pages/Route/locale/es.yml
@@ -1,21 +1,57 @@
route:
+ filter:
+ Served: Servida
+ extendedList:
+ selectStartingDate: Seleccione la fecha de inicio
+ statingDate: Fecha de inicio
+ cloneSelectedRoutes: Clonar rutas seleccionadas
+ downloadSelectedRoutes: Descargar rutas seleccionadas como PDF
+ markServed: Marcar como servidas
roadmap:
+ roadmap: Troncal
+ carrier: Transportista
+ vehicle: Vehículo
+ price: Precio
+ observations: Observaciones
+ etd: ETD
+ dateCantEmpty: La fecha no puede estar vacía
+ createRoadmap: Crear troncal
+ deleteRoadmap: Eliminar troncal(es)
+ cloneSelected: Clonar rutas seleccionadas
+ selectedRoadmapsRemoved: Los troncales seleccionadas serán eliminados
+ areYouSure: ¿Seguro que quieres continuar?
+ selectEtd: Selecciona la fecha estimada de salida
search: Buscar troncales
searchInfo: Puedes buscar por referencia del troncal
params:
- agencyModeName: Agencia Ruta
- agencyAgreement: Agencia Acuerdo
- id: Id
- name: Troncal
+ warehouseFk: Almacén
+ description: Descripción
+ m3: m³
+ scopeDays: Días adelante
+ vehicleFk: Vehículo
+ agencyModeFk: Agencia
+ workerFk: Trabajador
+ from: Desde
+ to: Hasta
+ isOk: Servida
etd: ETD
tractorPlate: Matrícula
price: Precio
observations: Observaciones
+ id: Id
+ name: Troncal
cmrFk: Id CMR
hasCmrDms: Gestdoc
+ search: Búsqueda general
ticketFk: Id ticket
- routeFK: Id ruta
+ routeFk: Id ruta
+ clientFk: Id cliente
+ countryFk: Pais
shipped: Fecha preparación
+ agencyModeName: Agencia Ruta
+ agencyAgreement: Agencia Acuerdo
+ isOwn: Propio
+ isAnyVolumeAllowed: Cualquier volumen
Worker: Trabajador
Agency: Agencia
Vehicle: Vehículo
@@ -23,25 +59,18 @@ route:
hourStarted: H.Inicio
hourFinished: H.Fin
createRoute: Crear ruta
- From: Desde
- To: Hasta
Date: Fecha
KmStart: Km inicio
KmEnd: Km fin
Served: Servida
- Clone Selected Routes: Clonar rutas seleccionadas
- Select the starting date: Seleccione la fecha de inicio
- Stating date: Fecha de inicio
- Cancel: Cancelar
- Mark as served: Marcar como servidas
- Download selected routes as PDF: Descargar rutas seleccionadas como PDF
- Add ticket: Añadir tickets
- preview: Vista previa
- Summary: Resumen
+ addTicket: Añadir tickets
+ routeSummary: Ir a vista previa
Route is closed: La ruta está cerrada
Route is not served: La ruta no está servida
search: Buscar rutas
searchInfo: Puedes buscar por referencia de la ruta
+ dated: Fecha
+ preview: Vista previa
cmr:
list:
results: resultados
@@ -55,4 +84,4 @@ route:
clientFk: Id cliente
shipped: Fecha preparación
viewCmr: Ver CMR
- downloadCmrs: Descargar CMRs
\ No newline at end of file
+ downloadCmrs: Descargar CMRs
diff --git a/src/pages/Shelving/Card/ShelvingCard.vue b/src/pages/Shelving/Card/ShelvingCard.vue
index 9e0ac8ad2..e2fb79fb0 100644
--- a/src/pages/Shelving/Card/ShelvingCard.vue
+++ b/src/pages/Shelving/Card/ShelvingCard.vue
@@ -1,11 +1,11 @@
- {
});
- {
-
+
diff --git a/src/pages/Shelving/Card/ShelvingFilter.vue b/src/pages/Shelving/Card/ShelvingFilter.vue
index 56cf4f58c..35657a972 100644
--- a/src/pages/Shelving/Card/ShelvingFilter.vue
+++ b/src/pages/Shelving/Card/ShelvingFilter.vue
@@ -2,6 +2,7 @@
import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
+import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
const { t } = useI18n();
const props = defineProps({
@@ -38,27 +39,14 @@ const emit = defineEmits(['search']);
option-label="code"
:filter-options="['id', 'code']"
dense
- outlined
- rounded
+ filled
sort-by="code ASC"
/>
-
+
diff --git a/src/pages/Shelving/Card/ShelvingSummary.vue b/src/pages/Shelving/Card/ShelvingSummary.vue
index f89ff4d78..4a6669624 100644
--- a/src/pages/Shelving/Card/ShelvingSummary.vue
+++ b/src/pages/Shelving/Card/ShelvingSummary.vue
@@ -6,6 +6,7 @@ import VnLv from 'components/ui/VnLv.vue';
import VnUserLink from 'components/ui/VnUserLink.vue';
import filter from './ShelvingFilter.js';
import ShelvingDescriptorMenu from './ShelvingDescriptorMenu.vue';
+import VnTitle from 'src/components/common/VnTitle.vue';
const $props = defineProps({
id: {
@@ -38,13 +39,10 @@ const entityId = computed(() => $props.id || route.params.id);
-
+
-import VnCardBeta from 'components/common/VnCardBeta.vue';
+import VnCard from 'components/common/VnCard.vue';
import ParkingDescriptor from 'pages/Shelving/Parking/Card/ParkingDescriptor.vue';
import filter from './ParkingFilter.js';
-
import { computed } from 'vue';
import { useRoute } from 'vue-router';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import VnLv from 'components/ui/VnLv.vue';
import filter from './ParkingFilter.js';
const props = defineProps({
@@ -16,17 +16,17 @@ const route = useRoute();
const entityId = computed(() => props.id || route.params.id);
-
-
+
diff --git a/src/pages/Shelving/Parking/Card/ParkingSummary.vue b/src/pages/Shelving/Parking/Card/ParkingSummary.vue
index 7188ebeb6..1365c71ca 100644
--- a/src/pages/Shelving/Parking/Card/ParkingSummary.vue
+++ b/src/pages/Shelving/Parking/Card/ParkingSummary.vue
@@ -4,6 +4,7 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'components/ui/VnLv.vue';
+import VnTitle from 'src/components/common/VnTitle.vue';
const $props = defineProps({
id: {
@@ -28,13 +29,10 @@ const filter = {
-
+
-
+
@@ -51,8 +47,7 @@ const emit = defineEmits(['search']);
option-label="description"
:label="t('params.sectorFk')"
dense
- outlined
- rounded
+ filled
:options="sectors"
use-input
input-debounce="0"
diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue
index 4e0c21100..651121de8 100644
--- a/src/pages/Shelving/ShelvingList.vue
+++ b/src/pages/Shelving/ShelvingList.vue
@@ -1,14 +1,17 @@
@@ -37,48 +87,75 @@ function navigate(id) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('shelving.list.newShelving') }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ es:
+ shelving:
+ list:
+ parking: Estacionamiento
+ priority: Prioridad
+
+ summary:
+ recyclable: Reciclable
+ en:
+ shelving:
+ list:
+ parking: Parking
+ priority: Priority
+
+ summary:
+ recyclable: Recyclable
+
diff --git a/src/pages/Supplier/Card/SupplierBalanceFilter.vue b/src/pages/Supplier/Card/SupplierBalanceFilter.vue
index c4b63d9c8..c727688ad 100644
--- a/src/pages/Supplier/Card/SupplierBalanceFilter.vue
+++ b/src/pages/Supplier/Card/SupplierBalanceFilter.vue
@@ -33,7 +33,7 @@ defineProps({
:label="t('params.from')"
v-model="params.from"
@update:model-value="searchFn()"
- is-outlined
+ filled
/>
@@ -47,8 +47,7 @@ defineProps({
:include="{ relation: 'accountingType' }"
sort-by="id"
dense
- outlined
- rounded
+ filled
>
@@ -74,8 +73,7 @@ defineProps({
option-label="name"
hide-selected
dense
- outlined
- rounded
+ filled
/>
diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue
index e30f79f96..74b3520bf 100644
--- a/src/pages/Supplier/Card/SupplierCard.vue
+++ b/src/pages/Supplier/Card/SupplierCard.vue
@@ -1,10 +1,10 @@
- {
- {{ buy.itemName }}
+ {{ buy.itemName }}
diff --git a/src/pages/Supplier/Card/SupplierConsumptionFilter.vue b/src/pages/Supplier/Card/SupplierConsumptionFilter.vue
index 390f7d9ff..e21e37eb3 100644
--- a/src/pages/Supplier/Card/SupplierConsumptionFilter.vue
+++ b/src/pages/Supplier/Card/SupplierConsumptionFilter.vue
@@ -25,20 +25,12 @@ defineProps({
-
+
-
+
@@ -54,8 +46,7 @@ defineProps({
option-label="nickname"
hide-selected
dense
- outlined
- rounded
+ filled
/>
@@ -73,8 +64,7 @@ defineProps({
option-label="name"
hide-selected
dense
- outlined
- rounded
+ filled
>
@@ -102,8 +92,7 @@ defineProps({
option-label="name"
hide-selected
dense
- outlined
- rounded
+ filled
/>
@@ -113,7 +102,7 @@ defineProps({
:label="t('params.from')"
v-model="params.from"
@update:model-value="searchFn()"
- is-outlined
+ filled
/>
@@ -123,7 +112,7 @@ defineProps({
:label="t('params.to')"
v-model="params.to"
@update:model-value="searchFn()"
- is-outlined
+ filled
/>
diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue
index 462bdf853..2863784ab 100644
--- a/src/pages/Supplier/Card/SupplierDescriptor.vue
+++ b/src/pages/Supplier/Card/SupplierDescriptor.vue
@@ -3,7 +3,7 @@ import { ref, computed, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import EntityDescriptor from 'components/ui/EntityDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import { toDateString } from 'src/filters';
@@ -61,7 +61,7 @@ const getEntryQueryParams = (supplier) => {
- {
-
+
diff --git a/src/pages/Supplier/Card/SupplierFilter.js b/src/pages/Supplier/Card/SupplierFilter.js
index 3ce5c3de2..3aabe2c6d 100644
--- a/src/pages/Supplier/Card/SupplierFilter.js
+++ b/src/pages/Supplier/Card/SupplierFilter.js
@@ -11,6 +11,11 @@ export default {
'isSerious',
'isTrucker',
'account',
+ 'workerFk',
+ 'note',
+ 'isReal',
+ 'isPayMethodChecked',
+ 'companySize',
],
include: [
{
diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue
index ecee5b76b..4293bd41a 100644
--- a/src/pages/Supplier/Card/SupplierFiscalData.vue
+++ b/src/pages/Supplier/Card/SupplierFiscalData.vue
@@ -108,7 +108,6 @@ function handleLocation(data, location) {
diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue
index c9625518f..ec89d77e0 100644
--- a/src/pages/Supplier/SupplierList.vue
+++ b/src/pages/Supplier/SupplierList.vue
@@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
import VnTable from 'components/VnTable/VnTable.vue';
import VnSection from 'src/components/common/VnSection.vue';
import VnInput from 'src/components/common/VnInput.vue';
-import VnSelect from 'src/components/common/VnSelect.vue';
import FetchData from 'src/components/FetchData.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import SupplierSummary from './Card/SupplierSummary.vue';
@@ -53,7 +52,7 @@ const columns = computed(() => [
label: t('globals.alias'),
name: 'alias',
columnFilter: {
- name: 'search',
+ name: 'nickname',
},
cardVisible: true,
},
@@ -120,6 +119,21 @@ const columns = computed(() => [
],
},
]);
+
+const filterColumns = computed(() => {
+ const copy = [...columns.value];
+ copy.splice(copy.length - 1, 0, {
+ align: 'left',
+ label: t('globals.params.provinceFk'),
+ name: 'provinceFk',
+ options: provincesOptions.value,
+ columnFilter: {
+ component: 'select',
+ },
+ });
+
+ return copy;
+});
[
/>
[
-
-
-
diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue b/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue
index ef2eb75d6..3c2fe95e5 100644
--- a/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue
+++ b/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue
@@ -44,8 +44,8 @@ const getPriceDifference = async () => {
shipped: ticket.value.shipped,
};
const { data } = await axios.post(
- `tickets/${ticket.value.id}/priceDifference`,
- params
+ `tickets/${formData.value.id}/priceDifference`,
+ params,
);
ticket.value.sale = data;
};
@@ -71,8 +71,8 @@ const submit = async () => {
};
const { data } = await axios.post(
- `tickets/${ticket.value.id}/componentUpdate`,
- params
+ `tickets/${formData.value.id}/componentUpdate`,
+ params,
);
if (!data) return;
@@ -99,7 +99,7 @@ const onNextStep = async () => {
openConfirmationModal(
t('basicData.negativesConfirmTitle'),
t('basicData.negativesConfirmMessage'),
- submitWithNegatives
+ submitWithNegatives,
);
else submit();
}
diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue
index e22d5799a..19dbd608c 100644
--- a/src/pages/Ticket/Card/TicketCard.vue
+++ b/src/pages/Ticket/Card/TicketCard.vue
@@ -1,10 +1,10 @@
- {
return $props.id || route.params.id;
});
const problems = ref({});
+const originalTicket = ref();
function ticketFilter(ticket) {
return JSON.stringify({ clientFk: ticket.clientFk });
}
+async function getClaims() {
+ const userFilter = { where: { refundTicketFk: entityId.value } };
+ const { data } = await axios.get(`TicketRefunds`, {
+ params: { filter: JSON.stringify(userFilter) },
+ });
+ if (!data) return;
+ originalTicket.value = data[0]?.originalTicketFk;
+}
+async function getProblems() {
+ const { data } = await axios.get(`Tickets/${entityId.value}/getTicketProblems`);
+ if (!data) return;
+ problems.value = data[0];
+}
+function getInfo() {
+ getClaims();
+ getProblems();
+}
- ([problems] = data)"
- />
-
@@ -73,12 +88,12 @@ function ticketFilter(ticket) {
-
+
-
+
+ {{ entity?.client?.department?.name || '-' }}
+
+
-
+
-
+
@@ -129,9 +144,18 @@ function ticketFilter(ticket) {
>
{{ t('ticket.card.newOrder') }}
+
+ {{ t('ticket.card.ticketClaimed') }}
+
-
+
diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
index 63e45c8ab..f7389b592 100644
--- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue
+++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
@@ -32,7 +32,7 @@ onMounted(() => {
watch(
() => props.ticket,
- () => restoreTicket
+ () => restoreTicket,
);
const { push, currentRoute } = useRouter();
@@ -58,7 +58,7 @@ const hasDocuwareFile = ref();
const quasar = useQuasar();
const canRestoreTicket = ref(false);
-const onClientSelected = async(clientId) =>{
+const onClientSelected = async (clientId) => {
client.value = clientId;
await fetchClient();
await fetchAddresses();
@@ -66,10 +66,10 @@ const onClientSelected = async(clientId) =>{
const onAddressSelected = (addressId) => {
address.value = addressId;
-}
+};
const fetchClient = async () => {
- const response = await getClient(client.value)
+ const response = await getClient(client.value);
if (!response) return;
const [retrievedClient] = response.data;
selectedClient.value = retrievedClient;
@@ -151,7 +151,7 @@ function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') {
recipientId: ticket.value.clientFk,
type: type,
},
- '_blank'
+ '_blank',
);
}
@@ -297,8 +297,8 @@ async function transferClient() {
clientFk: client.value,
addressFk: address.value,
};
-
- await axios.patch( `Tickets/${ticketId.value}/transferClient`, params );
+
+ await axios.patch(`Tickets/${ticketId.value}/transferClient`, params);
window.location.reload();
}
@@ -339,7 +339,7 @@ async function changeShippedHour(time) {
const { data } = await axios.post(
`Tickets/${ticketId.value}/updateEditableTicket`,
- params
+ params,
);
if (data) window.location.reload();
@@ -405,8 +405,7 @@ async function uploadDocuware(force) {
uploadDocuware(true);
});
- const { data } = await axios.post(`Docuwares/upload`, {
- fileCabinet: 'deliveryNote',
+ const { data } = await axios.post(`Docuwares/upload-delivery-note`, {
ticketIds: [parseInt(ticketId.value)],
});
@@ -500,7 +499,7 @@ async function ticketToRestore() {
- {
};
const getMana = async () => {
- const { data } = await axios.get(`Tickets/${route.params.id}/getSalesPersonMana`);
+ const { data } = await axios.get(`Tickets/${route.params.id}/getDepartmentMana`);
mana.value = data;
await getUsesMana();
};
diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue
index f8084ff2f..e9e153b70 100644
--- a/src/pages/Ticket/Card/TicketExpedition.vue
+++ b/src/pages/Ticket/Card/TicketExpedition.vue
@@ -37,7 +37,6 @@ const expeditionStateTypes = ref([]);
const expeditionsFilter = computed(() => ({
where: { ticketFk: route.params.id },
- order: ['created DESC'],
}));
const ticketArrayData = useArrayData('Ticket');
@@ -105,6 +104,9 @@ const columns = computed(() => [
name: 'created',
align: 'left',
cardVisible: true,
+ columnFilter: {
+ component: 'date',
+ },
format: (row) => toDateTimeFormat(row.created),
},
{
@@ -201,7 +203,7 @@ const getExpeditionState = async (expedition) => {
const openGrafana = (expeditionFk) => {
useOpenURL(
- `https://grafana.verdnatura.es/d/de1njb6p5answd/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`
+ `https://grafana.verdnatura.es/d/de1njb6p5answd/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`,
);
};
@@ -287,7 +289,7 @@ onMounted(async () => {
openConfirmationModal(
'',
t('expedition.removeExpeditionSubtitle'),
- deleteExpedition
+ deleteExpedition,
)
"
>
@@ -302,7 +304,6 @@ onMounted(async () => {
url="Expeditions/filter"
search-url="expeditions"
:columns="columns"
- :filter="expeditionsFilter"
v-model:selected="selectedRows"
:table="{
'row-key': 'id',
@@ -316,11 +317,14 @@ onMounted(async () => {
return { id: value };
case 'packageItemName':
return { packagingItemFk: value };
+ case 'created':
+ return { 'e.created': { gte: value } };
}
}
"
:redirect="false"
order="created DESC"
+ :filter="expeditionsFilter"
>
diff --git a/src/pages/Ticket/Card/TicketFilter.js b/src/pages/Ticket/Card/TicketFilter.js
index 7846f1658..daa204a7a 100644
--- a/src/pages/Ticket/Card/TicketFilter.js
+++ b/src/pages/Ticket/Card/TicketFilter.js
@@ -12,7 +12,7 @@ export default {
fields: [
'id',
'name',
- 'salesPersonFk',
+ 'departmentFk',
'phone',
'mobile',
'email',
@@ -29,7 +29,7 @@ export default {
fields: ['id', 'lang'],
},
},
- { relation: 'salesPersonUser' },
+ { relation: 'department' },
],
},
},
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index 456a151a3..2fb305cc3 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -174,22 +174,26 @@ const getSaleTotal = (sale) => {
return price - discount;
};
-const getRowUpdateInputEvents = (sale) => ({
- 'keyup.enter': () => {
- changeQuantity(sale);
- },
- blur: () => {
- changeQuantity(sale);
- },
-});
+const getRowUpdateInputEvents = (sale) => {
+ return {
+ 'keyup.enter': () => {
+ changeQuantity(sale);
+ },
+ blur: () => {
+ changeQuantity(sale);
+ },
+ };
+};
const resetChanges = async () => {
arrayData.fetch({ append: false });
tableRef.value.reload();
+ selectedRows.value = [];
};
const changeQuantity = async (sale) => {
if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
return;
+ else sale.originalQuantity = sale.quantity;
if (!sale.id) return addSale(sale);
if (await isSalePrepared(sale)) {
@@ -235,7 +239,7 @@ const addSale = async (sale) => {
notify('globals.dataSaved', 'positive');
sale.isNew = false;
- arrayData.fetch({});
+ resetChanges();
};
const changeConcept = async (sale) => {
if (await isSalePrepared(sale)) {
@@ -258,6 +262,18 @@ const DEFAULT_EDIT = {
oldQuantity: null,
};
const edit = ref({ ...DEFAULT_EDIT });
+const usesMana = ref(null);
+
+const getUsesMana = async () => {
+ const { data } = await axios.get('Sales/usesMana');
+ usesMana.value = data;
+};
+
+const getMana = async () => {
+ const { data } = await axios.get(`Tickets/${route.params.id}/getDepartmentMana`);
+ mana.value = data;
+ await getUsesMana();
+};
const selectedValidSales = computed(() => {
if (!sales.value) return;
@@ -310,7 +326,7 @@ const changeDiscount = async (sale) => {
}
};
-const updateDiscounts = async (sales, newDiscount = null) => {
+const updateDiscounts = async (sales, newDiscount) => {
const salesTracking = await fetchSalesTracking();
const someSaleIsPrepared = salesTracking.some((sale) =>
@@ -320,12 +336,11 @@ const updateDiscounts = async (sales, newDiscount = null) => {
else updateDiscount(sales, newDiscount);
};
-const updateDiscount = async (sales, newDiscount = null) => {
- const saleIds = sales.map((sale) => sale.id);
- const _newDiscount = newDiscount || edit.value.discount;
+const updateDiscount = async (sales, newDiscount = 0) => {
+ const salesIds = sales.map(({ id }) => id);
const params = {
- salesIds: saleIds,
- newDiscount: _newDiscount,
+ salesIds,
+ newDiscount,
manaCode: manaCode.value,
};
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
@@ -474,7 +489,7 @@ const endNewRow = (row) => {
};
async function confirmUpdate(cb) {
- await quasar
+ quasar
.dialog({
component: VnConfirm,
componentProps: {
@@ -664,6 +679,7 @@ watch(
selection: 'multiple',
}"
:right-search="false"
+ :search-url="false"
:column-search="false"
:disable-option="{ card: true }"
auto-load
@@ -681,6 +697,17 @@ watch(
:disabled-attr="isTicketEditable"
>
+
+
+ {{ `saleGroup: ${row.saleGroupFk}` }}
+
+
@@ -692,7 +719,7 @@ watch(
-
+
@@ -740,7 +767,7 @@ watch(
{{ row?.item?.subName.toUpperCase() }}