fixed selecting a spool with filament weight but no spool switching to the remaining weight option

This commit is contained in:
Thomas White
2023-08-31 14:39:40 +08:00
parent f9a987b196
commit d4f0a03a26

View File

@@ -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);
}
}
};