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
46aae30d
Commit
46aae30d
authored
Feb 26, 2024
by
alissonalbuquerque
Browse files
feat(task-time): add implementações parciais de cadastro e listagem de horarios
parent
8a932f92
Changes
14
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
46aae30d
...
...
@@ -81,7 +81,7 @@ class PadController extends Controller
* @return \Illuminate\Http\Response
*/
public
function
view
(
$id
)
{
{
$ensinoTotalHoras
=
EnsinoAtendimentoDiscente
::
whereUserPadId
(
$id
)
->
sum
(
'ch_semanal'
)
+
EnsinoAula
::
whereUserPadId
(
$id
)
->
sum
(
'ch_semanal'
)
...
...
app/Http/Controllers/TaskController.php
0 → 100644
View file @
46aae30d
<?php
namespace
App\Http\Controllers
;
use
App\Models\Tabelas\Ensino\EnsinoAtendimentoDiscente
;
use
App\Models\Tabelas\Ensino\EnsinoCoordenacaoRegencia
;
use
App\Models\Tabelas\Ensino\EnsinoOrientacao
;
use
App\Models\Tabelas\Ensino\EnsinoParticipacao
;
use
App\Models\Tabelas\Ensino\EnsinoSupervisao
;
use
App\Models\Tabelas\Ensino\EnsinoAula
;
use
App\Models\Tabelas\Ensino\EnsinoMembroDocente
;
use
App\Models\Tabelas\Ensino\EnsinoOutros
;
use
App\Models\Tabelas\Ensino\EnsinoProjeto
;
use
App\Models\Tabelas\Pesquisa\PesquisaCoordenacao
;
use
App\Models\Tabelas\Pesquisa\PesquisaLideranca
;
use
App\Models\Tabelas\Pesquisa\PesquisaOrientacao
;
use
App\Models\Tabelas\Pesquisa\PesquisaOutros
;
use
App\Models\Tabelas\Extensao\ExtensaoCoordenacao
;
use
App\Models\Tabelas\Extensao\ExtensaoOrientacao
;
use
App\Models\Tabelas\Extensao\ExtensaoOutros
;
use
App\Models\Tabelas\Gestao\GestaoCoordenacaoLaboratoriosDidaticos
;
use
App\Models\Tabelas\Gestao\GestaoMembroCamaras
;
use
App\Models\Tabelas\Gestao\GestaoMembroConselho
;
use
App\Models\Tabelas\Gestao\GestaoOutros
;
use
App\Models\Tabelas\Gestao\GestaoCoordenacaoProgramaInstitucional
;
use
App\Models\Tabelas\Gestao\GestaoMembroComissao
;
use
App\Models\Tabelas\Gestao\GestaoMembroTitularConselho
;
use
App\Models\Tabelas\Gestao\GestaoRepresentanteUnidadeEducacao
;
use
App\Models\TaskTime
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Collection
;
use
Illuminate\Support\Facades\Response
;
class
TaskController
extends
Controller
{
public
function
search
(
Request
$request
)
{
$q
=
$request
->
query
(
'q'
);
$user_pad_id
=
$request
->
query
(
'user_pad_id'
);
//ENSINO
//---------------------------------------------
$type_ensino_aula
=
TaskTime
::
TYPE_ENSINO_AULA
;
$list_ensino_aula
=
EnsinoAula
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoAula
$model
)
use
(
$type_ensino_aula
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_aula
}
"
,
'text'
=>
$model
->
componente_curricular
];
});
$type_ensino_coordenacao_regencia
=
TaskTime
::
TYPE_ENSINO_COORDENACAO_REGENCIA
;
$list_ensino_coordenacao_regencia
=
EnsinoCoordenacaoRegencia
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoCoordenacaoRegencia
$model
)
use
(
$type_ensino_coordenacao_regencia
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_coordenacao_regencia
}
"
,
'text'
=>
$model
->
componente_curricular
];
});
$type_ensino_orientacao
=
TaskTime
::
TYPE_ENSINO_ORIENTACAO
;
$list_ensino_orientacao
=
EnsinoOrientacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoOrientacao
$model
)
use
(
$type_ensino_orientacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_orientacao
}
"
,
'text'
=>
$model
->
atividade
];
});
$type_ensino_supervisao
=
TaskTime
::
TYPE_ENSINO_SUPERVISAO
;
$list_ensino_supervisao
=
EnsinoSupervisao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoSupervisao
$model
)
use
(
$type_ensino_supervisao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_supervisao
}
"
,
'text'
=>
$model
->
atividade
];
});
$type_ensino_atendimento_discente
=
TaskTime
::
TYPE_ENSINO_ATENDIMENTO_DISCENTE
;
$list_ensino_atendimento_discente
=
EnsinoAtendimentoDiscente
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoAtendimentoDiscente
$model
)
use
(
$type_ensino_atendimento_discente
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_atendimento_discente
}
"
,
'text'
=>
$model
->
componente_curricular
];
});
$type_ensino_projeto
=
TaskTime
::
TYPE_ENSINO_PROJETO
;
$list_ensino_projeto
=
EnsinoProjeto
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoProjeto
$model
)
use
(
$type_ensino_projeto
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_projeto
}
"
,
'text'
=>
$model
->
componente_curricular
];
});
$type_ensino_participacao
=
TaskTime
::
TYPE_ENSINO_PARTICIPACAO
;
$list_ensino_participacao
=
EnsinoParticipacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoParticipacao
$model
)
use
(
$type_ensino_participacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_participacao
}
"
,
'text'
=>
$model
->
curso
];
});
$type_ensino_membro_docente
=
TaskTime
::
TYPE_ENSINO_MEMBRO_DOCENTE
;
$list_ensino_membro_docente
=
EnsinoMembroDocente
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoMembroDocente
$model
)
use
(
$type_ensino_membro_docente
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_membro_docente
}
"
,
'text'
=>
$model
->
nucleo
];
});
$type_ensino_outros
=
TaskTime
::
TYPE_ENSINO_OUTROS
;
$list_ensino_outros
=
EnsinoOutros
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
EnsinoOutros
$model
)
use
(
$type_ensino_outros
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_ensino_outros
}
"
,
'text'
=>
$model
->
atividade
];
});
//---------------------------------------------
//PESQUISA
//---------------------------------------------
$type_pesquisa_coordenacao
=
TaskTime
::
TYPE_PESQUISA_COORDENACAO
;
$list_pesquisa_coordenacao
=
PesquisaCoordenacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
PesquisaCoordenacao
$model
)
use
(
$type_pesquisa_coordenacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_pesquisa_coordenacao
}
"
,
'text'
=>
$model
->
titulo_projeto
];
});
$type_pesquisa_orientacao
=
TaskTime
::
TYPE_PESQUISA_ORIENTACAO
;
$list_pesquisa_orientacao
=
PesquisaOrientacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
PesquisaOrientacao
$model
)
use
(
$type_pesquisa_orientacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_pesquisa_orientacao
}
"
,
'text'
=>
$model
->
titulo_projeto
];
});
$type_pesquisa_lideranca
=
TaskTime
::
TYPE_PESQUISA_LIDERANCA
;
$list_pesquisa_lideranca
=
PesquisaLideranca
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
PesquisaLideranca
$model
)
use
(
$type_pesquisa_lideranca
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_pesquisa_lideranca
}
"
,
'text'
=>
$model
->
grupo_pesquisa
];
});
$type_pesquisa_outros
=
TaskTime
::
TYPE_PESQUISA_OUTROS
;
$list_pesquisa_outros
=
PesquisaOutros
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
PesquisaOutros
$model
)
use
(
$type_pesquisa_outros
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_pesquisa_outros
}
"
,
'text'
=>
$model
->
atividade
];
});
//---------------------------------------------
//EXTENSÃO
//---------------------------------------------
$type_extensao_coordenacao
=
TaskTime
::
TYPE_EXTENSAO_COORDENACAO
;
$list_extensao_coordenacao
=
ExtensaoCoordenacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
ExtensaoCoordenacao
$model
)
use
(
$type_extensao_coordenacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_extensao_coordenacao
}
"
,
'text'
=>
$model
->
titulo_projeto
];
});
$type_extensao_orientacao
=
TaskTime
::
TYPE_EXTENSAO_ORIENTACAO
;
$list_extensao_orientacao
=
ExtensaoOrientacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
ExtensaoOrientacao
$model
)
use
(
$type_extensao_orientacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_extensao_orientacao
}
"
,
'text'
=>
$model
->
titulo_projeto
];
});
$type_extensao_outros
=
TaskTime
::
TYPE_EXTENSAO_OUTROS
;
$list_extensao_outros
=
ExtensaoOutros
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
ExtensaoOutros
$model
)
use
(
$type_extensao_outros
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_extensao_outros
}
"
,
'text'
=>
$model
->
atividade
];
});
//---------------------------------------------
//GESTÃO
//---------------------------------------------
$type_gestao_coordenacao_laboratorios_didaticos
=
TaskTime
::
TYPE_GESTAO_COORDENACAO_LABORATORIOS_DIDATICOS
;
$list_gestao_coordenacao_laboratorios_didaticos
=
GestaoCoordenacaoLaboratoriosDidaticos
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoCoordenacaoLaboratoriosDidaticos
$model
)
use
(
$type_gestao_coordenacao_laboratorios_didaticos
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_coordenacao_laboratorios_didaticos
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_membro_conselho
=
TaskTime
::
TYPE_GESTAO_MEMBRO_CONSELHO
;
$list_gestao_membro_conselho
=
GestaoMembroConselho
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoMembroConselho
$model
)
use
(
$type_gestao_membro_conselho
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_membro_conselho
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_coordenacao_programa_institucional
=
TaskTime
::
TYPE_GESTAO_COORDENACAO_PROGRAMA_INSTITUCIONAL
;
$list_gestao_coordenacao_programa_institucional
=
GestaoCoordenacaoProgramaInstitucional
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoCoordenacaoProgramaInstitucional
$model
)
use
(
$type_gestao_coordenacao_programa_institucional
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_coordenacao_programa_institucional
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_membro_titular_conselho
=
TaskTime
::
TYPE_GESTAO_MEMBRO_TITULAR_CONSELHO
;
$list_gestao_membro_titular_conselho
=
GestaoMembroTitularConselho
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoMembroTitularConselho
$model
)
use
(
$type_gestao_membro_titular_conselho
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_membro_titular_conselho
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_membro_camaras
=
TaskTime
::
TYPE_GESTAO_MEMBRO_CAMARAS
;
$list_gestao_membro_camaras
=
GestaoMembroCamaras
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoMembroCamaras
$model
)
use
(
$type_gestao_membro_camaras
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_membro_camaras
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_representante_unidade_educacao
=
TaskTime
::
TYPE_GESTAO_REPRESENTANTE_UNIDADE_EDUCACAO
;
$list_gestao_representante_unidade_educacao
=
GestaoRepresentanteUnidadeEducacao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoRepresentanteUnidadeEducacao
$model
)
use
(
$type_gestao_representante_unidade_educacao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_representante_unidade_educacao
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_membro_comissao
=
TaskTime
::
TYPE_GESTAO_MEMBRO_COMISSAO
;
$list_gestao_membro_comissao
=
GestaoMembroComissao
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoMembroComissao
$model
)
use
(
$type_gestao_membro_comissao
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_membro_comissao
}
"
,
'text'
=>
$model
->
nome
];
});
$type_gestao_outros
=
TaskTime
::
TYPE_GESTAO_OUTROS
;
$list_gestao_outros
=
GestaoOutros
::
whereUserPadId
(
$user_pad_id
)
->
get
()
->
map
(
function
(
GestaoOutros
$model
)
use
(
$type_gestao_outros
)
{
return
[
'id'
=>
"id_
{
$model
->
id
}
|type_
{
$type_gestao_outros
}
"
,
'text'
=>
$model
->
atividade
];
});
//---------------------------------------------
$dimension_collections
=
[
$list_ensino_aula
,
$list_ensino_coordenacao_regencia
,
$list_ensino_orientacao
,
$list_ensino_supervisao
,
$list_ensino_atendimento_discente
,
$list_ensino_projeto
,
$list_ensino_participacao
,
$list_ensino_membro_docente
,
$list_ensino_outros
,
$list_pesquisa_coordenacao
,
$list_pesquisa_orientacao
,
$list_pesquisa_lideranca
,
$list_pesquisa_outros
,
$list_extensao_coordenacao
,
$list_extensao_orientacao
,
$list_extensao_outros
,
$list_gestao_coordenacao_laboratorios_didaticos
,
$list_gestao_membro_conselho
,
$list_gestao_coordenacao_programa_institucional
,
$list_gestao_membro_titular_conselho
,
$list_gestao_membro_camaras
,
$list_gestao_representante_unidade_educacao
,
$list_gestao_membro_comissao
,
$list_gestao_outros
,
];
$combined_collections
=
collect
([]);
$list_tasks
=
collect
(
$dimension_collections
)
->
reduce
(
function
(
$carry
,
$collection
)
{
return
$carry
->
concat
(
$collection
);
},
$combined_collections
);
$results
=
[
'results'
=>
$list_tasks
];
return
Response
::
json
(
$results
);
}
}
app/Http/Controllers/TaskTimeController.php
View file @
46aae30d
...
...
@@ -2,20 +2,35 @@
namespace
App\Http\Controllers
;
use
App\Models\TaskTime
;
use
App\Models\Util\Menu
;
use
Illuminate\Http\Request
;
class
TaskTimeController
extends
Controller
{
public
function
index
()
{
public
function
index
(
$user_pad_id
)
{
$menu
=
Menu
::
PADS
;
}
$taskTimes
=
TaskTime
::
whereUserPadId
(
$user_pad_id
)
->
get
();
public
function
createView
()
{
return
view
(
'task-time.index'
,
[
'menu'
=>
$menu
,
'user_pad_id'
=>
$user_pad_id
]);
}
public
function
create
(
$user_pad_id
)
{
return
view
(
'task-time.create'
,
[
'user_pad_id'
=>
$user_pad_id
]
);
}
public
function
create
()
{
public
function
save
(
Request
$request
)
{
$array
=
TaskTime
::
splitTarefaAndType
(
$request
->
get
(
'tarefa_id'
));
dd
(
$request
->
get
(
'tarefa_id'
),
$array
);
}
public
function
updateView
()
{
...
...
app/Models/TaskTime.php
View file @
46aae30d
...
...
@@ -166,7 +166,7 @@ class TaskTime extends Model
return
$this
->
hasOne
(
UserPad
::
class
,
'id'
,
'user_pad_id'
);
}
public
static
function
listWeekDays
(
$value
)
{
public
static
function
listWeekDays
(
$value
=
null
)
{
$values
=
[
self
::
WEEK_DAY_SUNDAY
=>
"DOMINGO"
,
self
::
WEEK_DAY_MONDAY
=>
"SEGUNDA-FEIRA"
,
...
...
@@ -180,4 +180,25 @@ class TaskTime extends Model
return
$value
!=
null
?
$values
[
$value
]
:
$values
;
}
/**
* Explode string with format "id_{id}|type_{type}" to array ['tarefa_id' => 'integer', 'type' => 'integer']
* @return array
*/
public
static
function
splitTarefaAndType
(
string
$task_type
)
{
$split_task_type
=
explode
(
"|"
,
$task_type
);
$task_data
=
$split_task_type
[
0
];
$split_task
=
explode
(
"_"
,
$task_data
);
$task_id
=
$split_task
[
1
];
$type_data
=
$split_task_type
[
1
];
$split_type
=
explode
(
"_"
,
$type_data
);
$type
=
$split_type
[
1
];
$data
=
[
'tarefa_id'
=>
$task_id
,
'type'
=>
$type
];
return
$data
;
}
}
resources/views/components/buttons/btn-show-modal.blade.php
0 → 100644
View file @
46aae30d
{{
--
@
include
(
'components.buttons.btn-show-modal'
,
[
'_id'
=>
''
,
'_icon'
=>
''
,
'_class'
=>
''
,
'_content'
=>
''
,
'_target_class'
=>
''
,
])
--
}}
@
php
$_id
=
!
isset
(
$_id
)
?
''
:
$_id
;
$_icon
=
!
isset
(
$_icon
)
?
''
:
"bi bi-
{
$_icon
}
"
;
$_class
=
!
isset
(
$_class
)
?
"btn
{
$_target_class
}
"
:
"btn
{
$_class
}
{
$_target_class
}
"
;
$_content
=
!
isset
(
$_content
)
?
''
:
$_content
;
@
endphp
<
div
class
=
"btn-show-modal"
>
<
button
type
=
"button"
id
=
"
{
{$_id}
}
"
class
=
"
{
{$_class}
}
"
>
<
i
class
=
"
{
{$_icon}
}
"
></
i
>
{{
$_content
}}
</
button
>
</
div
>
\ No newline at end of file
resources/views/pad/anexo/_form.blade.php
View file @
46aae30d
...
...
@@ -177,9 +177,9 @@
$yes = YesOrNo::YES;
$no = YesOrNo::NO;
@endphp
<script
type=
"text/javascript"
>
/** Interpolação: PHP => JS*/
const
yes
=
"
{{ $yes }}
"
const
no
=
"
{{ $no }}
"
...
...
resources/views/pad/components/scripts/dimensao/ensino/show_modal.blade.php
View file @
46aae30d
...
...
@@ -6,7 +6,6 @@
])
--
}}
<
script
type
=
"text/javascript"
>
$
(
'.{{ $btn_class }}'
)
.
click
(
function
(
e
)
{
...
...
resources/views/pad/teacher/view.blade.php
View file @
46aae30d
...
...
@@ -71,6 +71,14 @@
</
div
>
</
div
>
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
<
div
class
=
"card-body"
>
<
h2
class
=
"text-center"
>
<
i
class
=
"bi bi-clock"
></
i
>
</
h2
>
<
h3
class
=
"text-center"
>
Horário
</
h3
>
<
a
class
=
"stretched-link btn-pad-horario"
href
=
"{{ route('TaskTimeIndex', ['user_pad_id' =>
$user_pad_id
]) }}"
></
a
>
</
div
>
</
div
>
<
div
class
=
"card mx-2"
style
=
"width: 10rem;"
>
<
div
class
=
"card-body"
>
<
h2
class
=
"text-center"
>
<
i
class
=
"bi bi-exclamation-circle-fill"
></
i
>
</
h2
>
...
...
resources/views/task-time/_form.blade.php
0 → 100644
View file @
46aae30d
resources/views/task-time/create.blade.php
0 → 100644
View file @
46aae30d
@
php
use
App\Models\TaskTime
;
@
endphp
<
form
id
=
"form-user_pad"
action
=
"{{ route('TaskTimeSave') }}"
method
=
"post"
>
@
csrf
@
method
(
'POST'
)
<
div
class
=
"col-sm-12"
>
<
div
class
=
"mb-3"
>
<
label
for
=
"weekday"
>
Atividade
</
label
>
<
select
name
=
"tarefa_id"
id
=
"tarefa_id"
class
=
"form-select"
>
<!--
@
foreach
(
TaskTime
::
listWeekDays
()
as
$id
=>
$text
)
<
option
value
=
"
{
{$id}}">{{$text}
}
</option>
@endforeach -->
</select>
</div>
</div>
<div class="
col
-
sm
-
12
">
<div class="
mb
-
3
">
<label for="
weekday
">Dia da Semana</label>
<select name="
weekday
" id="
weekday
" class="
form
-
select
">
@foreach(TaskTime::listWeekDays() as
$id
=>
$text
)
<option value="
{{
$id
}}
">
{
{$text}
}
</option>
@endforeach
</select>
</div>
</div>
<div class="
mt
-
1
text
-
end
">
<div class="
modal
-
footer
">
@include('components.buttons.btn-save', [
'id' => 'btn_submit',
'content' => 'Cadastrar',
])
@include('components.buttons.btn-close_modal')
</div>
</div>
</form>
<script type="
text
/
javascript
">
$('#weekday').select2(
{
allowClear: true,
placeholder: 'Dia da Semana',
dropdownParent: $('#modal')
})
$('#tarefa_id').select2(
{
allowClear: true,
placeholder: 'Tarefa',
ajax: {
url: '{{ route("
TaskSearch
") }}',
data: function(params) {
return {
q: params.term,
user_pad_id :
{
{$user_pad_id}
}
}
},
dataType: 'json'
},
dropdownParent: $('#modal')
})
</script>
\ No newline at end of file
resources/views/task-time/index.blade.php
0 → 100644
View file @
46aae30d
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Início'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'menu'
=>
$menu
])
@
endsection
@
section
(
'body'
)
<
div
class
=
"container"
>
@
include
(
'components.alerts'
)
@
include
(
'components.buttons.btn-show-modal'
,
[
// '_id' => 'btn-task-time-create',
'_class'
=>
'btn-success'
,
'_content'
=>
'Cadastrar'
,
'_target_class'
=>
'task-time-create'
,
])
@
include
(
'components.modal'
,
[
'size'
=>
'modal-lg'
,
'header'
=>
''
])
</
div
>
@
endsection
@
section
(
'scripts'
)
@
include
(
'pad.components.scripts.dimensao.ensino.show_modal'
,
[
'modal_id'
=>
'modal'
,
'route'
=>
route
(
'TaskTimeCreate'
,
[
'user_pad_id'
=>
$user_pad_id
]),
'btn_class'
=>
'task-time-create'
,
])
@
endsection
\ No newline at end of file
routes/Task.php
0 → 100644
View file @
46aae30d
<?php
use
App\Http\Controllers\TaskController
;
use
Illuminate\Support\Facades\Route
;
Route
::
prefix
(
'/tarefa/geral'
)
->
group
(
function
()
{
Route
::
get
(
'/search'
,
[
TaskController
::
class
,
'search'
])
->
name
(
'TaskSearch'
);
});
\ No newline at end of file
routes/TaskTime.php
0 → 100644
View file @
46aae30d
<?php
use
App\Http\Controllers\TaskTimeController
;
use
Illuminate\Support\Facades\Route
;
Route
::
prefix
(
'/tarefa/horario'
)
->
group
(
function
()
{
Route
::
get
(
'/index/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'index'
])
->
name
(
'TaskTimeIndex'
);
Route
::
get
(
'/create/{user_pad_id}'
,
[
TaskTimeController
::
class
,
'create'
])
->
name
(
'TaskTimeCreate'
);
Route
::
post
(
'/save'
,
[
TaskTimeController
::
class
,
'save'
])
->
name
(
'TaskTimeSave'
);
//edit
//update
//delete
//move
});
\ No newline at end of file
routes/web.php
View file @
46aae30d
...
...
@@ -42,6 +42,10 @@ require __DIR__ . '/users.php';
require
__DIR__
.
'/user_type.php'
;
require
__DIR__
.
'/Task.php'
;
require
__DIR__
.
'/TaskTime.php'
;
require
__DIR__
.
'/dimensao/dimensao.php'
;
require
__DIR__
.
'/dimensao/ensino.php'
;
...
...
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