Skip to content

Commit

Permalink
fix: cleanup CaseInProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
Valur committed Oct 22, 2024
1 parent 928f7fe commit 28f6a63
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Locale } from '@island.is/shared/types'
import {
ContentLanguage,
CustomPageUniqueIdentifier,
OfficialJournalOfIcelandCase,
OfficialJournalOfIcelandCaseInProgress,
Query,
QueryGetOrganizationArgs,
QueryOfficialJournalOfIcelandCasesInProgressArgs,
Expand Down Expand Up @@ -85,9 +85,9 @@ const OJOICasesInProgressPage: CustomScreen<OJOICasesInProgressProps> = ({
<T.Row key={c.id}>
<T.Data>{formatDate(c.createdAt)}</T.Data>
<T.Data>{formatDate(c.requestedPublicationDate)}</T.Data>
<T.Data>{c.status.title}</T.Data>
<T.Data>{c.advertType.title + ' ' + c.advertTitle}</T.Data>
<T.Data>{c.involvedParty.title}</T.Data>
<T.Data>{c.status}</T.Data>
<T.Data>{c.title}</T.Data>
<T.Data>{c.involvedParty}</T.Data>
</T.Row>
))}
</T.Body>
Expand All @@ -98,7 +98,7 @@ const OJOICasesInProgressPage: CustomScreen<OJOICasesInProgressProps> = ({
}

interface OJOICasesInProgressProps {
cases?: Array<OfficialJournalOfIcelandCase>
cases?: Array<OfficialJournalOfIcelandCaseInProgress>
organization?: Query['getOrganization']
locale: Locale
}
Expand Down
14 changes: 4 additions & 10 deletions apps/web/screens/queries/OfficialJournalOfIceland.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,11 @@ export const CASES_IN_PROGRESS_QUERY = gql`
officialJournalOfIcelandCasesInProgress(params: $params) {
cases {
id
advertType {
title
}
advertTitle
status {
title
}
involvedParty {
title
}
title
status
involvedParty
createdAt
fastTrack
requestedPublicationDate
}
paging {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
import { Field, ID, ObjectType } from '@nestjs/graphql'
import { AdvertEntity } from './advert.model'

@ObjectType('OfficialJournalOfIcelandCase')
export class Case {
@ObjectType('OfficialJournalOfIcelandCaseInProgress')
export class CaseInProgress {
@Field(() => ID)
id!: string

@Field(() => AdvertEntity)
advertType!: AdvertEntity | null

@Field(() => String)
advertTitle!: string | null
title!: string | null

@Field(() => AdvertEntity)
involvedParty!: AdvertEntity | null
@Field(() => String)
involvedParty!: string | null

@Field(() => AdvertEntity)
status!: AdvertEntity | null
@Field(() => String)
status!: string | null

@Field(() => String)
createdAt!: string | null

@Field(() => String)
requestedPublicationDate!: string | null

@Field(() => Boolean)
fastTrack!: boolean | null
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Field, ObjectType } from '@nestjs/graphql'

import { AdvertPaging } from './advert-paging.model'
import { Case } from './case.model'
import { CaseInProgress } from './case.model'

@ObjectType('OfficialJournalOfIcelandCasesInProgressResponse')
export class CasesInProgressResponse {
@Field(() => [Case])
cases!: Case[]
@Field(() => [CaseInProgress])
cases!: CaseInProgress[]

@Field(() => AdvertPaging)
paging!: AdvertPaging
Expand Down
Loading

0 comments on commit 28f6a63

Please sign in to comment.