Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-31 14:54:19 +03:00
parent afe77171f4
commit 7b1de24dfb
4 changed files with 97 additions and 16 deletions

View File

@@ -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,