Skip to content

Commit

Permalink
Merge branch 'development' into 4001-datatable-use-datagrid
Browse files Browse the repository at this point in the history
  • Loading branch information
yaguzmang authored Dec 30, 2024
2 parents 325b649 + cb9dcf5 commit 67e09bb
Show file tree
Hide file tree
Showing 106 changed files with 19 additions and 28,593 deletions.
11 changes: 7 additions & 4 deletions src/server/repository/assessment/section/getMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import { Assessment, Cycle, Section } from 'meta/assessment'
import { BaseProtocol, DB, Schemas } from 'server/db'
import { SectionAdapter } from 'server/repository/adapter'

export const getMany = async (
props: { assessment: Assessment; cycle: Cycle; showHidden?: boolean },
client: BaseProtocol = DB
): Promise<Array<Section>> => {
type Props = {
assessment: Assessment
cycle: Cycle
showHidden?: boolean
}

export const getMany = async (props: Props, client: BaseProtocol = DB): Promise<Array<Section>> => {
const { assessment, cycle, showHidden = false } = props
const schemaName = Schemas.getName(assessment)

Expand Down
23 changes: 12 additions & 11 deletions src/server/repository/assessment/section/getManyMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import { Assessment, Cycle, TableSection } from 'meta/assessment'
import { Assessment, Cycle, SectionName, TableSection } from 'meta/assessment'

import { BaseProtocol, DB, Schemas } from 'server/db'
import { TableSectionAdapter } from 'server/repository/adapter'

export const getManyMetadata = async (
props: {
assessment: Assessment
sectionNames?: Array<string>
cycle: Cycle
showHidden?: boolean
},
client: BaseProtocol = DB
): Promise<Record<string, Array<TableSection>>> => {
type Props = {
assessment: Assessment
cycle: Cycle
sectionNames?: Array<SectionName>
showHidden?: boolean
}

type RecordTableSections = Record<SectionName, Array<TableSection>>

export const getManyMetadata = async (props: Props, client: BaseProtocol = DB): Promise<RecordTableSections> => {
const { cycle, sectionNames, assessment, showHidden = false } = props
const schemaName = Schemas.getName(assessment)

// @ts-ignore
return client.result<Record<string, Array<TableSection>>>(
return client.result<RecordTableSections>(
`
with "row" as (select s.props ->> 'name' as section_name,
to_jsonb(ts.*) as table_section,
Expand Down
11 changes: 0 additions & 11 deletions src/test/dataMigration/jest.config.js

This file was deleted.

62 changes: 0 additions & 62 deletions src/test/dataMigration/panEuPostDataMigration.ts

This file was deleted.

120 changes: 0 additions & 120 deletions src/test/dataMigration/postDataMigration.ts

This file was deleted.

Loading

0 comments on commit 67e09bb

Please sign in to comment.