chore: checklist ux flow redesign (#3418)

* chore: ux flow redesign

* chore: remove unused imports

* fix: allow creation of tasks of the same name

* chore: apply code suggestions from Mathias
This commit is contained in:
Richard Shiue
2023-09-22 09:33:24 +08:00
committed by GitHub
parent 6ba7fc0317
commit 3c65a96b04
8 changed files with 131 additions and 174 deletions

View File

@ -87,7 +87,7 @@ impl CellDataChangeset for ChecklistTypeOption {
#[inline]
fn update_cell_data_with_changeset(
cell_data: &mut ChecklistCellData,
mut changeset: ChecklistCellChangeset,
changeset: ChecklistCellChangeset,
) {
// Delete the options
cell_data
@ -98,12 +98,6 @@ fn update_cell_data_with_changeset(
.retain(|option_id| !changeset.delete_option_ids.contains(option_id));
// Insert new options
changeset.insert_options.retain(|option_name| {
!cell_data
.options
.iter()
.any(|option| option.name == *option_name)
});
changeset
.insert_options
.into_iter()