Skip to content

Commit

Permalink
Merge pull request #18 from Eyevinn/fix-lock-bug-solve
Browse files Browse the repository at this point in the history
fix: solve lock bug
  • Loading branch information
Saelmala authored Sep 20, 2024
2 parents c669245 + 81831c4 commit f0f99c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/production/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ export default function ProductionConfiguration({ params }: PageProps) {
<DndProvider backend={HTML5Backend}>
<SourceCards
productionSetup={productionSetup}
locked={locked}
updateProduction={(updated) => {
updateProduction(productionSetup._id, updated);
}}
Expand Down
4 changes: 3 additions & 1 deletion src/components/sourceCards/SourceCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import { ISource, useDragableItems } from '../../hooks/useDragableItems';

export default function SourceCards({
productionSetup,
locked,
updateProduction,
onSourceUpdate,
onSourceRemoval
}: {
productionSetup: Production;
locked: boolean;
updateProduction: (updated: Production) => void;
onSourceUpdate: (source: SourceReference, sourceItem: ISource) => void;
onSourceRemoval: (source: SourceReference) => void;
Expand Down Expand Up @@ -51,7 +53,7 @@ export default function SourceCards({
// console.log(`Removing source "${source.name}" from sources list`);
tempItems = tempItems.filter((i) => i._id !== source._id);
// console.log(`Adding source "${source.name}" to grid`);
if (!productionSetup.isActive) {
if (!productionSetup.isActive && !locked) {
gridItems.push(
<DragItem
key={`${source.ingest_source_name}-${source.input_slot}-key`}
Expand Down

0 comments on commit f0f99c5

Please sign in to comment.