This commit is contained in:
21
api/app/Exports/Farmacia/RelatorioAltoCustoProcesso.php
Normal file
21
api/app/Exports/Farmacia/RelatorioAltoCustoProcesso.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioAltoCustoProcessoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAltoCustoProcesso implements FromView
|
||||
{
|
||||
private const TITLE = 'ALTO CUSTO - RELATÓRIO DE PROCESSO';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-alto-custo-processo';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAltoCustoProcessoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioAltoCustoRetiradaPendenteService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioAltoCustoRetiradaPendente implements FromView
|
||||
{
|
||||
private const TITLE = 'ALTO CUSTO - RELATÓRIO DE RETIRADA PENDENTE';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-alto-custo-retirada-pendente';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioAltoCustoRetiradaPendenteService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
21
api/app/Exports/Farmacia/RelatorioDispensacao.php
Normal file
21
api/app/Exports/Farmacia/RelatorioDispensacao.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Services\Farmacia\RelatorioDispensacaoService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioDispensacao implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE DISPENSAÇÃO';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-dispensacao';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = RelatorioDispensacaoService::getPrintExportData();
|
||||
$data['title'] = self::TITLE;
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
42
api/app/Exports/Farmacia/RelatorioDispensacaoRemedioCasa.php
Normal file
42
api/app/Exports/Farmacia/RelatorioDispensacaoRemedioCasa.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Farmacia;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Cadastro\Estabelecimento\Unidade;
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Services\Farmacia\RelatorioDispensacaoRemedioCasaService;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
|
||||
class RelatorioDispensacaoRemedioCasa implements FromView
|
||||
{
|
||||
private const TITLE = 'RELATÓRIO DE DISPENSAÇÃO - REMÉDIO EM CASA';
|
||||
private const VIEW = 'exportacoes.farmacia.relatorio-dispensacao-remedio-casa';
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$itens = RelatorioDispensacaoRemedioCasaService::index();
|
||||
$unidade = Unidade::find(request()->unidade_id);
|
||||
$infraestrutura = Infraestrutura::find(request()->infraestrutura_id);
|
||||
$material = Material::find(request()->material_id);
|
||||
$paciente = Paciente::find(request()->paciente_id);
|
||||
|
||||
$data = [
|
||||
'title' => self::TITLE,
|
||||
'periodo' => [
|
||||
'inicio' => request()->periodo['start'],
|
||||
'fim' => request()->periodo['end'],
|
||||
],
|
||||
'unidade' => $unidade->nome_fantasia ?? 'Todas',
|
||||
'infraestrutura' => $infraestrutura->nome ?? 'Todas',
|
||||
'material' => $material->descricao ?? 'Todos',
|
||||
'paciente' => $paciente->nome ?? 'Todos',
|
||||
'data' => $itens,
|
||||
'colunas' => collect(request()->get('selected_columns')),
|
||||
];
|
||||
|
||||
return view(self::VIEW, $data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user