Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2970,6 +2970,20 @@ async function onColor2Change(colorCode2) {
|
||||
=========================================================== */
|
||||
const bedenStock = ref([]) // Görsel tablo için stok listesi
|
||||
const stockMap = ref({}) // { "48": 12, "50": 7, ... } şeklinde key-value map
|
||||
|
||||
function warnIfSecondColorMissing() {
|
||||
const hasSecondColorOptions = Array.isArray(renkOptions2.value) && renkOptions2.value.length > 0
|
||||
const secondColorEmpty = !String(form.renk2 || '').trim()
|
||||
|
||||
if (hasSecondColorOptions && secondColorEmpty) {
|
||||
$q.notify({
|
||||
type: 'warning',
|
||||
message: 'Bu model/renk için 2. renk seçimi önerilir.',
|
||||
position: 'top-right'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const onSaveOrUpdateRow = async () => {
|
||||
if (!hasRowMutationPermission()) {
|
||||
notifyNoPermission(
|
||||
@@ -2980,6 +2994,8 @@ const onSaveOrUpdateRow = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
warnIfSecondColorMissing()
|
||||
|
||||
await orderStore.saveOrUpdateRowUnified({
|
||||
form,
|
||||
|
||||
@@ -3033,6 +3049,8 @@ const onSaveAndNextColor = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
warnIfSecondColorMissing()
|
||||
|
||||
const ok = await orderStore.saveOrUpdateRowUnified({
|
||||
form,
|
||||
recalcVat: typeof recalcVat === 'function' ? recalcVat : null,
|
||||
|
||||
Reference in New Issue
Block a user