Merge pull request '#7677 - return more postcode fields' (!2865) from 7677_vnLocation_perf into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2865 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
c9db888266
|
@ -29,7 +29,7 @@ describe('Postcode filter()', () => {
|
||||||
}
|
}
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
expect(results.length).toEqual(4);
|
expect(results.length).toEqual(5);
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
@ -63,7 +63,7 @@ describe('Postcode filter()', () => {
|
||||||
search: 'one',
|
search: 'one',
|
||||||
}}, options);
|
}}, options);
|
||||||
|
|
||||||
expect(results.length).toEqual(4);
|
expect(results.length).toEqual(5);
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
|
|
@ -361,11 +361,12 @@ INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`postCode`(`code`, `townFk`, `geoFk`)
|
INSERT INTO `vn`.`postCode`(`code`, `townFk`, `geoFk`)
|
||||||
VALUES
|
VALUES
|
||||||
('46000', 1, 6),
|
('46000', 1, 6),
|
||||||
('46460', 2, 6),
|
('46460', 2, 6),
|
||||||
('46680', 3, 6),
|
('46680', 3, 6),
|
||||||
('46600', 4, 7),
|
('46600', 4, 7),
|
||||||
('EC170150', 5, 8);
|
('46600',1, 6),
|
||||||
|
('EC170150', 5, 8);
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientType`(`code`, `type`)
|
INSERT INTO `vn`.`clientType`(`code`, `type`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -43,8 +43,14 @@ module.exports = Self => {
|
||||||
include: [{
|
include: [{
|
||||||
relation: 'province',
|
relation: 'province',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'name']
|
fields: ['id', 'name', 'countryFk'],
|
||||||
}
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'country',
|
||||||
|
scope: {fields: ['id', 'name']},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
relation: 'agencyMode',
|
relation: 'agencyMode',
|
||||||
scope: {
|
scope: {
|
||||||
|
|
Loading…
Reference in New Issue