Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user