Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
ba97c0e4
Commit
ba97c0e4
authored
Jun 27, 2022
by
alissonalbuquerque
Browse files
add alterações do crud do pad
parent
06519e72
Changes
29
Hide whitespace changes
Inline
Side-by-side
resources/views/layouts/user-dashboard/dashboard_admin.blade.php
View file @
ba97c0e4
...
...
@@ -89,7 +89,7 @@
<h1
class=
"h2"
>
Gestão de Unidades
</h1>
</div>
@include('components.buttons.btn-create', ['route' => route('unidade_create'), 'id' => 'btn-create-unidade', 'css' => 'btn btn-primary', 'te
x
t' => 'Cadastrar Nova Unidade'])
@include('components.buttons.btn-create', ['route' => route('unidade_create'), 'id' => 'btn-create-unidade', 'c
la
ss' => 'btn btn-primary', '
con
te
n
t' => 'Cadastrar Nova Unidade'])
@section('form-unidade-create')
@show
...
...
resources/views/layouts/user-jquery/jquery_admin.blade.php
View file @
ba97c0e4
...
...
@@ -25,8 +25,8 @@ $( document ).ready(() => {
<td scope="row">
${
index
+
1
}
<td>
<td>
${
unidade
.
name
}
<td>
<td>
@include('components.buttons.btn-edit', ['route' => ''])
@include('components.buttons.btn-delete', ['route' => ''])
@include('components.buttons.btn-edit', [
'btn_class' => 'btn btn-warning',
'route' => ''])
@include('components.buttons.btn-delete', [
'id' => '', 'btn_class' => '',
'route' => ''])
</td>
</tr>
`
)
...
...
resources/views/pad/admin/create.blade.php
0 → 100644
View file @
ba97c0e4
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Novo'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[])
@
endsection
@
section
(
'body'
)
<
div
class
=
""
>
<
div
class
=
"mb-3"
>
<
h2
class
=
"h3"
>
Pad
-
Criar
</
h2
>
</
div
>
<
form
class
=
"form"
action
=
"
{
{route('pad_store')}
}
"
method
=
"post"
>
@
csrf
<
div
class
=
"row mb-3"
>
<
div
class
=
"col"
>
<
label
class
=
"form-label"
for
=
"nome"
>
Nome
</
label
>
<
input
class
=
"form-control @error('nome') is-invalid @enderror"
type
=
"text"
name
=
"nome"
id
=
"nome"
value
=
"{{ old('nome') }}"
>
@
error
(
'nome'
)
<
div
class
=
"alert alert-danger"
>
<
span
>
{{
$message
}}
</
span
>
</
div
>
@
enderror
</
div
>
<
div
class
=
"col"
>
<
label
class
=
"form-label"
for
=
"status"
>
Status
</
label
>
<
select
class
=
"form-select @error('status') is-invalid @enderror"
name
=
"status"
id
=
"status"
>
@
foreach
(
$status
as
$value
=>
$content
)
<
option
value
=
"
{
{$value}}">{{$content}
}
</option>
@endforeach
</select>
@error('status')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
</div>
<div class="
row
mb
-
3
">
<div class="
col
-
sm
-
6
">
<label class="
form
-
label
" for="
data_inicio
">Data de Início</label>
<input class="
form
-
control
@
error
(
'data_inicio'
)
is
-
invalid
@
enderror
" type="
date
" name="
data_inicio
" id="
data_inicio
" value="
{{
old
(
'data_inicio'
)
}}
">
@error('data_inicio')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label class="
form
-
label
" for="
data_fim
">Data de Fim</label>
<input class="
form
-
control
@
error
(
'data_fim'
)
is
-
invalid
@
enderror
" type="
date
" name="
data_fim
" id="
data_fim
" value="
{{
old
(
'data_fim'
)
}}
">
@error('data_fim')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
</div>
<div class="
d
-
flex
justify
-
content
-
end
mt
-
4
">
@include('components.buttons.btn-save', [
'btn_class' => 'btn btn-outline-success',
'i_class' => '',
'content' => 'Cadastrar',
])
</div>
</form>
</div>
@endsection
resources/views/pad/admin/edit.blade.php
0 → 100644
View file @
ba97c0e4
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Novo'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[])
@
endsection
@
section
(
'body'
)
<
div
class
=
""
>
<
div
class
=
"mb-3"
>
<
h2
class
=
"h3"
>
Pad
-
Atualizar
</
h2
>
</
div
>
<
form
class
=
"form"
action
=
"{{route('pad_update', ['id' =>
$pad->id
])}}"
method
=
"post"
>
@
csrf
@
method
(
'PUT'
)
<
div
class
=
"row mb-3"
>
<
div
class
=
"col"
>
<
label
class
=
"form-label"
for
=
"nome"
>
Nome
</
label
>
<
input
class
=
"form-control @error('nome') is-invalid @enderror"
type
=
"text"
name
=
"nome"
id
=
"nome"
value
=
"{{
$pad->nome
}}"
>
@
error
(
'nome'
)
<
div
class
=
"alert alert-danger"
>
<
span
>
{{
$message
}}
</
span
>
</
div
>
@
enderror
</
div
>
<
div
class
=
"col"
>
<
label
class
=
"form-label"
for
=
"status"
>
Status
</
label
>
<
select
class
=
"form-select @error('status') is-invalid @enderror"
name
=
"status"
id
=
"status"
>
@
foreach
(
$status
as
$value
=>
$content
)
<
option
value
=
"
{
{$value}}">{{$content}
}
</option>
@endforeach
</select>
@error('status')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
</div>
<div class="
row
mb
-
3
">
<div class="
col
-
sm
-
6
">
<label class="
form
-
label
" for="
data_inicio
">Data de Início</label>
<input class="
form
-
control
@
error
(
'data_inicio'
)
is
-
invalid
@
enderror
" type="
date
" name="
data_inicio
" id="
data_inicio
" value="
{{
$pad
->
data_inicio
}}
">
@error('data_inicio')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
<div class="
col
-
sm
-
6
">
<label class="
form
-
label
" for="
data_fim
">Data de Fim</label>
<input class="
form
-
control
@
error
(
'data_fim'
)
is
-
invalid
@
enderror
" type="
date
" name="
data_fim
" id="
data_fim
" value="
{{
$pad
->
data_fim
}}
">
@error('data_fim')
<div class="
alert
alert
-
danger
">
<span>
{
{$message}
}
</span>
</div>
@enderror
</div>
</div>
<div class="
d
-
flex
justify
-
content
-
end
mt
-
4
">
@include('components.buttons.btn-save', [
'btn_class' => 'btn btn-outline-success',
'i_class' => '',
'content' => 'Atualizar',
])
</div>
</form>
</div>
@endsection
resources/views/pad/admin/index.blade.php
0 → 100644
View file @
ba97c0e4
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Início'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[])
@
endsection
@
section
(
'body'
)
<
div
class
=
""
>
<
h3
>
PAD
-
Listagem
</
h3
>
<
div
class
=
""
>
@
include
(
'components.alerts'
)
<
div
class
=
"d-flex justify-content-end mb-2"
>
@
include
(
'components.buttons.btn-create'
,
[
'id'
=>
'pad_create'
,
'class'
=>
'btn-outline-success'
,
'route'
=>
route
(
'pad_create'
),
'content'
=>
'Cadastrar'
,
])
</
div
>
<
div
class
=
"border rounded px-4"
>
<
table
class
=
"table table-hover mt-4"
>
<
thead
>
<
tr
>
<
th
scole
=
"col"
>
#</th>
<
th
scole
=
"col"
>
Nome
</
th
>
<
th
scole
=
"col"
>
Data
de
início
</
th
>
<
th
scole
=
"col"
>
Data
de
fim
</
th
>
<
th
scole
=
"col"
>
Status
</
th
>
<
th
scole
=
"col"
>
Opções
</
th
>
</
tr
>
</
thead
>
@
php
$index_row
=
1
;
@
endphp
<
tbody
>
@
foreach
(
$pads
as
$pad
)
<
tr
>
<
td
scope
=
"row"
>
{{
$index_row
++
}}
</
td
>
<
td
>
{{
$pad
->
nome
}}
</
td
>
<
td
>
{{
$pad
->
getDateInicio
()
}}
</
td
>
<
td
>
{{
$pad
->
getDateFim
()
}}
</
td
>
<
td
>
{{
$pad
->
getStatusAsText
()
}}
</
td
>
<
td
>
@
include
(
'components.buttons.btn-edit'
,
[
'btn_class'
=>
'btn btn-outline-primary'
,
'route'
=>
route
(
'pad_edit'
,
[
'id'
=>
$pad
->
id
])
])
@
include
(
'components.buttons.btn-delete'
,
[
'id'
=>
$pad
->
id
,
'btn_class'
=>
'btn btn-outline-danger'
,
'route'
=>
route
(
'pad_delete'
,
[
'id'
=>
$pad
->
id
])
])
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
</
div
>
</
div
>
@
endsection
@
section
(
'script'
)
<
script
type
=
"text/javascript"
>
</
script
>
@
endsection
\ No newline at end of file
resources/views/unidade/create.blade.php
View file @
ba97c0e4
...
...
@@ -33,7 +33,11 @@
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'unidade_index'
),
])
@
include
(
'components.buttons.btn-save'
)
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Cadastrar'
'btn_class'
=>
'btn btn-outline-success'
'i_class'
=>
''
])
</
div
>
</
form
>
</
div
>
...
...
resources/views/unidade/index.blade.php
View file @
ba97c0e4
...
...
@@ -17,8 +17,8 @@
<
h2
class
=
""
>
TODAS
AS
UNIDADES
</
h2
>
@
include
(
'components.buttons.btn-create'
,
[
'route'
=>
route
(
'unidade_create'
),
'css'
=>
''
,
'te
x
t'
=>
'Nova Unidade'
,
'c
la
ss'
=>
''
,
'
con
te
n
t'
=>
'Nova Unidade'
,
'id'
=>
''
,
])
</
div
>
...
...
resources/views/unidade/update.blade.php
View file @
ba97c0e4
...
...
@@ -32,7 +32,11 @@
@
include
(
'components.buttons.btn-cancel'
,
[
'route'
=>
route
(
'unidade_index'
),
])
@
include
(
'components.buttons.btn-save'
)
@
include
(
'components.buttons.btn-save'
,
[
'content'
=>
'Cadastrar'
'btn_class'
=>
'btn btn-outline-success'
'i_class'
=>
''
])
</
div
>
</
form
>
</
div
>
...
...
routes/web.php
View file @
ba97c0e4
...
...
@@ -9,7 +9,7 @@ use App\Http\Controllers\Dimensao\ExtensaoController;
use
App\Http\Controllers\Dimensao\GestaoController
;
use
App\Http\Controllers\DisciplinaController
;
use
App\Http\Controllers\UnidadeController
;
use
App\Http\Controllers\P
AD
Controller
;
use
App\Http\Controllers\P
ad
Controller
;
use
App\Http\Controllers\Dimensao\Tabelas\Ensino\EnsinoAulaController
;
use
App\Http\Controllers\UserController
;
use
App\Http\Controllers\CoordenadorController
;
...
...
@@ -73,13 +73,12 @@ Route::prefix('/ensino')->group(function () {
});
Route
::
prefix
(
'/pad'
)
->
group
(
function
()
{
Route
::
get
(
'/index'
,
[
PADController
::
class
,
'index'
])
->
name
(
'pad_index'
);
Route
::
get
(
'/create'
,
[
PADController
::
class
,
'create'
])
->
name
(
'pad_create'
);
Route
::
post
(
'/store'
,
[
PADController
::
class
,
'store'
])
->
name
(
'pad_store'
);
Route
::
get
(
'/edit/{id}'
,
[
PADController
::
class
,
'edit'
])
->
name
(
'pad_edit'
);
Route
::
post
(
'/update/{id}'
,
[
PADController
::
class
,
'update'
])
->
name
(
'pad_update'
);
Route
::
delete
(
'/delete/{id}'
,
[
PADController
::
class
,
'destroy'
])
->
name
(
'pad_delete'
);
Route
::
get
(
'/anexo'
,
[
PADController
::
class
,
'anexo'
])
->
name
(
'pad_anexo'
);
Route
::
get
(
'/index'
,
[
PadController
::
class
,
'index'
])
->
name
(
'pad_index'
);
Route
::
get
(
'/create'
,
[
PadController
::
class
,
'create'
])
->
name
(
'pad_create'
);
Route
::
post
(
'/store'
,
[
PadController
::
class
,
'store'
])
->
name
(
'pad_store'
);
Route
::
get
(
'/edit/{id}'
,
[
PadController
::
class
,
'edit'
])
->
name
(
'pad_edit'
);
Route
::
put
(
'/update/{id}'
,
[
PadController
::
class
,
'update'
])
->
name
(
'pad_update'
);
Route
::
delete
(
'/delete/{id}'
,
[
PadController
::
class
,
'delete'
])
->
name
(
'pad_delete'
);
});
Route
::
prefix
(
'/coordenador'
)
->
group
(
function
()
{
...
...
Prev
1
2
Next
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