-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into enhancement/map
- Loading branch information
Showing
16 changed files
with
116 additions
and
63 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
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
18 changes: 15 additions & 3 deletions
18
server/modules/surveyRdb/repository/schemaRdbRepository.js
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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
import * as SchemaRdb from '@common/surveyRdb/schemaRdb' | ||
import { Schemata } from '@common/model/db' | ||
|
||
import { db } from '@server/db/db' | ||
|
||
export const dropSchema = async (surveyId, client = db) => | ||
client.query(`DROP SCHEMA IF EXISTS ${SchemaRdb.getName(surveyId)} CASCADE`) | ||
client.query(`DROP SCHEMA IF EXISTS ${Schemata.getSchemaSurveyRdb(surveyId)} CASCADE`) | ||
|
||
export const createSchema = async (surveyId, client = db) => | ||
client.query(`CREATE SCHEMA ${SchemaRdb.getName(surveyId)}`) | ||
client.query(`CREATE SCHEMA ${Schemata.getSchemaSurveyRdb(surveyId)}`) | ||
|
||
export const selectSchemaExists = async (surveyId, client = db) => { | ||
const result = await client.one( | ||
` | ||
SELECT COUNT(*) = 1 AS res | ||
FROM information_schema.schemata | ||
WHERE schema_name = $1 | ||
`, | ||
[Schemata.getSchemaSurveyRdb(surveyId)] | ||
) | ||
return result.res | ||
} |
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
20 changes: 13 additions & 7 deletions
20
webapp/views/App/views/Data/Records/HeaderLeft/HeaderLeft.scss
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 |
---|---|---|
@@ -1,16 +1,22 @@ | ||
@import 'webapp/style/vars'; | ||
|
||
$tableHeaderHeight: 40px; | ||
$tableHeaderHeight: 30px; | ||
|
||
.records__header-left { | ||
display: flex; | ||
align-items: center; | ||
height: $tableHeaderHeight; | ||
column-gap: 1rem; | ||
} | ||
|
||
.records__header-left__input-search { | ||
padding: 0px 5px; | ||
border: 1px solid $greyBorder; | ||
background: white; | ||
width: 15rem; | ||
button, | ||
.btn { | ||
padding: 0.5rem 0.8rem; | ||
} | ||
|
||
.records__header-left__input-search { | ||
padding: 5px 5px; | ||
border: 1px solid $greyBorder; | ||
background: white; | ||
width: 15rem; | ||
} | ||
} |
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.