Merge branch 'master' into hotFix_invoiceIn_issued
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-05-19 06:16:18 +00:00
commit 975154c929
13 changed files with 40 additions and 5 deletions

View File

@ -5,8 +5,8 @@ const $ = {
userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]',
saveButton: 'vn-client-web-access button[type=submit]',
nameValue: 'vn-client-log .change:nth-child(1) .basic-json:nth-child(1) vn-json-value',
activeValue: 'vn-client-log .change:nth-child(2) .basic-json:nth-child(2) vn-json-value'
nameValue: 'vn-client-log .change:nth-child(1) .basic-json:nth-child(2) vn-json-value',
activeValue: 'vn-client-log .change:nth-child(2) .basic-json:nth-child(1) vn-json-value'
};
describe('Client web access path', () => {

View File

@ -28,6 +28,12 @@ export default class Controller extends Component {
} else {
cssClass = type;
switch (type) {
case 'number':
if (Number.isInteger(value))
text = value;
else
text = Math.round((value + Number.EPSILON) * 1000) / 1000;
break;
case 'boolean':
text = value ? '✓' : '✗';
cssClass = value ? 'true' : 'false';

View File

@ -75,5 +75,19 @@ describe('Component vnJsonValue', () => {
expect(el.textContent).toEqual('2050');
expect(el.className).toContain('json-number');
});
it('should display number when value is decimal', () => {
controller.value = 10.1;
expect(el.textContent).toEqual('10.1');
expect(el.className).toContain('json-number');
});
it('should display rounded number when value is decimal with lot of decimals', () => {
controller.value = 10.124323234;
expect(el.textContent).toEqual('10.124');
expect(el.className).toContain('json-number');
});
});
});

View File

@ -76,6 +76,8 @@ export default class Controller extends Section {
new: this.castJsonValue(newValues[prop])
});
}
log.props.sort(
(a, b) => a.nameI18n.localeCompare(b.nameI18n));
}
}

View File

@ -6,3 +6,5 @@ columns:
typeFk: type
userFk: user
companyFk: company
workerFk: worker
balance: balance

View File

@ -6,3 +6,5 @@ columns:
typeFk: tipo
userFk: usuario
companyFk: compañia
workerFk: trabajador
balance: balance

View File

@ -44,4 +44,6 @@ columns:
intrastatFk: intrastat
genericFk: generic
itemFk: item
density: density
compression: compression

View File

@ -44,4 +44,6 @@ columns:
intrastatFk: intrastat
genericFk: genérico
itemFk: artículo
density: densidad
compression: compresión

View File

@ -1,5 +1,6 @@
name: sale
columns:
id: id
concept: concept
quantity: quantity
price: price

View File

@ -1,5 +1,6 @@
name: línea
columns:
id: id
concept: concepto
quantity: cantidad
price: precio

View File

@ -1,4 +1,4 @@
name: tracking
name: state
columns:
id: id
created: created

View File

@ -1,4 +1,4 @@
name: seguimiento
name: estado
columns:
id: id
created: creado

View File

@ -194,7 +194,10 @@ class Controller extends Section {
}
createClaim() {
const timeDifference = new Date().getTime() - new Date(this.ticket.shipped).getTime();
const today = new Date();
today.setHours(0, 0, 0, 0);
const timeDifference = today.getTime() - new Date(this.ticket.landed).getTime();
const pastDays = Math.floor(timeDifference / 86400000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim)