calebesantana
calebesantana
FFilament
Created by calebesantana on 6/23/2023 in #❓┊help
Table builder with data from API rest
Query code:
if (!empty($this->dataCriacao) && !empty($this->dataPrevistaTermino) && !empty($this->tipoAprofundamento)) {
$query = SolicitacaoRequerimento::select('tb_solicitacao_requerimento.id_solicitacao_requerimento', 'a.nome', 'md.frequencia', 'bbc.course_id', 'bbu.user_id')
->join('tb_aluno AS a', 'tb_solicitacao_requerimento.id_aluno_solicitante', '=', 'a.id_aluno')
->join('tb_requerimento AS rm', 'rm.id_requerimento', '=', 'tb_solicitacao_requerimento.id_requerimento')
->join('tb_status_requerimento AS srm', 'tb_solicitacao_requerimento.id_status_requerimento', '=', 'srm.id_status_requerimento')
->join('tb_matricula_disciplina AS md', 'tb_solicitacao_requerimento.id_matricula_disciplina', '=', 'md.id_matricula_disciplina')
->join('tb_disciplina_professor AS dp', 'md.id_disciplina_professor', '=', 'dp.id_disciplina_professor')
->join('tb_blackboard_course AS bbc', 'dp.id_disciplina_professor', '=', 'bbc.id_disciplina_professor')
->join('tb_blackboard_aluno AS bbu', 'a.id_aluno', '=', 'bbu.id_aluno')
->whereIn('srm.descricao', ['EM ANÁLISE', 'AGUARDANDO']);

if ($this->dataCriacao) {
$query->where('tb_solicitacao_requerimento.data_criacao', '>=', $this->dataCriacao);
}

if ($this->dataPrevistaTermino) {
$query->where('tb_solicitacao_requerimento.data_prevista_termino', '<=', $this->dataPrevistaTermino);
}

if ($this->tipoAprofundamento) {
$query->where('rm.id_requerimento', '=', $this->tipoAprofundamento);
}

$alunos = $query->get();

foreach ($alunos as $aluno) {
// get student grade
}

return $alunos;
}
if (!empty($this->dataCriacao) && !empty($this->dataPrevistaTermino) && !empty($this->tipoAprofundamento)) {
$query = SolicitacaoRequerimento::select('tb_solicitacao_requerimento.id_solicitacao_requerimento', 'a.nome', 'md.frequencia', 'bbc.course_id', 'bbu.user_id')
->join('tb_aluno AS a', 'tb_solicitacao_requerimento.id_aluno_solicitante', '=', 'a.id_aluno')
->join('tb_requerimento AS rm', 'rm.id_requerimento', '=', 'tb_solicitacao_requerimento.id_requerimento')
->join('tb_status_requerimento AS srm', 'tb_solicitacao_requerimento.id_status_requerimento', '=', 'srm.id_status_requerimento')
->join('tb_matricula_disciplina AS md', 'tb_solicitacao_requerimento.id_matricula_disciplina', '=', 'md.id_matricula_disciplina')
->join('tb_disciplina_professor AS dp', 'md.id_disciplina_professor', '=', 'dp.id_disciplina_professor')
->join('tb_blackboard_course AS bbc', 'dp.id_disciplina_professor', '=', 'bbc.id_disciplina_professor')
->join('tb_blackboard_aluno AS bbu', 'a.id_aluno', '=', 'bbu.id_aluno')
->whereIn('srm.descricao', ['EM ANÁLISE', 'AGUARDANDO']);

if ($this->dataCriacao) {
$query->where('tb_solicitacao_requerimento.data_criacao', '>=', $this->dataCriacao);
}

if ($this->dataPrevistaTermino) {
$query->where('tb_solicitacao_requerimento.data_prevista_termino', '<=', $this->dataPrevistaTermino);
}

if ($this->tipoAprofundamento) {
$query->where('rm.id_requerimento', '=', $this->tipoAprofundamento);
}

$alunos = $query->get();

foreach ($alunos as $aluno) {
// get student grade
}

return $alunos;
}
3 replies
FFilament
Created by calebesantana on 5/26/2023 in #❓┊help
Table from different database connection
Ohhh okay! Thanks
12 replies
FFilament
Created by calebesantana on 5/26/2023 in #❓┊help
Table from different database connection
Ok, but in the query way It should work anyway, right? Here's the dd of getTableQuery() method:
protected function getTableQuery(): Builder
{
dd($this->alunos);
return $this->alunos->toQuery();
}
protected function getTableQuery(): Builder
{
dd($this->alunos);
return $this->alunos->toQuery();
}
12 replies
FFilament
Created by calebesantana on 5/26/2023 in #❓┊help
Table from different database connection
When I dd($this->alunos) it's showing the correct model properties, exactly like the select in this query, but when I use this values in the getTableColumns() it's not rendering...where I'm forgotten to select? Maybe it's necessary to create the relationships and try to access the values from the relation?
12 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
Solved by migrating from Laravel Mix to Vite.
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
Well, as I said, filament admin panel is loading this file and I put this just to test if I'm missing something that this manifest file has that my app.js it doesnt...I just had followed the notifications docs to install it in my livewire layout, forget about the manifest since this file doesnt exist in the docs guide..
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
I just have the manifest.js compiled...that's why I'm not sure if I should use it in my livewire layout, I just put it there to test since my admin panel is loading this file..
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
I just have the manifest.js compiled...that's why I'm not sure if I should use it in my livewire layout, I just put it there to test since my admin panel is loading this file..
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
If I use just the app.js but inside the <body> tag, the notifications persist with that weird behaviour that it's being called, the network request it's happening and successfull, but it doesn't show the notification in my blade page, still invisible...
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
The app.js I'm pretty sure that is importing AlpineFloatingUI, Alpine and NotificationsAlpinePluginjust as said the docs...about the manifest.js I'm not sure, I think this file was created on some other process since I'm using Laravel Mix to compile my assets. Then I realized that the admin panel was loading this file and then I tried to use it in my layout and it works
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
Yepp I follow the docs, not sure If that's the right way since I already use notifications in admin panel? 🤔
32 replies
FFilament
Created by calebesantana on 3/2/2023 in #❓┊help
notifications aren't showing up correctly at custom livewire layout
32 replies