Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db4c8cf40f | ||
|
|
54b3187656 | ||
|
|
a1222d0178 | ||
|
|
3863210146 | ||
|
|
ae7e5f75a1 | ||
|
|
79f52acaa3 | ||
|
|
be28c4feec |
@@ -1,16 +0,0 @@
|
||||
APP_URL=http://127.0.0.1:8000
|
||||
SESSION_DRIVER=file
|
||||
CACHE_STORE=array
|
||||
|
||||
APP_KEY=base64:O0djxuJapvByUFNx5avmY7od6Y6C05JYv3kAFNrlrMX=
|
||||
DB_CONNECTION=pgsql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=wms_dusk
|
||||
DB_USERNAME=wms_user
|
||||
DB_PASSWORD=987400Kmh
|
||||
QUEUE_CONNECTION=sync
|
||||
MAIL_MAILER=array
|
||||
DEBUGBAR_ENABLED=false
|
||||
|
||||
TELESCOPE_ENABLED=false
|
||||
@@ -39,4 +39,3 @@ composer.lock
|
||||
/storage/framework/
|
||||
/storage/debugbar/
|
||||
/phpunit.dusk.xml
|
||||
sonarqube-issues.csv
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -0,0 +1,5 @@
|
||||
# Analytics
|
||||
|
||||
Display KPIs, warehouse performance trends, executive summaries, and OTTC analysis.
|
||||
|
||||
Contains actual sample Blade views and placeholder service provider/routes only.
|
||||
Executable → Regular
-1
@@ -64,7 +64,6 @@
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Metric</th>
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,5 @@
|
||||
# Audit
|
||||
|
||||
Review activity logs, data changes, interface events, and administrative actions.
|
||||
|
||||
Contains actual sample Blade views and placeholder service provider/routes only.
|
||||
Executable → Regular
-1
@@ -64,7 +64,6 @@
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>When</th>
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+3
-1
@@ -63,7 +63,9 @@ class AuditTrailServiceProvider extends ServiceProvider
|
||||
$commandPath = __DIR__ . '/../Console';
|
||||
$commands = collect(File::allFiles($commandPath))
|
||||
->map(function ($file) {
|
||||
return 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
||||
$class = 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
||||
|
||||
return $class;
|
||||
})
|
||||
->filter(function ($class) {
|
||||
return class_exists($class);
|
||||
|
||||
Executable → Regular
+12
@@ -14,6 +14,18 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected $moduleNamespace = 'Modules\AuditTrail\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,5 @@
|
||||
# Carrier Management
|
||||
|
||||
Maintain carriers, services, and shipment routing master data.
|
||||
|
||||
Contains actual sample Blade views and placeholder service provider/routes only.
|
||||
Executable → Regular
-1
@@ -64,7 +64,6 @@
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Carrier</th>
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+29
-26
@@ -26,37 +26,40 @@ class DeleteOpenAiFilesCommand extends Command
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
$service = new OpenAiFileService((string) $setting->api_key);
|
||||
|
||||
try {
|
||||
return $this->executeFor(new OpenAiFileService((string) $setting->api_key));
|
||||
if ((bool) $this->option('dry-run')) {
|
||||
$files = $service->listFiles();
|
||||
|
||||
$this->info('Found ' . count($files) . ' OpenAI API file(s).');
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->line(sprintf(
|
||||
'- %s %s',
|
||||
(string) ($file['id'] ?? 'unknown'),
|
||||
(string) ($file['filename'] ?? 'unnamed'),
|
||||
));
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
$result = $service->deleteAllFiles();
|
||||
|
||||
$this->info("Listed: {$result['listed']}");
|
||||
$this->info("Deleted: {$result['deleted']}");
|
||||
$this->info("Failed: {$result['failed']}");
|
||||
|
||||
foreach ($result['failures'] as $failure) {
|
||||
$this->error($failure['file_id'] . ': ' . $failure['error']);
|
||||
}
|
||||
|
||||
return $result['failed'] === 0 ? self::SUCCESS : self::FAILURE;
|
||||
} catch (Throwable $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
private function executeFor(OpenAiFileService $service): int
|
||||
{
|
||||
if ((bool) $this->option('dry-run')) {
|
||||
$files = $service->listFiles();
|
||||
$this->info('Found ' . count($files) . ' OpenAI API file(s).');
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->line(sprintf('- %s %s', (string) ($file['id'] ?? 'unknown'), (string) ($file['filename'] ?? 'unnamed')));
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
$result = $service->deleteAllFiles();
|
||||
$this->info("Listed: {$result['listed']}");
|
||||
$this->info("Deleted: {$result['deleted']}");
|
||||
$this->info("Failed: {$result['failed']}");
|
||||
|
||||
foreach ($result['failures'] as $failure) {
|
||||
$this->error($failure['file_id'] . ': ' . $failure['error']);
|
||||
}
|
||||
|
||||
return $result['failed'] === 0 ? self::SUCCESS : self::FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+1
@@ -16,5 +16,6 @@ class ChatGPTDatabaseSeeder extends Seeder
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
// $this->call("OthersTableSeeder");
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\ChatGPT\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
final class OpenAiFileException extends RuntimeException {}
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+3
-1
@@ -79,7 +79,9 @@ class ChatGPTServiceProvider extends ServiceProvider
|
||||
$commandPath = __DIR__ . '/../Console';
|
||||
$commands = collect(File::allFiles($commandPath))
|
||||
->map(function ($file) {
|
||||
return 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
||||
$class = 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
||||
|
||||
return $class;
|
||||
})
|
||||
->filter(function ($class) {
|
||||
return class_exists($class);
|
||||
|
||||
Executable → Regular
+12
@@ -14,6 +14,18 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected $moduleNamespace = 'Modules\ChatGPT\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+6
-11
@@ -65,8 +65,7 @@
|
||||
</div>
|
||||
|
||||
<label class="inline-flex items-center gap-2 text-sm text-slate-700">
|
||||
<label for="sonar-input-a09f3b253f" class="visually-hidden">is active</label>
|
||||
<input type="checkbox" name="is_active" value="1" checked class="rounded border-slate-300 text-blue-600 focus:ring-blue-500" id="sonar-input-a09f3b253f">
|
||||
<input type="checkbox" name="is_active" value="1" checked class="rounded border-slate-300 text-blue-600 focus:ring-blue-500">
|
||||
Make active key
|
||||
</label>
|
||||
|
||||
@@ -83,7 +82,6 @@
|
||||
|
||||
<div class="mt-5 overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-slate-200 text-sm">
|
||||
<caption class="sr-only">Data table</caption>
|
||||
<thead class="bg-slate-50 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">
|
||||
<tr>
|
||||
<th class="px-4 py-3">Name</th>
|
||||
@@ -101,27 +99,24 @@
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<label for="sonar-input-30f47d1294" class="visually-hidden">name</label>
|
||||
<input
|
||||
<input
|
||||
name="name"
|
||||
type="text"
|
||||
value="{{ old('name', $setting->name) }}"
|
||||
class="w-full rounded-lg border-slate-300 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
||||
id="name">
|
||||
>
|
||||
|
||||
<label for="sonar-input-707eb8d2ba" class="visually-hidden">Leave blank to keep existing key</label>
|
||||
<input
|
||||
<input
|
||||
name="api_key"
|
||||
type="password"
|
||||
value=""
|
||||
autocomplete="new-password"
|
||||
placeholder="Leave blank to keep existing key"
|
||||
class="w-full rounded-lg border-slate-300 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
||||
id="sonar-input-707eb8d2ba">
|
||||
>
|
||||
|
||||
<label class="inline-flex items-center gap-2 text-xs text-slate-600">
|
||||
<label for="sonar-input-da782f0360" class="visually-hidden">is active</label>
|
||||
<input
|
||||
<input
|
||||
type="checkbox"
|
||||
name="is_active"
|
||||
value="1"
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+4
-4
@@ -4,7 +4,7 @@ namespace Modules\ChatGPT\Services;
|
||||
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Modules\ChatGPT\Exceptions\OpenAiFileException;
|
||||
use RuntimeException;
|
||||
|
||||
class OpenAiFileService
|
||||
{
|
||||
@@ -33,7 +33,7 @@ class OpenAiFileService
|
||||
->get(self::BASE_URL . '/files', $query);
|
||||
|
||||
if ($response->failed()) {
|
||||
throw new OpenAiFileException('OpenAI file list request failed: ' . $response->body());
|
||||
throw new RuntimeException('OpenAI file list request failed: ' . $response->body());
|
||||
}
|
||||
|
||||
$payload = $response->json();
|
||||
@@ -63,7 +63,7 @@ class OpenAiFileService
|
||||
->delete(self::BASE_URL . '/files/' . rawurlencode($fileId));
|
||||
|
||||
if ($response->failed()) {
|
||||
throw new OpenAiFileException("OpenAI file delete request failed for {$fileId}: " . $response->body());
|
||||
throw new RuntimeException("OpenAI file delete request failed for {$fileId}: " . $response->body());
|
||||
}
|
||||
|
||||
return $response->json() ?? [];
|
||||
@@ -90,7 +90,7 @@ class OpenAiFileService
|
||||
try {
|
||||
$this->deleteFile($fileId);
|
||||
$deleted++;
|
||||
} catch (OpenAiFileException $exception) {
|
||||
} catch (RuntimeException $exception) {
|
||||
$failures[] = [
|
||||
'file_id' => $fileId,
|
||||
'error' => $exception->getMessage(),
|
||||
|
||||
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user