atualizacao

This commit is contained in:
2026-03-30 12:42:20 +00:00
parent 9384c43f2a
commit 730313470b
25 changed files with 2370 additions and 213 deletions

View File

@@ -4,37 +4,67 @@ namespace App\Http\Controllers\Api\v1;
use App\Http\Controllers\Controller;
use App\Models\clientes;
use App\Models\clientes_relatorios_mensal;
use App\Models\clientes_chamado;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
class relatorio_chamados extends Controller
{
public function salvar_relatorio(Request $request)
public function salvar_chamados(Request $request)
{
foreach ($request->all() as $item) {
Log::info('Iniciando o processo de chamado');
try {
foreach ($request->all() as $chamado) {
Log::info('Processando chamado ' . $chamado['ticket']);
$cliente = clientes::where('name', $item['customerName'])->first();
$cliente = clientes::where('name', '=', $chamado['cliente'])->first();
if (isset($cliente)) {
Log::info('Criando chamado ' . $chamado['ticket']);
clientes_chamado::updateOrCreate(
[
if ($cliente) {
'ticket' => $chamado['ticket']
],
[
'id_cliente' => $cliente->id,
'titulo' => $chamado['titulo'],
'minutos_utilizados' => $chamado['minutosUtilizados'],
'data_resolucao' => Carbon::parse($chamado['dataResolucao'])->format('Y-m-d H:i:s'),
'consultor_responsavel' => $chamado['consultorResponsavel'],
'nome_cliente' => $chamado['cliente']
]
);
} else {
Log::info('Atualizando chamado ' . $chamado['ticket']);
clientes_chamado::updateOrCreate(
[
$relatorio = new clientes_relatorios_mensal();
$relatorio->id_cliente = $cliente->id;
$relatorio->horas_utilizadas = array_sum(
array_column($item['registros'], 'cr13a_horasutilizadas')
);
$relatorio->chamados = json_encode($item['registros']);
$relatorio->save();
'ticket' => $chamado['ticket']
],
[
'titulo' => $chamado['titulo'],
'minutos_utilizados' => $chamado['minutosUtilizados'],
'data_resolucao' => Carbon::parse($chamado['dataResolucao'])->format('Y-m-d H:i:s'),
'consultor_responsavel' => $chamado['consultorResponsavel'],
'nome_cliente' => $chamado['cliente']
]
);
}
}
}
return response()->json([
'success' => true,
'message' => 'Chamados recebidos com sucesso',
'dados' => $request->all()
], 201);
return response()->json([
'success' => true,
'message' => 'Relatório recebido com sucesso',
'data' => $request->all(),
], 201);
} catch (\Throwable $e) {
return response()->json([
'success' => false,
'message' => 'Erro ao salvar relatório',
'error' => $e->getMessage(),
'line' => $e->getLine(),
], 500);
}
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Http\Controllers;
use App\Models\clientes;
use App\Models\clientes_relatorio;
use Illuminate\Http\Request;
class ClientesRelatorioController extends Controller
{
public function index()
{
$relatorios = clientes_relatorio::all();
return view("relatorios.index", compact('relatorios'));
}
public function listarClientes()
{
$clientes = clientes::select('id', 'name')->orderBy('name')->get();
return response()->json($clientes);
}
public function store(Request $request)
{
$request->validate([
'cliente_id' => 'required|exists:clientes,id',
]);
$clienteId = $request->cliente_id;
$ultimoRelatorio = clientes_relatorio::where('id_cliente', $clienteId)
->latest('id')
->first();
if ($ultimoRelatorio) {
$dadosNovoRelatorio = $ultimoRelatorio->toArray();
unset(
$dadosNovoRelatorio['id'],
$dadosNovoRelatorio['created_at'],
$dadosNovoRelatorio['updated_at']
);
// campos que você NÃO quer copiar
unset(
$dadosNovoRelatorio['status'],
$dadosNovoRelatorio['data_envio'],
$dadosNovoRelatorio['observacao_final']
);
$novoRelatorio = clientes_relatorio::create($dadosNovoRelatorio);
} else {
$novoRelatorio = clientes_relatorio::create([
'cliente_id' => $clienteId,
]);
}
return redirect()->back()->with('success', 'Relatório criado com sucesso.');
}
}

View File

@@ -1,10 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ClientesRelatoriosMensalController extends Controller
{
//
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class clientes_chamado extends Model
{
protected $fillable = [
'titulo',
'ticket',
'data_resolucao',
'consultor_responsavel',
'minutos_utilizados',
'id_cliente',
'nome_cliente'
];
}

View File

@@ -4,7 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class clientes_relatorios_mensal extends Model
class clientes_relatorio extends Model
{
//
}

View File

@@ -14,7 +14,7 @@ class clientes_usuarios extends Model
'mailboxUsage' => 'array',
];
protected $fillable = [
protected $fillable = [
'id_cliente',
'id_user',
'accountEnabled',
@@ -24,6 +24,6 @@ class clientes_usuarios extends Model
'displayName',
'upn',
'primarySmtp',
'principalSource'
'principalSource'
];
}

View File

@@ -3,6 +3,7 @@
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Sentry\Laravel\Integration;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
@@ -16,6 +17,6 @@ return Application::configure(basePath: dirname(__DIR__))
$middleware->append(\App\Http\Middleware\TrustProxies::class);
})
->withExceptions(function (Exceptions $exceptions): void {
//
Integration::handles($exceptions);
})
->create();

View File

@@ -13,7 +13,8 @@
"laravel/framework": "^12.0",
"laravel/horizon": "^5.40",
"laravel/sanctum": "^4.2",
"laravel/tinker": "^2.10.1"
"laravel/tinker": "^2.10.1",
"sentry/sentry-laravel": "^4.24"
},
"require-dev": {
"fakerphp/faker": "^1.23",

483
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8daa8e625b1a4f30f19d27ea0fe5aa02",
"content-hash": "9e57e49c6a12df23c6994f3b850c0951",
"packages": [
{
"name": "barryvdh/laravel-dompdf",
@@ -1284,6 +1284,66 @@
],
"time": "2025-08-22T14:27:06+00:00"
},
{
"name": "jean85/pretty-package-versions",
"version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/Jean85/pretty-package-versions.git",
"reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a",
"reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.1.0",
"php": "^7.4|^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"jean85/composer-provided-replaced-stub-package": "^1.0",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^7.5|^8.5|^9.6",
"rector/rector": "^2.0",
"vimeo/psalm": "^4.3 || ^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Jean85\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alessandro Lai",
"email": "alessandro.lai85@gmail.com"
}
],
"description": "A library to get pretty versions strings of installed dependencies",
"keywords": [
"composer",
"package",
"release",
"versions"
],
"support": {
"issues": "https://github.com/Jean85/pretty-package-versions/issues",
"source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1"
},
"time": "2025-03-19T14:43:43+00:00"
},
{
"name": "laravel/breeze",
"version": "v2.3.8",
@@ -3025,6 +3085,84 @@
],
"time": "2025-11-20T02:34:59+00:00"
},
{
"name": "nyholm/psr7",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/Nyholm/psr7.git",
"reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3",
"reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3",
"shasum": ""
},
"require": {
"php": ">=7.2",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.1 || ^2.0"
},
"provide": {
"php-http/message-factory-implementation": "1.0",
"psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"http-interop/http-factory-tests": "^0.9",
"php-http/message-factory": "^1.0",
"php-http/psr7-integration-tests": "^1.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
"symfony/error-handler": "^4.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Nyholm\\Psr7\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com"
},
{
"name": "Martijn van der Ven",
"email": "martijn@vanderven.se"
}
],
"description": "A fast PHP7 implementation of PSR-7",
"homepage": "https://tnyholm.se",
"keywords": [
"psr-17",
"psr-7"
],
"support": {
"issues": "https://github.com/Nyholm/psr7/issues",
"source": "https://github.com/Nyholm/psr7/tree/1.8.2"
},
"funding": [
{
"url": "https://github.com/Zegnat",
"type": "github"
},
{
"url": "https://github.com/nyholm",
"type": "github"
}
],
"time": "2024-09-09T07:06:30+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.4",
@@ -3869,6 +4007,190 @@
},
"time": "2026-03-03T17:31:43+00:00"
},
{
"name": "sentry/sentry",
"version": "4.23.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-php.git",
"reference": "121a674d5fffcdb8e414b75c1b76edba8e592b66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/121a674d5fffcdb8e414b75c1b76edba8e592b66",
"reference": "121a674d5fffcdb8e414b75c1b76edba8e592b66",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/psr7": "^1.8.4|^2.1.1",
"jean85/pretty-package-versions": "^1.5|^2.0.4",
"php": "^7.2|^8.0",
"psr/log": "^1.0|^2.0|^3.0",
"symfony/options-resolver": "^4.4.30|^5.0.11|^6.0|^7.0|^8.0"
},
"conflict": {
"raven/raven": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4",
"guzzlehttp/promises": "^2.0.3",
"guzzlehttp/psr7": "^1.8.4|^2.1.1",
"monolog/monolog": "^1.6|^2.0|^3.0",
"nyholm/psr7": "^1.8",
"open-telemetry/api": "^1.0",
"open-telemetry/exporter-otlp": "^1.0",
"open-telemetry/sdk": "^1.0",
"phpbench/phpbench": "^1.0",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^8.5.52|^9.6.34",
"spiral/roadrunner-http": "^3.6",
"spiral/roadrunner-worker": "^3.6"
},
"suggest": {
"monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler."
},
"type": "library",
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"Sentry\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sentry",
"email": "accounts@sentry.io"
}
],
"description": "PHP SDK for Sentry (http://sentry.io)",
"homepage": "http://sentry.io",
"keywords": [
"crash-reporting",
"crash-reports",
"error-handler",
"error-monitoring",
"log",
"logging",
"profiling",
"sentry",
"tracing"
],
"support": {
"issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/4.23.0"
},
"funding": [
{
"url": "https://sentry.io/",
"type": "custom"
},
{
"url": "https://sentry.io/pricing/",
"type": "custom"
}
],
"time": "2026-03-23T13:15:52+00:00"
},
{
"name": "sentry/sentry-laravel",
"version": "4.24.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "f823bd85e38e06cb4f1b7a82d48a2fc95320b31d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/f823bd85e38e06cb4f1b7a82d48a2fc95320b31d",
"reference": "f823bd85e38e06cb4f1b7a82d48a2fc95320b31d",
"shasum": ""
},
"require": {
"illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0 | ^12.0 | ^13.0",
"nyholm/psr7": "^1.0",
"php": "^7.2 | ^8.0",
"sentry/sentry": "^4.23.0",
"symfony/psr-http-message-bridge": "^1.0 | ^2.0 | ^6.0 | ^7.0 | ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.11",
"guzzlehttp/guzzle": "^7.2",
"laravel/folio": "^1.1",
"laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0 | ^12.0 | ^13.0",
"laravel/octane": "^2.15",
"laravel/pennant": "^1.0",
"livewire/livewire": "^2.0 | ^3.0 | ^4.0",
"mockery/mockery": "^1.3",
"orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^8.5 | ^9.6 | ^10.4 | ^11.5"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"Sentry": "Sentry\\Laravel\\Facade"
},
"providers": [
"Sentry\\Laravel\\ServiceProvider",
"Sentry\\Laravel\\Tracing\\ServiceProvider"
]
}
},
"autoload": {
"psr-0": {
"Sentry\\Laravel\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sentry",
"email": "accounts@sentry.io"
}
],
"description": "Laravel SDK for Sentry (https://sentry.io)",
"homepage": "https://sentry.io",
"keywords": [
"crash-reporting",
"crash-reports",
"error-handler",
"error-monitoring",
"laravel",
"log",
"logging",
"profiling",
"sentry",
"tracing"
],
"support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues",
"source": "https://github.com/getsentry/sentry-laravel/tree/4.24.0"
},
"funding": [
{
"url": "https://sentry.io/",
"type": "custom"
},
{
"url": "https://sentry.io/pricing/",
"type": "custom"
}
],
"time": "2026-03-24T10:33:54+00:00"
},
{
"name": "symfony/clock",
"version": "v7.3.0",
@@ -4859,6 +5181,77 @@
],
"time": "2025-09-16T08:38:17+00:00"
},
{
"name": "symfony/options-resolver",
"version": "v7.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "b38026df55197f9e39a44f3215788edf83187b80"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/b38026df55197f9e39a44f3215788edf83187b80",
"reference": "b38026df55197f9e39a44f3215788edf83187b80",
"shasum": ""
},
"require": {
"php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides an improved replacement for the array_replace PHP function",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"support": {
"source": "https://github.com/symfony/options-resolver/tree/v7.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-11-12T15:39:26+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.33.0",
@@ -5753,6 +6146,94 @@
],
"time": "2025-09-11T10:12:26+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
"version": "v7.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "929ffe10bbfbb92e711ac3818d416f9daffee067"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/929ffe10bbfbb92e711ac3818d416f9daffee067",
"reference": "929ffe10bbfbb92e711ac3818d416f9daffee067",
"shasum": ""
},
"require": {
"php": ">=8.2",
"psr/http-message": "^1.0|^2.0",
"symfony/http-foundation": "^6.4|^7.0|^8.0"
},
"conflict": {
"php-http/discovery": "<1.15",
"symfony/http-kernel": "<6.4"
},
"require-dev": {
"nyholm/psr7": "^1.1",
"php-http/discovery": "^1.15",
"psr/log": "^1.1.4|^2|^3",
"symfony/browser-kit": "^6.4|^7.0|^8.0",
"symfony/config": "^6.4|^7.0|^8.0",
"symfony/event-dispatcher": "^6.4|^7.0|^8.0",
"symfony/framework-bundle": "^6.4.13|^7.1.6|^8.0",
"symfony/http-kernel": "^6.4.13|^7.1.6|^8.0",
"symfony/runtime": "^6.4.13|^7.1.6|^8.0"
},
"type": "symfony-bridge",
"autoload": {
"psr-4": {
"Symfony\\Bridge\\PsrHttpMessage\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "PSR HTTP message bridge",
"homepage": "https://symfony.com",
"keywords": [
"http",
"http-message",
"psr-17",
"psr-7"
],
"support": {
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v7.4.4"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2026-01-03T23:30:35+00:00"
},
{
"name": "symfony/routing",
"version": "v7.3.6",

View File

@@ -52,6 +52,12 @@ return [
'channels' => [
'sentry_logs' => [
'driver' => 'sentry_logs',
// The minimum logging level at which this handler will be triggered
// Available levels: debug, info, notice, warning, error, critical, alert, emergency
'level' => env('LOG_LEVEL', 'debug'), // defaults to `debug` if not set
],
'stack' => [
'driver' => 'stack',
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
@@ -89,7 +95,7 @@ return [
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],

144
config/sentry.php Normal file
View File

@@ -0,0 +1,144 @@
<?php
/**
* Sentry Laravel SDK configuration file.
*
* @see https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/
*/
return [
// @see https://docs.sentry.io/concepts/key-terms/dsn-explainer/
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
// @see https://spotlightjs.com/
// 'spotlight' => env('SENTRY_SPOTLIGHT', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#logger
// 'logger' => Sentry\Logger\DebugFileLogger::class, // By default this will log to `storage_path('logs/sentry.log')`
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => env('SENTRY_RELEASE'),
// When left empty or `null` the Laravel environment will be used (usually discovered from `APP_ENV` in your `.env`)
'environment' => env('SENTRY_ENVIRONMENT'),
// Override the organization ID used for trace continuation checks.
'org_id' => env('SENTRY_ORG_ID') === null ? null : (int) env('SENTRY_ORG_ID'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#sample_rate
'sample_rate' => env('SENTRY_SAMPLE_RATE') === null ? 1.0 : (float) env('SENTRY_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces_sample_rate
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_TRACES_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#profiles_sample_rate
'profiles_sample_rate' => env('SENTRY_PROFILES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_PROFILES_SAMPLE_RATE'),
// Only continue incoming traces when the organization IDs are compatible with this SDK instance.
'strict_trace_continuation' => env('SENTRY_STRICT_TRACE_CONTINUATION', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#enable_logs
'enable_logs' => env('SENTRY_ENABLE_LOGS', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#log_flush_threshold
'log_flush_threshold' => env('SENTRY_LOG_FLUSH_THRESHOLD') === null ? null : (int) env('SENTRY_LOG_FLUSH_THRESHOLD'),
// The minimum log level that will be sent to Sentry as logs using the `sentry_logs` logging channel
'logs_channel_level' => env('SENTRY_LOG_LEVEL', env('SENTRY_LOGS_LEVEL', env('LOG_LEVEL', 'debug'))),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send_default_pii
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_exceptions
// 'ignore_exceptions' => [],
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_transactions
'ignore_transactions' => [
// Ignore Laravel's default health URL
'/up',
],
// Breadcrumb specific configuration
'breadcrumbs' => [
// Capture Laravel logs as breadcrumbs
'logs' => env('SENTRY_BREADCRUMBS_LOGS_ENABLED', true),
// Capture Laravel cache events (hits, writes etc.) as breadcrumbs
'cache' => env('SENTRY_BREADCRUMBS_CACHE_ENABLED', true),
// Capture Livewire components like routes as breadcrumbs
'livewire' => env('SENTRY_BREADCRUMBS_LIVEWIRE_ENABLED', true),
// Capture SQL queries as breadcrumbs
'sql_queries' => env('SENTRY_BREADCRUMBS_SQL_QUERIES_ENABLED', true),
// Capture SQL query bindings (parameters) in SQL query breadcrumbs
'sql_bindings' => env('SENTRY_BREADCRUMBS_SQL_BINDINGS_ENABLED', false),
// Capture queue job information as breadcrumbs
'queue_info' => env('SENTRY_BREADCRUMBS_QUEUE_INFO_ENABLED', true),
// Capture command information as breadcrumbs
'command_info' => env('SENTRY_BREADCRUMBS_COMMAND_JOBS_ENABLED', true),
// Capture HTTP client request information as breadcrumbs
'http_client_requests' => env('SENTRY_BREADCRUMBS_HTTP_CLIENT_REQUESTS_ENABLED', true),
// Capture send notifications as breadcrumbs
'notifications' => env('SENTRY_BREADCRUMBS_NOTIFICATIONS_ENABLED', true),
],
// Performance monitoring specific configuration
'tracing' => [
// Trace queue jobs as their own transactions (this enables tracing for queue jobs)
'queue_job_transactions' => env('SENTRY_TRACE_QUEUE_ENABLED', true),
// Capture queue jobs as spans when executed on the sync driver
'queue_jobs' => env('SENTRY_TRACE_QUEUE_JOBS_ENABLED', true),
// Capture SQL queries as spans
'sql_queries' => env('SENTRY_TRACE_SQL_QUERIES_ENABLED', true),
// Capture SQL query bindings (parameters) in SQL query spans
'sql_bindings' => env('SENTRY_TRACE_SQL_BINDINGS_ENABLED', false),
// Capture where the SQL query originated from on the SQL query spans
'sql_origin' => env('SENTRY_TRACE_SQL_ORIGIN_ENABLED', true),
// Define a threshold in milliseconds for SQL queries to resolve their origin
'sql_origin_threshold_ms' => env('SENTRY_TRACE_SQL_ORIGIN_THRESHOLD_MS', 100),
// Capture views rendered as spans
'views' => env('SENTRY_TRACE_VIEWS_ENABLED', true),
// Capture Livewire components as spans
'livewire' => env('SENTRY_TRACE_LIVEWIRE_ENABLED', true),
// Capture HTTP client requests as spans
'http_client_requests' => env('SENTRY_TRACE_HTTP_CLIENT_REQUESTS_ENABLED', true),
// Capture Laravel cache events (hits, writes etc.) as spans
'cache' => env('SENTRY_TRACE_CACHE_ENABLED', true),
// Capture Redis operations as spans (this enables Redis events in Laravel)
'redis_commands' => env('SENTRY_TRACE_REDIS_COMMANDS', false),
// Capture where the Redis command originated from on the Redis command spans
'redis_origin' => env('SENTRY_TRACE_REDIS_ORIGIN_ENABLED', true),
// Capture send notifications as spans
'notifications' => env('SENTRY_TRACE_NOTIFICATIONS_ENABLED', true),
// Enable tracing for requests without a matching route (404's)
'missing_routes' => env('SENTRY_TRACE_MISSING_ROUTES_ENABLED', false),
// Configures if the performance trace should continue after the response has been sent to the user until the application terminates
// This is required to capture any spans that are created after the response has been sent like queue jobs dispatched using `dispatch(...)->afterResponse()` for example
'continue_after_response' => env('SENTRY_TRACE_CONTINUE_AFTER_RESPONSE', true),
// Enable the tracing integrations supplied by Sentry (recommended)
'default_integrations' => env('SENTRY_TRACE_DEFAULT_INTEGRATIONS_ENABLED', true),
],
];

View File

@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('clientes_relatorios_mensals');
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('clientes_relatorios', function (Blueprint $table) {
$table->id();
$table->foreignId('id_cliente')->nullable()->constrained('clientes')->cascadeOnDelete();
$table->integer('horas_utilizadas');
$table->json('chamados');
$table->json('melhorias')->nullable();
$table->longText('nota_consultor')->nullable();
$table->longText('observacao_consultor')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('clientes_relatorios');
}
};

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('clientes_chamados', function (Blueprint $table) {
$table->id();
$table->foreignId('id_cliente')->nullable()->constrained('clientes')->cascadeOnDelete();
$table->string('titulo');
$table->string('ticket');
$table->date('data_resolucao');
$table->string('consultor_responsavel');
$table->integer('minutos_utilizados');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('clientes_chamados');
}
};

View File

@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('clientes_chamados', function (Blueprint $table) {
$table->dateTime('data_resolucao')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

View File

@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('clientes_chamados', function (Blueprint $table) {
$table->dateTime('data_resolucao')->nullable()->change();
$table->integer('minutos_utilizados')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('clientes_chamados', function (Blueprint $table) {
$table->string('nome_cliente')->after('id_cliente');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('clientes_chamados', function (Blueprint $table) {
//
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('clientes_relatorios', function (Blueprint $table) {
$table->string('title')->after('id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('clientes_relatorios', function (Blueprint $table) {
//
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('clientes_relatorios', function (Blueprint $table) {
$table->string('status')->after('id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('clientes_relatorios', function (Blueprint $table) {
//
});
}
};

BIN
dump.rdb

Binary file not shown.

View File

@@ -0,0 +1,121 @@
@extends('theme.default')
@section('page.title', 'Relatórios')
@section('content')
@include('theme.alertas')
<div class="container-fluid">
<div class="row">
<div class="col-xl-12 bst-seller">
<div class="d-flex align-items-center justify-content-between mb-4">
<div class="d-flex align-items-center">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
+ Add Relatório
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="{{ route('relatorios.store') }}" method="POST">
@csrf
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Novo Relatório</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<label for="cliente_id" class="form-label">Cliente</label>
<select name="cliente_id" id="cliente_id" class="form-select" required>
<option value="">Carregando clientes...</option>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Fechar</button>
<button type="submit" class="btn btn-primary">Criar relatório</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="card h-auto">
<div class="card-header border-0 align-items-center">
<div id="tableCustomerFilter"></div>
<div id="tableCustomerExcelBTN"></div>
</div>
<div class="card-body table-card-body px-0 pt-0 pb-2">
<div class="table-responsive check-wrapper">
<table id="customerTable" class="table">
<thead class="table-light">
<tr>
<th class="mw-100">ID</th>
<th class="mw-200">Título</th>
<th class="mw-100">Status</th>
<th class="mw-100">Opções</th>
</tr>
</thead>
<tbody>
@foreach ($relatorios as $relatorio)
<tr>
<td><span>{{$relatorio->id}}</span></td>
<td>
<div class="d-flex">
<img src="assets/images/avatar/small/avatar1.webp"
class="avatar avatar-sm me-2" alt="">
<div class="clearfix">
<h6 class="mb-0">{{$relatorio->titulo}}</h6>
</div>
</div>
</td>
<td><span class="badge badge-success light">{{$relatorio->status}}</span></td>
<td><span></span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script>
document.addEventListener('DOMContentLoaded', function () {
const modal = document.getElementById('exampleModal');
const select = document.getElementById('cliente_id');
modal.addEventListener('show.bs.modal', function () {
select.innerHTML = '<option value="">Carregando clientes...</option>';
fetch("{{ route('clientes.lista') }}")
.then(response => response.json())
.then(data => {
select.innerHTML = '<option value="">Selecione um cliente</option>';
data.forEach(cliente => {
const option = document.createElement('option');
option.value = cliente.id;
option.textContent = cliente.name;
select.appendChild(option);
});
})
.catch(error => {
console.error('Erro ao carregar clientes:', error);
select.innerHTML = '<option value="">Erro ao carregar clientes</option>';
});
});
});
</script>
@endsection

File diff suppressed because it is too large Load Diff

View File

@@ -20,199 +20,217 @@
<body>
<!-- Start - Preloader -->
<div id="preloader">
<div class="lds-ripple">
<div></div>
<div></div>
<!-- Start - Preloader -->
<div id="preloader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
</div>
</div>
<!-- End - Preloader -->
<!-- End - Preloader -->
<!-- Start - Main Wrapper -->
<div id="main-wrapper">
<!-- Start - Main Wrapper -->
<div id="main-wrapper">
<!-- Start - Nav Header -->
<div class="nav-header">
<a href="{{ route('dashboard') }}" class="brand-logo" aria-label="Brand Logo">
</a>
</div>
<!-- End - Nav Header -->
<!-- Start - Nav Header -->
<div class="nav-header">
<a href="{{ route('dashboard') }}" class="brand-logo" aria-label="Brand Logo">
</a>
</div>
<!-- End - Nav Header -->
<!-- Start - Sidebar Chat Box -->
<!-- Start - Sidebar Chat Box -->
<!-- End - Sidebar Chat Box -->
<!-- End - Sidebar Chat Box -->
<!-- Start - Header -->
<div class="header">
<div class="header-content">
<nav class="navbar navbar-expand">
<div class="collapse navbar-collapse justify-content-between">
<div class="header-left">
</div>
<ul class="navbar-nav header-right">
<li class="nav-item notification_dropdown d-none d-sm-flex">
<a class="nav-link dz-fullscreen" href="javascript:void(0);" aria-label="Fullscreen">
<svg id="icon-full" viewBox="0 0 24 24" width="20" height="20"
stroke="var(--bs-body-color)" stroke-width="2" fill="none"
stroke-linecap="round" stroke-linejoin="round">
<path
<!-- Start - Header -->
<div class="header">
<div class="header-content">
<nav class="navbar navbar-expand">
<div class="collapse navbar-collapse justify-content-between">
<div class="header-left">
</div>
<ul class="navbar-nav header-right">
<li class="nav-item notification_dropdown d-none d-sm-flex">
<a class="nav-link dz-fullscreen" href="javascript:void(0);" aria-label="Fullscreen">
<svg id="icon-full" viewBox="0 0 24 24" width="20" height="20"
stroke="var(--bs-body-color)" stroke-width="2" fill="none"
stroke-linecap="round" stroke-linejoin="round">
<path
d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"
style="stroke-dasharray: 37, 57; stroke-dashoffset: 0;"></path>
</svg>
<svg id="icon-minimize" width="20" height="20" viewBox="0 0 24 24" fill="none"
stroke="var(--bs-body-color)" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minimize">
<path
</svg>
<svg id="icon-minimize" width="20" height="20" viewBox="0 0 24 24" fill="none"
stroke="var(--bs-body-color)" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" class="feather feather-minimize">
<path
d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"
style="stroke-dasharray: 37, 57; stroke-dashoffset: 0;"></path>
</svg>
</a>
</li>
<li class="nav-item dropdown header-profile-dropdown">
<a class="nav-link" href="javascript:void(0);" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
<div class="profile-head">
<div class="profile-media">
<img src="{{ asset('assets/images/tab/1.jpg') }}" alt="">
</div>
<div class="header-info">
<h6 class="author-name">{{ Auth::user()->name }}</h6>
<small>{{ Auth::user()->email }}</small>
</div>
</div>
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<div class="py-2 d-flex px-3">
<img src="{{ asset('assets/images/tab/1.jpg') }}"
class="avatar avatar-sm rounded-circle" alt="">
<div class="ms-2">
<h6 class="mb-0">{{ Auth::user()->name }}</h6>
<small>Web Designer</small>
</svg>
</a>
</li>
<li class="nav-item dropdown header-profile-dropdown">
<a class="nav-link" href="javascript:void(0);" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
<div class="profile-head">
<div class="profile-media">
<img src="{{ asset('assets/images/tab/1.jpg') }}" alt="">
</div>
<div class="header-info">
<h6 class="author-name">{{ Auth::user()->name }}</h6>
<small>{{ Auth::user()->email }}</small>
</div>
</div>
</li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="{{ route('horizon.index') }}" target="_blank"><i
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<div class="py-2 d-flex px-3">
<img src="{{ asset('assets/images/tab/1.jpg') }}"
class="avatar avatar-sm rounded-circle" alt="">
<div class="ms-2">
<h6 class="mb-0">{{ Auth::user()->name }}</h6>
<small>Web Designer</small>
</div>
</div>
</li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="{{ route('horizon.index') }}" target="_blank"><i
class="fa-solid fa-chart-area text-primary me-1"></i> Horizon</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li>
<a href="#" class="dropdown-item"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"
viewBox="0 0 24 24" fill="none" stroke="var(--bs-danger)"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path stroke="var(--bs-danger)"
d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
<polyline stroke="var(--bs-danger)" points="16 17 21 12 16 7">
</polyline>
<line x1="21" y1="12" x2="9" y2="12"></line>
</svg>
<span class="ms-2 text-danger">Logout</span>
</a>
<li>
<hr class="dropdown-divider">
</li>
<li>
<a href="#" class="dropdown-item"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"
viewBox="0 0 24 24" fill="none" stroke="var(--bs-danger)"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path stroke="var(--bs-danger)"
d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
<polyline stroke="var(--bs-danger)" points="16 17 21 12 16 7">
</polyline>
<line x1="21" y1="12" x2="9" y2="12"></line>
</svg>
<span class="ms-2 text-danger">Logout</span>
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST"
class="d-none">
@csrf
</form>
<form id="logout-form" action="{{ route('logout') }}" method="POST"
class="d-none">
@csrf
</form>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
<!-- End - Header -->
<!-- End - Header -->
<!-- Start - Sidebar Navigation -->
<div class="deznav">
<div class="deznav-scroll">
<ul class="metismenu" id="menu">
<li class="menu-title" data-i18n="CloudEssential">CloudEssential</li>
<li>
<a href="{{ route('dashboard') }}" aria-expanded="false">
<div class="menu-icon">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 14.0673C7.4407 14.0673 4.41309 14.6034 4.41309 16.7501C4.41309 18.8969 7.4215 19.4521 10.986 19.4521C14.5313 19.4521 17.5581 18.9152 17.5581 16.7693C17.5581 14.6234 14.5505 14.0673 10.986 14.0673Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 11.0054C13.3126 11.0054 15.1983 9.11881 15.1983 6.79223C15.1983 4.46564 13.3126 2.57993 10.986 2.57993C8.65944 2.57993 6.77285 4.46564 6.77285 6.79223C6.76499 9.11096 8.63849 10.9975 10.9563 11.0054H10.986Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<span class="nav-text" data-i18n="Dashboard">Dashboard</span>
</a>
</li>
<li>
<a href="{{ route('clientes') }}" aria-expanded="false">
<div class="menu-icon">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 14.0673C7.4407 14.0673 4.41309 14.6034 4.41309 16.7501C4.41309 18.8969 7.4215 19.4521 10.986 19.4521C14.5313 19.4521 17.5581 18.9152 17.5581 16.7693C17.5581 14.6234 14.5505 14.0673 10.986 14.0673Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 11.0054C13.3126 11.0054 15.1983 9.11881 15.1983 6.79223C15.1983 4.46564 13.3126 2.57993 10.986 2.57993C8.65944 2.57993 6.77285 4.46564 6.77285 6.79223C6.76499 9.11096 8.63849 10.9975 10.9563 11.0054H10.986Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<span class="nav-text" data-i18n="Clientes">Clientes</span>
</a>
</li>
<li>
<a href="{{ route('relatorios') }}" aria-expanded="false">
<div class="menu-icon">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 14.0673C7.4407 14.0673 4.41309 14.6034 4.41309 16.7501C4.41309 18.8969 7.4215 19.4521 10.986 19.4521C14.5313 19.4521 17.5581 18.9152 17.5581 16.7693C17.5581 14.6234 14.5505 14.0673 10.986 14.0673Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 11.0054C13.3126 11.0054 15.1983 9.11881 15.1983 6.79223C15.1983 4.46564 13.3126 2.57993 10.986 2.57993C8.65944 2.57993 6.77285 4.46564 6.77285 6.79223C6.76499 9.11096 8.63849 10.9975 10.9563 11.0054H10.986Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
<span class="nav-text" data-i18n="Relatorios">Relatorios</span>
</a>
</li>
</ul>
</div>
<!-- Start - Sidebar Navigation -->
<div class="deznav">
<div class="deznav-scroll">
<ul class="metismenu" id="menu">
<li class="menu-title" data-i18n="CloudEssential">CloudEssential</li>
<li>
<a href="{{ route('dashboard') }}" aria-expanded="false">
<div class="menu-icon">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 14.0673C7.4407 14.0673 4.41309 14.6034 4.41309 16.7501C4.41309 18.8969 7.4215 19.4521 10.986 19.4521C14.5313 19.4521 17.5581 18.9152 17.5581 16.7693C17.5581 14.6234 14.5505 14.0673 10.986 14.0673Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 11.0054C13.3126 11.0054 15.1983 9.11881 15.1983 6.79223C15.1983 4.46564 13.3126 2.57993 10.986 2.57993C8.65944 2.57993 6.77285 4.46564 6.77285 6.79223C6.76499 9.11096 8.63849 10.9975 10.9563 11.0054H10.986Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<span class="nav-text" data-i18n="Dashboard">Dashboard</span>
</a>
</li>
<li>
<a href="{{ route('clientes') }}" aria-expanded="false">
<div class="menu-icon">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 14.0673C7.4407 14.0673 4.41309 14.6034 4.41309 16.7501C4.41309 18.8969 7.4215 19.4521 10.986 19.4521C14.5313 19.4521 17.5581 18.9152 17.5581 16.7693C17.5581 14.6234 14.5505 14.0673 10.986 14.0673Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.986 11.0054C13.3126 11.0054 15.1983 9.11881 15.1983 6.79223C15.1983 4.46564 13.3126 2.57993 10.986 2.57993C8.65944 2.57993 6.77285 4.46564 6.77285 6.79223C6.76499 9.11096 8.63849 10.9975 10.9563 11.0054H10.986Z"
stroke="#888888" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<span class="nav-text" data-i18n="Clientes">Clientes</span>
</a>
</li>
</ul>
</div>
<!-- End - Sidebar Navigation -->
<!-- Start - Content Body -->
<main class="content-body">
@yield('content')
</main>
<!-- End - Content Body -->
<!-- Start - Footer -->
<div class="footer">
<div class="copyright text-center">
<p class="mb-0">Copyright © Developed by <a href="https://cloudessential.tech/" target="_blank">Felipe
Aquino</a> 2025 - <span class="current-year"></span></p>
</div>
</div>
<!-- End - Footer -->
</div>
<!-- End - Sidebar Navigation -->
<!-- Start - Content Body -->
<main class="content-body">
@yield('content')
</main>
<!-- End - Content Body -->
<!-- Start - Footer -->
<div class="footer">
<div class="copyright text-center">
<p class="mb-0">Copyright © Developed by <a href="https://cloudessential.tech/" target="_blank">Felipe
Aquino</a> 2025 - <span class="current-year"></span></p>
</div>
</div>
<!-- End - Footer -->
</div>
<!-- End - Main Wrapper -->
<!-- End - Main Wrapper -->
<!-- Start - Page Scripts -->
<script src="../assets/js/sidebar-menu.js"></script>
<script src="../assets/js/config.js"></script>
<script src="{{ asset('assets/js/jquery-3.5.1.min.js')}}"></script>
<script src="{{ asset('assets/js/icons/feather-icon/feather.min.js') }}"></script>
<script src="{{ asset('assets/js/icons/feather-icon/feather-icon.js') }}"></script>
<script src="{{ asset('assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ asset('assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js') }}"></script>
<script src="{{ asset('assets/vendor/metismenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ asset('assets/vendor/@yaireo/tagify/dist/tagify.js') }}"></script>
<script src="{{asset('/assets/vendor/dropzone/dropzone.min.js')}}"></script>
<script src="{{ asset('assets/vendor/i18n/i18n.js') }}"></script>
<script src="{{ asset('assets/js/translator.js') }}"></script>
<script src="{{ asset('assets/js/deznav-init.js') }}"></script>
<script src="{{ asset('assets/js/custom.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap/popper.min.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap/bootstrap.min.js') }}"></script>
<script src="{{ asset('assets/js/tooltip-init.js') }}"></script>
@yield('scripts')
<!-- Start - Page Scripts -->
<script src="../assets/js/sidebar-menu.js"></script>
<script src="../assets/js/config.js"></script>
<script src="{{ asset('assets/js/jquery-3.5.1.min.js')}}"></script>
<script src="{{ asset('assets/js/icons/feather-icon/feather.min.js') }}"></script>
<script src="{{ asset('assets/js/icons/feather-icon/feather-icon.js') }}"></script>
<script src="{{ asset('assets/vendor/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ asset('assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js') }}"></script>
<script src="{{ asset('assets/vendor/metismenu/dist/metisMenu.min.js') }}"></script>
<script src="{{ asset('assets/vendor/@yaireo/tagify/dist/tagify.js') }}"></script>
<script src="{{asset('/assets/vendor/dropzone/dropzone.min.js')}}"></script>
<script src="{{ asset('assets/vendor/i18n/i18n.js') }}"></script>
<script src="{{ asset('assets/js/translator.js') }}"></script>
<script src="{{ asset('assets/js/deznav-init.js') }}"></script>
<script src="{{ asset('assets/js/custom.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap/popper.min.js') }}"></script>
<script src="{{ asset('assets/js/bootstrap/bootstrap.min.js') }}"></script>
<script src="{{ asset('assets/js/tooltip-init.js') }}"></script>
@yield('scripts')
</body>

View File

@@ -7,5 +7,5 @@ use App\Http\Controllers\Api\v1\user_details;
Route::prefix('v1')->group(function () {
route::post('user_details', [user_details::class, 'user_details']);
route::post('relatorio_chamados', [relatorio_chamados::class, 'salvar_relatorio']);
route::post('salvarchamados', [relatorio_chamados::class, 'salvar_chamados']);
});

View File

@@ -3,6 +3,7 @@
use App\Http\Controllers\ClientesController;
use App\Http\Controllers\M365CredController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\ClientesRelatorioController;
use Illuminate\Support\Facades\Route;
@@ -18,17 +19,19 @@ Route::middleware('auth')->group(function () {
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::get('/dashboard', function () {return view('dashboard');})->name('dashboard');
Route::get('/dashboard', function () {
return view('dashboard'); })->name('dashboard');
## Clientes
## Clientes
Route::get('/clientes', [ClientesController::class, 'index'])->name('clientes');
Route::get('/clientes/lista', [ClientesRelatorioController::class, 'listarClientes'])->name('clientes.lista');
Route::get('/clientes/{id}', [ClientesController::class, 'detalhes'])->name('cliente');
Route::post('/clientes/add', [ClientesController::class, 'add'])->name('clientes.add');
Route::post('/clientes/edit/{id}', [ClientesController::class, 'update'])->name('clientes.edit');
Route::post('/clientes/delete/{id}', [ClientesController::class, 'destroy'])->name('clientes.delete');
Route::post('/clientes/cred/{id}', [M365CredController::class, 'save'])->name('m365.cred');
## M365 Funções
## M365 Funções
Route::post('/clientes/{id}/m365_get_users', [ClientesController::class, 'm365_get_users'])->name('m365_get_users');
Route::post('/clientes/{id}/m365_get_groups', [ClientesController::class, 'm365_get_groups'])->name('m365_get_groups');
Route::post('/clientes/{id}/m365_get_sites_sharepoint', [ClientesController::class, 'm365_get_sites_sharepoint'])->name('m365_get_sites_sharepoint');
@@ -37,6 +40,9 @@ Route::middleware('auth')->group(function () {
Route::post('/clientes/{id}/m365_get_users_details', [ClientesController::class, 'm365_get_users_details'])->name('m365_get_users_details');
Route::post('/clientes/{id}/m365_scfo_sites', [ClientesController::class, 'm365_scfo_sites'])->name('m365_scfo_sites');
## Relatórios
Route::get('/relatorios', [ClientesRelatorioController::class, 'index'])->name('relatorios');
Route::post('/relatorios/store', [ClientesRelatorioController::class, 'store'])->name('relatorios.store');
});
require __DIR__ . '/auth.php';