Skip to content

Commit d1790ab

Browse files
committed
Insere região de intregração no cadastro de agente
1 parent 357f2a2 commit d1790ab

File tree

2 files changed

+117
-1
lines changed

2 files changed

+117
-1
lines changed

dev/config.d/0.main.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,4 @@
4141

4242
'app.geoDivisionsFilters' => [15],
4343

44-
'app.geoDivisionsShowAgentRI' => true,
4544
];
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<?php
2+
/**
3+
* @var MapasCulturais\App $app
4+
* @var MapasCulturais\Themes\BaseV2\Theme $this
5+
*/
6+
7+
use MapasCulturais\i;
8+
9+
$this->import('
10+
entity-field
11+
entity-map
12+
');
13+
?>
14+
15+
<?php $this->applyTemplateHook('entity-location','before'); ?>
16+
<div :class="classes" class="entity-location grid-12">
17+
<?php $this->applyTemplateHook('entity-location','begin'); ?>
18+
<div v-if="!hideLabel" class="entity-location__title col-12">
19+
<label v-if="verifiedAdress()"><?= i::__('Endereço')?></label>
20+
<?php if($this->isEditable()): ?>
21+
<?php $this->info('cadastro -> configuracoes-entidades -> endereco') ?>
22+
<?php endif; ?>
23+
</div>
24+
<div class="col-12" v-if="editable">
25+
<div class="grid-12">
26+
<entity-field @change="address(); pesquisacep(entity.En_CEP);" classes="col-4 sm:col-12" :entity="entity" prop="En_CEP"></entity-field>
27+
<entity-field @change="address()" classes="col-8 sm:col-12" :entity="entity" prop="En_Nome_Logradouro"></entity-field>
28+
<entity-field @change="address()" classes="col-2 sm:col-4" :entity="entity" prop="En_Num"></entity-field>
29+
<entity-field @change="address()" classes="col-10 sm:col-8" :entity="entity" prop="En_Bairro"></entity-field>
30+
<entity-field @change="address()" classes="col-12" :entity="entity" prop="En_Complemento" label="<?php i::_e('Complemento ou ponto de referência')?>"></entity-field>
31+
<entity-field v-if="statesAndCitiesCountryCode != 'BR'" @change="address()" classes="col-12" :entity="entity" prop="En_Pais" label="<?php i::_e('País') ?>"></entity-field>
32+
</div>
33+
</div>
34+
35+
<div class="col-12" v-if="editable && !statesAndCitiesEnable">
36+
<div class="grid-12" v-if="!entity.En_Pais || entity.En_Pais == statesAndCitiesCountryCode">
37+
<entity-field @change="address()" classes="col-6 sm:col-12" :entity="entity" prop="En_Estado" label="<?php i::_e('Estado')?>"></entity-field>
38+
<entity-field @change="address()" classes="col-6 sm:col-12" :entity="entity" prop="En_Municipio" label="<?php i::_e('Município')?>"></entity-field>
39+
</div>
40+
</div>
41+
42+
<div class="col-12" v-if="editable && statesAndCitiesEnable">
43+
<div class="grid-12" v-if="!entity.En_Pais || entity.En_Pais == statesAndCitiesCountryCode">
44+
<div class="field col-6">
45+
<label class="field__title">
46+
<?php i::_e('Estado')?>
47+
<span v-if="isRequired('En_Estado')" class="required">*<?php i::_e('obrigatório') ?></span>
48+
</label>
49+
<select @change="citiesList(); address()" v-model="entity.En_Estado">
50+
<option v-for="state in states" :value="state.value">{{state.label}}</option>
51+
</select>
52+
</div>
53+
<div class="field col-6">
54+
<label class="field__title">
55+
<?php i::_e('Município')?>
56+
<span v-if="isRequired('En_Municipio')" class="required">*<?php i::_e('obrigatório') ?></span>
57+
</label>
58+
<select @change="address()" v-model="entity.En_Municipio">
59+
<option v-for="city in cities" :value="city">{{city}}</option>
60+
</select>
61+
</div>
62+
</div>
63+
</div>
64+
65+
<div class="col-12">
66+
<div class="grid-12" v-if="entity.En_Pais && entity.En_Pais != statesAndCitiesCountryCode">
67+
<div class="field col-6">
68+
<label class="field__title">
69+
<?php i::_e('Estado')?>
70+
<span v-if="isRequired('En_Estado')" class="required">*<?php i::_e('obrigatório') ?></span>
71+
</label>
72+
<input :id="propId('En_Estado')" v-model="entity.En_Estado" type="text" @change="address()" autocomplete="off">
73+
</div>
74+
75+
<div class="field col-6">
76+
<label class="field__title">
77+
<?php i::_e('Município')?>
78+
<span v-if="isRequired('En_Municipio')" class="required">*<?php i::_e('obrigatório') ?></span>
79+
</label>
80+
<input v-model="entity.En_Municipio" :id="propId('En_Municipio')" type="text" @change="address()" autocomplete="off">
81+
</div>
82+
</div>
83+
</div>
84+
85+
<div v-if="editable && entity.geoRI" class="col-12">
86+
<div class="entity-location__integration-region grid-12">
87+
<div class="field col-6">
88+
<label class="title"><?php i::_e('Região de Integração') ?></label>
89+
<div class="box">
90+
<label class="box__content">{{entity.geoRI}}</label>
91+
</div>
92+
</div>
93+
</div>
94+
</div>
95+
96+
<div class="col-12" v-if="editable && hasPublicLocation">
97+
<div class="col-6 sm:col-12 public-location">
98+
<entity-field @change="address()" type="checkbox" classes="public-location__field col-6" :entity="entity" prop="publicLocation" label="<?php i::esc_attr_e('Localização pública')?>">
99+
<?php if($this->isEditable()): ?>
100+
<template #info>
101+
<?php $this->info('cadastro -> configuracoes-entidades -> localizacao-publica') ?>
102+
</template>
103+
<?php endif; ?>
104+
</entity-field>
105+
<label class="public-location__label col-12"><?php i::_e('Marque o campo acima para tornar o endereço público ou deixe desmarcado para manter o endereço privado.')?></label>
106+
</div>
107+
</div>
108+
<div v-if="verifiedAdress()" class="col-12">
109+
<p class="entity-location__address">
110+
<span v-if="entity.endereco">{{entity.endereco}}</span>
111+
<span v-if="!entity.endereco"><?= i::_e("Sem Endereço"); ?></span>
112+
</p>
113+
<entity-map :entity="entity" :editable="editable"></entity-map>
114+
</div>
115+
<?php $this->applyTemplateHook('entity-location','end'); ?>
116+
</div>
117+
<?php $this->applyTemplateHook('entity-location','after'); ?>

0 commit comments

Comments
 (0)