Skip to content

Commit

Permalink
Type ProjectStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley committed Oct 26, 2023
1 parent dca6893 commit 9c5d53b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/app/components/new/project-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { tracked } from "@glimmer/tracking";
import FlashMessageService from "ember-cli-flash/services/flash-messages";
import { task } from "ember-concurrency";
import FetchService from "hermes/services/fetch";
import { ProjectStatus } from "hermes/types/project-status";
import cleanString from "hermes/utils/clean-string";

interface NewProjectFormComponentSignature {
Expand Down Expand Up @@ -63,6 +64,7 @@ export default class NewProjectFormComponent extends Component<NewProjectFormCom
body: JSON.stringify({
title: cleanString(this.title),
description: cleanString(this.description),
status: ProjectStatus.Active,
}),
})
.then((response) => response?.json());
Expand Down
5 changes: 5 additions & 0 deletions web/app/types/project-status.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export enum ProjectStatus {
Active = "active",
Completed = "completed",
Archived = "archived",
}
2 changes: 2 additions & 0 deletions web/app/types/project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import {
RelatedExternalLink,
RelatedHermesDocument,
} from "hermes/components/related-resources";
import { ProjectStatus } from "./project-status";

export interface HermesProject {
id: string; // at least in Mirage...
title: string;
status: ProjectStatus;
documents?: RelatedHermesDocument[];
description?: string;
jiraObject?: {
Expand Down

0 comments on commit 9c5d53b

Please sign in to comment.