refactor(documents): drop documentLocation binding from edit layouts; wire archive fields
This commit is contained in:
@@ -67,7 +67,6 @@ let selectedReceivers = $state<Person[]>(untrack(() => initialReceivers));
|
||||
let dateIso = $state('');
|
||||
let tags = $state<Tag[]>([]);
|
||||
// Bulk-edit only — replace-on-non-blank semantics.
|
||||
let documentLocation = $state('');
|
||||
let archiveBox = $state('');
|
||||
let archiveFolder = $state('');
|
||||
|
||||
@@ -231,7 +230,6 @@ async function saveBulkEdit() {
|
||||
tagNames: tags.map((t) => t.name),
|
||||
senderId: senderId || null,
|
||||
receiverIds: selectedReceivers.map((r) => r.id),
|
||||
documentLocation: documentLocation || null,
|
||||
archiveBox: archiveBox || null,
|
||||
archiveFolder: archiveFolder || null
|
||||
};
|
||||
@@ -442,7 +440,6 @@ async function retrySave() {
|
||||
/>
|
||||
<DescriptionSection
|
||||
bind:tags={tags}
|
||||
bind:documentLocation={documentLocation}
|
||||
bind:archiveBox={archiveBox}
|
||||
bind:archiveFolder={archiveFolder}
|
||||
hideTitle
|
||||
@@ -494,7 +491,6 @@ async function retrySave() {
|
||||
/>
|
||||
<DescriptionSection
|
||||
bind:tags={tags}
|
||||
bind:documentLocation={documentLocation}
|
||||
bind:archiveBox={archiveBox}
|
||||
bind:archiveFolder={archiveFolder}
|
||||
hideTitle
|
||||
|
||||
@@ -397,8 +397,8 @@ describe('BulkDocumentEditLayout — mode="edit"', () => {
|
||||
initialEditEntries: [editEntry(1)]
|
||||
});
|
||||
const replaceBadges = container.querySelectorAll('[data-testid="field-label-badge-replace"]');
|
||||
// sender + documentLocation + archiveBox + archiveFolder = 4
|
||||
expect(replaceBadges.length).toBeGreaterThanOrEqual(4);
|
||||
// sender + archiveBox + archiveFolder = 3
|
||||
expect(replaceBadges.length).toBeGreaterThanOrEqual(3);
|
||||
});
|
||||
|
||||
it('topbar reads "Massenbearbeitung" + "{count} werden bearbeitet" in edit mode', async () => {
|
||||
|
||||
@@ -207,7 +207,8 @@ async function handleReplaceFile(e: Event) {
|
||||
bind:tags={tags}
|
||||
bind:currentTitle={currentTitle}
|
||||
initialTitle={doc.title ?? ''}
|
||||
initialDocumentLocation={doc.documentLocation ?? ''}
|
||||
initialArchiveBox={doc.archiveBox ?? ''}
|
||||
initialArchiveFolder={doc.archiveFolder ?? ''}
|
||||
initialSummary={doc.summary ?? ''}
|
||||
titleRequired={true}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user