Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
15010d3e41
|
@ -161,7 +161,7 @@ const arrayData = useArrayData(arrayDataKey, {
|
||||||
searchUrl: false,
|
searchUrl: false,
|
||||||
mapKey: $attrs['map-key'],
|
mapKey: $attrs['map-key'],
|
||||||
});
|
});
|
||||||
|
const isMenuOpened = ref(false);
|
||||||
const computedSortBy = computed(() => {
|
const computedSortBy = computed(() => {
|
||||||
return $props.sortBy || $props.optionLabel + ' ASC';
|
return $props.sortBy || $props.optionLabel + ' ASC';
|
||||||
});
|
});
|
||||||
|
@ -184,7 +184,9 @@ onMounted(() => {
|
||||||
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
const someIsLoading = computed(() => isLoading.value || !!arrayData?.isLoading?.value);
|
const someIsLoading = computed(
|
||||||
|
() => (isLoading.value || !!arrayData?.isLoading?.value) && !isMenuOpened.value,
|
||||||
|
);
|
||||||
function findKeyInOptions() {
|
function findKeyInOptions() {
|
||||||
if (!$props.options) return;
|
if (!$props.options) return;
|
||||||
return filter($props.modelValue, $props.options)?.length;
|
return filter($props.modelValue, $props.options)?.length;
|
||||||
|
@ -369,6 +371,8 @@ function getCaption(opt) {
|
||||||
:input-debounce="useURL ? '300' : '0'"
|
:input-debounce="useURL ? '300' : '0'"
|
||||||
:loading="someIsLoading"
|
:loading="someIsLoading"
|
||||||
@virtual-scroll="onScroll"
|
@virtual-scroll="onScroll"
|
||||||
|
@popup-hide="isMenuOpened = false"
|
||||||
|
@popup-show="isMenuOpened = true"
|
||||||
@keydown="handleKeyDown"
|
@keydown="handleKeyDown"
|
||||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
||||||
:data-url="url"
|
:data-url="url"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
import { downloadFile } from 'src/composables/downloadFile';
|
import { downloadFile } from 'src/composables/downloadFile';
|
||||||
|
|
||||||
import CustomerFileManagementDelete from 'src/pages/Customer/components/CustomerFileManagementDelete.vue';
|
import CustomerFileManagementDelete from 'src/pages/Customer/components/CustomerFileManagementDelete.vue';
|
||||||
|
@ -12,7 +12,7 @@ const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { openReport } = usePrintService();
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -24,7 +24,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const setDownloadFile = () => downloadFile($props.id);
|
const setDownloadFile = () => openReport(`dms/${$props.id}/downloadFile`, {}, '_blank');
|
||||||
|
|
||||||
const toCustomerFileManagementEdit = () => {
|
const toCustomerFileManagementEdit = () => {
|
||||||
router.push({
|
router.push({
|
||||||
|
|
|
@ -40,13 +40,11 @@ const dateRanges = computed(() => {
|
||||||
return { from, to };
|
return { from, to };
|
||||||
});
|
});
|
||||||
|
|
||||||
const reportParams = computed(() => {
|
const reportParams = computed(() => ({
|
||||||
return {
|
recipientId: Number(route.params.id),
|
||||||
recipientId: Number(route.params.id),
|
from: dateRange(dateRanges.value.from)[0].toISOString(),
|
||||||
to: dateRange(dateRanges.value.to)[1],
|
to: dateRange(dateRanges.value.to)[1].toISOString(),
|
||||||
from: dateRange(dateRanges.value.from)[1],
|
}));
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
async function getSupplierConsumptionData() {
|
async function getSupplierConsumptionData() {
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
|
|
|
@ -291,7 +291,7 @@ async function getZone(options) {
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('ticketList.warehouse')"
|
:label="t('basicData.warehouse')"
|
||||||
v-model="warehouseId"
|
v-model="warehouseId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -299,7 +299,7 @@ async function getZone(options) {
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
map-options
|
||||||
:required="true"
|
:required="true"
|
||||||
:rules="validate('ticketList.warehouse')"
|
:rules="validate('basicData.warehouse')"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md no-wrap">
|
<VnRow class="row q-gutter-md q-mb-md no-wrap">
|
||||||
|
|
|
@ -121,7 +121,7 @@ const ticketColumns = computed(() => [
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.lines),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.lines),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
label: t('advanceTickets.import'),
|
label: t('advanceTickets.import'),
|
||||||
name: 'totalWithVat',
|
name: 'totalWithVat',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
@ -172,6 +172,15 @@ const ticketColumns = computed(() => [
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
name: 'futureLiters',
|
name: 'futureLiters',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t('advanceTickets.preparation'),
|
||||||
|
name: 'futurePreparation',
|
||||||
|
field: 'futurePreparation',
|
||||||
|
align: 'left',
|
||||||
|
sortable: true,
|
||||||
|
headerClass: 'horizontal-separator',
|
||||||
|
columnFilter: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('advanceTickets.futureZone'),
|
label: t('advanceTickets.futureZone'),
|
||||||
|
@ -196,15 +205,17 @@ const ticketColumns = computed(() => [
|
||||||
label: t('advanceTickets.notMovableLines'),
|
label: t('advanceTickets.notMovableLines'),
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
name: 'notMovableLines',
|
name: 'notMovableLines',
|
||||||
|
class: 'shrink',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('advanceTickets.futureLines'),
|
label: t('advanceTickets.futureLines'),
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
name: 'futureLines',
|
name: 'futureLines',
|
||||||
|
class: 'shrink',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
label: t('advanceTickets.futureImport'),
|
label: t('advanceTickets.futureImport'),
|
||||||
name: 'futureTotalWithVat',
|
name: 'futureTotalWithVat',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
@ -385,7 +396,12 @@ watch(
|
||||||
if (!$el) return;
|
if (!$el) return;
|
||||||
const head = $el.querySelector('thead');
|
const head = $el.querySelector('thead');
|
||||||
const firstRow = $el.querySelector('thead > tr');
|
const firstRow = $el.querySelector('thead > tr');
|
||||||
|
const headSelectionCol = $el.querySelector(
|
||||||
|
'thead tr.bg-header th.q-table--col-auto-width',
|
||||||
|
);
|
||||||
|
if (headSelectionCol) {
|
||||||
|
headSelectionCol.classList.add('horizontal-separator');
|
||||||
|
}
|
||||||
const newRow = document.createElement('tr');
|
const newRow = document.createElement('tr');
|
||||||
destinationElRef.value = document.createElement('th');
|
destinationElRef.value = document.createElement('th');
|
||||||
originElRef.value = document.createElement('th');
|
originElRef.value = document.createElement('th');
|
||||||
|
@ -394,8 +410,10 @@ watch(
|
||||||
destinationElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
destinationElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
||||||
originElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
originElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
||||||
|
|
||||||
destinationElRef.value.setAttribute('colspan', '7');
|
originElRef.value.classList.add('advance-icon');
|
||||||
originElRef.value.setAttribute('colspan', '9');
|
|
||||||
|
destinationElRef.value.setAttribute('colspan', '9');
|
||||||
|
originElRef.value.setAttribute('colspan', '11');
|
||||||
|
|
||||||
destinationElRef.value.textContent = `${t(
|
destinationElRef.value.textContent = `${t(
|
||||||
'advanceTickets.destination',
|
'advanceTickets.destination',
|
||||||
|
@ -490,8 +508,6 @@ watch(
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
v-model:selected="selectedTickets"
|
v-model:selected="selectedTickets"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
:no-data-label="$t('globals.noResults')"
|
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:order="['futureTotalWithVat ASC']"
|
:order="['futureTotalWithVat ASC']"
|
||||||
auto-load
|
auto-load
|
||||||
|
|
|
@ -85,6 +85,7 @@ const ticketColumns = computed(() => [
|
||||||
label: t('advanceTickets.liters'),
|
label: t('advanceTickets.liters'),
|
||||||
name: 'liters',
|
name: 'liters',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
class: 'shrink',
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -177,7 +178,12 @@ watch(
|
||||||
if (!$el) return;
|
if (!$el) return;
|
||||||
const head = $el.querySelector('thead');
|
const head = $el.querySelector('thead');
|
||||||
const firstRow = $el.querySelector('thead > tr');
|
const firstRow = $el.querySelector('thead > tr');
|
||||||
|
const headSelectionCol = $el.querySelector(
|
||||||
|
'thead tr.bg-header th.q-table--col-auto-width',
|
||||||
|
);
|
||||||
|
if (headSelectionCol) {
|
||||||
|
headSelectionCol.classList.add('horizontal-separator');
|
||||||
|
}
|
||||||
const newRow = document.createElement('tr');
|
const newRow = document.createElement('tr');
|
||||||
destinationElRef.value = document.createElement('th');
|
destinationElRef.value = document.createElement('th');
|
||||||
originElRef.value = document.createElement('th');
|
originElRef.value = document.createElement('th');
|
||||||
|
@ -185,9 +191,10 @@ watch(
|
||||||
newRow.classList.add('bg-header');
|
newRow.classList.add('bg-header');
|
||||||
destinationElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
destinationElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
||||||
originElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
originElRef.value.classList.add('text-uppercase', 'color-vn-label');
|
||||||
|
originElRef.value.classList.add('advance-icon');
|
||||||
|
|
||||||
destinationElRef.value.setAttribute('colspan', '7');
|
destinationElRef.value.setAttribute('colspan', '9');
|
||||||
originElRef.value.setAttribute('colspan', '9');
|
originElRef.value.setAttribute('colspan', '7');
|
||||||
|
|
||||||
originElRef.value.textContent = `${t('advanceTickets.origin')}`;
|
originElRef.value.textContent = `${t('advanceTickets.origin')}`;
|
||||||
destinationElRef.value.textContent = `${t('advanceTickets.destination')}`;
|
destinationElRef.value.textContent = `${t('advanceTickets.destination')}`;
|
||||||
|
@ -371,4 +378,12 @@ watch(
|
||||||
:deep(.horizontal-bottom-separator) {
|
:deep(.horizontal-bottom-separator) {
|
||||||
border-bottom: 4px solid white !important;
|
border-bottom: 4px solid white !important;
|
||||||
}
|
}
|
||||||
|
:deep(th.advance-icon::after) {
|
||||||
|
content: '>>';
|
||||||
|
font-size: larger;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
float: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -120,6 +120,7 @@ basicData:
|
||||||
difference: Difference
|
difference: Difference
|
||||||
total: Total
|
total: Total
|
||||||
price: Price
|
price: Price
|
||||||
|
warehouse: Warehouse
|
||||||
newPrice: New price
|
newPrice: New price
|
||||||
chargeDifference: Charge difference to
|
chargeDifference: Charge difference to
|
||||||
withoutNegatives: Create without negatives
|
withoutNegatives: Create without negatives
|
||||||
|
|
|
@ -47,6 +47,7 @@ basicData:
|
||||||
difference: Diferencia
|
difference: Diferencia
|
||||||
total: Total
|
total: Total
|
||||||
price: Precio
|
price: Precio
|
||||||
|
warehouse: Almacén
|
||||||
newPrice: Nuevo precio
|
newPrice: Nuevo precio
|
||||||
chargeDifference: Cargar diferencia a
|
chargeDifference: Cargar diferencia a
|
||||||
withoutNegatives: Crear sin negativos
|
withoutNegatives: Crear sin negativos
|
||||||
|
|
|
@ -280,7 +280,7 @@ const fetchWeekData = async () => {
|
||||||
week: selectedWeekNumber.value,
|
week: selectedWeekNumber.value,
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const [{ data: mailData }, { data: countData }] = await Promise.allS([
|
const [{ data: mailData }, { data: countData }] = await Promise.all([
|
||||||
axios.get(`Workers/${route.params.id}/mail`, {
|
axios.get(`Workers/${route.params.id}/mail`, {
|
||||||
params: { filter: { where } },
|
params: { filter: { where } },
|
||||||
}),
|
}),
|
||||||
|
@ -292,8 +292,9 @@ const fetchWeekData = async () => {
|
||||||
state.value = mail?.state;
|
state.value = mail?.state;
|
||||||
reason.value = mail?.reason;
|
reason.value = mail?.reason;
|
||||||
canResend.value = !!countData.count;
|
canResend.value = !!countData.count;
|
||||||
} catch {
|
} catch (error) {
|
||||||
state.value = null;
|
state.value = null;
|
||||||
|
if (error?.status != 403) throw error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ describe('TicketList', () => {
|
||||||
});
|
});
|
||||||
}).as('ticket');
|
}).as('ticket');
|
||||||
|
|
||||||
cy.get('[data-cy="Warehouse_select"]').type('Warehouse Five');
|
cy.selectOption('[data-cy="Warehouse_select"]', 'Warehouse Five');
|
||||||
cy.get('.q-menu .q-item').contains('Warehouse Five').click();
|
cy.searchBtnFilterPanel();
|
||||||
cy.wait('@ticket').then((interception) => {
|
cy.wait('@ticket').then((interception) => {
|
||||||
const data = interception.response.body[1];
|
const data = interception.response.body[1];
|
||||||
expect(data.hasComponentLack).to.equal(1);
|
expect(data.hasComponentLack).to.equal(1);
|
||||||
|
|
Loading…
Reference in New Issue