Skip to content

Commit d37d457

Browse files
authored
Merge pull request #131 from o2Labs/129-reason-email
129 reason email
2 parents dafa58e + 4a5ed49 commit d37d457

19 files changed

+943
-764
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,20 @@ config:
9898
office-booker:system-admin-emails:
9999
100100
101+
office-booker:reason-to-book-req: true
102+
office-booker:notification-to-address: [email protected]
101103
```
102104
103-
_Note: The secure `selftest-key` can be generated and set by running:_
105+
_*Note:*_
106+
107+
_The secure `selftest-key` can be generated and set by running:_
104108

105109
```bash
106110
pulumi config set --secret selftest-key `openssl rand -base64 30`
107111
```
108112

113+
_If setting `reason-to-book-req` as true, you must also supply a `notification-to-address`._
114+
109115
## User Roles
110116

111117
Quotas are applied to all users regardless of role.

client/.eslintrc

+2-35
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,4 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"es6": true,
5-
"node": true,
6-
"jest": true
7-
},
8-
"plugins": ["@typescript-eslint", "prettier", "react", "react-hooks"],
9-
"extends": [
10-
"eslint:recommended",
11-
"plugin:react/recommended",
12-
"plugin:@typescript-eslint/recommended",
13-
"prettier/@typescript-eslint",
14-
"plugin:prettier/recommended"
15-
],
16-
"settings": {
17-
"react": {
18-
"pragma": "React",
19-
"version": "detect"
20-
}
21-
},
22-
"rules": {
23-
"prettier/prettier": ["error", { "singleQuote": true }],
24-
"@typescript-eslint/explicit-function-return-type": "off",
25-
"react-hooks/rules-of-hooks": "error",
26-
"react-hooks/exhaustive-deps": "warn"
27-
},
28-
"overrides": [
29-
{
30-
"files": ["**/*.tsx"],
31-
"rules": {
32-
"react/prop-types": "off"
33-
}
34-
}
35-
],
36-
"parser": "@typescript-eslint/parser"
2+
"extends": ["react-app", "react-app/jest", "plugin:prettier/recommended", "prettier"],
3+
"plugins": ["prettier"]
374
}

client/.prettierrc

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"trailingComma": "es5",
32
"printWidth": 100,
43
"singleQuote": true,
5-
"semi": true,
6-
"tabWidth": 2,
7-
"useTabs": false
4+
"semi": true
85
}

client/.stylelintrc

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"stylelint-processor-styled-components"
44
],
55
"extends": [
6-
"stylelint-config-recommended",
7-
"stylelint-config-styled-components",
8-
"stylelint-config-prettier"
6+
"stylelint-prettier/recommended",
7+
"stylelint-config-styled-components"
98
]
109
}

client/package.json

+16-20
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@
1212
"eject": "react-scripts eject"
1313
},
1414
"dependencies": {
15-
"@aws-amplify/auth": "^3.2.5",
15+
"@aws-amplify/auth": "^3.4.16",
1616
"@date-io/date-fns": "1.x",
1717
"@loadable/component": "^5.14.1",
1818
"@material-ui/core": "^4.6.1",
1919
"@material-ui/icons": "^4.9.1",
2020
"@material-ui/lab": "^4.0.0-alpha.54",
2121
"@material-ui/pickers": "^3.2.10",
2222
"@reach/router": "^1.3.3",
23+
"@testing-library/user-event": "^12.6.0",
2324
"@types/loadable__component": "^5.13.1",
24-
"amazon-cognito-identity-js": "^4.2.2",
25+
"amazon-cognito-identity-js": "^4.5.6",
2526
"array-fns": "^1.0.0",
26-
"core-js": "^3.6.5",
27+
"core-js": "^3.8.2",
2728
"date-fns": "^2.12.0",
2829
"lodash": "^4.17.19",
2930
"react": "17.x",
@@ -33,34 +34,29 @@
3334
"whatwg-fetch": "^3.4.1"
3435
},
3536
"devDependencies": {
36-
"@testing-library/jest-dom": "^5.11.5",
37+
"@testing-library/jest-dom": "^5.11.8",
3738
"@testing-library/react": "^11.1.1",
3839
"@types/date-fns": "^2.6.0",
39-
"@types/jest": "^26.0.13",
40-
"@types/node": "^14.x",
40+
"@types/jest": "^26.0.20",
41+
"@types/node": "^14.14.20",
4142
"@types/reach__router": "^1.3.5",
42-
"@types/react": "^16.9.34",
43-
"@types/react-dom": "^16.9.7",
44-
"@types/styled-components": "^5.1.0",
45-
"@typescript-eslint/eslint-plugin": "^4.1.0",
46-
"@typescript-eslint/parser": "^4.1.0",
43+
"@types/react": "^17.0.0",
44+
"@types/react-dom": "^17.0.0",
45+
"@types/styled-components": "^5.1.7",
4746
"babel-plugin-styled-components": "^1.10.6",
48-
"eslint": "7.x",
49-
"eslint-config-prettier": "^6.11.0",
50-
"eslint-config-react": "^1.1.7",
51-
"eslint-plugin-import": "^2.20.2",
52-
"eslint-plugin-prettier": "^3.1.3",
53-
"eslint-plugin-react": "^7.19.0",
47+
"eslint-config-prettier": "^7.1.0",
48+
"eslint-plugin-prettier": "^3.3.1",
5449
"jest-styled-components": "^7.0.2",
55-
"msw": "^0.21.3",
50+
"msw": "^0.25.0",
5651
"prettier": "^2.0.5",
5752
"react-scripts": "4.x",
5853
"stylelint": "^13.3.3",
5954
"stylelint-config-prettier": "^8.0.1",
60-
"stylelint-config-recommended": "^3.0.0",
6155
"stylelint-config-styled-components": "^0.1.1",
56+
"stylelint-prettier": "^1.1.2",
6257
"stylelint-processor-styled-components": "^1.8.0",
63-
"typescript": "4.x"
58+
"typescript": "4.1.3",
59+
"web-vitals": "^1.0.1"
6460
},
6561
"proxy": "http://localhost:3030/"
6662
}

client/src/components/App/Home/MakeBooking.styles.ts

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ export default styled.div`
3636
font-weight: bold;
3737
}
3838
39+
> p.notice {
40+
${(props) => props.theme.breakpoints.up('xs')} {
41+
margin: 1.6rem 0 0;
42+
}
43+
44+
${(props) => props.theme.breakpoints.up('sm')} {
45+
margin: 2rem 0 0;
46+
}
47+
48+
color: #e21c33;
49+
}
50+
3951
> ul {
4052
${(props) => props.theme.breakpoints.up('xs')} {
4153
margin: 1.6rem 0 0;

0 commit comments

Comments
 (0)