This file contains hidden or 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
export function getFieldById(id: AssessmentFieldId): AssessmentField { | |
switch (id.type) { | |
case 'checklist-comment': | |
return checklistCommentField(id.key); | |
case 'document-environmental-effects': | |
return documentEnvironmentalEffectsAssessment(id.documentId); | |
case 'document-objectives-and-policies': | |
return documentObjectivesAndPoliciesAssessment(id.documentId); | |
case 'document-standard': | |
return documentStandardAssessment(id.standardId); |
This file contains hidden or 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
const publicSteps = [ | |
{ | |
name: 'Step 1 - Mandatory public notification in certain circumstances', | |
outcomes: [ | |
{ | |
value: 'required', | |
description: 'Required', | |
}, | |
{ | |
value: null, |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"test": { | |
"presets": [ | |
[ | |
"@babel/preset-env", | |
{ | |
"useBuiltIns": "usage", | |
"corejs": 3 | |
} |
This file contains hidden or 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
{ | |
"javascriptEnabled": true | |
} |
This file contains hidden or 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
@import "../node_modules/antd/dist/antd.less"; | |
// Used by Ant design | |
@primary-color: #fd6f26; | |
@text-color: #343434; | |
@layout-body-background: #ffffff; | |
@layout-header-background: #343434; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="shortcut icon" href="/assets/favicon.png" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="theme-color" content="#000000" /> | |
<link rel="manifest" href="assets/manifest.json" /> | |
<link rel="stylesheet" href="src/index.less" /> |
This file contains hidden or 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
console.log( | |
JSON.stringify({ | |
name: 'Resource Consent Application & Assessment of Environmental Effects', | |
title: 'Resource Consent Application & Assessment of Environmental Effects', | |
template: [ | |
{ | |
type: 'component', | |
componentName: 'TitlePage', | |
}, | |
{ |
This file contains hidden or 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
export default [ | |
{ | |
name: 'Resource Consent Application & Assessment of Environmental Effects', | |
title: 'Resource Consent Application & Assessment of Environmental Effects', | |
template: [ | |
{ | |
type: 'component', | |
componentName: 'TitlePage', | |
}, | |
{ |
This file contains hidden or 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
const { Crypto } = require("@peculiar/webcrypto"); | |
global.crypto = new Crypto(); | |
require("fast-text-encoding"); | |
const jsdom = require("jsdom"); | |
const { window } = new jsdom.JSDOM(``, { runScripts: "outside-only" }); | |
global.btoa = window.btoa; | |
global.atob = window.atob; | |
const SALT = "247 213 94 9 15 236 156 48 194 177 107 216 198 215 169 239"; |
This file contains hidden or 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
from functools import partial | |
from stringcase import snakecase | |
def recursively_convert_keys(conversion_fun, data): | |
""" | |
The first major change we're making is pulling the type check out of the loop. This reduces the number of cases | |
which we need to handle, and allows us to run the conversion with a dictionary or a list. | |
The second change is that we're not mutating the original input. This simplifies things because we don't have | |
to delete the old keys, and we don't need to worry about breaking things in code elsewhere. | |
""" |