Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24656 - Handle NoW Draft in ToDoList #118

Merged
merged 8 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/interfaces/tasks-i.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface TaskToDoI {
documents?: Array<any>
header: TaskApiHeaderI
incorporationApplication?: any
noticeOfWithdrawal?: any
registrarsNotation?: any
registrarsOrder?: any
registration?: any
Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/todo-i.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ export interface TodoItemI {
submitter?: string
submittedDate?: Date
latestReviewComment?: string

// Notice of Withdrawal only
filingToBeWithdrawn?: number
}
10 changes: 10 additions & 0 deletions src/utils/todo/action-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ export const doResumeFiling = (item: TodoItemI): void => {
params = { 'conversion-id': item.filingId.toString() }
break

case FilingTypes.NOTICE_OF_WITHDRAWAL:
// navigate to Notice of Withdrawal page of the old dashboard -- only available for staff account
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
navigateFn = goToBusinessDashboard
path = `/${currentBusinessIdentifier}/notice-of-withdrawal`
params = {
filingToBeWithdrawn: item.filingToBeWithdrawn.toString(),
filingId: item.filingId.toString()
}
break

case FilingTypes.SPECIAL_RESOLUTION:
// navigate to Edit UI to resume this Special Resolution
navigateFn = goToEditPage
Expand Down
2 changes: 2 additions & 0 deletions src/utils/todo/task-filing/content-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export const getDraftTitle = (filing: TaskToDoI): string => {
return filingTypeToName(FilingTypes.DISSOLUTION)
case FilingTypes.INCORPORATION_APPLICATION:
return FilingNames.INCORPORATION_APPLICATION
case FilingTypes.NOTICE_OF_WITHDRAWAL:
return FilingNames.NOTICE_OF_WITHDRAWAL
case FilingTypes.REGISTRATION:
return FilingNames.REGISTRATION
case FilingTypes.RESTORATION:
Expand Down
5 changes: 5 additions & 0 deletions src/utils/todo/task-filing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export const buildFilingTodo = async (task: TaskI): Promise<TodoItemI> => {
newTodo.comment = filingData.comment
}

// For NoW filing, add relevant fields to newTodo
if (isFilingType([FilingTypes.NOTICE_OF_WITHDRAWAL])) {
newTodo.filingToBeWithdrawn = filing.noticeOfWithdrawal.filingId
}
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved

// Add the actionButton for newTodo
addActionButton(newTodo)

Expand Down