diff --git a/package-lock.json b/package-lock.json index 222fcf3..2c64e83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "mui-tel-input": "^7.0.0", "notistack": "^3.0.1", "openweathermap-ts": "^1.2.10", - "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#beans", + "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#component_quack", "query-string": "^9.2.1", "react": "^18.3.1", "react-beautiful-dnd": "^13.1.1", @@ -10911,7 +10911,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#f09196cbc38911bab69fb35c16b1c8f691a4413f", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#4e16c7a754503111aad27eeaef98069f95451e59", "dependencies": { "protobufjs": "^6.8.8" } diff --git a/package.json b/package.json index 5a27ce1..1a32f62 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "mui-tel-input": "^7.0.0", "notistack": "^3.0.1", "openweathermap-ts": "^1.2.10", - "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#beans", + "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#component_quack", "query-string": "^9.2.1", "react": "^18.3.1", "react-beautiful-dnd": "^13.1.1", diff --git a/src/component/ComponentForm.tsx b/src/component/ComponentForm.tsx index ef61681..08d6117 100644 --- a/src/component/ComponentForm.tsx +++ b/src/component/ComponentForm.tsx @@ -482,7 +482,7 @@ export default function ComponentForm(props: Props) { const updateCalibrationTypes = (event: any, index: number) => { let f = cloneDeep(form); - f.component.settings.calibrations[index].type = event.target.value as quack.MeasurementType; + f.component.settings.calibrations[index].measurementType = event.target.value as quack.MeasurementType; setForm(f); }; @@ -508,7 +508,7 @@ export default function ComponentForm(props: Props) { if (dimensions !== undefined && dimensions !== null) { dimensions.lengthCm = value; } else { - dimensions = pond.Dimensions.create({ + dimensions = quack.Dimensions.create({ heightCm: 0, lengthCm: value, widthCm: 0 @@ -537,7 +537,7 @@ export default function ComponentForm(props: Props) { if (dimensions !== undefined && dimensions !== null) { dimensions.heightCm = value; } else { - dimensions = pond.Dimensions.create({ + dimensions = quack.Dimensions.create({ heightCm: value, lengthCm: 0, widthCm: 0 @@ -566,7 +566,7 @@ export default function ComponentForm(props: Props) { if (dimensions !== undefined && dimensions !== null) { dimensions.widthCm = value; } else { - dimensions = pond.Dimensions.create({ + dimensions = quack.Dimensions.create({ heightCm: 0, lengthCm: 0, widthCm: value @@ -788,7 +788,7 @@ export default function ComponentForm(props: Props) { // !isMeasurementTypeValid(interaction.settings.conditions[index].measurementType) // } disabled={!component.settings.calibrate} - value={calibration.type ?? quack.MeasurementType.MEASUREMENT_TYPE_INVALID} + value={calibration.measurementType ?? quack.MeasurementType.MEASUREMENT_TYPE_INVALID} onChange={event => updateCalibrationTypes(event, i)} autoFocus={false} margin="normal" @@ -814,8 +814,8 @@ export default function ComponentForm(props: Props) { f.coefficients.push("0"); f.offsets.push("0"); f.component.settings.calibrations.push( - pond.Calibration.create({ - type: quack.MeasurementType.MEASUREMENT_TYPE_INVALID, + quack.Calibration.create({ + measurementType: quack.MeasurementType.MEASUREMENT_TYPE_INVALID, calibrationOffset: 0, calibrationCoefficient: 0 })