Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD 272: decs integration #110

Merged
merged 61 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c1812d2
Add sql-producer behaviour and instructions for setting up local stac…
Mar 2, 2021
caf52b6
Add behaviour to convert form complaints data to fit DECS schema
Mar 8, 2021
7fa9ecf
Add tests checking complaint data formatting is correct
Mar 15, 2021
dc59eb4
Update node version and sql queue config
MaxOSullivan Mar 29, 2021
4d753af
Update eslint version and fix linting errors
Apr 13, 2021
8bb2634
Add function to convert enums across complaint types to base complain…
Apr 14, 2021
bec1e53
inject validator as argument to validAgainstSchema, add validatorFactory
Apr 15, 2021
147c0f9
Add logging of send to queue response
Apr 15, 2021
adb6736
changed preprod namespace to new preprod namespace
Apr 16, 2021
ab0a748
Merge pull request #113 from UKHomeOffice/SD-710-new-preprod-env
James-Hovell Apr 16, 2021
7e94623
SD-720: Fixed eslint errors and upgraded eslint
SarahJaneLuff Apr 16, 2021
0f4f072
Merge pull request #114 from UKHomeOffice/feature/SD-720-Update-Linti…
joehod Apr 16, 2021
ceac847
Add tests for send-to-sqs
Apr 16, 2021
56f16ff
Add meaningful error messages to util functions
Apr 16, 2021
bd50ba9
readme
Apr 16, 2021
9332cd7
Merge pull request #115 from UKHomeOffice/SD-710-new-preprod-env
James-Hovell Apr 16, 2021
2dc5afa
Add sql-producer behaviour and instructions for setting up local stac…
Mar 2, 2021
ee3a483
Add behaviour to convert form complaints data to fit DECS schema
Mar 8, 2021
ef7868c
Add tests checking complaint data formatting is correct
Mar 15, 2021
97e0962
Update node version and sql queue config
MaxOSullivan Mar 29, 2021
aa751ef
Update eslint version and fix linting errors
Apr 13, 2021
38ced3b
Add function to convert enums across complaint types to base complain…
Apr 14, 2021
683244a
inject validator as argument to validAgainstSchema, add validatorFactory
Apr 15, 2021
d2d779a
Add logging of send to queue response
Apr 15, 2021
17b336c
Add tests for send-to-sqs
Apr 16, 2021
26f30e9
Add meaningful error messages to util functions
Apr 16, 2021
19a3e91
rebase from master
Apr 19, 2021
e5ece04
Update package lock
Apr 19, 2021
33cc247
SD-725: Upgrade Node Version to 14
SarahJaneLuff Apr 19, 2021
3302c4d
SD-725: Corrected Typo Error in .drone.yml file for feature branch ev…
SarahJaneLuff Apr 19, 2021
a2a6656
Merge pull request #119 from UKHomeOffice/feature/SD-725-upgrade-Node…
sulthan-ahmed Apr 19, 2021
4dc8ea8
formatting for kube change
Apr 19, 2021
8a7409b
Merge pull request #120 from UKHomeOffice/SD-710-new-preprod-env
James-Hovell Apr 19, 2021
29d5113
SD-725: Added tagging conditional of kube repo in drone.yml file, to …
SarahJaneLuff Apr 19, 2021
b92e1e3
Merge pull request #121 from UKHomeOffice/feature/SD-725-upgrade-Node…
James-Hovell Apr 19, 2021
79923b9
Refactor to json converters to functional approach
Apr 20, 2021
8abd40d
Add sql-producer behaviour and instructions for setting up local stac…
Mar 2, 2021
861cfff
Add behaviour to convert form complaints data to fit DECS schema
Mar 8, 2021
7bcaeb2
Add tests checking complaint data formatting is correct
Mar 15, 2021
f7e8dbe
Update node version and sql queue config
MaxOSullivan Mar 29, 2021
6b20185
Update eslint version and fix linting errors
Apr 13, 2021
3f33545
Add function to convert enums across complaint types to base complain…
Apr 14, 2021
fa6c93a
inject validator as argument to validAgainstSchema, add validatorFactory
Apr 15, 2021
97ca852
Add logging of send to queue response
Apr 15, 2021
56eef15
Add tests for send-to-sqs
Apr 16, 2021
5ceadf3
Add meaningful error messages to util functions
Apr 16, 2021
fd2b544
rebase from master
Apr 19, 2021
86c159b
Add sql-producer behaviour and instructions for setting up local stac…
Mar 2, 2021
3dba7d9
Add behaviour to convert form complaints data to fit DECS schema
Mar 8, 2021
4bc627f
Add tests checking complaint data formatting is correct
Mar 15, 2021
7410edf
Update node version and sql queue config
MaxOSullivan Mar 29, 2021
5738272
Update eslint version and fix linting errors
Apr 13, 2021
502e0c9
Add function to convert enums across complaint types to base complain…
Apr 14, 2021
d9d2f1c
inject validator as argument to validAgainstSchema, add validatorFactory
Apr 15, 2021
5b492db
Add logging of send to queue response
Apr 15, 2021
fd0d8f0
Add tests for send-to-sqs
Apr 16, 2021
5014a42
Add meaningful error messages to util functions
Apr 16, 2021
ec748b4
Refactor to json converters to functional approach
Apr 20, 2021
fdfbf89
Fix merge conflicts with remote
Apr 20, 2021
4445851
Fix sendToQueue config option and add test
Apr 20, 2021
f8bb068
Add fallback stub email to config
Apr 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ overrides:
rules:
implicit-dependencies/no-implicit: [error, { dev: true }]
max-nested-callbacks: off
complexity: [error, 40]
globals:
chai: true
sinon: true
Expand All @@ -22,3 +23,7 @@ overrides:
submitPage: true
getErrorSummaries: true
getErrorMessages: true
- files:
"apps/ukvi-complaints/behaviours/*.js"
rules:
complexity: [error, 40]
4 changes: 3 additions & 1 deletion apps/ukvi-complaints/behaviours/conditional-content.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

module.exports = superclass => class extends superclass {

locals (req, res, next) {
locals(req, res, next) {
res.locals.isBehaviourIssue = req.form.values.reason === 'staff-behaviour';
res.locals.isRefundIssue = req.form.values.reason === 'refund';
res.locals.isApplicationIssue = req.form.values.reason === 'immigration-application';
Expand Down
26 changes: 24 additions & 2 deletions apps/ukvi-complaints/fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,33 @@ module.exports = {
},

'applicant-dob': dateComponent('applicant-dob', {
validate: ['required', 'date', { type: 'before', arguments: moment().subtract(18, 'years').format('YYYY-MM-DD') }, { type: 'after', arguments: '1900-01-01' }],
validate: [
'required',
'date',
{
type: 'before',
arguments: moment().subtract(18, 'years').format('YYYY-MM-DD')
},
{
type: 'after',
arguments: '1900-01-01'
}
],
}),

'agent-representative-dob': dateComponent('agent-representative-dob', {
validate: ['required', 'date', { type: 'before', arguments: moment().subtract(18, 'years').format('YYYY-MM-DD') }, { type: 'after', arguments: '1900-01-01' }],
validate: [
'required',
'date',
{
type: 'before',
arguments: moment().subtract(18, 'years').format('YYYY-MM-DD')
},
{
type: 'after',
arguments: '1900-01-01'
}
],
}),

'applicant-email': {
Expand Down
17 changes: 1 addition & 16 deletions apps/ukvi-complaints/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable consistent-return */
sulthan-ahmed marked this conversation as resolved.
Show resolved Hide resolved
'use strict';

const config = require('../../config');
Expand Down Expand Up @@ -679,22 +680,6 @@ module.exports = {
}
}]
},
'/refund-when': {
fields: ['refund-when'],
forks: [{
target: '/refund-less-than',
condition: {
field: 'refund-when',
value: 'less-than'
}
}, {
target: '/refund-more-than',
condition: {
field: 'refund-when',
value: 'more-than'
}
}]
},
joehod marked this conversation as resolved.
Show resolved Hide resolved
'/refund-less-than': {

},
Expand Down
2 changes: 1 addition & 1 deletion apps/ukvi-complaints/lib/json-converters/delays.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DelaysComplaint extends Complaint {
return 'NO';
default:
throw new Error('invalid "return-of-documents" value');

joehod marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/ukvi-complaints/lib/json-converters/refund.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RefundComplaint extends Complaint {
case 'eu-settlement':
return 'EU_SETTLEMENT';
default:
throw new Error('invalid "refund-type" value')
throw new Error('invalid "refund-type" value');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SubmittingApplicationComplaint extends Complaint {
case 'complain':
return 'SOMETHING_ELSE';
default:
throw new Error('invalid "immigration-application" value')
throw new Error('invalid "immigration-application" value');
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ $('.typeahead').each(function applyTypeahead() {
}),
limit: 100
});
});
});
2 changes: 0 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
'use strict';

/* eslint no-process-env: 0 */
const env = process.env.NODE_ENV || 'production';
const localhost = () => `${process.env.LISTEN_HOST || '0.0.0.0'}:${process.env.PORT || 8080}`;

module.exports = {
dateFormat: 'DD-MM-YYYY',
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-process-env */
'use strict';
const hof = require('hof');

Expand Down
Loading