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
|
||||
thermographs: Thermographs
|
||||
hb: HB
|
||||
roundedCc: Rounded CC
|
||||
basicData:
|
||||
daysInForward: Automatic movement (Raid)
|
||||
isRaid: Raid
|
||||
|
|
|
@ -924,6 +924,7 @@ travel:
|
|||
availabled: F. Disponible
|
||||
availabledHour: Hora Disponible
|
||||
hb: HB
|
||||
roundedCc: CC redondeado
|
||||
basicData:
|
||||
daysInForward: Desplazamiento automatico (redada)
|
||||
isRaid: Redada
|
||||
|
|
|
@ -249,7 +249,6 @@ function getBadgeAttrs(row) {
|
|||
let timeDiff = today - timeTicket;
|
||||
|
||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||
switch (row.entryTypeCode) {
|
||||
case 'regularization':
|
||||
case 'life':
|
||||
|
@ -274,6 +273,7 @@ function getBadgeAttrs(row) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||
return { color: 'transparent' };
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,13 @@ const entriesTableColumns = computed(() => {
|
|||
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',
|
||||
field: 'pallet',
|
||||
|
@ -193,14 +200,15 @@ const entriesTotals = computed(() => {
|
|||
freightValue: 0,
|
||||
packageValue: 0,
|
||||
cc: 0,
|
||||
roundedCc: 0,
|
||||
pallet: 0,
|
||||
m3: 0,
|
||||
};
|
||||
|
||||
entriesTableRows.value.forEach((row) => {
|
||||
for (const key in totals) {
|
||||
if (key === 'cc') {
|
||||
totals[key] += Math.ceil(row[key] || 0);
|
||||
if (key === 'roundedCc') {
|
||||
totals['roundedCc'] += Math.ceil(row['cc'] || 0);
|
||||
} else {
|
||||
totals[key] += row[key] || 0;
|
||||
}
|
||||
|
@ -212,6 +220,7 @@ const entriesTotals = computed(() => {
|
|||
freight: toCurrency(totals.freightValue),
|
||||
packageValue: toCurrency(totals.packageValue),
|
||||
cc: totals.cc.toFixed(2),
|
||||
roundedCc: totals.roundedCc,
|
||||
pallet: totals.pallet.toFixed(2),
|
||||
m3: totals.m3.toFixed(2),
|
||||
};
|
||||
|
@ -378,6 +387,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
</QBtn>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-roundedCc="{ col, value }">
|
||||
<QTd>
|
||||
{{ Math.ceil(value) || 0 }}
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-observation="{ value }">
|
||||
<QTd>
|
||||
<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.packageValue }}</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.m3 }}</QTd>
|
||||
</template>
|
||||
|
|
|
@ -118,8 +118,8 @@ describe('Route extended list', () => {
|
|||
cy.validateContent(selector, value);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should clone selected route and add ticket', () => {
|
||||
// task https://redmine.verdnatura.es/issues/8814
|
||||
xit('Should clone selected route and add ticket', () => {
|
||||
cy.get(selectors.firstRowSelectCheckBox).click();
|
||||
cy.get(selectors.cloneBtn).click();
|
||||
cy.dataCy('Starting date_inputDate').type('01-01-2001');
|
||||
|
@ -146,7 +146,8 @@ describe('Route extended list', () => {
|
|||
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.markServedBtn).click();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('TicketList', () => {
|
||||
describe.skip('TicketList', () => {
|
||||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -35,7 +35,8 @@ describe('TicketList', () => {
|
|||
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');
|
||||
searchResults();
|
||||
cy.wait('@ticketSearchbar');
|
||||
|
|
Loading…
Reference in New Issue