WizardFile Manager düzenlemeleri
This commit is contained in:
parent
54a0131d6e
commit
2430a3bf4a
5 changed files with 33 additions and 33 deletions
3
.github/instructions/lowcode.instructions.md
vendored
3
.github/instructions/lowcode.instructions.md
vendored
|
|
@ -1766,7 +1766,8 @@ aday olur ve iki koşulla seçilebilir — kapsamdaki `{sql|postgres}/object/{Ta
|
|||
`CREATE TABLE` scriptidir (platform tabloları bu klasörde durmaz; scriptsiz tablo `NotManaged`) ve
|
||||
tabloyu başka bir ekran (sorgu/C/U/D komutu ya da bu ekranı alt form olarak kullanan üst ekran),
|
||||
Custom Endpoint SQL'i ya da custom component veri kaynağı kullanmaz (`InUse`). Kullanıcı onay
|
||||
diyaloğunda tabloyu seçerse (`WizardDeleteInput.DropTables`) kayıt temizliğinden **sonra**
|
||||
diyaloğunda tabloyu seçerse (`WizardDeleteInput.DropTables`; birden çok seçilebilir tablo varsa
|
||||
başlıktaki **Tümünü seç** hepsini işaretler) kayıt temizliğinden **sonra**
|
||||
`DROP TABLE` çalışır, ardından tablonun CRUD endpoint'leri ve seed dosyaları
|
||||
(`{sql|postgres}/object/{Tablo}.sql`, `crud/{Tablo}.json`) silinir. Düşürme hatası (ör. yabancı
|
||||
anahtar) silmeyi durdurmaz: tablo ve scripti yerinde kalır, rapor `Failed` + mesaj gösterir.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -38728,20 +38728,6 @@
|
|||
"Key": "App.ListForm.WizardDeleteTableMissing",
|
||||
"Value": "veritabanında yok"
|
||||
},
|
||||
{
|
||||
"Id": "7cf4a636-1aa4-5c40-b76d-6a56b2cab594",
|
||||
"CultureName": "en",
|
||||
"ResourceName": "Platform",
|
||||
"Key": "App.ListForm.WizardDeleteTableWarning",
|
||||
"Value": "The table and all of its data will be permanently deleted. This cannot be undone. Files to be deleted:"
|
||||
},
|
||||
{
|
||||
"Id": "de41b71a-ba27-5faa-a4b7-2875e11aaef0",
|
||||
"CultureName": "tr",
|
||||
"ResourceName": "Platform",
|
||||
"Key": "App.ListForm.WizardDeleteTableWarning",
|
||||
"Value": "Tablo ve içindeki tüm veriler kalıcı olarak silinecek. Bu işlem geri alınamaz. Silinecek dosyalar:"
|
||||
},
|
||||
{
|
||||
"Id": "13caacb0-eb0b-5a43-b5ce-0442057dbf26",
|
||||
"CultureName": "en",
|
||||
|
|
|
|||
|
|
@ -477,6 +477,18 @@ const WizardFileManager = () => {
|
|||
: prev,
|
||||
)
|
||||
|
||||
/** Silinebilen tablolar; toplu seçim yalnızca bunları işaretler. */
|
||||
const droppableTables = (confirm?.tables ?? [])
|
||||
.filter((t) => t.canDrop && canDropTable)
|
||||
.map((t) => t.tableName)
|
||||
const allTablesSelected =
|
||||
droppableTables.length > 0 && droppableTables.every((t) => confirm?.dropTables.includes(t))
|
||||
|
||||
const toggleAllDropTables = () =>
|
||||
setConfirm((prev) =>
|
||||
prev ? { ...prev, dropTables: allTablesSelected ? [] : droppableTables } : prev,
|
||||
)
|
||||
|
||||
const handleDeleteConfirm = async () => {
|
||||
if (!confirm) return
|
||||
setDeletingFile(confirm.fileName)
|
||||
|
|
@ -570,16 +582,6 @@ const WizardFileManager = () => {
|
|||
{translate('::App.ListForm.WizardDeleteTableNoPermission')}
|
||||
</div>
|
||||
)}
|
||||
{checked && (
|
||||
<div className="ml-6 mt-1 text-xs text-red-600 dark:text-red-400">
|
||||
{translate('::App.ListForm.WizardDeleteTableWarning')}
|
||||
{table.files.map((file) => (
|
||||
<div key={file} className="break-all font-mono text-gray-500">
|
||||
{file}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -1235,9 +1237,20 @@ const WizardFileManager = () => {
|
|||
)}
|
||||
{!!confirm?.tables?.length && (
|
||||
<div className="mt-4 rounded border border-gray-200 p-3 dark:border-gray-700">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<p className="text-sm font-medium text-gray-800 dark:text-gray-200">
|
||||
{translate('::App.ListForm.WizardDeleteTables')}
|
||||
</p>
|
||||
{droppableTables.length > 1 && (
|
||||
<Button size="xs" variant="plain" type="button" onClick={toggleAllDropTables}>
|
||||
{translate(
|
||||
allTablesSelected
|
||||
? '::App.Platform.ClearSelection'
|
||||
: '::App.Platform.SelectAll',
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-0.5 text-xs text-gray-500">
|
||||
{translate('::App.ListForm.WizardDeleteTablesHint')}
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue