[PROMOTE] dev to demo
1. [FEAT] 客戶管理欄位(客戶代號、起始日)非必填化:調整 companies.code 為 nullable 並增加長度。 2. [FIX] 優化 CI/CD 流程:修正標籤映射與 Runner 設定,確保生產環境部署穩定性。
This commit is contained in:
commit
ea4dbbdedf
@ -48,13 +48,13 @@ class CompanyController extends Controller
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'name' => 'required|string|max:255',
|
||||
'code' => 'required|string|max:50|unique:companies,code',
|
||||
'code' => 'nullable|string|max:50|unique:companies,code',
|
||||
'original_type' => 'required|string|in:buyout,lease',
|
||||
'tax_id' => 'nullable|string|max:50',
|
||||
'contact_name' => 'nullable|string|max:255',
|
||||
'contact_phone' => 'nullable|string|max:50',
|
||||
'contact_email' => 'nullable|email|max:255',
|
||||
'start_date' => 'required|date',
|
||||
'start_date' => 'nullable|date',
|
||||
'end_date' => 'nullable|date',
|
||||
'warranty_start_date' => 'nullable|date',
|
||||
'warranty_end_date' => 'nullable|date',
|
||||
@ -158,13 +158,13 @@ class CompanyController extends Controller
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'name' => 'required|string|max:255',
|
||||
'code' => 'required|string|max:50|unique:companies,code,' . $company->id,
|
||||
'code' => 'nullable|string|max:50|unique:companies,code,' . $company->id,
|
||||
'current_type' => 'required|string|in:buyout,lease',
|
||||
'tax_id' => 'nullable|string|max:50',
|
||||
'contact_name' => 'nullable|string|max:255',
|
||||
'contact_phone' => 'nullable|string|max:50',
|
||||
'contact_email' => 'nullable|email|max:255',
|
||||
'start_date' => 'required|date',
|
||||
'start_date' => 'nullable|date',
|
||||
'end_date' => 'nullable|date',
|
||||
'warranty_start_date' => 'nullable|date',
|
||||
'warranty_end_date' => 'nullable|date',
|
||||
|
||||
@ -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('companies', function (Blueprint $table) {
|
||||
$table->string('code', 100)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->string('code', 20)->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -795,8 +795,8 @@
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
<label class="text-xs font-black text-slate-500 uppercase tracking-widest pl-1">{{
|
||||
__('Company Code') }} <span class="text-rose-500 ml-0.5">*</span></label>
|
||||
<input type="text" name="code" x-model="currentCompany.code" required
|
||||
__('Company Code') }}</label>
|
||||
<input type="text" name="code" x-model="currentCompany.code"
|
||||
class="luxury-input w-full" placeholder="{{ __('e.g. TWSTAR') }}">
|
||||
</div>
|
||||
</div>
|
||||
@ -811,8 +811,8 @@
|
||||
<div class="grid grid-cols-2 gap-3" x-show="currentCompany.current_type === 'lease'">
|
||||
<div class="space-y-2">
|
||||
<label class="text-xs font-black text-slate-500 uppercase tracking-widest pl-1">{{
|
||||
__('Start Date') }} <span class="text-rose-500 ml-0.5">*</span></label>
|
||||
<input type="date" name="start_date" x-model="currentCompany.start_date" :required="currentCompany.current_type === 'lease'"
|
||||
__('Start Date') }}</label>
|
||||
<input type="date" name="start_date" x-model="currentCompany.start_date"
|
||||
class="luxury-input w-full px-2">
|
||||
</div>
|
||||
<div class="space-y-2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user