Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-20 08:50:24 +03:00
parent c6bdf83f05
commit a1f5c653c6
2 changed files with 232 additions and 17 deletions

View File

@@ -106,14 +106,11 @@
<template #body-cell-source_type="props">
<q-td :props="props" :class="cellClass(props.row.t_key, 'source_type')">
<q-select
v-model="rowDraft(props.row.t_key).source_type"
dense
outlined
emit-value
map-options
:options="sourceTypeOptions"
@update:model-value="() => queueAutoSave(props.row.t_key)"
<q-badge
color="primary"
text-color="white"
class="source-type-badge"
:label="sourceTypeLabel(props.row.t_key)"
/>
</q-td>
</template>
@@ -238,6 +235,11 @@ const sourceTypeOptions = [
{ label: 'postgre', value: 'postgre' },
{ label: 'mssql', value: 'mssql' }
]
const sourceTypeLabelMap = {
dummy: 'UI',
postgre: 'PostgreSQL',
mssql: 'MSSQL'
}
const columns = [
{ name: 'actions', label: 'Güncelle', field: 'actions', align: 'left' },
@@ -377,7 +379,6 @@ function rowHasChanges (key) {
if (!draft || !orig) return false
return (
draft.source_text_tr !== orig.source_text_tr ||
draft.source_type !== orig.source_type ||
draft.en !== orig.en ||
draft.de !== orig.de ||
draft.es !== orig.es ||
@@ -398,7 +399,7 @@ function cellClass (key, field) {
const orig = originalByKey.value[key]
if (!draft || !orig) return ''
if (draft[field] !== orig[field]) return 'cell-dirty'
if (field !== 'source_type' && draft[field] !== orig[field]) return 'cell-dirty'
if (field === 'en' && isPending(key, 'en')) return 'cell-new'
if (field === 'de' && isPending(key, 'de')) return 'cell-new'
@@ -410,6 +411,11 @@ function cellClass (key, field) {
return ''
}
function sourceTypeLabel (key) {
const val = String(rowDraft(key).source_type || 'dummy').toLowerCase()
return sourceTypeLabelMap[val] || val || '-'
}
function toggleSelected (key, checked) {
if (checked) {
if (!selectedKeys.value.includes(key)) {