Add code field to archive content edit form and IDB

- Expose archive_content.code in edit form (trusted + edit_mode only)
- Add code to properties_to_save so it persists on every API load/save
- Add code field + index to Archive_Content Dexie interface (schema v2)
- Minor: center "Add" button rows in archive and content list components

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-05-07 18:42:15 -04:00
parent 6e700e7b4d
commit 3553809f27
5 changed files with 42 additions and 5 deletions

View File

@@ -299,6 +299,7 @@ export const properties_to_save = [
'archive_id',
'archive_content_type',
'name',
'code',
'description',
'content_html',
'content_json',

View File

@@ -90,6 +90,7 @@ export interface Archive_Content {
archive_content_type: string;
name: string;
code?: null | string;
description?: null | string;
content_html?: null | string;
@@ -168,7 +169,28 @@ export class MySubClassedDexie extends Dexie {
tmp_sort_1, tmp_sort_2,
enable, hide, priority, sort, group, notes, created_on, updated_on, [group+priority+sort+updated_on]`
});
// v2: add code index to content table
this.version(2).stores({
archive: `
id, archive_id,
code,
account_id,
name,
original_datetime, original_timezone, original_location,
tmp_sort_1, tmp_sort_2,
enable, hide, priority, sort, group, notes, created_on, updated_on`,
content: `
id, archive_content_id,
archive_id,
archive_content_type,
name,
code,
hosted_file_id,
original_datetime, original_timezone, original_location,
[group+original_datetime],
tmp_sort_1, tmp_sort_2,
enable, hide, priority, sort, group, notes, created_on, updated_on, [group+priority+sort+updated_on]`
});
}
}