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"]', userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]', email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]',
saveButton: 'vn-client-web-access button[type=submit]', saveButton: 'vn-client-web-access button[type=submit]',
nameValue: 'vn-client-log .change:nth-child(1) .basic-json:nth-child(1) 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(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', () => { describe('Client web access path', () => {

View File

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

View File

@ -75,5 +75,19 @@ describe('Component vnJsonValue', () => {
expect(el.textContent).toEqual('2050'); expect(el.textContent).toEqual('2050');
expect(el.className).toContain('json-number'); 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]) new: this.castJsonValue(newValues[prop])
}); });
} }
log.props.sort(
(a, b) => a.nameI18n.localeCompare(b.nameI18n));
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -194,7 +194,10 @@ class Controller extends Section {
} }
createClaim() { 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); const pastDays = Math.floor(timeDifference / 86400000);
if (pastDays >= this.ticketConfig[0].daysForWarningClaim) if (pastDays >= this.ticketConfig[0].daysForWarningClaim)