Repository navigation
Allow batch creation of custom item types - #2196
Open
jbouquiaux wants to merge 1 commit into
Open
jbouquiaux wants to merge 1 commit into
jbouquiaux wants to merge 1 commit into
Conversation
The batch create modal only offered `samples`/`cells` and submitted any non-sample row as `type: "cells"`. It now offers the same creatable custom types as the single-item modal (via a shared `withCreatableDynamicTypes` helper), submits the selected type, picks the constituent columns from the type's base type, and restricts "Copy from" to items of the selected type.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2196 +/- ##
=======================================
Coverage 82.48% 82.48%
=======================================
Files 91 91
Lines 8782 8782
=======================================
Hits 7244 7244
Misses 1538 1538 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The batch create modal only offered
samples/cellsand submitted every non-sample row astype: "cells". It now supports the same custom item types as the single-item create modal.Changes
resources.js: move the "built-in + creatable custom types" logic fromCreateItemModalinto a sharedwithCreatableDynamicTypes(allowedTypes, schemas)helper. As before, custom types are only added in a samples-table context, never in the inventory modals.CreateItemModal.vue: use the helper. No behaviour change.BatchCreateItemModal.vue:samples/cells;Closes #2194