3604-route_agencyTerm #893

Merged
carlosjr merged 20 commits from 3604-route_agencyTerm into dev 2022-03-15 14:18:27 +00:00
3 changed files with 11 additions and 3 deletions
Showing only changes of commit cff1e6cfbf - Show all commits

View File

@ -1,4 +1,5 @@
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
module.exports = Self => {
Self.remoteMethodCtx('filter', {
@ -24,6 +25,10 @@ module.exports = Self => {
Self.filter = async(ctx, filter, options) => {
const conn = Self.dataSource.connector;
const myOptions = {};
if (typeof options == 'object')
Object.assign(myOptions, options);
let stmts = [];
vicent marked this conversation as resolved Outdated

const

const
let stmt;
vicent marked this conversation as resolved Outdated

stmt is initialized once and assigned once, perhaps you want to create a constant directly on definition

stmt is initialized once and assigned once, perhaps you want to create a constant directly on definition
@ -62,7 +67,7 @@ module.exports = Self => {
let agencyTerm = stmts.push(stmt) - 1;
vicent marked this conversation as resolved Outdated

const

const
let sql = ParameterizedSQL.join(stmts, ';');
vicent marked this conversation as resolved Outdated

const

const
let result = await conn.executeStmt(sql);
let result = await conn.executeStmt(sql, myOptions);
vicent marked this conversation as resolved Outdated

const

const
const models = Self.app.models;
for (let agencyTerm of result)

View File

@ -1,6 +1,7 @@
import ngModule from '../../module';
import Section from 'salix/components/section';
import './style.scss';
import UserError from 'core/lib/user-error';
class Controller extends Section {
constructor($element, $) {
@ -81,7 +82,8 @@ class Controller extends Section {
};
this.$http(options).then(res => {
if (res) {
let addedDms = res.data;
const addedDms = res.data;
if (addedDms.length > 1) throw new UserError('You cannot attach more than one document');
this.$.watcher.updateOriginalData();
const params = {

View File

@ -3,4 +3,5 @@ Buy requests: Peticiones de compra
Agency route: Agencia ruta
Agency Agreement: Agencia acuerdo
Autonomous: Autónomos
Two autonomous cannot be counted at the same time: Dos autonónomos no pueden ser contabilizados al mismo tiempo
Two autonomous cannot be counted at the same time: Dos autonónomos no pueden ser contabilizados al mismo tiempo
You cannot attach more than one document: No puedes adjuntar más de un documento