admin: category drag-and-drop reorder + modal-based license key management
- Add sortOrder column to ProclamationCategory with migration - Implement drag-and-drop reorder in AdminTable with persist-to-DB - Refactor AdminTable to use $derived + dragOverride (no $effect sync) - Replace window.location.reload with invalidateAll for reorder - Convert license key create to modal with subscription level dropdown - Add LicenseKeyForm.svelte following the CategoryForm pattern - Add replace action (delete + generate new key with same level) - Remove deactivateOld checkbox; each key has its own level - Use use:enhance with update() to refresh list after create/replace
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "ProclamationCategory" ADD COLUMN "sortOrder" INTEGER NOT NULL DEFAULT 0;
|
||||
@@ -149,6 +149,7 @@ model SolfeggioFrequency {
|
||||
model ProclamationCategory {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
sortOrder Int @default(0)
|
||||
parentId Int?
|
||||
parent ProclamationCategory? @relation("CategoryHierarchy", fields: [parentId], references: [id])
|
||||
children ProclamationCategory[] @relation("CategoryHierarchy")
|
||||
|
||||
Reference in New Issue
Block a user