Skip to content

Commit

Permalink
feat: add new application status
Browse files Browse the repository at this point in the history
  • Loading branch information
JomnoiZ committed Jan 6, 2025
1 parent 69da1f1 commit 72a8604
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/core/components/profile/stepCardList.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ const StepCardList: React.FC<StepCardListProps> = ({ status, lgCode, firstname,
props[5] = { step: 5, status: "complete", isApproved: "true" }
props[6] = { step: 6, status: "inProgress", isApproved: "true" }
break
case ProfileStatus.passedTheCamp:
props[1] = { step: 1, status: "complete", isApproved: "true" }
props[2] = { step: 2, status: "complete", isApproved: "true" }
props[3] = { step: 3, status: "complete", isApproved: "true" }
props[4] = { step: 4, status: "complete", isApproved: "true" }
props[5] = { step: 5, status: "complete", isApproved: "true" }
props[6] = { step: 6, status: "complete", isApproved: "true" }
break
case ProfileStatus.paymentFailed:
props[1] = { step: 1, status: "complete", isApproved: "true" }
props[2] = { step: 2, status: "complete", isApproved: "true" }
Expand Down
1 change: 1 addition & 0 deletions src/core/models/dto/application.dto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type ApplicationState =
| "REJECTED_FAILED_THE_INTERVIEW"
| "PAYMENT_ACCEPTED"
| "REJECTED_FAIL_TO_PAY"
| "PASSED_THE_CAMP"

export type FileStatus = "EMPTY" | "UPLOADED" | "CHANGE_REQUIRED" | "PASSED"

Expand Down
3 changes: 2 additions & 1 deletion src/core/models/profileStatus.model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export enum ProfileStatus {
passedInterview = "passedInterview",
failedInterview = "failedInterview",
paymentAccepted = "paymentAccepted",
paymentFailed = "paymentFailed"
paymentFailed = "paymentFailed",
passedTheCamp = "passedTheCamp"
}
3 changes: 2 additions & 1 deletion src/modules/profile.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ const ProfileModule = () => {
PASSED_INTERVIEW: ProfileStatus.passedInterview,
REJECTED_FAILED_THE_INTERVIEW: ProfileStatus.failedInterview,
PAYMENT_ACCEPTED: ProfileStatus.paymentAccepted,
REJECTED_FAIL_TO_PAY: ProfileStatus.paymentFailed
REJECTED_FAIL_TO_PAY: ProfileStatus.paymentFailed,
PASSED_THE_CAMP: ProfileStatus.passedTheCamp
}

const profileStatus = applicationState === "SUBMITTED" ? profileStatusMap[applicationState][fileStatus] : profileStatusMap[applicationState]
Expand Down

0 comments on commit 72a8604

Please sign in to comment.