Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Followup konveyor#1404 to update the way tags are updated to an existing application. Tags that are from an analysis need to be included with the update payload or they will be removed. This is different behavior from archetype or assessment tags. No updates to an application can remove archetype or assessment tags. Summary of changes and refactoring: - As form values, keep the tags using just the tag name as a string - Moved all data access/mutation code to hook `useApplicationFormData()` to logically divide concerns (data access v. UI handling) - Tags dropdown will only display/edit the application's "Manual tags" - `onSubmit()`'s payload building simplified using partially curried helper functions - Migrate to use `ItemsSelect` for handling the Tags Update `useUpdateApplicationMutation()` to provide the mutation's payload to the `onSuccess()` function. This allows the `onSuccess()` function to toast a message with the application's name. Add utility functions to `model-utils.tsx`: - convert objects that look like `Ref` object into exactly a `Ref` object: - toRef() - toRefs() - Match a set of items that look like `Ref` objects against a (set of) values and the matching matches as exactly `Ref` objects: items into exactly `Ref` objects: - matchItemsToRef() - matchItemsToRefs() Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
- Loading branch information