Skip to content

Commit

Permalink
Merge pull request #16 from paneron/12-integer
Browse files Browse the repository at this point in the history
fix(gr-sheet): Add support for Integer
  • Loading branch information
ribose-jeffreylau authored Jan 2, 2025
2 parents f5f0423 + 9d7b7e8 commit 1d3f21b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/gr-sheet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { teeAsync } from '../../common/src/util.js';
export const ParameterType = {
FILE: 'parameter file name',
MEASURE: 'measure (w/ UoM)',
INTEGER_VALUE: 'integer value',
} as const;


Expand Down Expand Up @@ -745,10 +746,12 @@ const SupportedSheets = {
parameter: resolveReference(parameter, 'id') as string | Predicate,
type: type === "Reference File"
? ParameterType.FILE
: type === "Integer"
? ParameterType.INTEGER_VALUE
: ParameterType.MEASURE,
unitOfMeasurement: type !== "Reference File"
? resolveReference(unitOfMeasurement, 'id') as string | Predicate
: null,
unitOfMeasurement: ["Reference File", 'Integer'].includes(type)
? null
: resolveReference(unitOfMeasurement, 'id') as string | Predicate,
value: type === "Reference File"
? fileRef
: value,
Expand Down

0 comments on commit 1d3f21b

Please sign in to comment.