From 04877c1425a036816f5375e03930b75891d51b3a Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 20 Feb 2023 13:15:47 +0100 Subject: [PATCH] refs #5063 refactor hook --- modules/item/back/methods/item/new.js | 6 ++---- modules/item/front/summary/index.html | 25 ------------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/modules/item/back/methods/item/new.js b/modules/item/back/methods/item/new.js index 0bd9035cf..d066f2c9f 100644 --- a/modules/item/back/methods/item/new.js +++ b/modules/item/back/methods/item/new.js @@ -24,8 +24,6 @@ module.exports = Self => { const myOptions = {}; let tx; - params.isPhotoRequested = true; - if (typeof options == 'object') Object.assign(myOptions, options); @@ -40,8 +38,7 @@ module.exports = Self => { 'intrastatFk', 'originFk', 'priority', - 'tag', - 'isPhotoRequested' + 'tag' ]; for (const key in params) { @@ -60,6 +57,7 @@ module.exports = Self => { const itemType = await models.ItemType.findById(params.typeFk, {fields: ['isLaid']}, myOptions); params.isLaid = itemType.isLaid; + params.isPhotoRequested = true; const item = await models.Item.create(params, myOptions); diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index c604f5c8f..46a2baef4 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -75,31 +75,6 @@ {{$ctrl.summary.item.itemType.worker.user.name}} - - - - - - - - - - - -