Skip to content

Commit

Permalink
#1437 Remove the isOwner extra data
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 17, 2020
1 parent ef5f4e3 commit d9b4f49
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
3 changes: 2 additions & 1 deletion frontend/app/scripts/controllers/case/CaseObservablesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
sort: $scope.filtering.context.sort,
pageSize: $scope.filtering.context.pageSize,
filter: $scope.filtering.buildQuery(),
extraData: ['seen', 'permissions', 'isOwner', 'shareCount'],
extraData: ['seen', 'permissions', 'shareCount'],
// extraData: ['seen', 'permissions', 'isOwner', 'shareCount'],
operations: [
{'_name': 'getCase', 'idOrName': $scope.caseId},
{'_name': 'observables'}
Expand Down
3 changes: 2 additions & 1 deletion frontend/app/scripts/controllers/case/CaseTasksCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
{'_name': 'getCase', "idOrName": $scope.caseId},
{'_name': 'tasks'}
],
extraData: ['isOwner', 'shareCount'],
extraData: ['shareCount'],
//extraData: ['isOwner', 'shareCount'],
onUpdate: function() {
$scope.buildTaskGroups($scope.tasks.values);
}
Expand Down
15 changes: 3 additions & 12 deletions frontend/app/views/partials/case/case.tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ <h4>
<td>
<div>
<!-- FIXME -->
<span class="mr-xxs text-primary clickable" ng-if="!!!task.extraData.isOwner"><i class="fa fa-share-square"
<!-- <span class="mr-xxs text-primary clickable" ng-if="!!!task.extraData.isOwner"><i class="fa fa-share-square"
uib-tooltip="Shared from another organisation" tooltip-placement="right"></i></span>
<span class="mr-xxs text-primary clickable" ng-if="!!task.extraData.isOwner"><i class="fa fa-building-o"
uib-tooltip="Created by my organisation" tooltip-placement="right"></i></span>
uib-tooltip="Created by my organisation" tooltip-placement="right"></i></span> -->
<a href ui-sref="app.case.tasks-item({caseId: caseId, itemId:task._id})">{{task.title}}</a>
</div>
<div ng-show="task.status === 'Completed'" class="text-success">
Expand All @@ -109,11 +109,7 @@ <h4>
</td>
<td align="center">
<a href ng-if="task.extraData.shareCount > 0" ui-sref="app.case.tasks-item({caseId: caseId, itemId:task._id})" class="noline"
uib-tooltip="{{ {
true: 'Current organisation has shared this Task with ' + task.extraData.shareCount + ' organisation(s)',
false: 'This Task has been shared by its owner with ' + task.extraData.shareCount + ' organisation(s)'
}[task.extraData.isOwner] }}"
tooltip-placement="left-middle">
tooltip-placement="left-middle">

<i class="fa fa-users"></i>
({{task.extraData.shareCount || 0}})
Expand Down Expand Up @@ -232,12 +228,7 @@ <h4>
</td>
<td align="center">
<a href ng-if="task.extraData.shareCount > 0" ui-sref="app.case.tasks-item({caseId: caseId, itemId:task._id})" class="noline"
uib-tooltip="{{ {
true: 'Current organisation has shared this Task with ' + task.extraData.shareCount + ' organisation(s)',
false: 'This Task has been shared by its owner with ' + task.extraData.shareCount + ' organisation(s)'
}[task.extraData.isOwner] }}"
tooltip-placement="left-middle">

<i class="fa fa-users"></i>
({{task.extraData.shareCount || 0}})
</a>
Expand Down
8 changes: 2 additions & 6 deletions frontend/app/views/partials/observables/list/observables.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ <h4>
<td class="wrap">
<!-- FIXME -->
<div class="wrap clickable" ng-click="openArtifact(artifact)">
<span class="mr-xxs text-primary clickable" ng-if="!!!artifact.extraData.isOwner"><i class="fa fa-share-square"
<!-- <span class="mr-xxs text-primary clickable" ng-if="!!!artifact.extraData.isOwner"><i class="fa fa-share-square"
uib-tooltip="Shared from another organisation" tooltip-placement="right"></i></span>
<span class="mr-xxs text-primary clickable" ng-if="!!artifact.extraData.isOwner"><i class="fa fa-building-o"
uib-tooltip="Created by my organisation" tooltip-placement="right"></i></span>
uib-tooltip="Created by my organisation" tooltip-placement="right"></i></span> -->
<span class="wrap clickable" uib-tooltip="{{artifact.message}}" tooltip-placement="top-left">
{{(artifact.data | fang) || (artifact.attachment.name | fang)}}
</span>
Expand All @@ -108,10 +108,6 @@ <h4>
</td>
<td align="center">
<a href ng-if="artifact.extraData.shareCount > 0" ui-sref="app.case.observables-item({itemId: artifact._id})" class="noline"
uib-tooltip="{{ {
true: 'Current organisation has shared this Observable with ' + artifact.extraData.shareCount + ' organisation(s)',
false: 'This Observable has been shared by its owner with ' + artifact.extraData.shareCount + ' organisation(s)'
}[artifact.extraData.isOwner] }}"
tooltip-placement="left-middle">

<i class="fa fa-users"></i>
Expand Down

0 comments on commit d9b4f49

Please # to comment.