Commit cec3c110 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige vista de tracking y carga de citas

Soluciona problemas con la recepción de datos y de selección.
parent 012c4155
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -69,11 +69,7 @@ define([
			this._once(this._buildChannel(this.storeChannel, this.actions.ITEM_AVAILABLE),
				lang.hitch(this, function (response) {

				if (!response.body) {
					return;
				}

				var data = response.body.data;
				var data = response.res.data;

				this._activityData = data;

@@ -83,7 +79,9 @@ define([
			}), {
				predicate: function(response) {

					return !!response.body.data.activityType;
					var data = response.res.data;

					return data && data.activityType;
				}
			}, this);

+2 −3
Original line number Diff line number Diff line
@@ -243,14 +243,13 @@ define([

		_subBrowserWorkSelected: function(res) {

			if (!res || !res.body || !res.body.ids) {
			if (!res || !res.ids) {
				return;
			}

			var items = res.body.ids;
			var items = res.ids;

			for (var i = 0; i < items.length; i++) {

				var pathGenerate = items[i],
					item = {
						activityId: pathGenerate.split(this.pathSeparator)[1],
+1 −1
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ define([

			this._publish(this._buildChannel(this.selectorChannel, this.actions.DESELECT), {
				items: items,
				selectionTarget: this.targetBrowserWork
				target: this.targetBrowserWork
			});
		},

+2 −10
Original line number Diff line number Diff line
@@ -331,17 +331,9 @@ define([

		_chkSelectionTargetLoadingIsMine: function(res) {

			var target = res.selectionTarget;

			if (target === this.selectionTarget) {
				return true;
			}

			if (target === this.target) {
				return true;
			}
			var target = res.target;

			return false;
			return target === (this.selectionTarget ? this.selectionTarget : this.target);
		},

		_subSelectionTargetLoading: function(res) {
+11 −8
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ define([
	, Input
	, FilteringSelect
) {

	return declare([Input, _Store], {
		//	summary:
		//		Implementación de input FilteringSelect.
@@ -76,22 +77,24 @@ define([
			this._emitEvt('REQUEST', requestObj);
		},

		_dataAvailable: function(/*Object*/ res) {
		_dataAvailable: function(/*Object*/ res, resWrapper) {

			var data = res.data;

			if (!res || res.requesterId != this.getOwnChannel()) {
			if (!data || resWrapper.requesterId !== this.getOwnChannel()) {
				return;
			}

			this._inputInstance.emit('receivedResults', {
				data: (res.data && res.data.data) ? res.data.data : res.data,
				total: res.data.total || res.total
				data: data.data || data,
				total: data.total || res.total
			});
		},

		_getRequestObj: function(request) {

			var obj = {
					target: request.target ? request.target : this.target,
				target: request.target || this.target,
				requesterId: this.getOwnChannel()
			};