Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-03 15:08:31 +03:00
parent 07c000358e
commit e965eb7c36

View File

@@ -281,9 +281,6 @@
</q-card-section>
<q-card-section style="max-height: 68vh; overflow: auto;">
<div class="text-caption text-grey-7 q-mb-sm">
Ilk etap dummy: isBlocked=0 kabul edilmis satirlar gibi listelenir.
</div>
<div
v-for="(row, idx) in attributeRows"
:key="`${row.AttributeTypeCodeNumber}-${idx}`"
@@ -307,7 +304,6 @@
option-label="label"
option-value="value"
:options="row.Options"
label="AttributeCode - AttributeDescription"
/>
</div>
</div>
@@ -758,6 +754,18 @@ function collectLinesFromRows (selectedRows) {
NewDesc: mergeDescWithAutoNote(row, row.NewDesc || row.OldDesc)
}
const oldItemCode = String(row.OldItemCode || '').trim().toUpperCase()
const oldColor = normalizeShortCode(row.OldColor, 3)
const oldDim2 = normalizeShortCode(row.OldDim2, 3)
const oldDesc = String(row.OldDesc || '').trim()
const hasChange = (
baseLine.NewItemCode !== oldItemCode ||
baseLine.NewColor !== oldColor ||
baseLine.NewDim2 !== oldDim2 ||
String(baseLine.NewDesc || '').trim() !== oldDesc
)
if (!hasChange) continue
for (const id of (row.OrderLineIDs || [])) {
lines.push({
OrderLineID: id,
@@ -1156,11 +1164,17 @@ async function sendUpdateMailAfterApply (selectedRows) {
const host = String(window?.location?.hostname || '').trim().toLowerCase()
const isLocalHost = host === 'localhost' || host === '127.0.0.1'
if (isLocalHost) {
console.info('[OrderProductionUpdate] sendUpdateMailAfterApply skipped (localhost)', { orderHeaderID: orderId, host })
return
}
try {
const t0 = nowMs()
const payload = buildProductionUpdateMailPayload(selectedRows)
console.info('[OrderProductionUpdate] sendUpdateMailAfterApply start', {
orderHeaderID: orderId,
updatedItems: payload?.updatedItems?.length || 0
})
const res = await api.post('/order/send-market-mail', {
orderHeaderID: orderId,
operation: payload.operation,
@@ -1171,6 +1185,11 @@ async function sendUpdateMailAfterApply (selectedRows) {
})
const sentCount = Number(res?.data?.sentCount || 0)
console.info('[OrderProductionUpdate] sendUpdateMailAfterApply done', {
orderHeaderID: orderId,
sentCount,
durationMs: Math.round(nowMs() - t0)
})
$q.notify({
type: 'positive',
message: sentCount > 0
@@ -1178,6 +1197,12 @@ async function sendUpdateMailAfterApply (selectedRows) {
: 'Guncelleme maili gonderildi'
})
} catch (err) {
console.error('[OrderProductionUpdate] sendUpdateMailAfterApply failed', {
orderHeaderID: orderId,
status: err?.response?.status,
data: err?.response?.data,
message: err?.message
})
$q.notify({
type: 'warning',
message: 'Guncelleme kaydedildi, mail gonderilemedi.'
@@ -1299,7 +1324,7 @@ async function onBulkSubmit () {
return
}
if (!lines.length) {
$q.notify({ type: 'negative', message: 'Secili satirlarda guncellenecek kayit bulunamadi.' })
$q.notify({ type: 'warning', message: 'Secili satirlarda degisiklik yok.' })
return
}
const { errMsg: cdErrMsg, cdItems } = collectCdItemsFromSelectedRows(selectedRows)