Merge
gitea/salix/dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2019-10-11 17:43:29 +02:00
commit 7dfd1fe6f2
12 changed files with 50 additions and 45 deletions

View File

@ -94,7 +94,7 @@ module.exports = Self => {
const models = Self.app.models;
const storageConnector = Self.app.dataSources.storage.connector;
const myUserId = ctx.req.accessToken.userId;
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}});
const myWorker = await models.Worker.findOne({where: {userFk: myUserId}}, myOptions);
const args = ctx.args;
const newDms = await Self.create({

View File

@ -471,7 +471,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF
(14, 1, 2, 1, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 104, 'Malibu Point', 4, NULL, 0, 9, CURDATE()),
(15, 1, 7, 1, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 105, 'Plastic Cell', 125, NULL, 0, 3, CURDATE()),
(16, 1, 7, 1, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, CURDATE()),
(17, 1, 7, 1, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, CURDATE()),
(17, 1, 7, 2, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 106, 'Many Places', 126, NULL, 0, 3, CURDATE()),
(18, 1, 4, 4, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 108, 'Cerebro', 128, NULL, 0, 12, CURDATE()),
(19, 1, 5, 5, 3, CURDATE(), DATE_ADD(CURDATE(), INTERVAL + 1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 1, 13, CURDATE()),
(20, 1, 5, 5, 3, DATE_ADD(CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 109, 'Somewhere in Thailand', 129, NULL, 0, 13, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),

View File

@ -31,7 +31,7 @@
tpl-body {
display: block;
width: 20em;
min-width: 20em;
}
& > button.close {
@extend %clickable;

View File

@ -9,7 +9,9 @@
<section><vn-icon icon="add_circle"></vn-icon></section>
<section translate>Drag & Drop files here...</section>
</section>
<vn-data-viewer
model="model"
class="vn-w-lg">
<vn-horizontal class="photo-list">
<section class="photo" ng-repeat="photo in $ctrl.photos">
<section class="image mdl-shadow--2dp" on-error-src
@ -25,11 +27,8 @@
</button>
</section>
</section>
<vn-empty-rows ng-if="$ctrl.photos.length == 0">
<span translate>Drag & Drop files here...</span>
</vn-empty-rows>
</vn-horizontal>
<vn-pagination model="model"></vn-pagination>
</vn-data-viewer>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>

View File

@ -1,6 +1,7 @@
#Ordenar alfabeticamente
Add sale: Añadir linea
Are you sure you want to send it?: ¿Seguro que quieres enviarlo?
Are you sure you want to delete this claim?: ¿Seguro que quieres eliminar esta reclamación?
Client Id: Id cliente
Claimed ticket: Ticket reclamado
Delete claim: Eliminar reclamación

View File

@ -14,7 +14,7 @@ module.exports = function(Self) {
code: 'BOARDING'
};
let state = await models.State.findOne({where});
let params = {ticketFk: ctx.instance.id, stateFk: state.id};
let params = {ticketFk: ctx.instance.shipFk, stateFk: state.id};
const loopBackContext = LoopBackContext.getCurrentContext();
let httpCtx = {req: loopBackContext.active};

View File

@ -7,28 +7,28 @@
class="modal-form"
on-open="model.refresh()">
<tpl-body>
<vn-horizontal class="header vn-pa-md vn-w-lg">
<vn-horizontal class="header vn-pa-md">
<h5><span translate>Stowaways to add</span></h5>
</vn-horizontal>
<vn-horizontal class="vn-pa-md vn-w-lg">
<vn-data-viewer class="vn-w-xs" model="model">
<vn-horizontal class="vn-pa-md"> <!-- FIXME: Dialog width -->
<vn-data-viewer model="model">
<vn-table model="model" auto-load="false">
<vn-thead>
<vn-tr>
<vn-th number>Ticket id</vn-th>
<vn-th number>Shipped</vn-th>
<vn-th number>Agency</vn-th>
<vn-th number>Warehouse</vn-th>
<vn-th number>State</vn-th>
<vn-th>Shipped</vn-th>
<vn-th>Agency</vn-th>
<vn-th>Warehouse</vn-th>
<vn-th>State</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="ticket in possibleStowaways" class="clickable" ng-click="$ctrl.addStowaway(ticket)">
<vn-td number>{{ticket.id}}</vn-td>
<vn-td number>{{ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td number>{{ticket.agencyMode.name}}</vn-td>
<vn-td number>{{ticket.warehouse.name}}</vn-td>
<vn-td number>{{ticket.state.state.name}}</vn-td>
<vn-td>{{ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td>{{ticket.agencyMode.name}}</vn-td>
<vn-td>{{ticket.warehouse.name}}</vn-td>
<vn-td>{{ticket.state.state.name}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>

View File

@ -1,4 +1,5 @@
import ngModule from '../module';
import './style.scss';
class Controller {
constructor($stateParams, $, $http, vnApp, $translate) {

View File

@ -115,7 +115,7 @@
<vn-dialog class="dialog-summary"
vn-id="addTurn">
<tpl-body>
<div>
<div class="vn-pa-md">
<h5 style="text-align: center">
<span translate>In which day you want to add the ticket?</span>
</h5>
@ -162,7 +162,9 @@
card-reload="$ctrl.cardReload()"
ticket="$ctrl.ticket">
</vn-add-stowaway>
<vn-remove-stowaway vn-id="removeStowaway" card-reload="$ctrl.cardReload()" ticket="$ctrl.ticket"></vn-remove-stowaway>
<vn-remove-stowaway vn-id="removeStowaway"
card-reload="$ctrl.cardReload()" ticket="$ctrl.ticket">
</vn-remove-stowaway>
<vn-confirm
vn-id="confirm-dialog"
on-response="$ctrl.returnDialog(response)"

View File

@ -1,5 +1,11 @@
@import "variables";
vn-add-stowaway {
vn-data-viewer {
width: 40em
}
}
vn-dialog.modal-form {
vn-horizontal.header {
background-color: $color-main;
@ -10,12 +16,6 @@ vn-dialog.modal-form {
margin: 0 auto;
}
}
tpl-body {
width: 100%;
}
table {
width: 100%
}
& > div {
padding: 0 !important;
}

View File

@ -13,7 +13,7 @@
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="dmsFk" shrink>Id</vn-th>
<vn-th field="dmsFk" number shrink>Id</vn-th>
<vn-th field="dmsTypeFk" shrink>Type</vn-th>
<vn-th field="hardCopyNumber" shrink number>Order</vn-th>
<vn-th field="reference" shrink>Reference</vn-th>
@ -53,7 +53,7 @@
</vn-td>
<vn-td shrink>
<vn-check disabled="true"
ng-model="document.dms.hasFile">
field="document.dms.hasFile">
</vn-check>
</vn-td>
<vn-td shrink>

View File

@ -30,10 +30,12 @@ module.exports = Self => {
stmts.push(new ParameterizedSQL('CALL vn.subordinateGetList(?)', [myWorker.id]));
stmts.push('SELECT * FROM tmp.subordinate');
stmts.push('DROP TEMPORARY TABLE tmp.subordinate');
let sql = ParameterizedSQL.join(stmts, ';');
let result = await conn.executeStmt(sql);
return result[1];
};
};