generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADJUST1-277 Edit links for add remand. (#103)
* ADJUST1-277 Edit links for add remand. * ADJUST1-277 Fix linting. * ADJUST1-277 Fixing content.
- Loading branch information
Showing
15 changed files
with
137 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Adjustment } from './adjustments/adjustmentsTypes' | ||
|
||
type SessionAdjustment = Adjustment & { | ||
complete?: boolean | ||
} | ||
|
||
export default SessionAdjustment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import SessionAdjustment from '../@types/AdjustmentTypes' | ||
import { PrisonApiPrisoner } from '../@types/prisonApi/prisonClientTypes' | ||
import RemandDatesForm from './remandDatesForm' | ||
|
||
export default class RemandDatesModel { | ||
constructor( | ||
public id: string, | ||
public prisonerDetail: PrisonApiPrisoner, | ||
public adjustments: SessionAdjustment[], | ||
public form: RemandDatesForm, | ||
) {} | ||
|
||
public backlink(): string { | ||
if (this.adjustments.length > 1 || this.adjustments[0].complete) { | ||
return `/${this.prisonerDetail.offenderNo}/remand/review` | ||
} | ||
return `/${this.prisonerDetail.offenderNo}` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.