[FIX] 整合機台效期管理功能並優化 UI 比例
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m2s

- 修正 Alpine.js 作用域問題,恢復效期編輯彈窗功能
- 整合機台日誌與效期管理至主列表頁 (Index)
- 優化大螢幕貨道格線佈局,解決日期折行問題
- 縮小彈窗字體與內距,調整為極簡奢華風 UI
- 新增貨道效期與批號欄位之 Migration 與模型關聯
- 補齊中、英、日三語系翻譯檔
This commit is contained in:
2026-03-24 16:46:04 +08:00
parent 38770b080b
commit 87ef247a48
22 changed files with 2539 additions and 647 deletions

View File

@@ -0,0 +1,30 @@
<?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('machine_logs', function (Blueprint $table) {
$table->foreignId('company_id')->after('id')->nullable()->constrained()->onDelete('cascade');
$table->string('type')->after('level')->default('status')->index(); // status, login, submachine, device
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('machine_logs', function (Blueprint $table) {
$table->dropForeign(['company_id']);
$table->dropColumn(['company_id', 'type']);
});
}
};

View File

@@ -0,0 +1,29 @@
<?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('machine_slots', function (Blueprint $table) {
$table->date('expiry_date')->nullable()->after('max_stock')->comment('商品效期');
$table->string('batch_no')->nullable()->after('expiry_date')->comment('補貨批號');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('machine_slots', function (Blueprint $table) {
$table->dropColumn(['expiry_date', 'batch_no']);
});
}
};