Skip to content

Commit

Permalink
chore: nx format:write update dirty files
Browse files Browse the repository at this point in the history
  • Loading branch information
andes-it committed Dec 27, 2024
1 parent 9ce28d9 commit beecd8e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const strings = defineMessages({
},
changeReviewedDecisionButtonText: {
id: 'judicial.system.core:public_prosecutor.indictments.overview.change_reviewed_decision_button_text',
defaultMessage:'Breyta ákvörðun?',
description: 'Notaður sem texti fyrir staðfestingartakka þegar ákvörðun ríkissaksóknara er breytt.',
defaultMessage: 'Breyta ákvörðun?',
description:
'Notaður sem texti fyrir staðfestingartakka þegar ákvörðun ríkissaksóknara er breytt.',
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ import {
import { useCase } from '@island.is/judicial-system-web/src/utils/hooks'

import { ReviewDecision } from '../../components/ReviewDecision/ReviewDecision'
import { CONFIRM_PROSECUTOR_DECISION, ConfirmationModal, isReviewerAssignedModal, REVIEWER_ASSIGNED } from '../../components/utils'
import {
CONFIRM_PROSECUTOR_DECISION,
ConfirmationModal,
isReviewerAssignedModal,
REVIEWER_ASSIGNED,
} from '../../components/utils'
import { IndictmentReviewerSelector } from './IndictmentReviewerSelector'
import { strings } from './Overview.strings'


export const Overview = () => {
const router = useRouter()
const { formatMessage: fm } = useIntl()
Expand All @@ -42,7 +46,9 @@ export const Overview = () => {
const [isReviewedDecisionChanged, setIsReviewedDecisionChanged] =
useState<boolean>(false)

const [confirmationModal, setConfirmationModal] = useState<ConfirmationModal | undefined>();
const [confirmationModal, setConfirmationModal] = useState<
ConfirmationModal | undefined
>()

// const lawsBroken = useIndictmentsLawsBroken(workingCase) NOTE: Temporarily hidden while list of laws broken is not complete

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { ConfirmationModal, isConfirmProsecutorDecisionModal } from '../utils'
import { strings } from './ReviewDecision.strings'
import * as styles from './ReviewDecision.css'


interface Props {
caseId: string
currentDecision?: IndictmentCaseReviewDecision
Expand All @@ -35,14 +34,13 @@ interface Props {
onChange?: (decision: IndictmentCaseReviewDecision) => void
}


export const ReviewDecision: FC<Props> = (props) => {
const {
caseId,
currentDecision,
indictmentAppealDeadline,
indictmentAppealDeadlineIsInThePast,
modalVisible,
modalVisible,
setModalVisible,
isFine,
onSelect,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
export const CONFIRM_PROSECUTOR_DECISION = 'CONFIRM_PROSECUTOR_DECISION'
export const REVIEWER_ASSIGNED = 'REVIEWER_ASSIGNED'

export type ConfirmationModal = typeof REVIEWER_ASSIGNED | typeof CONFIRM_PROSECUTOR_DECISION

export const isReviewerAssignedModal = (modal?: ConfirmationModal) => modal === REVIEWER_ASSIGNED
export const isConfirmProsecutorDecisionModal = (modal?: ConfirmationModal) => modal === CONFIRM_PROSECUTOR_DECISION
export type ConfirmationModal =
| typeof REVIEWER_ASSIGNED
| typeof CONFIRM_PROSECUTOR_DECISION

export const isReviewerAssignedModal = (modal?: ConfirmationModal) =>
modal === REVIEWER_ASSIGNED
export const isConfirmProsecutorDecisionModal = (modal?: ConfirmationModal) =>
modal === CONFIRM_PROSECUTOR_DECISION
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ import {
} from '@island.is/judicial-system-web/src/graphql/schema'

import { ReviewDecision } from '../../PublicProsecutor/components/ReviewDecision/ReviewDecision'
import { CONFIRM_PROSECUTOR_DECISION, ConfirmationModal } from '../../PublicProsecutor/components/utils'
import {
CONFIRM_PROSECUTOR_DECISION,
ConfirmationModal,
} from '../../PublicProsecutor/components/utils'
import { strings } from './IndictmentOverview.strings'

interface ServiceAnnouncementProps {
Expand Down Expand Up @@ -106,7 +109,9 @@ const IndictmentOverview: FC = () => {
const latestDate = workingCase.courtDate ?? workingCase.arraignmentDate
const caseIsClosed = isCompletedCase(workingCase.state)

const [modalVisible, setModalVisible] = useState<ConfirmationModal | undefined>()
const [modalVisible, setModalVisible] = useState<
ConfirmationModal | undefined
>()
const [isReviewDecisionSelected, setIsReviewDecisionSelected] =
useState(false)

Expand Down

0 comments on commit beecd8e

Please sign in to comment.