Merge pull request 'feat: add rounded CC field to travel summary and translations' (!1639) from ccRoundedFix into master
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1639 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
0eda125579
|
@ -841,6 +841,7 @@ travel:
|
||||||
availabledHour: Availabled hour
|
availabledHour: Availabled hour
|
||||||
thermographs: Thermographs
|
thermographs: Thermographs
|
||||||
hb: HB
|
hb: HB
|
||||||
|
roundedCc: Rounded CC
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Automatic movement (Raid)
|
daysInForward: Automatic movement (Raid)
|
||||||
isRaid: Raid
|
isRaid: Raid
|
||||||
|
|
|
@ -924,6 +924,7 @@ travel:
|
||||||
availabled: F. Disponible
|
availabled: F. Disponible
|
||||||
availabledHour: Hora Disponible
|
availabledHour: Hora Disponible
|
||||||
hb: HB
|
hb: HB
|
||||||
|
roundedCc: CC redondeado
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Desplazamiento automatico (redada)
|
daysInForward: Desplazamiento automatico (redada)
|
||||||
isRaid: Redada
|
isRaid: Redada
|
||||||
|
|
|
@ -249,7 +249,6 @@ function getBadgeAttrs(row) {
|
||||||
let timeDiff = today - timeTicket;
|
let timeDiff = today - timeTicket;
|
||||||
|
|
||||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
|
||||||
switch (row.entryTypeCode) {
|
switch (row.entryTypeCode) {
|
||||||
case 'regularization':
|
case 'regularization':
|
||||||
case 'life':
|
case 'life':
|
||||||
|
@ -274,6 +273,7 @@ function getBadgeAttrs(row) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||||
return { color: 'transparent' };
|
return { color: 'transparent' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,13 @@ const entriesTableColumns = computed(() => {
|
||||||
showValue: true,
|
showValue: true,
|
||||||
},
|
},
|
||||||
{ label: 'CC', field: 'cc', name: 'cc', align: 'left', showValue: true },
|
{ label: 'CC', field: 'cc', name: 'cc', align: 'left', showValue: true },
|
||||||
|
{
|
||||||
|
label: t('travel.summary.roundedCc'),
|
||||||
|
field: 'cc',
|
||||||
|
name: 'roundedCc',
|
||||||
|
align: 'left',
|
||||||
|
showValue: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Pallet',
|
label: 'Pallet',
|
||||||
field: 'pallet',
|
field: 'pallet',
|
||||||
|
@ -193,14 +200,15 @@ const entriesTotals = computed(() => {
|
||||||
freightValue: 0,
|
freightValue: 0,
|
||||||
packageValue: 0,
|
packageValue: 0,
|
||||||
cc: 0,
|
cc: 0,
|
||||||
|
roundedCc: 0,
|
||||||
pallet: 0,
|
pallet: 0,
|
||||||
m3: 0,
|
m3: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
entriesTableRows.value.forEach((row) => {
|
entriesTableRows.value.forEach((row) => {
|
||||||
for (const key in totals) {
|
for (const key in totals) {
|
||||||
if (key === 'cc') {
|
if (key === 'roundedCc') {
|
||||||
totals[key] += Math.ceil(row[key] || 0);
|
totals['roundedCc'] += Math.ceil(row['cc'] || 0);
|
||||||
} else {
|
} else {
|
||||||
totals[key] += row[key] || 0;
|
totals[key] += row[key] || 0;
|
||||||
}
|
}
|
||||||
|
@ -212,6 +220,7 @@ const entriesTotals = computed(() => {
|
||||||
freight: toCurrency(totals.freightValue),
|
freight: toCurrency(totals.freightValue),
|
||||||
packageValue: toCurrency(totals.packageValue),
|
packageValue: toCurrency(totals.packageValue),
|
||||||
cc: totals.cc.toFixed(2),
|
cc: totals.cc.toFixed(2),
|
||||||
|
roundedCc: totals.roundedCc,
|
||||||
pallet: totals.pallet.toFixed(2),
|
pallet: totals.pallet.toFixed(2),
|
||||||
m3: totals.m3.toFixed(2),
|
m3: totals.m3.toFixed(2),
|
||||||
};
|
};
|
||||||
|
@ -378,6 +387,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-roundedCc="{ col, value }">
|
||||||
|
<QTd>
|
||||||
|
{{ Math.ceil(value) || 0 }}
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-observation="{ value }">
|
<template #body-cell-observation="{ value }">
|
||||||
<QTd>
|
<QTd>
|
||||||
<QIcon name="insert_drive_file" color="primary" size="24px">
|
<QIcon name="insert_drive_file" color="primary" size="24px">
|
||||||
|
@ -394,6 +408,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
||||||
|
<QTd class="text-bold">{{ entriesTotals.roundedCc }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -118,8 +118,8 @@ describe('Route extended list', () => {
|
||||||
cy.validateContent(selector, value);
|
cy.validateContent(selector, value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// task https://redmine.verdnatura.es/issues/8814
|
||||||
it('Should clone selected route and add ticket', () => {
|
xit('Should clone selected route and add ticket', () => {
|
||||||
cy.get(selectors.firstRowSelectCheckBox).click();
|
cy.get(selectors.firstRowSelectCheckBox).click();
|
||||||
cy.get(selectors.cloneBtn).click();
|
cy.get(selectors.cloneBtn).click();
|
||||||
cy.dataCy('Starting date_inputDate').type('01-01-2001');
|
cy.dataCy('Starting date_inputDate').type('01-01-2001');
|
||||||
|
@ -146,7 +146,8 @@ describe('Route extended list', () => {
|
||||||
cy.readFile(`${downloadsFolder}/${fileName}`).should('exist');
|
cy.readFile(`${downloadsFolder}/${fileName}`).should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should mark as served the selected route', () => {
|
// task https://redmine.verdnatura.es/issues/8814
|
||||||
|
xit('Should mark as served the selected route', () => {
|
||||||
cy.get(selectors.lastRowSelectCheckBox).click();
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
cy.get(selectors.markServedBtn).click();
|
cy.get(selectors.markServedBtn).click();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('TicketList', () => {
|
describe.skip('TicketList', () => {
|
||||||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -35,7 +35,8 @@ describe('TicketList', () => {
|
||||||
cy.get('.summaryBody').should('exist');
|
cy.get('.summaryBody').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('filter client and create ticket', () => {
|
// task https://redmine.verdnatura.es/issues/8779
|
||||||
|
xit('filter client and create ticket', () => {
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
||||||
searchResults();
|
searchResults();
|
||||||
cy.wait('@ticketSearchbar');
|
cy.wait('@ticketSearchbar');
|
||||||
|
|
Loading…
Reference in New Issue