[REFACTOR] 移除機台管理與庫存設定中的貨道同步套用功能與日誌面板冗餘分頁
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 46s
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 46s
1. 移除 MachineController 貨道更新 API 的 apply_all_same_product 驗證規則。 2. 簡化 MachineService 的 updateSlot 邏輯,取消「同步套用至同機台其他相同商品」的批次異動功能以確保資料準確性。 3. 清理 index.blade.php 機台管理頁面中的「貨道狀態 (Slot Status)」分頁、相關 Alpine.js 函式與專用的貨道編輯 Modal。 4. 修正 stock.blade.php 庫存管理介面,移除編輯 Modal 內的同步切換開關。
This commit is contained in:
@@ -14,12 +14,10 @@ window.stockApp = function(initialMachineId) {
|
||||
|
||||
// Modal State
|
||||
showEditModal: false,
|
||||
selectedSlot: null,
|
||||
formData: {
|
||||
stock: 0,
|
||||
expiry_date: '',
|
||||
batch_no: '',
|
||||
apply_all_same_product: false
|
||||
batch_no: ''
|
||||
},
|
||||
|
||||
async init() {
|
||||
@@ -73,8 +71,7 @@ window.stockApp = function(initialMachineId) {
|
||||
this.formData = {
|
||||
stock: slot.stock || 0,
|
||||
expiry_date: slot.expiry_date ? slot.expiry_date.split('T')[0] : '',
|
||||
batch_no: slot.batch_no || '',
|
||||
apply_all_same_product: false
|
||||
batch_no: slot.batch_no || ''
|
||||
};
|
||||
this.showEditModal = true;
|
||||
},
|
||||
@@ -444,16 +441,6 @@ window.stockApp = function(initialMachineId) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toggle: Apply to all -->
|
||||
<div class="pt-4 border-t border-slate-100 dark:border-slate-800/50">
|
||||
<label class="relative inline-flex items-center cursor-pointer group">
|
||||
<input type="checkbox" x-model="formData.apply_all_same_product" class="sr-only peer">
|
||||
<div class="w-11 h-6 bg-slate-200 dark:bg-slate-800 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-cyan-500 transition-all duration-300"></div>
|
||||
<span class="ml-4 text-xs font-black text-slate-500 dark:text-slate-400 uppercase tracking-widest group-hover:text-cyan-600 transition-colors">
|
||||
{{ __('Apply changes to all identical products in this machine') }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer Actions -->
|
||||
|
||||
Reference in New Issue
Block a user