diff --git a/loopback/common/models/loggable.js b/loopback/common/models/loggable.js index e62015440..a6d0e8474 100644 --- a/loopback/common/models/loggable.js +++ b/loopback/common/models/loggable.js @@ -134,7 +134,7 @@ module.exports = function(Self) { break; } - val = recordSet && recordSet.id || val; // FIXME preparar todos los modelos con campo name + val = recordSet && recordSet.id || val; break; } } diff --git a/loopback/util/hook.js b/loopback/util/hook.js index 653681aea..fcd3476de 100644 --- a/loopback/util/hook.js +++ b/loopback/util/hook.js @@ -27,24 +27,3 @@ exports.getFinalState = function(ctx) { exports.isMultiple = function(ctx) { return !ctx.isNewInstance && !ctx.currentInstance; }; - -/* exports.fkToValue = async function(instance, ctx, model) { - let transaction = ctx.options && ctx.options.transaction; - let cleanInstance = JSON.parse(JSON.stringify(instance)); - let result = {}; - for (let key in cleanInstance) { - let val = cleanInstance[key]; - if (val === undefined || val === null) continue; - for (let key1 in model.relations) { - let val1 = model.relations[key1]; - if (val1.keyFrom == key && key != 'id') { - let recordSet = await val1.modelTo.findById(val, {}, {transaction}); - val = recordSet.name || recordSet.id; // FIXME preparar todos los modelos con campo name - break; - } - } - result[key] = val; - } - return result; -}; - */ diff --git a/modules/client/back/models/credit-insurance.js b/modules/client/back/models/credit-insurance.js index fce2a03dd..3310ffb11 100644 --- a/modules/client/back/models/credit-insurance.js +++ b/modules/client/back/models/credit-insurance.js @@ -5,7 +5,7 @@ module.exports = function(Self) { Self.validateBinded('credit', Self.validateCredit, { message: 'The credit must be an integer greater than or equal to zero', - allowNull: false, // FIXME: Ignored by loopback when it's false + allowNull: false, allowBlank: false }); diff --git a/modules/invoiceOut/back/methods/invoiceOut/regenerate.js b/modules/invoiceOut/back/methods/invoiceOut/regenerate.js index e075ac1e4..fda12c3cb 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/regenerate.js +++ b/modules/invoiceOut/back/methods/invoiceOut/regenerate.js @@ -22,7 +22,7 @@ module.exports = Self => { Self.regenerate = async(ctx, id) => { const userId = ctx.req.accessToken.userId; const models = Self.app.models; - const invoiceReportFk = 30; // FIXME - Should be deprecated + const invoiceReportFk = 30; // Should be deprecated const worker = await models.Worker.findOne({where: {userFk: userId}}); const tx = await Self.beginTransaction({}); diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/regenerate.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/regenerate.spec.js index 39e5f5171..43cb9023b 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/regenerate.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/regenerate.spec.js @@ -1,7 +1,7 @@ const app = require('vn-loopback/server/server'); describe('invoiceOut regenerate()', () => { - const invoiceReportFk = 30; // FIXME - Should be deprecated + const invoiceReportFk = 30; const invoiceOutId = 1; afterAll(async done => { diff --git a/print/report/rpt-delivery-note/index.html b/print/report/rpt-delivery-note/index.html index 4a994f847..1aea41883 100644 --- a/print/report/rpt-delivery-note/index.html +++ b/print/report/rpt-delivery-note/index.html @@ -105,7 +105,6 @@ -