Skip to content

Commit

Permalink
Merge pull request #97 from UN-OCHA/HPC-8026
Browse files Browse the repository at this point in the history
HPC-8026:Allow selecting monitoring periods to include in plan publishing
  • Loading branch information
Pl217 authored Jul 11, 2022
2 parents b3d7b7c + 1a94635 commit 601de5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unocha/hpc-api-core",
"version": "4.4.2",
"version": "4.4.3",
"description": "Core libraries supporting HPC.Tools API Backend",
"license": "Apache-2.0",
"private": false,
Expand Down
8 changes: 8 additions & 0 deletions src/db/models/planTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export type PlanTagId = Brand<

export const PLAN_TAG_ID = brandedType<number, PlanTagId>(t.number);

const PLAN_TAG_PUBLISH_TYPE = t.keyof({
major: null,
minor: null,
custom: null,
});

export const PLAN_TAG_REVISION_STATE = t.keyof({
none: null,
planDataAndProjects: null,
Expand All @@ -32,10 +38,12 @@ export default defineIDModel({
},
nonNullWithDefault: {
public: { kind: 'checked', type: t.boolean },
reportingPeriods: { kind: 'checked', type: t.array(t.number) },
},
optional: {
comment: { kind: 'checked', type: t.string },
revisionState: { kind: 'checked', type: PLAN_TAG_REVISION_STATE },
type: { kind: 'checked', type: PLAN_TAG_PUBLISH_TYPE },
},
},
idField: 'id',
Expand Down

0 comments on commit 601de5a

Please sign in to comment.