Skip to content

Allow batch creation of custom item types - #2196

Open
jbouquiaux wants to merge 1 commit into
datalab-org:mainfrom
Matgenix:jbouquiaux/custom-types-batch-create
Open

jbouquiaux wants to merge 1 commit into
datalab-org:mainfrom
Matgenix:jbouquiaux/custom-types-batch-create

Conversation

@jbouquiaux

Copy link
Copy Markdown
Member

The batch create modal only offered samples/cells and submitted every non-sample row as type: "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 from CreateItemModal into a shared withCreatableDynamicTypes(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:
    • the type dropdown lists the built-in and creatable custom types;
    • rows are submitted with the selected type instead of a hardcoded samples/cells;
    • "Copy from" (template and per-row) only lists items of the selected type, and resets when the type changes.

Closes #2194

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

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.48%. Comparing base (ddb057c) to head (da6efff).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch item creation does not support custom item types

1 participant