Loading client-app/src/component/browser/_DataTypeParser.js +2 −1 Original line number Diff line number Diff line Loading @@ -10,9 +10,10 @@ define([ _addData: function(response) { // TODO evitar sobreescribir respuesta, en su lugar adaptar su lectura donde haga falta if (response.data.features) { response.data.data = response.data.features; delete response.data.features; //delete response.data.features; } const data = response.data, Loading client-app/src/component/browser/_GeoJsonParser.js +2 −1 Original line number Diff line number Diff line Loading @@ -15,8 +15,9 @@ define([ this.inherited(arguments); } // TODO evitar sobreescribir respuesta, en su lugar adaptar su lectura donde haga falta response.data.data = response.data.features; delete response.data.features; //delete response.data.features; this.inherited(arguments); }, Loading client-app/src/component/search/TextImpl.js +4 −2 Original line number Diff line number Diff line Loading @@ -224,11 +224,13 @@ define([ var requesterId = action === '_suggest' ? this.getOwnChannel() : null; this._emitEvt('REQUEST', { method: this.methodSuggest, target: this._getTarget(), action: action, requesterId: requesterId, method: this.methodSuggest, params: { query: req.data } }); }, Loading client-app/src/design/map/_AddMapLayerComponent.js +2 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ define([ listenBounds: false, listenZoom: false, radius: false }, mapLayerPopupTemplate: null } }; return declare(null, { Loading @@ -66,6 +65,7 @@ define([ this.mergeComponentAttribute('mapLayerConfig', { parentChannel, selectorChannel: parentChannel, target: this.target, idProperty: 'uuid', simpleSelection: true }); Loading client-app/src/detail/activity/widget/ActivityInfrastructureMap.js +11 −68 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'src/component/base/_Filter' , 'src/component/base/_Module' , 'src/component/base/_Show' , 'src/component/base/_Store' Loading @@ -15,7 +14,6 @@ define([ ], function( declare , lang , _Filter , _Module , _Show , _Store Loading @@ -28,8 +26,8 @@ define([ , TemplateList ) { return declare([_Module, _Show, _Store, _Filter, _MapDesignWithContentLayout, _AddAtlasComponent, _AddBrowserComponent, _AddMapLayerComponent], { return declare([_Module, _Show, _Store, _MapDesignWithContentLayout, _AddAtlasComponent, _AddBrowserComponent, _AddMapLayerComponent], { // summary: // Widget para mostrar en un mapa las ubicaciones de infraestructuras asociadas a una actividad. Loading @@ -37,7 +35,7 @@ define([ const defaultConfig = { ownChannel: 'activityInfrastructureMap', _dataTarget: redmicConfig.services.infrastructureByActivity, target: redmicConfig.services.infrastructureByActivity, mapLayerPopupTemplate: TemplatePopup }; Loading Loading @@ -73,82 +71,27 @@ define([ }); }, _beforeInitialize: function() { this.inherited(arguments); const queryChannel = this.queryChannel; this.mergeComponentAttribute('browserConfig', { queryChannel }); this.mergeComponentAttribute('searchConfig', { queryChannel }); }, _defineSubscriptions: function() { this.inherited(arguments); const browserInstance = this.getComponentInstance('browser'); this.subscriptionsConfig.push({ channel : browserInstance.getChannel('BUTTON_EVENT'), callback: '_subBrowserInfrastructureUrlButtonEvent', options: { predicate: (evt) => evt?.btnId === 'infrastructureUrl' } }); }, _subBrowserInfrastructureUrlButtonEvent: function(res) { _infrastructureUrlCallback: function(res) { globalThis.open(res.item?.url, '_blank'); }, _onMeOrAncestorShown: function() { const replacedTarget = this._getTargetWithVariableReplaced(); this._updateComponentTargetValues(replacedTarget); this._requestDataFromReplacedTarget(replacedTarget); this._requestData(); }, _getTargetWithVariableReplaced: function() { _requestData: function() { const replaceObj = { const path = { id: this.pathVariableId }; return lang.replace(this._dataTarget, replaceObj); }, _updateComponentTargetValues: function(replacedTarget) { const browserInstance = this.getComponentInstance('browser'), searchInstance = this.getComponentInstance('search'), mapLayerInstance = this.getComponentInstance('mapLayer'); this._publish(mapLayerInstance.getChannel('SET_PROPS'), { target: replacedTarget }); const method = 'POST', target = this.target, params = {path}; this._publish(browserInstance.getChannel('SET_PROPS'), { target: replacedTarget }); this._publish(searchInstance.getChannel('SET_PROPS'), { target: replacedTarget }); }, _requestDataFromReplacedTarget: function(replacedTarget) { this._publish(this.getChannel('SET_PROPS'), { target: replacedTarget }); this._emitEvt('REQUEST', {method, target, params}); } }); }); Loading
client-app/src/component/browser/_DataTypeParser.js +2 −1 Original line number Diff line number Diff line Loading @@ -10,9 +10,10 @@ define([ _addData: function(response) { // TODO evitar sobreescribir respuesta, en su lugar adaptar su lectura donde haga falta if (response.data.features) { response.data.data = response.data.features; delete response.data.features; //delete response.data.features; } const data = response.data, Loading
client-app/src/component/browser/_GeoJsonParser.js +2 −1 Original line number Diff line number Diff line Loading @@ -15,8 +15,9 @@ define([ this.inherited(arguments); } // TODO evitar sobreescribir respuesta, en su lugar adaptar su lectura donde haga falta response.data.data = response.data.features; delete response.data.features; //delete response.data.features; this.inherited(arguments); }, Loading
client-app/src/component/search/TextImpl.js +4 −2 Original line number Diff line number Diff line Loading @@ -224,11 +224,13 @@ define([ var requesterId = action === '_suggest' ? this.getOwnChannel() : null; this._emitEvt('REQUEST', { method: this.methodSuggest, target: this._getTarget(), action: action, requesterId: requesterId, method: this.methodSuggest, params: { query: req.data } }); }, Loading
client-app/src/design/map/_AddMapLayerComponent.js +2 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ define([ listenBounds: false, listenZoom: false, radius: false }, mapLayerPopupTemplate: null } }; return declare(null, { Loading @@ -66,6 +65,7 @@ define([ this.mergeComponentAttribute('mapLayerConfig', { parentChannel, selectorChannel: parentChannel, target: this.target, idProperty: 'uuid', simpleSelection: true }); Loading
client-app/src/detail/activity/widget/ActivityInfrastructureMap.js +11 −68 Original line number Diff line number Diff line define([ 'dojo/_base/declare' , 'dojo/_base/lang' , 'src/component/base/_Filter' , 'src/component/base/_Module' , 'src/component/base/_Show' , 'src/component/base/_Store' Loading @@ -15,7 +14,6 @@ define([ ], function( declare , lang , _Filter , _Module , _Show , _Store Loading @@ -28,8 +26,8 @@ define([ , TemplateList ) { return declare([_Module, _Show, _Store, _Filter, _MapDesignWithContentLayout, _AddAtlasComponent, _AddBrowserComponent, _AddMapLayerComponent], { return declare([_Module, _Show, _Store, _MapDesignWithContentLayout, _AddAtlasComponent, _AddBrowserComponent, _AddMapLayerComponent], { // summary: // Widget para mostrar en un mapa las ubicaciones de infraestructuras asociadas a una actividad. Loading @@ -37,7 +35,7 @@ define([ const defaultConfig = { ownChannel: 'activityInfrastructureMap', _dataTarget: redmicConfig.services.infrastructureByActivity, target: redmicConfig.services.infrastructureByActivity, mapLayerPopupTemplate: TemplatePopup }; Loading Loading @@ -73,82 +71,27 @@ define([ }); }, _beforeInitialize: function() { this.inherited(arguments); const queryChannel = this.queryChannel; this.mergeComponentAttribute('browserConfig', { queryChannel }); this.mergeComponentAttribute('searchConfig', { queryChannel }); }, _defineSubscriptions: function() { this.inherited(arguments); const browserInstance = this.getComponentInstance('browser'); this.subscriptionsConfig.push({ channel : browserInstance.getChannel('BUTTON_EVENT'), callback: '_subBrowserInfrastructureUrlButtonEvent', options: { predicate: (evt) => evt?.btnId === 'infrastructureUrl' } }); }, _subBrowserInfrastructureUrlButtonEvent: function(res) { _infrastructureUrlCallback: function(res) { globalThis.open(res.item?.url, '_blank'); }, _onMeOrAncestorShown: function() { const replacedTarget = this._getTargetWithVariableReplaced(); this._updateComponentTargetValues(replacedTarget); this._requestDataFromReplacedTarget(replacedTarget); this._requestData(); }, _getTargetWithVariableReplaced: function() { _requestData: function() { const replaceObj = { const path = { id: this.pathVariableId }; return lang.replace(this._dataTarget, replaceObj); }, _updateComponentTargetValues: function(replacedTarget) { const browserInstance = this.getComponentInstance('browser'), searchInstance = this.getComponentInstance('search'), mapLayerInstance = this.getComponentInstance('mapLayer'); this._publish(mapLayerInstance.getChannel('SET_PROPS'), { target: replacedTarget }); const method = 'POST', target = this.target, params = {path}; this._publish(browserInstance.getChannel('SET_PROPS'), { target: replacedTarget }); this._publish(searchInstance.getChannel('SET_PROPS'), { target: replacedTarget }); }, _requestDataFromReplacedTarget: function(replacedTarget) { this._publish(this.getChannel('SET_PROPS'), { target: replacedTarget }); this._emitEvt('REQUEST', {method, target, params}); } }); });