Skip to content

Commit

Permalink
Conjunto de pequenos ajustes para unificar a ux writing da página do …
Browse files Browse the repository at this point in the history
…edital
  • Loading branch information
lpirola committed Jul 10, 2024
1 parent 42c8d40 commit 5ace306
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 26 deletions.
1 change: 1 addition & 0 deletions api/mapas/config/authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'auth.redirect_path' => '/edital/4',
'auth.config' => [
'salt' => env('AUTH_SALT', null),
'urlImageToUseInEmails' => 'https://iniciativas-mapadasperiferias.cidades.gov.br/files/opportunity/4/file/30/logo-ppv2024-f33ccbf81a4f55ec30ccb6c03264c7a7-23.jpg',
'timeout' => '24 hours',
'enableLoginByCPF' => false,
'loginOnRegister' => true,
Expand Down
2 changes: 1 addition & 1 deletion api/mapas/src/core/Entities/AgentRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ abstract class AgentRelation extends \MapasCulturais\Entity
/**
* @var \MapasCulturais\Entities\Agent
*
* @ORM\ManyToOne(targetEntity="MapasCulturais\Entities\Agent", fetch="EAGER")
* @ORM\ManyToOne(targetEntity="MapasCulturais\Entities\Agent", fetch="LAZY")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="agent_id", referencedColumnName="id", onDelete="CASCADE")
* })
Expand Down
11 changes: 6 additions & 5 deletions api/mapas/src/core/Middlewares/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ public function __invoke(Request $request, RequestHandler $handler)
$mem = memory_get_usage(true) / 1024 / 1024;

$route = $app->request->route;
if (str_contains($route, 'site.index')) {
if (
str_contains($route, 'site.index') ||
str_contains($route, 'panel.index') ||
str_contains($route, 'panel.registration')
) {
$response = $response->withStatus(302);
return $response->withHeader('Location', '/edital/4');
}
if (str_contains($route, 'panel.index')) {
$response = $response->withStatus(302);
return $response->withHeader('Location', '/minhas-inscricoes');
}

return $response;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<div v-if="categories.length > 0" class="col-6 sm:col-12 field">
<select name="category" v-model="category">
<option value="null" disabled selected> <?= $this->text('placeholder-category', i::__('Selecione a categoria')) ?> </option>
<option value="null" disabled selected> <?= $this->text('placeholder-category', i::__('Selecione o eixo')) ?> </option>
<option v-for="category in categories" :value="category"> {{category}} </option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use MapasCulturais\i;

return [
'selecione categoria' => $this->text('error-category', i::__('Por favor, selecione a categoria da inscrição')),
'selecione categoria' => $this->text('error-category', i::__('Por favor, selecione o eixo da inscrição')),
'selecione tipo de proponente' => $this->text('error-proponent-type', i::__('Por favor, selecione o tipo de proponente da inscrição')),
'selecione faixa' => $this->text('error-range', i::__('Por favor, selecione a faixa para inscrição')),
'selecione agente' => i::__('Por favor, selecione o agente responsável pela inscrição'),
Expand All @@ -14,4 +15,4 @@
'limite de inscrições' => i::__('O limite de inscrições nessa oportunidade foi atingido.'),
'limite de inscrições por usuário' => i::__('O limite de inscrições por usuário nessa oportunidade foi atingido.'),

];
];
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @var MapasCulturais\App $app
* @var MapasCulturais\Themes\BaseV2\Theme $this
Expand All @@ -11,15 +12,26 @@
');
?>
<div class="registration-actions">
<div class="registration-actions__secondary">
<button class="button button--large button--primary-outline" @click="validate()"> <?= i::__('Conferir inscrição') ?> </button>
<button @click="save();" class="button button--large button--primary-outline">
<?= i::__("Salvar") ?>
</button>

<button @click="exit()" class="button button--large button--primary-outline">
<?= i::__("Salvar e sair") ?>
</button>
</div>
<div class="registration-actions__primary">
<div v-if="Object.keys(registration.__validationErrors).length > 0" class="errors">
<span class="errors__title"> <?= i::__('Ops! Alguns erros foram identificados.') ?> </span>
<span class="errors__subtitle"> <?= i::__('Para continuar, corrija os campos com os erros listados abaixo:') ?> </span>

<div v-for="(error, index) in registration.__validationErrors" class="errors__error">
<div class="errors__error--text">
<strong>{{fieldName(index)}}:</strong> <p v-for="text in error">{{text}}</p>
</div>
<strong>{{fieldName(index)}}:</strong>
<p v-for="text in error">{{text}}</p>
</div>
</div>
</div>

Expand All @@ -28,22 +40,12 @@
<button @click="modal.open()" class="button button--large button--xbg button--primary">
<?= i::__("Enviar") ?>
</button>
</template>
</template>
<template #message="message">
<?php i::_e('Ao enviar sua inscrição você já estará participando da oportunidade.') ?>
</template>
</mc-confirm-button>
</mc-confirm-button>

<!-- <button class="button button--large button--xbg button--primary" @click="send()"> <?= i::__('Enviar') ?> </button> -->
</div>
<div class="registration-actions__secondary">
<button class="button button--large button--primary-outline" @click="validate()"> <?= i::__('Validar inscrição') ?> </button>
<button @click="save();" class="button button--large button--primary-outline">
<?= i::__("Salvar") ?>
</button>

<button @click="exit()" class="button button--large button--primary-outline">
<?= i::__("Salvar e sair") ?>
</button>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<dd :class="[entity.__objectType+'__color', 'type']"> {{entity.type.name}} </dd>
</dl>
<dl v-if="entity.ownerEntity" class="single-opportunity__owner">
<dt><?= i::__('Vinculado com ') ?><opportunity-owner-type :entity="entity"></opportunity-owner-type></dt>
<dt><?= i::__('Vinculado com ') ?><!--opportunity-owner-type :entity="entity"></opportunity-owner-type--></dt>
<dd><mc-link :entity="entity.ownerEntity"></mc-link></dd>
</dl>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<div class="section__content">
<div class="card owner">
<h3 class="card__title">
<?= i::__('Agente responsável') ?>
<?= i::__('Agente') ?>
</h3>

<div class="card__content">
Expand Down

0 comments on commit 5ace306

Please sign in to comment.