2957-ticket_summary_postcode + fetched tags css #649
|
@ -102,7 +102,7 @@ vn-table {
|
|||
& > vn-one {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 0.75rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
& > vn-one:nth-child(2) h3 {
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports = Self => {
|
|||
}, {
|
||||
relation: 'address',
|
||||
scope: {
|
||||
fields: ['street', 'city', 'provinceFk', 'phone', 'mobile'],
|
||||
fields: ['street', 'city', 'provinceFk', 'phone', 'mobile', 'postalCode'],
|
||||
include: {
|
||||
relation: 'province',
|
||||
scope: {
|
||||
|
|
|
@ -3,3 +3,4 @@ No delivery zone available for this shipping date: No hay una zona de reparto di
|
|||
No delivery zone available for this parameters: No hay una zona de reparto disponible con estos parámetros
|
||||
Deleted: Eliminado
|
||||
Zone: Zona
|
||||
Edit address: Editar dirección
|
|
@ -16,10 +16,11 @@ class Controller extends Summary {
|
|||
get formattedAddress() {
|
||||
if (!this.summary) return '';
|
||||
|
||||
let address = this.summary.address;
|
||||
let province = address.province ? `(${address.province.name})` : '';
|
||||
const address = this.summary.address;
|
||||
const postcode = address.postalCode;
|
||||
const province = address.province ? `(${address.province.name})` : '';
|
||||
|
||||
return `${address.street} - ${address.city} ${province}`;
|
||||
return `${address.street} - ${postcode} - ${address.city} ${province}`;
|
||||
}
|
||||
|
||||
loadData() {
|
||||
|
|
|
@ -27,18 +27,19 @@ describe('Ticket', () => {
|
|||
});
|
||||
|
||||
describe('formattedAddress()', () => {
|
||||
it('should return a full fromatted address with city and province', () => {
|
||||
it('should return the full fromatted address with city and province', () => {
|
||||
controller.summary = {
|
||||
address: {
|
||||
province: {
|
||||
name: 'Gotham'
|
||||
},
|
||||
street: '1007 Mountain Drive',
|
||||
postalCode: 46060,
|
||||
city: 'Gotham'
|
||||
}
|
||||
};
|
||||
|
||||
expect(controller.formattedAddress).toEqual('1007 Mountain Drive - Gotham (Gotham)');
|
||||
expect(controller.formattedAddress).toEqual('1007 Mountain Drive - 46060 - Gotham (Gotham)');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue