change travel.agencyFk by agencyModeFk

This commit is contained in:
Vicent Llopis 2022-07-13 14:36:03 +02:00
parent d7ca5a8247
commit fdf6e04233
23 changed files with 70 additions and 52 deletions

View File

@ -1340,7 +1340,7 @@ INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
(4, 4), (4, 4),
(5, 6); (5, 6);
INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`) INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseOutFk`, `agencyModeFk`, `m3`, `kg`,`ref`, `totalEntries`, `cargoSupplierFk`)
VALUES VALUES
(1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1), (1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 2, 1, 100.00, 1000, 'first travel', 1, 1),
(2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2, 2), (2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 2, 1, 150, 2000, 'second travel', 2, 2),

View File

@ -38642,26 +38642,29 @@ CREATE TABLE `travel` (
`warehouseInFk` smallint(6) unsigned DEFAULT NULL, `warehouseInFk` smallint(6) unsigned DEFAULT NULL,
`warehouseOutFk` smallint(6) unsigned DEFAULT NULL, `warehouseOutFk` smallint(6) unsigned DEFAULT NULL,
`agencyFk` int(11) DEFAULT NULL, `agencyFk` int(11) DEFAULT NULL,
`ref` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `agencyModeFk` int(11) DEFAULT NULL,
`isDelivered` tinyint(1) NOT NULL DEFAULT '0', `ref` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`isReceived` tinyint(1) NOT NULL DEFAULT '0', `isDelivered` tinyint(1) NOT NULL DEFAULT 0,
`isReceived` tinyint(1) NOT NULL DEFAULT 0,
`m3` decimal(10,2) unsigned DEFAULT NULL, `m3` decimal(10,2) unsigned DEFAULT NULL,
`kg` decimal(10,0) unsigned DEFAULT NULL, `kg` decimal(10,0) unsigned DEFAULT NULL,
`cargoSupplierFk` int(11) DEFAULT NULL, `cargoSupplierFk` int(11) DEFAULT NULL,
`totalEntries` tinyint(4) unsigned DEFAULT '0', `totalEntries` tinyint(4) unsigned DEFAULT 0,
`appointment` datetime DEFAULT NULL, `appointment` datetime DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `shipment_2` (`shipped`,`landed`,`warehouseInFk`,`warehouseOutFk`,`agencyFk`,`ref`), UNIQUE KEY `shipment_1` (`shipped`,`landed`,`warehouseInFk`,`warehouseOutFk`,`agencyFk`,`agencyModeFk`,`ref`),
KEY `agency_id` (`agencyFk`), KEY `agency_id` (`agencyFk`),
KEY `shipment` (`shipped`), KEY `shipment` (`shipped`),
KEY `landing` (`landed`), KEY `landing` (`landed`),
KEY `warehouse_landing` (`warehouseInFk`,`landed`), KEY `warehouse_landing` (`warehouseInFk`,`landed`),
KEY `warehouse_out_shipment` (`warehouseOutFk`,`shipped`), KEY `warehouse_out_shipment` (`warehouseOutFk`,`shipped`),
KEY `travel_ibfk_4_idx` (`cargoSupplierFk`), KEY `travel_ibfk_4_idx` (`cargoSupplierFk`),
KEY `travel_FK` (`agencyModeFk`),
CONSTRAINT `travel_FK` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE,
CONSTRAINT `travel_ibfk_1` FOREIGN KEY (`warehouseInFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `travel_ibfk_1` FOREIGN KEY (`warehouseInFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `travel_ibfk_2` FOREIGN KEY (`warehouseOutFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE, CONSTRAINT `travel_ibfk_2` FOREIGN KEY (`warehouseOutFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `travel_ibfk_3` FOREIGN KEY (`agencyFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE CONSTRAINT `travel_ibfk_3` FOREIGN KEY (`agencyFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=195614 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ;
@ -38677,6 +38680,15 @@ DELIMITER ;;
FOR EACH ROW FOR EACH ROW
BEGIN BEGIN
CALL travel_checkDates(NEW.shipped, NEW.landed); CALL travel_checkDates(NEW.shipped, NEW.landed);
-- Actualizar agencyFk y agencyModeFk
IF NEW.agencyFk THEN
SET NEW.agencyModeFk = NEW.agencyFk;
END IF;
IF NEW.agencyModeFk THEN
SET NEW.agencyFk = NEW.agencyModeFk;
END IF;
END */;; END */;;
DELIMITER ; DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -38700,6 +38712,15 @@ BEGIN
OR !(NEW.shipped <=> OLD.shipped) THEN OR !(NEW.shipped <=> OLD.shipped) THEN
CALL travel_checkDates(NEW.shipped, NEW.landed); CALL travel_checkDates(NEW.shipped, NEW.landed);
END IF; END IF;
-- Actualizar agencyFk y agencyModeFk
IF !(NEW.agencyFk <=> OLD.agencyFk)THEN
SET NEW.agencyModeFk = NEW.agencyFk;
END IF;
IF !(NEW.agencyModeFk <=> OLD.agencyModeFk) THEN
SET NEW.agencyFk = NEW.agencyModeFk;
END IF;
END */;; END */;;
DELIMITER ; DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -46762,7 +46783,7 @@ BEGIN
JOIN entry e ON e.id = b.entryFk JOIN entry e ON e.id = b.entryFk
JOIN itemType it ON it.id = i.typeFk JOIN itemType it ON it.id = i.typeFk
JOIN travel tr ON tr.id = e.travelFk JOIN travel tr ON tr.id = e.travelFk
JOIN agencyMode am ON am.id = tr.agencyFk JOIN agencyMode am ON am.id = tr.agencyModeFk
JOIN tmp.rate r JOIN tmp.rate r
SET b.freightValue = @PF:= SET b.freightValue = @PF:=
ROUND(IFNULL(((am.m3 * @cm3:= item_getVolume(b.itemFk, b.packageFk)) / 1000000) / b.packing,0),3), ROUND(IFNULL(((am.m3 * @cm3:= item_getVolume(b.itemFk, b.packageFk)) / 1000000) / b.packing,0),3),
@ -72251,7 +72272,7 @@ BEGIN
END; END;
START TRANSACTION; START TRANSACTION;
INSERT INTO travel (shipped, landed, warehouseInFk, warehouseOutFk, agencyFk, `ref`, isDelivered, isReceived, m3, kg) INSERT INTO travel (shipped, landed, warehouseInFk, warehouseOutFk, agencyModeFk, `ref`, isDelivered, isReceived, m3, kg)
SELECT vDateStart, vDateEnd, vWarehouseInFk, vWarehouseOutFk, vAgencyModeFk, vRef, isDelivered, isReceived, m3, kg SELECT vDateStart, vDateEnd, vWarehouseInFk, vWarehouseOutFk, vAgencyModeFk, vRef, isDelivered, isReceived, m3, kg
FROM travel FROM travel
WHERE id = vTravelFk; WHERE id = vTravelFk;

View File

@ -29,7 +29,7 @@ describe('Entry descriptor path', () => {
it('should click the travels button to be redirected to the travels index filtered by the current agency', async() => { it('should click the travels button to be redirected to the travels index filtered by the current agency', async() => {
await page.waitToClick(selectors.entryDescriptor.travelsQuicklink); await page.waitToClick(selectors.entryDescriptor.travelsQuicklink);
await page.expectURL('/travel/index'); await page.expectURL('/travel/index');
await page.expectURL('agencyFk'); await page.expectURL('agencyModeFk');
}); });
it('should go back to the entry summary', async() => { it('should go back to the entry summary', async() => {

View File

@ -43,7 +43,7 @@ module.exports = Self => {
'name', 'name',
'shipped', 'shipped',
'landed', 'landed',
'agencyFk', 'agencyModeFk',
'warehouseOutFk', 'warehouseOutFk',
'warehouseInFk', 'warehouseInFk',
'isReceived', 'isReceived',

View File

@ -137,7 +137,7 @@
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete
label="Agency" label="Agency"
ng-model="$ctrl.travelFilterParams.agencyFk" ng-model="$ctrl.travelFilterParams.agencyModeFk"
url="AgencyModes" url="AgencyModes"
show-field="name" show-field="name"
value-field="id"> value-field="id">

View File

@ -46,7 +46,7 @@ class Controller extends Section {
if (!value) continue; if (!value) continue;
switch (key) { switch (key) {
case 'agencyFk': case 'agencyModeFk':
case 'warehouseInFk': case 'warehouseInFk':
case 'warehouseOutFk': case 'warehouseOutFk':
case 'shipped': case 'shipped':

View File

@ -14,7 +14,7 @@ class Controller extends ModuleCard {
{ {
relation: 'travel', relation: 'travel',
scope: { scope: {
fields: ['id', 'landed', 'agencyFk', 'warehouseOutFk'], fields: ['id', 'landed', 'agencyModeFk', 'warehouseOutFk'],
include: [ include: [
{ {
relation: 'agency', relation: 'agency',

View File

@ -14,9 +14,9 @@ class Controller extends Descriptor {
let travelFilter; let travelFilter;
const entryTravel = this.entry && this.entry.travel; const entryTravel = this.entry && this.entry.travel;
if (entryTravel && entryTravel.agencyFk) { if (entryTravel && entryTravel.agencyModeFk) {
travelFilter = this.entry && JSON.stringify({ travelFilter = this.entry && JSON.stringify({
agencyFk: entryTravel.agencyFk agencyModeFk: entryTravel.agencyModeFk
}); });
} }
return travelFilter; return travelFilter;
@ -49,7 +49,7 @@ class Controller extends Descriptor {
{ {
relation: 'travel', relation: 'travel',
scope: { scope: {
fields: ['id', 'landed', 'agencyFk', 'warehouseOutFk'], fields: ['id', 'landed', 'agencyModeFk', 'warehouseOutFk'],
include: [ include: [
{ {
relation: 'agency', relation: 'agency',

View File

@ -35,7 +35,7 @@ module.exports = Self => {
'landed', 'landed',
'warehouseInFk', 'warehouseInFk',
'warehouseOutFk', 'warehouseOutFk',
'agencyFk', 'agencyModeFk',
'ref' 'ref'
] ]
}); });
@ -56,7 +56,7 @@ module.exports = Self => {
travel.warehouseOutFk, travel.warehouseOutFk,
travel.warehouseInFk, travel.warehouseInFk,
travel.ref, travel.ref,
travel.agencyFk travel.agencyModeFk
] ]
); );
stmts.push(stmt); stmts.push(stmt);
@ -76,7 +76,7 @@ module.exports = Self => {
'landed', 'landed',
'warehouseInFk', 'warehouseInFk',
'warehouseOutFk', 'warehouseOutFk',
'agencyFk', 'agencyModeFk',
'ref' 'ref'
] ]
}); });

View File

@ -34,7 +34,7 @@ module.exports = Self => {
description: 'The landed to date filter' description: 'The landed to date filter'
}, },
{ {
arg: 'agencyFk', arg: 'agencyModeFk',
type: 'number', type: 'number',
description: 'The agencyModeFk id' description: 'The agencyModeFk id'
}, },
@ -96,7 +96,7 @@ module.exports = Self => {
case 'continent': case 'continent':
return {'cnt.code': value}; return {'cnt.code': value};
case 'id': case 'id':
case 'agencyFk': case 'agencyModeFk':
case 'warehouseOutFk': case 'warehouseOutFk':
case 'warehouseInFk': case 'warehouseInFk':
case 'totalEntries': case 'totalEntries':
@ -143,7 +143,7 @@ module.exports = Self => {
JOIN warehouse wo ON wo.id = t.warehouseOutFk JOIN warehouse wo ON wo.id = t.warehouseOutFk
JOIN country c ON c.id = wo.countryFk JOIN country c ON c.id = wo.countryFk
LEFT JOIN continent cnt ON cnt.id = c.continentFk LEFT JOIN continent cnt ON cnt.id = c.continentFk
JOIN agencyMode am ON am.id = t.agencyFk` JOIN agencyMode am ON am.id = t.agencyModeFk`
); );
stmt.merge(conn.makeWhere(filter.where)); stmt.merge(conn.makeWhere(filter.where));

View File

@ -44,7 +44,7 @@ module.exports = Self => {
description: 'The landed to date filter', description: 'The landed to date filter',
http: {source: 'query'} http: {source: 'query'}
}, { }, {
arg: 'agencyFk', arg: 'agencyModeFk',
type: 'number', type: 'number',
description: 'The agencyModeFk id', description: 'The agencyModeFk id',
http: {source: 'query'} http: {source: 'query'}
@ -102,7 +102,7 @@ module.exports = Self => {
case 'landedTo': case 'landedTo':
return {'t.landed': {lte: value}}; return {'t.landed': {lte: value}};
case 'id': case 'id':
case 'agencyFk': case 'agencyModeFk':
case 'warehouseOutFk': case 'warehouseOutFk':
case 'warehouseInFk': case 'warehouseInFk':
case 'totalEntries': case 'totalEntries':
@ -124,7 +124,7 @@ module.exports = Self => {
t.landed, t.landed,
t.warehouseInFk, t.warehouseInFk,
t.warehouseOutFk, t.warehouseOutFk,
t.agencyFk, t.agencyModeFk,
t.ref, t.ref,
t.isDelivered, t.isDelivered,
t.isReceived, t.isReceived,
@ -137,7 +137,7 @@ module.exports = Self => {
wout.name warehouseOutName, wout.name warehouseOutName,
cnt.code continent cnt.code continent
FROM vn.travel t FROM vn.travel t
JOIN vn.agencyMode am ON am.id = t.agencyFk JOIN vn.agencyMode am ON am.id = t.agencyModeFk
JOIN vn.warehouse win ON win.id = t.warehouseInFk JOIN vn.warehouse win ON win.id = t.warehouseInFk
JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk
JOIN warehouse wo ON wo.id = t.warehouseOutFk JOIN warehouse wo ON wo.id = t.warehouseOutFk

View File

@ -32,9 +32,9 @@ module.exports = Self => {
t.warehouseOutFk, t.warehouseOutFk,
t.landed, t.landed,
t.shipped, t.shipped,
t.agencyFk t.agencyModeFk
FROM travel t FROM travel t
WHERE t.agencyFk = ? LIMIT 50)`, [agencyModeFk]); WHERE t.agencyModeFk = ? LIMIT 50)`, [agencyModeFk]);
stmts.push(stmt); stmts.push(stmt);
stmt = new ParameterizedSQL(` stmt = new ParameterizedSQL(`
@ -44,10 +44,10 @@ module.exports = Self => {
t.warehouseOutFk, t.warehouseOutFk,
(SELECT ROUND(AVG(DATEDIFF(t.landed, t.shipped ))) (SELECT ROUND(AVG(DATEDIFF(t.landed, t.shipped )))
FROM tmp.travel t FROM tmp.travel t
WHERE t.agencyFk WHERE t.agencyModeFk
ORDER BY id DESC LIMIT 50) AS dayDuration ORDER BY id DESC LIMIT 50) AS dayDuration
FROM tmp.travel t FROM tmp.travel t
WHERE t.agencyFk WHERE t.agencyModeFk
ORDER BY t.id DESC LIMIT 1`); ORDER BY t.id DESC LIMIT 1`);
const avgDaysIndex = stmts.push(stmt) - 1; const avgDaysIndex = stmts.push(stmt) - 1;

View File

@ -71,7 +71,7 @@ describe('Travel cloneWithEntries()', () => {
expect(newTravel.ref).toEqual('fifth travel'); expect(newTravel.ref).toEqual('fifth travel');
expect(newTravel.warehouseInFk).toEqual(warehouseThree); expect(newTravel.warehouseInFk).toEqual(warehouseThree);
expect(newTravel.warehouseOutFk).toEqual(warehouseThree); expect(newTravel.warehouseOutFk).toEqual(warehouseThree);
expect(newTravel.agencyFk).toEqual(agencyModeOne); expect(newTravel.agencyModeFk).toEqual(agencyModeOne);
expect(travelEntries.length).toBeGreaterThan(0); expect(travelEntries.length).toBeGreaterThan(0);
}); });
}); });

View File

@ -70,10 +70,10 @@ describe('Travel extraCommunityFilter()', () => {
expect(result.length).toEqual(3); expect(result.length).toEqual(3);
}); });
it('should return the travel matching "agencyFk"', async() => { it('should return the travel matching "agencyModeFk"', async() => {
const ctx = { const ctx = {
args: { args: {
agencyFk: 1 agencyModeFk: 1
} }
}; };

View File

@ -44,17 +44,14 @@
"type": "number" "type": "number"
}, },
"agencyModeFk": { "agencyModeFk": {
"type": "number", "type": "number"
"mysql": {
"columnName": "agencyFk"
}
} }
}, },
"relations": { "relations": {
"agency": { "agency": {
"type": "belongsTo", "type": "belongsTo",
"model": "AgencyMode", "model": "AgencyMode",
"foreignKey": "agencyFk" "foreignKey": "agencyModeFk"
}, },
"warehouseIn": { "warehouseIn": {
"type": "belongsTo", "type": "belongsTo",

View File

@ -25,7 +25,7 @@ class Controller extends Section {
'shipped', 'shipped',
'landed', 'landed',
'totalEntries', 'totalEntries',
'agencyFk', 'agencyModeFk',
'warehouseInFk', 'warehouseInFk',
'warehouseOutFk', 'warehouseOutFk',
'cargoSupplierFk' 'cargoSupplierFk'
@ -64,7 +64,7 @@ class Controller extends Section {
onCloneAccept() { onCloneAccept() {
const params = JSON.stringify({ const params = JSON.stringify({
ref: this.travel.ref, ref: this.travel.ref,
agencyModeFk: this.travel.agencyFk, agencyModeFk: this.travel.agencyModeFk,
shipped: this.travel.shipped, shipped: this.travel.shipped,
landed: this.travel.landed, landed: this.travel.landed,
warehouseInFk: this.travel.warehouseInFk, warehouseInFk: this.travel.warehouseInFk,

View File

@ -18,7 +18,7 @@ describe('Travel Component vnTravelDescriptorMenu', () => {
controller.travel = { controller.travel = {
ref: 'the ref', ref: 'the ref',
agencyFk: 'the agency', agencyModeFk: 'the agency',
shipped: 'the shipped date', shipped: 'the shipped date',
landed: 'the landing date', landed: 'the landing date',
warehouseInFk: 'the receiver warehouse', warehouseInFk: 'the receiver warehouse',
@ -29,7 +29,7 @@ describe('Travel Component vnTravelDescriptorMenu', () => {
const params = JSON.stringify({ const params = JSON.stringify({
ref: controller.travel.ref, ref: controller.travel.ref,
agencyModeFk: controller.travel.agencyFk, agencyModeFk: controller.travel.agencyModeFk,
shipped: controller.travel.shipped, shipped: controller.travel.shipped,
landed: controller.travel.landed, landed: controller.travel.landed,
warehouseInFk: controller.travel.warehouseInFk, warehouseInFk: controller.travel.warehouseInFk,

View File

@ -14,9 +14,9 @@ class Controller extends Descriptor {
let travelFilter; let travelFilter;
const travel = this.travel; const travel = this.travel;
if (travel && travel.agencyFk) { if (travel && travel.agencyModeFk) {
travelFilter = this.travel && JSON.stringify({ travelFilter = this.travel && JSON.stringify({
agencyFk: this.travel.agencyFk agencyModeFk: this.travel.agencyModeFk
}); });
} }
return travelFilter; return travelFilter;

View File

@ -29,7 +29,7 @@
</vn-textfield> </vn-textfield>
<vn-autocomplete vn-one <vn-autocomplete vn-one
label="Agency" label="Agency"
ng-model="filter.agencyFk" ng-model="filter.agencyModeFk"
url="AgencyModes" url="AgencyModes"
show-field="name" show-field="name"
value-field="id"> value-field="id">

View File

@ -11,7 +11,7 @@
<vn-tr> <vn-tr>
<vn-th field="id" number filter-enabled="false">Id</vn-th> <vn-th field="id" number filter-enabled="false">Id</vn-th>
<vn-th field="ref">Reference</vn-th> <vn-th field="ref">Reference</vn-th>
<vn-th field="agencyFk">Agency</vn-th> <vn-th field="agencyModeFk">Agency</vn-th>
<vn-th field="warehouseOutFk">Warehouse Out</vn-th> <vn-th field="warehouseOutFk">Warehouse Out</vn-th>
<vn-th field="shipped" center shrink-date>Shipped</vn-th> <vn-th field="shipped" center shrink-date>Shipped</vn-th>
<vn-th field="isDelivered" center>Delivered</vn-th> <vn-th field="isDelivered" center>Delivered</vn-th>

View File

@ -10,7 +10,7 @@ export default class Controller extends Section {
onCloneAccept(travel) { onCloneAccept(travel) {
const params = JSON.stringify({ const params = JSON.stringify({
ref: travel.ref, ref: travel.ref,
agencyModeFk: travel.agencyFk, agencyModeFk: travel.agencyModeFk,
shipped: travel.shipped, shipped: travel.shipped,
landed: travel.landed, landed: travel.landed,
warehouseInFk: travel.warehouseInFk, warehouseInFk: travel.warehouseInFk,
@ -44,7 +44,7 @@ export default class Controller extends Section {
case 'landed': case 'landed':
return {'t.landed': {between: this.dateRange(value)}}; return {'t.landed': {between: this.dateRange(value)}};
case 'id': case 'id':
case 'agencyFk': case 'agencyModeFk':
case 'warehouseOutFk': case 'warehouseOutFk':
case 'warehouseInFk': case 'warehouseInFk':
case 'totalEntries': case 'totalEntries':

View File

@ -35,11 +35,11 @@ describe('Travel Component vnTravelIndex', () => {
const travel = { const travel = {
ref: 1, ref: 1,
agencyFk: 1 agencyModeFk: 1
}; };
const travelParams = { const travelParams = {
ref: travel.ref, ref: travel.ref,
agencyModeFk: travel.agencyFk agencyModeFk: travel.agencyModeFk
}; };
const queryParams = JSON.stringify(travelParams); const queryParams = JSON.stringify(travelParams);
controller.onCloneAccept(travel); controller.onCloneAccept(travel);

View File

@ -29,7 +29,7 @@
</vn-textfield> </vn-textfield>
<vn-autocomplete vn-one <vn-autocomplete vn-one
label="Agency" label="Agency"
ng-model="filter.agencyFk" ng-model="filter.agencyModeFk"
url="AgencyModes" url="AgencyModes"
show-field="name" show-field="name"
value-field="id"> value-field="id">