Fix product performance grouped JSON build
This commit is contained in:
@@ -5256,6 +5256,27 @@ function scrollToFirstRequiredAttentionRow () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function saveChanges () {
|
async function saveChanges () {
|
||||||
|
if (!detailHeader.value) {
|
||||||
|
$q.dialog({
|
||||||
|
title: 'Kayit Yapilamadi',
|
||||||
|
message: 'Maliyet baslik bilgisi bulunamadi.',
|
||||||
|
ok: { label: 'Tamam', color: 'primary' },
|
||||||
|
persistent: true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectedUretimSekliID = parseInt(String(detailHeader.value?.UretimSekliID || '0').trim() || '0', 10) || 0
|
||||||
|
if (!(selectedUretimSekliID > 0)) {
|
||||||
|
$q.dialog({
|
||||||
|
title: 'Uretim Sekli Zorunlu',
|
||||||
|
message: 'Kaydetmeden once Uretim Sekli alanini secmelisiniz.',
|
||||||
|
ok: { label: 'Tamam', color: 'warning', textColor: 'black' },
|
||||||
|
persistent: true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
saveLoading.value = true
|
saveLoading.value = true
|
||||||
try {
|
try {
|
||||||
requiredAttentionRowKeys.value = {}
|
requiredAttentionRowKeys.value = {}
|
||||||
@@ -5346,22 +5367,6 @@ async function saveChanges () {
|
|||||||
const okBrPrice = await confirmBrPriceDeviationIfNeeded()
|
const okBrPrice = await confirmBrPriceDeviationIfNeeded()
|
||||||
if (!okBrPrice) return
|
if (!okBrPrice) return
|
||||||
|
|
||||||
if (!detailHeader.value) {
|
|
||||||
$q.notify({ type: 'negative', message: 'Header bulunamadi.', position: 'top-right' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate required header fields
|
|
||||||
const selectedUretimSekliID = parseInt(String(detailHeader.value?.UretimSekliID || '0').trim() || '0', 10) || 0
|
|
||||||
if (!(selectedUretimSekliID > 0)) {
|
|
||||||
$q.notify({
|
|
||||||
type: 'warning',
|
|
||||||
message: 'Uretim Sekli secilmeden kayit yapilamaz.',
|
|
||||||
position: 'top-right'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate: "Kod" (sKodu) is mandatory for any row that has a hammadde type.
|
// Validate: "Kod" (sKodu) is mandatory for any row that has a hammadde type.
|
||||||
// We block saving if there are rows with empty/whitespace code, to avoid sending blank rows to backend.
|
// We block saving if there are rows with empty/whitespace code, to avoid sending blank rows to backend.
|
||||||
const blankCodeRows = (Array.isArray(flatDetailRows.value) ? flatDetailRows.value : [])
|
const blankCodeRows = (Array.isArray(flatDetailRows.value) ? flatDetailRows.value : [])
|
||||||
|
|||||||
Reference in New Issue
Block a user