Skip to content

Commit

Permalink
Merge pull request #325 from secultce/feature/bug-evaluation-list
Browse files Browse the repository at this point in the history
Correção na listagem de avaliações
  • Loading branch information
Junior-Shyko authored Nov 25, 2024
2 parents 63b915f + 1dae71c commit ff5f780
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/protected/application/lib/MapasCulturais/ApiQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ protected function _addFilterByPermissions($value) {
$pkey = $this->addSingleParam($this->_permission);
$_uid = $user->id;

if(($this->_permission != 'view' || $class::isPrivateEntity()) && (!$this->usesOriginSubsite)) {
if(($this->_permission != 'view' || $class::isPrivateEntity()) && (!$this->usesOriginSubsite || !$this->adminInSubsites)) {
$this->joins .= " JOIN e.__permissionsCache $alias WITH $alias.action = $pkey AND $alias.userId = $_uid ";

} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,6 @@ function API_findEvaluations($opportunity_id = null) {
registration_id IN ({$registration_ids})
$sql_status
ORDER BY registration_sent_timestamp, valuer_user_id ASC
$sql_limit
", $params);


Expand Down Expand Up @@ -1076,4 +1075,4 @@ function POST_saveFieldsOrder() {
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@
<td colspan='10'>
<span ng-if="data.evaluations.length === 0"><?php \MapasCulturais\i::_e("Nenhuma avaliação enviada.");?></span>
<span ng-if="data.evaluations.length === 1"><?php \MapasCulturais\i::_e("1 avaliação encontrada.");?></span>
<span ng-if="data.evaluations.length > 1">{{data.evaluations.length}}
<span ng-if="data.evaluationsAPIMetadata.count > 0">
<i> de {{ data.evaluationsAPIMetadata.count }}</i>
</span>
<?php \MapasCulturais\i::_e("Avaliações");?>
</span>
<span ng-if="data.evaluations.length > 1">
{{data.evaluations.length}} <?php \MapasCulturais\i::_e("Avaliações");?>
</span>
</td>
</tr>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@
<td colspan='10'>
<span ng-if="data.evaluations.length === 0"><?php \MapasCulturais\i::_e("Nenhuma avaliação enviada.");?></span>
<span ng-if="data.evaluations.length === 1"><?php \MapasCulturais\i::_e("1 avaliação encontrada.");?></span>
<span ng-if="data.evaluations.length > 1">{{data.evaluations.length}}
<span ng-if="data.evaluationsAPIMetadata.count > 0">
<i> de {{ data.evaluationsAPIMetadata.count }}</i>
</span>
<?php \MapasCulturais\i::_e("Avaliações");?>
</span>
<span ng-if="data.evaluations.length > 1">
{{data.evaluations.length}} <?php \MapasCulturais\i::_e("Avaliações");?>
</span>
</td>
</tr>
<tr ng-repeat="evaluation in data.evaluations" id="registration-{{evaluation.registration.id}}">
Expand Down

0 comments on commit ff5f780

Please sign in to comment.