Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to homolog #361

Merged
merged 3 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@

class Diligence{

static public function findBy($className = 'Diligence\Entities\Diligence', $array): array
static public function findBy(string $className = 'Diligence\Entities\Diligence', array $criteria = [], array $orderBy = []): array
{
$app = App::i();
$entity = $app->em->getRepository($className)->findBy($array);
if(count($entity) > 0){
return $entity;
}
$entity = $app->em->getRepository($className)->findBy($criteria, $orderBy);
return $entity;
}

static public function getRegistrationAgentOpenAndAgent($number, $agentOpen, $agent): array
{
$app = App::i();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?php

use Diligence\Entities\AnswerDiligence;
use Diligence\Entities\Diligence;
use \MapasCulturais\App;
use Diligence\Repositories\Diligence as DiligenceRepo;

$app = App::i();

$diligences = DiligenceRepo::findBy('Diligence\Entities\Diligence', ['registration' => $entity->id]);
$diligences = DiligenceRepo::findBy('Diligence\Entities\Diligence', [
'registration' => $entity->id,
'status' => Diligence::STATUS_SEND
], ['createTimestamp' => 'asc']);
$mostRecentDiligence = end($diligences);
$diligenceId = $diligences ? $mostRecentDiligence->id : null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
//dump($entity);
<?php
//$spaceRelation = array_key_exists('useSpaceRelation', $project->metadata) ? $project->metadata['useSpaceRelation'] : '';

//if($spaceRelation == 'optional' || $spaceRelation == 'required'):
?>

Expand All @@ -10,24 +9,21 @@
<!-- espaços relacionados a inscricao -->
<div class="registration-list">
<input type="hidden" id="ownerId" name="ownerId" class="js-editable" data-edit="ownerId"/>
<div id="registration-agent-space" class="js-registration-agent registration-agent">
<p ng-if="data.entity.registrationSpace.status < 0" class="alert warning"><?php \MapasCulturais\i::_e("Aguardando confirmação");?></p>
<div class="clearfix">
<img ng-src="{{data.entity.registrationSpace.space.avatar.avatarSmall.url || data.assets.avatarSpace}}" class="registration-space-avatar" />

<div class="space-single-view-message">
<a ng-if="data.entity.registrationSpace.space" href="{{data.entity.registrationSpace.space.singleUrl}}">{{data.entity.registrationSpace.space.name}}</a>
<span ng-if="!data.entity.registrationSpace.space"><?php \MapasCulturais\i::_e("Não informado");?></span>
</div>
<div id="registration-agent-space" class="js-registration-agent registration-agent">
<p ng-if="data.entity.registrationSpace.status < 0" class="alert warning"><?php \MapasCulturais\i::_e("Aguardando confirmação");?></p>
<div class="clearfix">
<img ng-src="{{data.entity.registrationSpace.space.avatar.avatarSmall.url || data.assets.avatarSpace}}" class="registration-space-avatar" />

<div class="space-single-view-message">
<a ng-if="data.entity.registrationSpace.space" href="{{data.entity.registrationSpace.space.singleUrl}}">{{data.entity.registrationSpace.space.name}}</a>
<span ng-if="!data.entity.registrationSpace.space"><?php \MapasCulturais\i::_e("Não informado");?></span>
</div>
<div class="registration-space-details">
<div ng-repeat="prop in data.spaceLabels" ng-if="data.entity.spaceData[prop.name]">
<span class="label">{{prop.label}}</span>: {{prop.name === 'location' ? getReadableLocation(data.entity.spaceData[prop.name]) : data.entity.spaceData[prop.name]}}
</div>
</div>
<div class="registration-space-details">
<div ng-repeat="prop in data.spaceLabels" ng-if="data.entity.spaceData[prop.name]">
<span class="label">{{prop.label}}</span>: {{prop.name === 'location' ? getReadableLocation(data.entity.spaceData[prop.name]) : data.entity.spaceData[prop.name]}}
</div>
</div>
</div>
</div>
</div>

<?php //endif; ?>
Loading