Skip to content

Commit

Permalink
Be able to remove advanced fields from destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
sp90 committed Nov 5, 2024
1 parent 097433d commit b35206f
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 208 deletions.
28 changes: 28 additions & 0 deletions src/app/backup/backup.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,34 @@ export class BackupState {
.filter((x) => this.selectedAdvancedOptions()?.findIndex((y) => y.name === x.Name) === -1);
});

addAdvancedFormPair(item: FormView) {
this.selectedAdvancedFormPair.update((y) => {
y.push(item);

return y;
});

this.notSelectedAdvancedFormPair.update((y) => {
y = y.filter((x) => x.name !== item.name);

return y;
});
}

removeAdvancedFormPair(item: FormView) {
this.notSelectedAdvancedFormPair.update((y) => {
y.push(item);

return y;
});

this.selectedAdvancedFormPair.update((y) => {
y = y.filter((x) => x.name !== item.name);

return y;
});
}

init(id: 'new' | 'string' = 'new', isDraft = false) {
this.backupId.set(id);

Expand Down
Loading

0 comments on commit b35206f

Please sign in to comment.