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