Skip to content

Commit

Permalink
fix(chip action type): Set action type to Amend for CHIP spa submissi…
Browse files Browse the repository at this point in the history
…ons (#401)

* Set action type for chip

* Correct logic error
  • Loading branch information
mdial89f authored Feb 21, 2024
1 parent 5e4dbe1 commit 6233cf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/shared-types/action-types/new-submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { attachmentSchema } from "../attachments";
// This is the event schema for ne submissions from our system
export const onemacSchema = z.object({
authority: z.string(),
seaActionType: z.string().optional(), // Used by waivers.
seaActionType: z.string().optional(), // Used by waivers and chip spas
origin: z.string(),
additionalInformation: z.string().nullable().default(null),
submitterName: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/handlers/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const submit = async (event: APIGatewayEvent) => {

const result = await sql.query(query);
console.log(result);
if (body.authority == Authority["1915b"]) {
if ([Authority["1915b"], Authority.CHIP_SPA].includes(body.authority)) {
const actionTypeQuery = `
UPDATE SEA.dbo.State_Plan
SET Action_Type = (
Expand Down
1 change: 1 addition & 0 deletions src/services/ui/src/pages/form/chip-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const formSchema = z.object({
other: zAttachmentOptional,
}),
proposedEffectiveDate: z.date(),
seaActionType: z.string().default("Amend"),
});
type ChipFormSchema = z.infer<typeof formSchema>;

Expand Down

0 comments on commit 6233cf7

Please sign in to comment.