Skip to content

Commit

Permalink
fixed selecting a spool with filament weight but no spool switching t…
Browse files Browse the repository at this point in the history
…o the remaining weight option
  • Loading branch information
TomW1605 committed Aug 31, 2023
1 parent f9a987b commit d4f0a03
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/src/pages/spools/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ export const SpoolCreate: React.FC<IResourceComponentsProps & CreateOrCloneProps
const newFilamentWeight = newSelectedFilament?.weight || 0;
const newSpoolWeight = newSelectedFilament?.spool_weight || 0;

if (!(newFilamentWeight && newSpoolWeight)) {
setWeightToEnter(2);
if (weightToEnter >= 3) {
if (!(newFilamentWeight && newSpoolWeight)) {
setWeightToEnter(2);
}
}
if (!newFilamentWeight) {
setWeightToEnter(1);
if (weightToEnter >= 2) {
if (!newFilamentWeight) {
setWeightToEnter(1);
}
}
};

Expand Down

0 comments on commit d4f0a03

Please sign in to comment.