2708 - Extra community changes #503

Merged
carlosjr merged 11 commits from 2708-travel_extracommunity into dev 2021-01-19 14:13:13 +00:00
5 changed files with 50 additions and 58 deletions
Showing only changes of commit 8c8891f8e3 - Show all commits

View File

@ -10,75 +10,75 @@ module.exports = Self => {
accepts: [ accepts: [
{ {
arg: 'ctx', arg: 'ctx',
type: 'Object', type: 'object',
http: {source: 'context'} http: {source: 'context'}
}, { }, {
arg: 'filter', arg: 'filter',
type: 'Object', type: 'object',
description: `Filter defining where, order, offset, and limit - must be a JSON-encoded string` description: `Filter defining where, order, offset, and limit - must be a JSON-encoded string`
}, { }, {
arg: 'search', arg: 'search',
type: 'String', type: 'string',
description: `If it's and integer searchs by id, otherwise it searchs by nickname` description: `If it's and number searchs by id, otherwise it searchs by nickname`
}, { }, {
arg: 'from', arg: 'from',
type: 'Date', type: 'date',
description: `The from date filter` description: `The from date filter`
}, { }, {
arg: 'to', arg: 'to',
type: 'Date', type: 'date',
description: `The to date filter` description: `The to date filter`
}, { }, {
arg: 'nickname', arg: 'nickname',
type: 'String', type: 'string',
description: `The nickname filter` description: `The nickname filter`
}, { }, {
arg: 'id', arg: 'id',
type: 'Integer', type: 'number',
description: `The ticket id filter` description: `The ticket id filter`
}, { }, {
arg: 'clientFk', arg: 'clientFk',
type: 'Integer', type: 'number',
description: `The client id filter` description: `The client id filter`
}, { }, {
arg: 'agencyModeFk', arg: 'agencyModeFk',
type: 'Integer', type: 'number',
description: `The agency mode id filter` description: `The agency mode id filter`
}, { }, {
arg: 'warehouseFk', arg: 'warehouseFk',
type: 'Integer', type: 'number',
description: `The warehouse id filter` description: `The warehouse id filter`
}, { }, {
arg: 'salesPersonFk', arg: 'salesPersonFk',
type: 'Integer', type: 'number',
description: `The salesperson id filter` description: `The salesperson id filter`
}, { }, {
arg: 'provinceFk', arg: 'provinceFk',
type: 'Integer', type: 'number',
description: `The province id filter` description: `The province id filter`
}, { }, {
arg: 'stateFk', arg: 'stateFk',
type: 'Number', type: 'number',
description: `The state id filter` description: `The state id filter`
}, { }, {
arg: 'myTeam', arg: 'myTeam',
type: 'Boolean', type: 'boolean',
description: `Whether to show only tickets for the current logged user team (For now it shows only the current user tickets)` description: `Whether to show only tickets for the current logged user team (For now it shows only the current user tickets)`
}, { }, {
arg: 'problems', arg: 'problems',
type: 'Boolean', type: 'boolean',
description: `Whether to show only tickets with problems` description: `Whether to show only tickets with problems`
}, { }, {
arg: 'pending', arg: 'pending',
type: 'Boolean', type: 'boolean',
description: `Whether to show only tickets with state 'Pending'` description: `Whether to show only tickets with state 'Pending'`
}, { }, {
arg: 'mine', arg: 'mine',
type: 'Boolean', type: 'boolean',
description: `Whether to show only tickets for the current logged user` description: `Whether to show only tickets for the current logged user`
}, { }, {
arg: 'orderFk', arg: 'orderFk',
type: 'Number', type: 'number',
description: `The order id filter` description: `The order id filter`
}, { }, {
arg: 'refFk', arg: 'refFk',
@ -86,12 +86,12 @@ module.exports = Self => {
description: `The invoice reference filter` description: `The invoice reference filter`
}, { }, {
arg: 'alertLevel', arg: 'alertLevel',
type: 'Number', type: 'number',
description: `The alert level of the tickets` description: `The alert level of the tickets`
} }
], ],
returns: { returns: {
type: ['Object'], type: ['object'],
root: true root: true
}, },
http: { http: {

View File

@ -10,69 +10,58 @@ module.exports = Self => {
accepts: [ accepts: [
{ {
arg: 'filter', arg: 'filter',
type: 'Object', type: 'object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
http: {source: 'query'}
}, },
{ {
arg: 'search', arg: 'search',
type: 'String', type: 'string',
description: 'Searchs the travel by id', description: 'Searchs the travel by id'
http: {source: 'query'}
}, },
{ {
arg: 'id', arg: 'id',
type: 'Integer', type: 'number',
description: 'The travel id', description: 'The travel id'
http: {source: 'query'}
}, },
{ {
arg: 'shippedFrom', arg: 'shippedFrom',
type: 'Date', type: 'date',
description: 'The shipped from date filter', description: 'The shipped from date filter'
http: {source: 'query'}
}, },
{ {
arg: 'shippedTo', arg: 'shippedTo',
type: 'Date', type: 'date',
description: 'The shipped to date filter', description: 'The shipped to date filter'
http: {source: 'query'}
}, },
{ {
arg: 'landedFrom', arg: 'landedFrom',
type: 'Date', type: 'date',
description: 'The landed from date filter', description: 'The landed from date filter'
http: {source: 'query'}
}, },
{ {
arg: 'landedTo', arg: 'landedTo',
type: 'Date', type: 'date',
description: 'The landed to date filter', description: 'The landed to date filter'
http: {source: 'query'}
}, },
{ {
arg: 'agencyFk', arg: 'agencyFk',
type: 'Number', type: 'number',
description: 'The agencyModeFk id', description: 'The agencyModeFk id'
http: {source: 'query'}
}, },
{ {
arg: 'warehouseOutFk', arg: 'warehouseOutFk',
type: 'Number', type: 'number',
description: 'The warehouseOutFk filter', description: 'The warehouseOutFk filter'
http: {source: 'query'}
}, },
{ {
arg: 'warehouseInFk', arg: 'warehouseInFk',
type: 'Number', type: 'number',
description: 'The warehouseInFk filter', description: 'The warehouseInFk filter'
http: {source: 'query'}
}, },
{ {
arg: 'totalEntries', arg: 'totalEntries',
type: 'Number', type: 'number',
description: 'The totalEntries filter', description: 'The totalEntries filter'
http: {source: 'query'}
}, },
{ {
arg: 'ref', arg: 'ref',
@ -86,7 +75,7 @@ module.exports = Self => {
}, },
{ {
arg: 'cargoSupplierFk', arg: 'cargoSupplierFk',
type: 'Number', type: 'number',
description: 'The freighter supplier id' description: 'The freighter supplier id'
}, },
], ],
@ -132,6 +121,7 @@ module.exports = Self => {
}); });
filter = mergeFilters(filter, {where}); filter = mergeFilters(filter, {where});
console.log(JSON.stringify(filter.where));
let stmts = []; let stmts = [];
let stmt; let stmt;

View File

@ -9,9 +9,10 @@
<vn-searchbar <vn-searchbar
vn-focus vn-focus
panel="vn-extra-community-search-panel" panel="vn-extra-community-search-panel"
info="Search by travel id or reference"
placeholder="Search by extra community travel"
suggested-filter="$ctrl.defaultFilter" suggested-filter="$ctrl.defaultFilter"
filter="$ctrl.defaultFilter" filter="$ctrl.defaultFilter"
info="Search by travel id or reference"
auto-state="false" auto-state="false"
model="model"> model="model">
</vn-searchbar> </vn-searchbar>

View File

@ -15,7 +15,7 @@ class Controller extends Section {
event => this.dragEnd(event)); event => this.dragEnd(event));
this.draggableElement = 'a[draggable]'; this.draggableElement = 'a[draggable]';
this.droppableElement = 'vn-table[vn-droppable]'; this.droppableElement = 'vn-tbody[vn-droppable]';
const scopeDays = 14; const scopeDays = 14;
const landedFrom = new Date(); const landedFrom = new Date();

View File

@ -4,7 +4,8 @@ Freighter: Transitario
Bl. KG: KG Bloq. Bl. KG: KG Bloq.
Phy. KG: KG físico Phy. KG: KG físico
Vol. KG: KG Vol. Vol. KG: KG Vol.
Search by travel id or reference: Buscar por id travel o referencia Search by travel id or reference: Buscar por id de travel o referencia
Search by extra community travel: Buscar por envío extra comunitario
Continent Out: Continente salida Continent Out: Continente salida
W. Shipped: F. envío W. Shipped: F. envío
W. Landed: F. llegada W. Landed: F. llegada