Browse Source

update with api

parent
commit
50165f8560

app/Filament/Resources/EgsHistoryResource.php → app/Filament/Resources/EsgHistoryResource.php View File

@@ -22,11 +22,16 @@ use Illuminate\Database\Eloquent\SoftDeletingScope;
22 22
 use SolutionForest\FilamentTranslateField\Forms\Component\Translate;
23 23
 use App\Service\DeepLService;
24 24
 
25
-class EgsHistoryResource extends Resource
25
+class EsgHistoryResource extends Resource
26 26
 {
27
-    protected static ?string $model = EgsHistory::class;
27
+    protected static ?string $model = EsgHistory::class;
28 28
 
29
-    protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
29
+    protected static ?string $navigationIcon = 'heroicon-o-list-bullet';
30
+    protected static ?string $navigationLabel = "永續里程管理";
31
+    protected static ?string $navigationGroup = '企業永續';
32
+    protected static ?string $modelLabel = "永續里程管理";
33
+    public ?string $tableSortColumn = null;
34
+    public ?string $tableSortDirection = null;
30 35
 
31 36
     public static function form(Form $form): Form
32 37
     {

app/Filament/Resources/EgsHistoryResource/Pages/CreateEgsHistory.php → app/Filament/Resources/EsgHistoryResource/Pages/CreateEsgHistory.php View File

@@ -6,7 +6,7 @@ use App\Filament\Resources\EgsHistoryResource;
6 6
 use Filament\Actions;
7 7
 use Filament\Resources\Pages\CreateRecord;
8 8
 
9
-class CreateEgsHistory extends CreateRecord
9
+class CreateEsgHistory extends CreateRecord
10 10
 {
11 11
     protected static string $resource = EgsHistoryResource::class;
12 12
 

app/Filament/Resources/EgsHistoryResource/Pages/EditEgsHistory.php → app/Filament/Resources/EsgHistoryResource/Pages/EditEsgHistory.php View File

@@ -6,7 +6,7 @@ use App\Filament\Resources\EgsHistoryResource;
6 6
 use Filament\Actions;
7 7
 use Filament\Resources\Pages\EditRecord;
8 8
 
9
-class EditEgsHistory extends EditRecord
9
+class EditEsgHistory extends EditRecord
10 10
 {
11 11
     protected static string $resource = EgsHistoryResource::class;
12 12
 

app/Filament/Resources/EgsHistoryResource/Pages/ListEgsHistories.php → app/Filament/Resources/EsgHistoryResource/Pages/ListEsgHistories.php View File

@@ -6,7 +6,7 @@ use App\Filament\Resources\EgsHistoryResource;
6 6
 use Filament\Actions;
7 7
 use Filament\Resources\Pages\ListRecords;
8 8
 
9
-class ListEgsHistories extends ListRecords
9
+class ListEsgHistories extends ListRecords
10 10
 {
11 11
     protected static string $resource = EgsHistoryResource::class;
12 12
 

app/Models/EsgHistoriy.php → app/Models/EsgHistory.php View File

@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
7 7
 use Illuminate\Support\Facades\Storage;
8 8
 use Spatie\Translatable\HasTranslations;
9 9
 
10
-class EsgHistoriy extends Model
10
+class EsgHistory extends Model
11 11
 {
12 12
     use HasTranslations;
13 13
     protected $guarded  = ["id"];

database/migrations/2025_10_30_064958_create_esg_historiys_table.php → database/migrations/2025_10_30_064958_create_esg_histories_table.php View File

@@ -11,7 +11,7 @@ return new class extends Migration
11 11
      */
12 12
     public function up(): void
13 13
     {
14
-        Schema::create('esg_historiys', function (Blueprint $table) {
14
+        Schema::create('esg_histories', function (Blueprint $table) {
15 15
             $table->id();
16 16
             $table->string('selected_year')->comment("年份");
17 17
             $table->string('selected_month')->comment("月份");
@@ -29,6 +29,6 @@ return new class extends Migration
29 29
      */
30 30
     public function down(): void
31 31
     {
32
-        Schema::dropIfExists('esg_historiys');
32
+        Schema::dropIfExists('esg_histories');
33 33
     }
34 34
 };