Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sistema_mcid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marcio neto
sistema_mcid
Commits
79035112
Commit
79035112
authored
Feb 06, 2024
by
sandroresende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finalizacao modulo apis - edicao projetos
parent
e632fb68
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
879 additions
and
52 deletions
+879
-52
ApiController.php
app/Http/Controllers/ApiController.php
+33
-0
HomeApisController.php
app/Http/Controllers/Mod_apis/HomeApisController.php
+0
-3
ProjetosDebenturesController.php
...ttp/Controllers/Mod_apis/ProjetosDebenturesController.php
+83
-8
RedirecionarUsuario.php
app/Http/Middleware/RedirecionarUsuario.php
+2
-5
RlcMunicipiosBeneficiadosDebentures.php
app/Mod_apis/RlcMunicipiosBeneficiadosDebentures.php
+16
-1
app.js
public/js/app.js
+364
-1
app.js
resources/assets/js/app.js
+4
-0
AdicionarMunicipios.vue
...ces/assets/js/components/mod_apis/AdicionarMunicipios.vue
+110
-0
dados_projeto.blade.php
resources/views/modulo_apis/dados_projeto.blade.php
+25
-1
editar_condicao_emissao.blade.php
...urces/views/modulo_apis/editar_condicao_emissao.blade.php
+1
-1
editar_emissao.blade.php
resources/views/modulo_apis/editar_emissao.blade.php
+18
-5
editar_municipios.blade.php
resources/views/modulo_apis/editar_municipios.blade.php
+149
-0
home_apis.blade.php
resources/views/modulo_apis/home_apis.blade.php
+61
-23
api.php
routes/api.php
+3
-1
web.php
routes/web.php
+10
-3
No files found.
app/Http/Controllers/ApiController.php
View file @
79035112
...
...
@@ -25,6 +25,7 @@ use App\IndicadoresHabitacionais\BrasilComRm;
use
App\IndicadoresHabitacionais\ViewIndicadoresSaneamento
;
use
App\Mod_apis\AgenteFiduciario
;
use
App\Mod_apis\ModalidadeProjeto
;
use
App\Mod_apis\RlcMunicipiosBeneficiadosDebentures
;
use
App\Mod_apis\SituacaoConjur
;
use
App\Mod_apis\SituacaoEmissao
;
use
App\Mod_apis\SituacaoEnquadramento
;
...
...
@@ -33,6 +34,7 @@ use App\Mod_apis\SituacaoPublicacaoPortaria;
use
App\Mod_apis\StatusAnalise
;
use
App\Mod_apis\StatusEnquadramento
;
use
App\Mod_apis\StatusExecucao
;
use
App\Mod_apis\ViewMunicipiosBeneficiadosDebentures
;
use
App\Mod_bndes\Andamento
as
Mod_bndesAndamento
;
use
App\Mod_bndes\RlcAndamentoSituacaoObra
;
use
App\Mod_bndes\SituacaoContrato
as
Mod_bndesSituacaoContrato
;
...
...
@@ -88,6 +90,7 @@ use App\Mod_debentures_reidi\TipoProjeto;
use
App\Mod_debentures_reidi\ViewProjetosDebentures
;
use
App\Mod_debentures_reidi\ViewProjetosdebenturesReidi
;
use
App\Mod_debentures_reidi\ViewProjetosReidis
;
use
App\Mod_saci\mod_ibge\Municipio
as
Mod_ibgeMunicipio
;
use
App\Propostas\ViewSysRelatorioGeralDiscricionarioSistema
;
use
App\Setor
;
use
App\User
;
...
...
@@ -719,4 +722,34 @@ class ApiController extends Controller
return
AgenteFiduciario
::
orderBy
(
'txt_agente_fiduciario'
)
->
get
();
}
public
function
buscarMunicipiosBeneficiados
(
$estado
)
{
$where
=
[];
$where
[]
=
[
'tab_municipios.id_uf'
,
$estado
];
//
return
$municipios
=
Mod_ibgeMunicipio
::
leftjoin
(
'mcid_sistema_apis.rlc_municipios_beneficiados_debentures'
,
'tab_municipios.id_municipio'
,
'='
,
'rlc_municipios_beneficiados_debentures.municipio_id'
)
->
select
(
'tab_municipios.id_municipio'
,
'tab_municipios.ds_municipio'
,
'cod_ibge_7d'
)
->
where
(
$where
)
->
whereNull
(
'rlc_municipios_beneficiados_debentures.municipio_id'
)
->
orderBy
(
'tab_municipios.ds_municipio'
)
->
get
();
return
$municipios
=
ViewMunicipiosBeneficiadosDebentures
::
where
(
'id_uf'
,
$estado
)
->
get
();
}
}
app/Http/Controllers/Mod_apis/HomeApisController.php
View file @
79035112
...
...
@@ -20,9 +20,6 @@ class HomeApisController extends Controller
public
function
__construct
()
{
$this
->
middleware
(
'auth'
);
$this
->
middleware
(
'redirecionar'
);
// $this->middleware('moduloUsuario');
}
/**
...
...
app/Http/Controllers/Mod_apis/ProjetosDebenturesController.php
View file @
79035112
...
...
@@ -11,6 +11,7 @@ use App\Mod_apis\EmissaoDebentures;
use
App\Mod_apis\ProjetosDebentures
;
use
App\Mod_apis\RlcCondicoesEmissao
;
use
App\Mod_apis\RlcGrupoControladorDebentures
;
use
App\Mod_apis\RlcMunicipiosBeneficiadosDebentures
;
use
App\Mod_apis\RlcTitularDebentures
;
use
App\Mod_apis\ViewEmissaoDebentures
;
use
App\Mod_apis\ViewMunicipiosBeneficiadosDebentures
;
...
...
@@ -29,9 +30,6 @@ class ProjetosDebenturesController extends Controller
public
function
__construct
()
{
$this
->
middleware
(
'auth'
);
$this
->
middleware
(
'redirecionar'
);
// $this->middleware('moduloUsuario');
}
/**
...
...
@@ -327,11 +325,13 @@ class ProjetosDebenturesController extends Controller
}
}
public
function
editarEmissao
(
$
projetoDebenture
Id
)
public
function
editarEmissao
(
$
emissao
Id
)
{
$projetoDebenture
=
ViewProjetosDebentures
::
where
(
'projeto_debenture_id'
,
$projetoDebentureId
)
->
first
();
$emissaoDebentures
=
ViewEmissaoDebentures
::
where
(
'projeto_debenture_id'
,
$projetoDebentureId
)
->
first
();
$emissaoDebentures
=
ViewEmissaoDebentures
::
where
(
'emissao_debenture_id'
,
$emissaoId
)
->
first
();
$projetoDebenture
=
ViewProjetosDebentures
::
where
(
'projeto_debenture_id'
,
$emissaoDebentures
->
projeto_debenture_id
)
->
first
();
if
(
!
empty
(
$emissaoDebentures
))
{
$condicoesEmissao
=
RlcCondicoesEmissao
::
where
(
'emissao_debenture_id'
,
$emissaoDebentures
->
emissao_debenture_id
)
->
get
();
...
...
@@ -375,7 +375,7 @@ class ProjetosDebenturesController extends Controller
{
return
$condicoesEmissao
=
RlcCondicoesEmissao
::
where
(
'id'
,
$condicaoEmissao
)
->
first
();
$condicoesEmissao
=
RlcCondicoesEmissao
::
where
(
'id'
,
$condicaoEmissao
)
->
first
();
...
...
@@ -389,7 +389,7 @@ class ProjetosDebenturesController extends Controller
DB
::
beginTransaction
();
return
$condicaoEmissao
=
RlcCondicoesEmissao
::
find
(
$request
->
condicao_emissao_id
);
$condicaoEmissao
=
RlcCondicoesEmissao
::
find
(
$request
->
condicao_emissao_id
);
$condicaoEmissao
->
num_emissao
=
$request
->
num_emissao
;
...
...
@@ -421,4 +421,79 @@ class ProjetosDebenturesController extends Controller
return
back
();
}
}
public
function
excluirCondicaoEmissao
(
$condicaoId
)
{
DB
::
beginTransaction
();
$condicaoEmissao
=
RlcCondicoesEmissao
::
find
(
$condicaoId
);
$deleteCondicaoEmissao
=
$condicaoEmissao
->
delete
();
if
(
$deleteCondicaoEmissao
)
{
DB
::
commit
();
flash
()
->
sucesso
(
"Sucesso"
,
"Condição da emissão deletada com sucesso!"
);
return
redirect
()
->
back
();
}
else
{
DB
::
rollBack
();
flash
()
->
erro
(
"Erro"
,
"Não foi possível deletar a condição da emissão."
);
return
back
();
}
}
public
function
editarMunicipios
(
$projetoDebentures
)
{
$municipiosBeneficiados
=
ViewMunicipiosBeneficiadosDebentures
::
where
(
'projeto_debenture_id'
,
$projetoDebentures
)
->
get
();
$projetoDebenture
=
ViewProjetosDebentures
::
where
(
'projeto_debenture_id'
,
$projetoDebentures
)
->
first
();
return
view
(
'modulo_apis.editar_municipios'
,
compact
(
'projetoDebenture'
,
'municipiosBeneficiados'
));
}
public
function
adicionarMunicipiosBeneficiados
(
Request
$request
)
{
//return $request->all();
DB
::
beginTransaction
();
return
$municipiosBeneficiados
=
$request
->
municipiosBeneficiados
;
foreach
(
$municipiosBeneficiados
as
$item
)
{
$salvouMunicipioBeneficiado
=
RlcMunicipiosBeneficiadosDebentures
::
salvarMunicipioBeneficiado
(
$request
->
projeto_debenture_id
,
$item
);
}
if
(
!
$salvouMunicipioBeneficiado
)
{
DB
::
rollBack
();
flash
()
->
erro
(
"Erro"
,
"Não foi possível adicionar os municípios."
);
return
back
();
}
else
{
DB
::
commit
();
flash
()
->
sucesso
(
"Sucesso"
,
"Municípios adicionaos com sucesso!"
);
return
redirect
()
->
back
();
}
}
public
function
excluirMunicipios
(
$municipioBeneficiadoId
)
{
DB
::
beginTransaction
();
$municipiosBeneficiados
=
RlcMunicipiosBeneficiadosDebentures
::
find
(
$municipioBeneficiadoId
);
$deleteCondicaoEmissao
=
$municipiosBeneficiados
->
delete
();
if
(
$deleteCondicaoEmissao
)
{
DB
::
commit
();
flash
()
->
sucesso
(
"Sucesso"
,
"Condição da emissão deletada com sucesso!"
);
return
redirect
()
->
back
();
}
else
{
DB
::
rollBack
();
flash
()
->
erro
(
"Erro"
,
"Não foi possível deletar a condição da emissão."
);
return
back
();
}
}
}
app/Http/Middleware/RedirecionarUsuario.php
View file @
79035112
...
...
@@ -61,10 +61,7 @@ class RedirecionarUsuario
}
elseif
(
$usuario
->
modulo_sistema_id
==
5
)
{
return
redirect
(
'/home_bndes'
);
}
elseif
(
$usuario
->
modulo_sistema_id
==
6
)
{
Auth
::
logout
();
return
redirect
(
'/login'
);
//return redirect('/home');
return
redirect
(
'/home_apis'
);
}
else
{
flash
()
->
erro
(
"Erro"
,
"Não existe usuário com esses dados."
);
Auth
::
logout
();
...
...
@@ -79,4 +76,4 @@ class RedirecionarUsuario
return
redirect
(
'/'
);
}
}
}
\ No newline at end of file
}
app/Mod_apis/RlcMunicipiosBeneficiadosDebentures.php
View file @
79035112
...
...
@@ -14,4 +14,19 @@ class RlcMunicipiosBeneficiadosDebentures extends Model
public
$timestamps
=
false
;
// tabela não possui coluna de data de criação/atualização
}
\ No newline at end of file
public
static
function
salvarMunicipioBeneficiado
(
$projeto_debenture_id
,
$codMunicipio
)
{
$municipiosBen
=
new
RlcMunicipiosBeneficiadosDebentures
;
$municipiosBen
->
projeto_debenture_id
=
$projeto_debenture_id
;
$municipiosBen
->
municipio_id
=
$codMunicipio
;
$salvoMunicipiosBen
=
$municipiosBen
->
save
();
if
(
$salvoMunicipiosBen
)
{
return
true
;
}
else
{
return
true
;
}
}
}
public/js/app.js
View file @
79035112
This diff is collapsed.
Click to expand it.
resources/assets/js/app.js
View file @
79035112
...
...
@@ -284,6 +284,10 @@ Vue.component(
require
(
"./components/mod_apis/EditarEnquadramento.vue"
)
);
Vue
.
component
(
"adicionar-municipios"
,
require
(
"./components/mod_apis/adicionarMunicipios.vue"
)
);
const
app
=
new
Vue
({
el
:
"#app"
,
});
resources/assets/js/components/mod_apis/AdicionarMunicipios.vue
0 → 100644
View file @
79035112
<
template
>
<div
class=
"form-group"
>
<div
class=
"row"
>
<div
class=
"column col-xs-12 col-md-4"
>
<label
for=
"uf"
>
UF
</label>
<select
id=
"estado"
class=
"form-select br-select"
name=
"estado"
@
change=
"onChangeEstado"
v-model=
"estado"
>
<option
value=
""
>
Escolha um Estado:
</option>
<option
v-for=
"estado in estados"
v-text=
"estado.txt_sigla_uf"
:value=
"estado.id"
:key=
"estado.id"
></option>
</select>
</div>
</div>
<div
class=
"titulo"
v-if=
"estado != '' && this.municipios.length > 1"
>
<h5>
Municípios Beneficiados
</h5>
</div>
<div
class=
"row"
v-if=
"estado != '' && this.municipios.length > 1"
>
<div
class=
"col col-xs-12 col-sm-4 br-checkbox"
>
<input
id=
"checkbox-1"
name=
"checkbox-1"
type=
"checkbox"
@
click=
'checkAll()'
v-model=
'isCheckAll'
/>
<label
for=
"checkbox-1"
>
Todos
</label>
</div>
<div
class=
"col col-xs-12 col-sm-4 br-checkbox"
v-for=
'lang in municipios'
>
<input
id=
"municipiosBeneficiados"
name=
"municipiosBeneficiados[]"
type=
'checkbox'
v-bind:value=
'lang.cod_ibge_7d'
v-model=
'municipiosCheck'
@
change=
'updateCheckall()'
/>
<label
for=
"checkbox-1"
>
{{
lang
.
ds_municipio
}}
</label>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:[
'url'
,
'dados'
],
data
(){
return
{
situacao_emissoes
:
''
,
estado
:
''
,
estados
:
''
,
textoEscolhaMunicipio
:
'Filtre o Estado'
,
municipio
:
''
,
municipios
:
''
,
buscando
:
false
,
isCheckAll
:
false
,
listmunic
:
[],
municipiosCheck
:[],
selectedlang
:
""
,
}
},
methods
:{
checkAll
:
function
(){
this
.
isCheckAll
=
!
this
.
isCheckAll
;
this
.
municipiosCheck
=
[];
if
(
this
.
isCheckAll
){
// Check all
for
(
let
i
=
0
;
i
<
this
.
municipios
.
length
;
i
++
)
{
this
.
municipiosCheck
.
push
(
this
.
municipios
[
i
].
cod_ibge_7d
);
}
}
},
updateCheckall
:
function
(){
if
(
this
.
municipiosCheck
.
length
==
this
.
municipios
.
length
){
this
.
isCheckAll
=
true
;
}
else
{
this
.
isCheckAll
=
false
;
}
},
onChangeEstado
()
{
this
.
textoEscolhaMunicipio
=
"Buscando..."
;
this
.
municipio
=
''
;
this
.
buscando
=
true
;
if
(
this
.
estado
!=
''
)
{
//busca dados no banco de dados para carregar no componente
axios
.
get
(
this
.
url
+
'/api/apis/debentures/municipios/'
+
this
.
estado
).
then
(
resposta
=>
{
this
.
textoEscolhaMunicipio
=
"Escolha um municipio:"
;
this
.
buscando
=
false
;
this
.
municipios
=
resposta
.
data
;
console
.
log
(
this
.
municipios
);
}).
catch
(
error
=>
{
console
.
log
(
error
);
});
}
else
{
this
.
buscando
=
false
;
this
.
municipio
=
''
;
this
.
textoEscolhaMunicipio
=
"Filtre o Estado"
}
}
}
,
mounted
()
{
axios
.
get
(
this
.
url
+
'/api/ufs'
).
then
(
resposta
=>
{
//console.log(resposta.data);
this
.
estados
=
resposta
.
data
;
this
.
estado
=
''
;
}).
catch
(
erro
=>
{
console
.
log
(
erro
);
})
}
}
</
script
>
resources/views/modulo_apis/dados_projeto.blade.php
View file @
79035112
...
...
@@ -291,6 +291,23 @@
class="
form
-
control
text
-
center
" name="
dte_encerramento_oferta_publica
" value="
@
if
(
$emissaoDebentures
->
dte_encerramento_oferta_publica
)
{{
date
(
'd/m/Y'
,
strtotime
(
$emissaoDebentures
->
dte_encerramento_oferta_publica
))}}
@
endif
" disabled>
</div>
</div><!--row-->
<div class="
row
">
<div class="
column
col
-
xs
-
12
col
-
md
-
2
">
<label for="
vlr_captado
" class="
control
-
label
">Valor Captado</label>
<input id="
vlr_captado
" type="
text
"
class="
form
-
control
text
-
center
" name="
vlr_captado
" value="
{{
number_format
(
(
$emissaoDebentures
->
vlr_captado
),
2
,
','
,
'.'
)}}
" disabled>
</div>
<div class="
column
col
-
xs
-
12
col
-
md
-
4
">
<label for="
agente_fiduciario_id
" class="
control
-
label
">Cnpj Agente Fiduciário</label>
<input id="
agente_fiduciario_id
" type="
text
"
class="
form
-
control
text
-
center
" name="
agente_fiduciario_id
" value="
{{
$emissaoDebentures
->
agente_fiduciario_id
}}
" disabled>
</div>
<div class="
column
col
-
xs
-
12
col
-
md
-
5
">
<label for="
txt_agente_fiduciario
" class="
control
-
label
">Agente Fiduciário</label>
<input id="
txt_agente_fiduciario
" type="
text
"
class="
form
-
control
text
-
center
" name="
txt_agente_fiduciario
" value="
{{
$emissaoDebentures
->
txt_agente_fiduciario
}}
" disabled>
</div>
</div>
<hr>
@if(!empty(
$emissaoDebentures
))
<button type="
button
" class="
br
-
button
block
secondary
mr
-
3
" aria-label="
Ícone
ilustrativo
" data-bs-toggle="
modal
" data-bs-target="
#registrarCondicaoEmissao">
...
...
@@ -327,7 +344,7 @@
@endif
<hr>
<div class="
mt
-
1
mb
-
1
text
-
right
">
<button type="
button
" class="
br
-
button
bg
-
violet
-
warm
-
60
text
-
white
mr
-
5
" aria-label="
Ícone
ilustrativo
" onclick='window.location.href="
{{
url
(
"apis/
emissao/debenture/
$projetoDebenture->projet
o_debenture_id
"
)}}
"'>
<button type="
button
" class="
br
-
button
bg
-
violet
-
warm
-
60
text
-
white
mr
-
5
" aria-label="
Ícone
ilustrativo
" onclick='window.location.href="
{{
url
(
"apis/
debenture/emissao/
$emissaoDebentures->emissa
o_debenture_id
"
)}}
"'>
<i class="
fas
fa
-
edit
" aria-hidden="
true
"></i>Editar Emissão
</button>
</div>
...
...
@@ -338,6 +355,7 @@
</div><!--form-group-->
<div class="
form
-
group
">
<div class="
card
">
<div class="
card
-
header
bg
-
green
-
cool
-
vivid
-
60
text
-
white
">Municípios beneficiados</div>
...
...
@@ -367,6 +385,12 @@
</tbody><!-- fechar tbody-->
</table><!-- fechar table-->
</div> <!-- table-responsive-sm -->
<hr>
<div class="
mt
-
1
mb
-
1
text
-
right
">
<button type="
button
" class="
br
-
button
bg
-
green
-
cool
-
vivid
-
60
text
-
white
mr
-
5
" aria-label="
Ícone
ilustrativo
" onclick='window.location.href="
{{
url
(
"apis/municipios_beneficiados/debenture/
$projetoDebenture->projeto_debenture_id
"
)}}
"'>
<i class="
fas
fa
-
edit
" aria-hidden="
true
"></i>Editar Municípios
</button>
</div>
</div><!--card-body-->
</div><!--card-->
</div> <!--form-group-->
...
...
resources/views/modulo_apis/editar_condicao_emissao.blade.php
View file @
79035112
...
...
@@ -42,7 +42,7 @@
<button class="
br
-
button
primary
mr
-
3
" type="
submit
" name="
Salvar
Edição
">Salvar
</button>
<button class="
br
-
button
danger
mr
-
3
" type="
button
" onclick="
window
.
location
.
href
=
'/apis/
emissao/debenture
/{{$condicoesEmissao->emissao_debenture_id}}'
">Voltar
<button class="
br
-
button
danger
mr
-
3
" type="
button
" onclick="
window
.
location
.
href
=
'/apis/
debenture/emissao
/{{$condicoesEmissao->emissao_debenture_id}}'
">Voltar
</button>
</div>
</form>
...
...
resources/views/modulo_apis/editar_emissao.blade.php
View file @
79035112
...
...
@@ -91,11 +91,24 @@
@if(
$dados->num_duracao_anos
)<p class="
card
-
text
"><b>Duração: </b>
{
{$dados->num_duracao_anos}
}
anos</p>@endif
@if(
$dados->num_cvm
)<p class="
card
-
text
"><b>CVM: </b>
{
{$dados->num_cvm}
}
</p>@endif
<div class="
p
-
3
text
-
right
">
<button type="
button
" class="
br
-
button
info
mr
-
3
" onclick='window.location.href="
{{
url
(
"apis/condicao_emissao/debenture/
$dados->id
"
)}}
"'>
<i class="
fas
fa
-
edit
" aria-hidden="
true
"></i>Editar
</button>
<button type="
button
" class="
br
-
button
danger
mr
-
3
">Excluir</button>
<div class="
row
">
<div class="
column
col
-
xs
-
12
col
-
md
-
6
text
-
right
">
<button type="
button
" class="
br
-
button
info
mr
-
3
" onclick='window.location.href="
{{
url
(
"apis/debenture/condicao_emissao/
$dados->id
"
)}}
"'>
<i class="
fas
fa
-
edit
" aria-hidden="
true
"></i>
</button>
</div>
<div class="
column
col
-
xs
-
12
col
-
md
-
6
text
-
left
">
<botao-acao-icone
:url="
'{{ url("apis/debenture/excluir/condicao_emissao/")}}'
"
registro="
{{
$dados
->
id
}}
"
mensagem="
Deseja
excluir
a
condição
?
"
titulo="
Atenção
!!!
"
txtbotaoconfirma="
Sim
"
txtbotaocancela="
Cancelar
"
cssbotao="
br
-
button
danger
mr
-
3
"
cssicone="
fas
fa
-
trash
"
></botao-acao-icone>
</div>
</div>
...
...
resources/views/modulo_apis/editar_municipios.blade.php
0 → 100644
View file @
79035112
@
extends
(
'layouts.app'
)
@
section
(
'scriptscss'
)
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"
{
{URL::asset('css/custom.css')}
}
"
media
=
"screen"
/>
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"{{ asset('css/relatorio_executivo.css') }}"
media
=
"screen"
>
@
endsection
@
section
(
'content'
)
<
historico
-
navegacao
:
url
=
"'{{ url('/home') }}'"
:
telanterior01
=
"'Debentures'"
:
telanterior02
=
"'Consultar projetos debentures'"
:
telatual
=
"'Dados do Projeto'"
>
</
historico
-
navegacao
>
<
div
class
="
main
-
content
pl
-
sm
-
3
mt
-
5
container
-
fluid
" id="
main
-
content
">
<cabecalho-relatorios
titulo="
Carta
Consulta
:
{{
$projetoDebenture
->
cod_carta_consulta
}}
"
:subtitulo1="
'{{$projetoDebenture->txt_modalidade_projeto}}'
"
:subtitulo2="
'{{$projetoDebenture->num_ano_cadastramento}}'
"
:subtitulo3="
'{{$projetoDebenture->txt_normativo_enquadramento}}'
"
@if(
$projetoDebenture->updated_at
)
:dataatualizacao="
'{{date('
d
/
m
/
Y
',strtotime($projetoDebenture->updated_at))}}'
"
@elseif(
$projetoDebenture->created_at
)
:dataatualizacao="
'{{date('
d
/
m
/
Y
',strtotime($projetoDebenture->created_at))}}'
"
@endif
barracompartilhar="
true
"
>
<div class="
text
-
center
">
@if(
$projetoDebenture->situacao_enquadramento_id
== 2 ||
$projetoDebenture->situacao_enquadramento_id
== 4)
<span class="
feedback
warning
" role="
alert
">
<i class="
fas
fa
-
exclamation
-
triangle
" aria-hidden="
true
"></i>
{
{$projetoDebenture->txt_situacao_enquadramento}
}
</span>
@elseif(
$projetoDebenture->situacao_enquadramento_id
== 3 ||
$projetoDebenture->situacao_enquadramento_id
== 6)
<span class="
feedback
danger
" role="
alert
">
<i class="
fas
fa
-
times
-
circle
" aria-hidden="
true
"></i>
{
{$projetoDebenture->txt_situacao_enquadramento}
}
</span>
@elseif(
$projetoDebenture->situacao_enquadramento_id
== 5)
<span class="
feedback
success
" role="
alert
">
<i class="
fas
fa
-
check
-
circle
" aria-hidden="
true
"></i>
{
{$projetoDebenture->txt_situacao_enquadramento}
}
</span>
@else
<span class="
feedback
info
" role="
alert
">
<i class="
fas
fa
-
info
-
circle
" aria-hidden="
true
"></i>
{
{$projetoDebenture->txt_situacao_enquadramento}
}
</span>
@endif
</div>
</cabecalho-relatorios>
<div class="
form
-
group
">
<div class="
card
">
<div class="
card
-
header
bg
-
green
-
cool
-
vivid
-
60
text
-
white
">Municípios Beneficiados</div>
<div class="
card
-
body
">
<button type="
button
" class="
br
-
button
block
secondary
mr
-
3
" disabled aria-label="
Ícone
ilustrativo
" data-bs-toggle="
modal
" data-bs-target="
#adicionarMunicipios">
<
i
class
="
fas
fa
-
plus
" aria-hidden="
true
"></i>Adicionar Municípios
</button>
<div class="
table
-
responsive
-
sm
">
<table class="
table
table
-
hover
">
<thead>
<tr class="
text
-
center
">
<th></th>
<th>UF</th>
<th>Código IBGE</th>
<th>Município</th>
<th>Região</th>
<th>RM / RIDE</th>
<th>Ação</th>
</tr>
</thead>
<tbody>
@foreach(
$municipiosBeneficiados
as
$dados
)
<tr>
<td>
{
{$loop->index+1}
}
</td>
<td>
{
{$dados->sg_uf}
}
</td>
<td>
{
{$dados->municipio_id}
}
</td>
<td>
{
{$dados->ds_municipio}
}
</td>
<td>
{
{$dados->ds_regiao}
}
</td>
<td>
{
{$dados->txt_rm_ride}
}
</td>
<td>
<botao-acao-icone
:url="
'{{ url("apis/debenture/excluir/municipio/")}}'
"
registro="
{{
$dados
->
municipio_beneficiado_debenture_id
}}
"
mensagem="
Deseja
excluir
este
município
?
"
titulo="
Atenção
!!!
"
txtbotaoconfirma="
Sim
"
txtbotaocancela="
Cancelar
"
cssbotao="
br
-
button
danger
mr
-
3
"
cssicone="
fas
fa
-
trash
"
></botao-acao-icone>
</td>
</tr>
@endforeach
</tbody><!-- fechar tbody-->
</table><!-- fechar table-->
</div> <!-- table-responsive-sm -->
<div class="
p
-
3
text
-
right
">
<button class="
br
-
button
danger
mr
-
3
" type="
button
" onclick="
window
.
location
.
href
=
'/apis/debentures/{{$projetoDebenture->projeto_debenture_id}}'
">Voltar
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Modal acompanhamento -->
<div class="
modal
fade
" id="
adicionarMunicipios
" tabindex="
-
1
" aria-labelledby="
adicionarMunicipiosLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
dialog
-
centered
modal
-
xl
">
<div class="
modal
-
content
">
<div class="
modal
-
header
">
<h1 class="
modal
-
title
fs
-
5
" id="
adicionarMunicipiosLabel
">Municipípios Beneficiados</h1>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
"></button>
</div>
<form class="
form
-
horizontal
" role="
form
" method="
POST
" action='{{ url("
apis
/
debenture
/
municipios_beneficiados
/
adicionar
/
") }}'>
{{ csrf_field() }}
<input type="
hidden
" id="
projeto_debenture_id
" name="
projeto_debenture_id
" value="
{{
$projetoDebenture
->
projeto_debenture_id
}}
">
<div class="
modal
-
body
">
<adicionar-municipios
:url="
'{{ url("/")}}'
">
</adicionar-municipios>
</div>
<div class="
modal
-
footer
">
<button type="
button
" class="
br
-
button
danger
mr
-
3
" data-bs-dismiss="
modal
">Fechar</button>
<button type="
submit
" class="
br
-
button
primary
mr
-
3
">Adicionar</button>
</div>
</form>
</div>
</div>
</div>
@endsection
\ No newline at end of file
resources/views/modulo_apis/home_apis.blade.php
View file @
79035112
...
...
@@ -6,31 +6,69 @@
@
section
(
'content'
)
<
div
class
="
br
-
card
">
<div class="
card
-
header
">
<div class="
d
-
flex
"><span class="
br
-
avatar
mt
-
1
" title="
Fulano
da
Silva
"><span class="
content
">
<img src='{{ URL::asset("
/
img
/
icones
/
pesquisa
.
png
")}}' alt="
Avatar
"/></span></span>
<div class="
ml
-
3
">
<div class="
text
-
weight
-
semi
-
bold
text
-
up
-
02
">
Propostas 2023
</div>
<
div
class
="
titulo
">
<h3>Contratos</h3>
</div>
<div class="
panel
-
body
">
<div class="
row
">
<div class="
column
col
-
xs
-
12
col
-
sm
-
6
col
-
md
-
3
text
-
center
">
<h4>
<a href='{{ url("
saci
/
propostas
/
cadastro
") }}'>
<img src='{{ URL::asset("
/
img
/
icones
/
questionarios
.
png
")}}' class="
img
-
thumbnail
img
-
responsive
" >
</a>
<p>Novo Contrato PAC</p>
</h4>
</div>
<div class="
column
col
-
xs
-
12
col
-
sm
-
6
col
-
md
-
3
text
-
center
">
</div>
<div class="
column
col
-
xs
-
12
col
-
sm
-
6
col
-
md
-
3
text
-
center
">
</div>
<div class="
column
col
-
xs
-
12
col
-
sm
-
6
col
-
md
-
3
text
-
center
">
<div>
Consulta
</div>
</div>
<div class="
ml
-
auto
">
<!--
<button class="
br
-
button
circle
" type="
button
" aria-label="
Ícone
ilustrativo
"><i class="
fas
fa
-
ellipsis
-
v
" aria-hidden="
true
"></i>
</button>
-->
</div>
</div>
</div>
<div class="
card
-
content
">
<p>
Este formulário permite que você filtre as propostas cadastradas selecionando as opções de filtro ou todas as propostas caso não selecione nenhum filtro. Nesse caso será disponibilizado uma lista de proposta com base
nos parâmetros selecionados.
</p>
</div>
</div>
</div>
<span class="
br
-
divider
my
-
3
"></span>
<form role="
form
" method="
POST
" action='{{ url("
apis
/
debentures
/
pesquisar
") }}'>
@csrf
<filtro-projetos-debentures
:url="
'{{ url('
/
') }}'
">
</filtro-projetos-debentures>
<div class="
p
-
3
text
-
right
">
<button class="
br
-
button
primary
mr
-
3
" type="
submit
" name="
Salvar
Edição
">Pesquisar
</button>
<button class="
br
-
button
danger
mr
-
3
" type="
button
" onclick="
javascript
:
window
.
history
.
go
(
-
1
)
">Voltar
</button>
</div>
</form>
</div>
<div class="
card
-
footer
">
<div class="
d
-
flex
" style="
padding
-
top
:
10
px
;
">
</div>
</div>
</div><!-- br-card -->
@endsection
routes/api.php
View file @
79035112
...
...
@@ -174,4 +174,6 @@ Route::get('/apis/situacao_publicacao', 'ApiController@buscarSituacaoPublicacao'
Route
::
get
(
'/apis/status_analises'
,
'ApiController@buscarStatusAnalises'
);
Route
::
get
(
'/apis/status_enquadramentos'
,
'ApiController@buscarStatusEnquadramentos'
);
Route
::
get
(
'/apis/status_execucao'
,
'ApiController@buscarStatusExecucao'
);
Route
::
get
(
'/apis/agente_fiduciario'
,
'ApiController@buscarAgenteFiduciario'
);
\ No newline at end of file
Route
::
get
(
'/apis/agente_fiduciario'
,
'ApiController@buscarAgenteFiduciario'
);
Route
::
get
(
'/apis/debentures/municipios/{estado}'
,
'ApiController@buscarMunicipiosBeneficiados'
);
\ No newline at end of file
routes/web.php
View file @
79035112
...
...
@@ -374,6 +374,7 @@ Route::post('/debentures_reidi/estado/reidis/add', 'Mod_debentures_reidi\ReidisC
//////módulo APIS
Route
::
get
(
'/home_apis'
,
'Mod_apis\HomeApisController@index'
);
Route
::
get
(
'/apis/debentures/consultar'
,
'Mod_apis\ProjetosDebenturesController@consultarProjetos'
);
Route
::
post
(
'/apis/debentures/pesquisar'
,
'Mod_apis\ProjetosDebenturesController@pesquisarProjetos'
);
...
...
@@ -394,8 +395,14 @@ Route::get('/apis/enquadramento/debenture/{projetoDebenture}', 'Mod_apis\Projeto
Route
::
post
(
'/apis/debenture/enquadramento/atualizar'
,
'Mod_apis\ProjetosDebenturesController@atualizarEnquadramento'
);
Route
::
get
(
'/apis/
emissao/debenture/{projetoDebenture
}'
,
'Mod_apis\ProjetosDebenturesController@editarEmissao'
);
Route
::
get
(
'/apis/
debenture/emissao/{emissao
}'
,
'Mod_apis\ProjetosDebenturesController@editarEmissao'
);
Route
::
post
(
'/apis/debenture/emissao/atualizar'
,
'Mod_apis\ProjetosDebenturesController@atualizarEmissao'
);
Route
::
get
(
'/apis/condicao_emissao/debenture/{condicaoEmissao}'
,
'Mod_apis\ProjetosDebenturesController@editarCondicaoEmissao'
);
Route
::
post
(
'/apis/debenture/condicao_emissao/atualizar'
,
'Mod_apis\ProjetosDebenturesController@atualizarCondicaoEmissao'
);
\ No newline at end of file
Route
::
get
(
'/apis/debenture/condicao_emissao/{condicaoEmissao}'
,
'Mod_apis\ProjetosDebenturesController@editarCondicaoEmissao'
);
Route
::
post
(
'/apis/debenture/condicao_emissao/atualizar'
,
'Mod_apis\ProjetosDebenturesController@atualizarCondicaoEmissao'
);
Route
::
get
(
'/apis/debenture/excluir/condicao_emissao/{condicaoEmissao}'
,
'Mod_apis\ProjetosDebenturesController@excluirCondicaoEmissao'
);
Route
::
get
(
'/apis/municipios_beneficiados/debenture/{projetoDebenture}'
,
'Mod_apis\ProjetosDebenturesController@editarMunicipios'
);
Route
::
get
(
'/apis/debenture/excluir/municipio/{municipioBeneficiadoId}'
,
'Mod_apis\ProjetosDebenturesController@excluirMunicipios'
);
Route
::
post
(
'/apis/debenture/municipios_beneficiados/adicionar'
,
'Mod_apis\ProjetosDebenturesController@adicionarMunicipiosBeneficiados'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment