Loading client-app/src/app/component/request/RestManager.js +16 −18 Original line number Diff line number Diff line Loading @@ -10,9 +10,7 @@ define([ return declare([_Module, _RestManagerItfc], { // summary: // Módulo encargado de la entrada/salida con respecto a servicios externos. // description: // Permite manejar las peticiones de datos y su respuesta, así como las operaciones de escritura y borrado. // Componente encargado de la entrada/salida de datos, para consulta, escritura y borrado. postMixInProperties: function() { Loading Loading @@ -58,7 +56,7 @@ define([ _defineSubscriptions: function () { const options = { predicate: (req) => this._chkTargetIsValid(req) predicate: req => this._chkTargetIsValid(req) }; this.subscriptionsConfig.push({ Loading @@ -85,13 +83,13 @@ define([ channel: this.getChannel('SAVE'), callback: '_subSave', options: { predicate: (req) => this._chkValidSaveRequest(req) predicate: req => this._chkValidSaveRequest(req) } },{ channel: this.getChannel('REMOVE'), callback: '_subRemove', options: { predicate: (req) => this._chkValidRemoveRequest(req) predicate: req => this._chkValidRemoveRequest(req) } }); }, Loading Loading @@ -121,7 +119,7 @@ define([ channel: this.getChannel('TARGET_LOADED') },{ event: 'ABORT_ALL_LOADING', channel: this._buildChannel(this.loadingChannel, this.actions.ABORT_ALL_LOADING) channel: this._buildChannel(this.loadingChannel, 'ABORT_ALL_LOADING') }); }, Loading @@ -138,8 +136,8 @@ define([ notifyError = true; this._performGet(req, requesterChannel).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _subRequest: function(req, _mediatorChannel, componentInfo) { Loading @@ -155,15 +153,15 @@ define([ notifyError = true; this._performRequest(req, requesterChannel).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _subInjectItem: function(req) { const res = { status: 200, data: req.data || {} data: req.data ?? {} }; const evtName = 'GET', Loading @@ -176,7 +174,7 @@ define([ const res = { status: 200, data: req.data || [] data: req.data ?? [] }; // TODO esta variable no se usa, eliminarla o asignarla a req o res? Loading Loading @@ -234,8 +232,8 @@ define([ notifyError = true; this._performSave(req).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _chkValidRemoveRequest: function(req) { Loading @@ -262,8 +260,8 @@ define([ notifyError = true; this._performRemove(req).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _emitLoading: function(req) { Loading client-app/src/app/component/request/RestManagerImpl.js +2 −9 Original line number Diff line number Diff line Loading @@ -20,14 +20,7 @@ define([ return declare([RestManager, _Send, _Receive, _Auth, _Params], { // summary: // Implementación del módulo RestManager, que provee métodos de comunicación mediante dojo/request/xhr. // description: // También maneja errores de permisos en peticiones y les añade cabeceras de autenticación. // Importante: el campo 'options' recibido en las peticiones desde otros módulos, sobreescribe directamente // las opciones que se usarán a su vez para realizar la petición HTTP. // apiUrl: String // Prefijo de rutas hacia el servidor. // Implementación del componente RestManager, que provee comunicación mediante dojo/request/xhr. postCreate: function() { Loading client-app/src/home/item/SearchBarWidget.js +9 −9 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ define([ , 'src/component/base/_Module' , 'src/component/base/_Show' , 'src/component/layout/dataDisplayer/DataDisplayer' , 'src/component/textSearch/TextSearchSuggestionsExpansionRequestImpl' , 'src/component/search/TextImpl' ], function( redmicConfig , declare Loading @@ -15,7 +15,7 @@ define([ , _Module , _Show , DataDisplayer , TextSearchSuggestionsExpansionRequestImpl , TextImpl ) { return declare([_Module, _Show, _Filter], { Loading Loading @@ -51,15 +51,15 @@ define([ this.textSearchConfig = this._merge([{ parentChannel: this.getChannel(), target: this.target, suggestionsRequestMethod: 'POST', suggestionsTarget: `${this.target}/_suggest`, getSuggestionsQueryParams: value => ({suggest: {text: value}}) //queryChannel: this.queryChannel, //legacyMode: false, //showExpandIcon: true //suggestionsRequestMethod: 'POST', //suggestionsTarget: `${this.target}/_suggest`, //getSuggestionsQueryParams: value => ({suggest: {text: value}}) queryChannel: this.queryChannel, legacyMode: false, showExpandIcon: true }, this.textSearchConfig || {}]); this.textSearch = new TextSearchSuggestionsExpansionRequestImpl(this.textSearchConfig); this.textSearch = new TextImpl(this.textSearchConfig); this._infoInstance = new DataDisplayer({ parentChannel: this.getChannel(), Loading Loading
client-app/src/app/component/request/RestManager.js +16 −18 Original line number Diff line number Diff line Loading @@ -10,9 +10,7 @@ define([ return declare([_Module, _RestManagerItfc], { // summary: // Módulo encargado de la entrada/salida con respecto a servicios externos. // description: // Permite manejar las peticiones de datos y su respuesta, así como las operaciones de escritura y borrado. // Componente encargado de la entrada/salida de datos, para consulta, escritura y borrado. postMixInProperties: function() { Loading Loading @@ -58,7 +56,7 @@ define([ _defineSubscriptions: function () { const options = { predicate: (req) => this._chkTargetIsValid(req) predicate: req => this._chkTargetIsValid(req) }; this.subscriptionsConfig.push({ Loading @@ -85,13 +83,13 @@ define([ channel: this.getChannel('SAVE'), callback: '_subSave', options: { predicate: (req) => this._chkValidSaveRequest(req) predicate: req => this._chkValidSaveRequest(req) } },{ channel: this.getChannel('REMOVE'), callback: '_subRemove', options: { predicate: (req) => this._chkValidRemoveRequest(req) predicate: req => this._chkValidRemoveRequest(req) } }); }, Loading Loading @@ -121,7 +119,7 @@ define([ channel: this.getChannel('TARGET_LOADED') },{ event: 'ABORT_ALL_LOADING', channel: this._buildChannel(this.loadingChannel, this.actions.ABORT_ALL_LOADING) channel: this._buildChannel(this.loadingChannel, 'ABORT_ALL_LOADING') }); }, Loading @@ -138,8 +136,8 @@ define([ notifyError = true; this._performGet(req, requesterChannel).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _subRequest: function(req, _mediatorChannel, componentInfo) { Loading @@ -155,15 +153,15 @@ define([ notifyError = true; this._performRequest(req, requesterChannel).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _subInjectItem: function(req) { const res = { status: 200, data: req.data || {} data: req.data ?? {} }; const evtName = 'GET', Loading @@ -176,7 +174,7 @@ define([ const res = { status: 200, data: req.data || [] data: req.data ?? [] }; // TODO esta variable no se usa, eliminarla o asignarla a req o res? Loading Loading @@ -234,8 +232,8 @@ define([ notifyError = true; this._performSave(req).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _chkValidRemoveRequest: function(req) { Loading @@ -262,8 +260,8 @@ define([ notifyError = true; this._performRemove(req).then( (res) => this._handleSuccess({ evtName, notifySuccess }, req, res), (res) => this._handleError({ evtName, notifyError }, req, res)); res => this._handleSuccess({ evtName, notifySuccess }, req, res), res => this._handleError({ evtName, notifyError }, req, res)); }, _emitLoading: function(req) { Loading
client-app/src/app/component/request/RestManagerImpl.js +2 −9 Original line number Diff line number Diff line Loading @@ -20,14 +20,7 @@ define([ return declare([RestManager, _Send, _Receive, _Auth, _Params], { // summary: // Implementación del módulo RestManager, que provee métodos de comunicación mediante dojo/request/xhr. // description: // También maneja errores de permisos en peticiones y les añade cabeceras de autenticación. // Importante: el campo 'options' recibido en las peticiones desde otros módulos, sobreescribe directamente // las opciones que se usarán a su vez para realizar la petición HTTP. // apiUrl: String // Prefijo de rutas hacia el servidor. // Implementación del componente RestManager, que provee comunicación mediante dojo/request/xhr. postCreate: function() { Loading
client-app/src/home/item/SearchBarWidget.js +9 −9 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ define([ , 'src/component/base/_Module' , 'src/component/base/_Show' , 'src/component/layout/dataDisplayer/DataDisplayer' , 'src/component/textSearch/TextSearchSuggestionsExpansionRequestImpl' , 'src/component/search/TextImpl' ], function( redmicConfig , declare Loading @@ -15,7 +15,7 @@ define([ , _Module , _Show , DataDisplayer , TextSearchSuggestionsExpansionRequestImpl , TextImpl ) { return declare([_Module, _Show, _Filter], { Loading Loading @@ -51,15 +51,15 @@ define([ this.textSearchConfig = this._merge([{ parentChannel: this.getChannel(), target: this.target, suggestionsRequestMethod: 'POST', suggestionsTarget: `${this.target}/_suggest`, getSuggestionsQueryParams: value => ({suggest: {text: value}}) //queryChannel: this.queryChannel, //legacyMode: false, //showExpandIcon: true //suggestionsRequestMethod: 'POST', //suggestionsTarget: `${this.target}/_suggest`, //getSuggestionsQueryParams: value => ({suggest: {text: value}}) queryChannel: this.queryChannel, legacyMode: false, showExpandIcon: true }, this.textSearchConfig || {}]); this.textSearch = new TextSearchSuggestionsExpansionRequestImpl(this.textSearchConfig); this.textSearch = new TextImpl(this.textSearchConfig); this._infoInstance = new DataDisplayer({ parentChannel: this.getChannel(), Loading