[FIX] 整合機台效期管理功能並優化 UI 比例
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m2s
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m2s
- 修正 Alpine.js 作用域問題,恢復效期編輯彈窗功能 - 整合機台日誌與效期管理至主列表頁 (Index) - 優化大螢幕貨道格線佈局,解決日期折行問題 - 縮小彈窗字體與內距,調整為極簡奢華風 UI - 新增貨道效期與批號欄位之 Migration 與模型關聯 - 補齊中、英、日三語系翻譯檔
This commit is contained in:
@@ -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']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -21,6 +21,7 @@ class RoleSeeder extends Seeder
|
||||
$permissions = [
|
||||
'menu.members',
|
||||
'menu.machines',
|
||||
'menu.machines.list',
|
||||
'menu.app',
|
||||
'menu.warehouses',
|
||||
'menu.sales',
|
||||
@@ -60,6 +61,7 @@ class RoleSeeder extends Seeder
|
||||
$tenantAdmin->syncPermissions([
|
||||
'menu.members',
|
||||
'menu.machines',
|
||||
'menu.machines.list',
|
||||
'menu.app',
|
||||
'menu.warehouses',
|
||||
'menu.sales',
|
||||
|
||||
Reference in New Issue
Block a user