Skip to content
This repository was archived by the owner on Apr 22, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
16f0c94
-- adding aurelia skeleton
robert-waggott Sep 4, 2018
b8644b9
-- initial setup
robert-waggott Sep 4, 2018
b4b286d
-- more work on aurelia setup
robert-waggott Sep 5, 2018
3725832
-- further refactoring to aurelia
robert-waggott Sep 7, 2018
f6c8117
-- more refactoring into aurelia
robert-waggott Sep 7, 2018
d6b473f
-- more conversion over to aurelia
robert-waggott Sep 10, 2018
7bc6d3a
-- more refactoring into aurelia
robert-waggott Sep 10, 2018
96d7f39
-- refactoring pay schedules into aurelia
robert-waggott Sep 11, 2018
f5c0da3
-- starting to refactor pension functionality into aurelia
robert-waggott Sep 11, 2018
512d49e
-- implementing pension functionality in aurelia
robert-waggott Sep 14, 2018
e6aa451
-- starting to add pay run info to aurelia
robert-waggott Sep 14, 2018
a08afc4
-- implementing pay run info modal in aurelia
robert-waggott Sep 14, 2018
5da0655
-- changes to modal footers
robert-waggott Sep 14, 2018
1c2b97c
-- implementing delete pay run functionality in aurelia
robert-waggott Sep 16, 2018
6f169f8
-- implementing re-run pay run in aurelia
robert-waggott Sep 16, 2018
c5006bb
-- implementing job info in aurelia
robert-waggott Sep 16, 2018
7d25562
-- adding polling to the job info modal
robert-waggott Sep 16, 2018
4c1a695
-- starting to implement add pay run functionality in aurelia
robert-waggott Sep 16, 2018
8d1a1f6
-- work on porting rti transactions to aurelia
robert-waggott Sep 19, 2018
2a5a81c
-- finishing porting of rti transactions to aurelia
robert-waggott Sep 19, 2018
20690e7
-- implementing the add pay run functionality in aurelia
robert-waggott Sep 19, 2018
370ad4d
-- implementing the api calls panel in aurelia
robert-waggott Sep 19, 2018
4bf0eb7
-- typo fix
robert-waggott Sep 19, 2018
4bb6536
-- porting the bank account form to aurelia
robert-waggott Sep 19, 2018
81977ac
-- starting to port employee functionality to aurelia
robert-waggott Sep 19, 2018
d7c3a32
-- starting to port pay instruction functionality to aurelia
robert-waggott Sep 20, 2018
d79452a
-- porting P45 pay instruction functionality to aurelia
robert-waggott Sep 20, 2018
71eb8d9
-- starting to port the employee form to aurelia
robert-waggott Sep 20, 2018
142f532
-- refactoring the api functionality into a seprate folder and more w…
robert-waggott Sep 21, 2018
82cc629
-- deleting /bin/ as it will soon be deprecated by move to gulp for b…
robert-waggott Sep 21, 2018
d351d7d
-- updating build tooling to use gulp
robert-waggott Sep 21, 2018
572cd24
-- implementing eslint in gulp
robert-waggott Sep 21, 2018
a94a434
-- explicitly listing out eslint rules
robert-waggott Sep 21, 2018
f14d499
-- removing deprecated instructions from readme.md
robert-waggott Sep 21, 2018
dbcfc62
-- updates to documentation
robert-waggott Sep 23, 2018
4b4005f
-- finishing off the employee form
robert-waggott Sep 23, 2018
e36fd2c
-- implementing delete employer functionality
robert-waggott Sep 23, 2018
c610c59
-- adding confirm before employer is deleted
robert-waggott Sep 23, 2018
1950747
-- splitting out the employers (plural) specific controller methods i…
robert-waggott Sep 23, 2018
120acba
-- starting to port the employer form to aurelia
robert-waggott Sep 23, 2018
4f567e3
-- removing redundant non-aurelia code
robert-waggott Sep 23, 2018
2c0fcbf
-- update to the readme and creation of a build gulp task to be run i…
robert-waggott Sep 24, 2018
c8fc340
-- finishing employer-form functionality
robert-waggott Sep 24, 2018
c3ffc1b
-- implementing delete employer revision
robert-waggott Sep 24, 2018
af5132a
-- adding polling of employer pay runs and rti submissions
robert-waggott Sep 24, 2018
358e2d8
-- tidy up of pay instruction code in preparation for porting to aurelia
robert-waggott Sep 25, 2018
556691c
-- further reorganisation of pay instructions
robert-waggott Sep 25, 2018
b70ddfc
-- starting to port pay instruction forms to aurelia
robert-waggott Sep 25, 2018
52a5102
-- patching branch from patch to master
robert-waggott Sep 30, 2018
1493140
-- creating the manage pay instruction modal
robert-waggott Sep 30, 2018
855b315
-- outputting the pay instruction friendly name rather than the class…
robert-waggott Sep 30, 2018
5577da0
-- fixing lint errors
robert-waggott Oct 1, 2018
e1f415a
-- fixing issue with deleting an employer revision not updating the e…
robert-waggott Oct 1, 2018
c19a38b
-- protecting routes so if api access has not been setup then the use…
robert-waggott Oct 1, 2018
f916f2a
-- implementing the github button styling
robert-waggott Oct 1, 2018
07111f3
-- bug fixes and formatting changes
robert-waggott Oct 2, 2018
dce800a
-- refactoring
robert-waggott Oct 2, 2018
4324045
-- adding a width to the pension modal to prevent it from resizing wh…
robert-waggott Oct 2, 2018
d0443ee
-- adding width on the pay instruction modal to folow pension modal
robert-waggott Oct 2, 2018
1e91ce0
-- testing, debugging and linting
robert-waggott Oct 6, 2018
cad5d75
-- removal of unused file
robert-waggott Oct 6, 2018
2c1a967
-- change to polling intervals to poll less often
robert-waggott Oct 8, 2018
cc29b27
-- starting to add in breadcrumbs
robert-waggott Oct 8, 2018
69001e7
-- cherry-picking bug fix from master
robert-waggott Oct 10, 2018
53439e3
-- finishing off breadcrumbs functionality
robert-waggott Oct 11, 2018
7d52edb
-- hiding save button when employer revisions tab is selected (as the…
robert-waggott Oct 12, 2018
dbb458b
-- fixing linting errors
robert-waggott Oct 12, 2018
7cc98da
-- adding employee revisions query in and adding revisions property a…
robert-waggott Oct 12, 2018
27b976e
-- implementing deletion of employee revisions on the client side
robert-waggott Oct 12, 2018
5acc4a1
-- implementing delete employee revision on the server-side
robert-waggott Oct 12, 2018
9bd2628
Merge branch 'master' into aurelia-rewrite
robert-waggott Oct 12, 2018
2f66a3b
-- merging changes from master
robert-waggott Oct 16, 2018
a3eed7e
-- resolves #23
robert-waggott Oct 18, 2018
0657a84
-- resolves #24
robert-waggott Oct 30, 2018
1bd5d04
-- starting to add in pay codes functionality #25
robert-waggott Oct 31, 2018
ce0728a
-- adding explicit ordering of pay instruction properties
robert-waggott Nov 25, 2018
af389e7
-- finishing off pay code functionality
robert-waggott Dec 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"sourceMap": true,
"sourceRoot": "src",
"moduleIds": false,
"comments": false,
"compact": false,
"code": true,
"presets": [
["es2015", {"loose": true}],
"stage-1"
],
"plugins": [
"syntax-flow",
"transform-decorators-legacy",
"transform-flow-strip-types"
]
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
content/dist
content/js
aurelia_project
262 changes: 262 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,272 @@
"es6": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2017
},
"rules": {
"accessor-pairs": "off",
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-callback-return": "off",
"array-element-newline": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-scoped-var": "off",
"block-spacing": "off",
"brace-style": "off",
"callback-return": "off",
"camelcase": "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"complexity": "off",
"computed-property-spacing": "off",
"consistent-return": "off",
"consistent-this": "off",
"constructor-super": "error",
"curly": "off",
"default-case": "off",
"dot-location": "off",
"dot-notation": "off",
"eol-last": "off",
"eqeqeq": "off",
"for-direction": "error",
"func-call-spacing": "off",
"func-name-matching": "off",
"func-names": "off",
"func-style": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"getter-return": "error",
"global-require": "off",
"guard-for-in": "off",
"handle-callback-err": "off",
"id-blacklist": "off",
"id-length": "off",
"id-match": "off",
"implicit-arrow-linebreak": "off",
"indent-legacy": "off",
"init-declarations": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"line-comment-position": "off",
"lines-around-comment": "off",
"lines-around-directive": "off",
"lines-between-class-members": "off",
"max-classes-per-file": "off",
"max-depth": "off",
"max-len": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-nested-callbacks": "off",
"max-params": "off",
"max-statements": "off",
"max-statements-per-line": "off",
"multiline-comment-style": "off",
"multiline-ternary": "off",
"new-cap": "off",
"new-parens": "off",
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": "off",
"no-alert": "off",
"no-array-constructor": "off",
"no-async-promise-executor": "off",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-buffer-constructor": "off",
"no-caller": "off",
"no-case-declarations": "error",
"no-catch-shadow": "off",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-confusing-arrow": "off",
"no-console": "error",
"no-const-assign": "error",
"no-constant-condition": "error",
"no-continue": "off",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "off",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "off",
"no-else-return": "off",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-function": "off",
"no-empty-pattern": "error",
"no-eq-null": "off",
"no-eval": "off",
"no-ex-assign": "error",
"no-extend-native": "off",
"no-extra-bind": "off",
"no-extra-boolean-cast": "error",
"no-extra-label": "off",
"no-extra-parens": "off",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-floating-decimal": "off",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-coercion": "off",
"no-implicit-globals": "off",
"no-implied-eval": "off",
"no-inline-comments": "off",
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-invalid-this": "off",
"no-irregular-whitespace": "error",
"no-iterator": "off",
"no-label-var": "off",
"no-labels": "off",
"no-lone-blocks": "off",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-magic-numbers": "off",
"no-misleading-character-class": "off",
"no-mixed-operators": "off",
"no-mixed-requires": "off",
"no-mixed-spaces-and-tabs": "error",
"no-multi-assign": "off",
"no-multi-spaces": "off",
"no-multi-str": "off",
"no-multiple-empty-lines": "off",
"no-native-reassign": "off",
"no-negated-condition": "off",
"no-negated-in-lhs": "off",
"no-nested-ternary": "off",
"no-new": "off",
"no-new-func": "off",
"no-new-object": "off",
"no-new-require": "off",
"no-new-symbol": "error",
"no-new-wrappers": "off",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "off",
"no-param-reassign": "off",
"no-path-concat": "off",
"no-plusplus": "off",
"no-process-env": "off",
"no-process-exit": "off",
"no-proto": "off",
"no-prototype-builtins": "off",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-globals": "off",
"no-restricted-imports": "off",
"no-restricted-modules": "off",
"no-restricted-properties": "off",
"no-restricted-syntax": "off",
"no-return-assign": "off",
"no-return-await": "off",
"no-script-url": "off",
"no-self-assign": "error",
"no-self-compare": "off",
"no-sequences": "off",
"no-shadow": "off",
"no-shadow-restricted-names": "off",
"no-spaced-func": "off",
"no-sparse-arrays": "error",
"no-sync": "off",
"no-tabs": "off",
"no-template-curly-in-string": "off",
"no-ternary": "off",
"no-this-before-super": "error",
"no-throw-literal": "off",
"no-trailing-spaces": "off",
"no-undef": "error",
"no-undef-init": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "off",
"no-unneeded-ternary": "off",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-vars": "error",
"no-use-before-define": "off",
"no-useless-call": "off",
"no-useless-computed-key": "off",
"no-useless-concat": "off",
"no-useless-constructor": "off",
"no-useless-escape": "error",
"no-useless-rename": "off",
"no-useless-return": "off",
"no-var": "off",
"no-void": "off",
"no-warning-comments": "off",
"no-whitespace-before-property": "off",
"no-with": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"object-shorthand": "off",
"one-var": "off",
"one-var-declaration-per-line": "off",
"operator-assignment": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"padding-line-between-statements": "off",
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-numeric-literals": "off",
"prefer-object-spread": "off",
"prefer-promise-reject-errors": "off",
"prefer-reflect": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
"quote-props": "off",
"radix": "off",
"require-atomic-updates": "off",
"require-await": "off",
"require-jsdoc": "off",
"require-unicode-regexp": "off",
"require-yield": "error",
"rest-spread-spacing": "off",
"semi-spacing": "off",
"semi-style": "off",
"sort-imports": "off",
"sort-keys": "off",
"sort-vars": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"spaced-comment": "off",
"strict": "off",
"switch-colon-spacing": "off",
"symbol-description": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"unicode-bom": "off",
"use-isnan": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
"vars-on-top": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",
"yoda": "off",
"indent": [
"error",
4
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
package-lock.json
.DS_Store
content/dist/
content/dist
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,41 @@ To get started/setup:

1. Run `node -v` and ensure you have at least node v9.6.0 installed.
2. Run `npm install --dev` to install all the npm package dependencies. When installing in production omit the `--dev` flag.
3. Run `node app.js` this will startup the server, which will default to run on port 3000. This can be set to an explicit port by running `node app.js -p 80` which will run the app up on port 80.
3. Install `aurelia-cli` which is required to run the aurelia bits: `npm install aurelia-cli -g`
4. Install `gulp` which is required to run builds: `npm install -g gulp`
5. Run `gulp` from the root of the checked out repo.

## Scripts
## Gulp tasks

All scripts rely on local npm modules therefore run `npm install` before running the below scripts:
### `lint`

### `npm run watch`
Lints all js files. Check `.eslintrc.json` for the rules it uses when linting.

Will run the up the node server, listen on port 3000 and watch the following file types for changes. If a change is detected it will restart the server.
### `sass`

- *.js
- *.hbs
- *.scss
Compiles `content/scss/main.scss` to `content/css/main.css`. Simples.

### `npm run test`
### `server`

Will run all spec unit tests in jasmine.
Starts the node server, as setup in `app.js`, using nodemon. Watches the following files, and on change will re-run the server:

### `npm run lint`
- `app.js`
- `api/**/*.js`

Runs `eslint` in `./`. Note the three `.eslintrc.json` configs in:
### `start-au-cli`

- ./
- ./content/js
- ./spec
Runs `au run` which is an aurelia-cli command, this in turns watches the `src` folder and will transcompile all js and html file changes into `/content/dist`. For more information on these tasks check out:

- The `/aurelia_project` directory that holds the gulp tasks specific to aurelia.
- `aurelia-cli` documentation [here](https://aurelia.io/docs/build-systems/aurelia-cli/).

### `watch-sass`

Watches all `scss` files in `/content/scss` and executes the sass task (detailed above) on a file change.

### `default`

Runs all of the above, in parallel.

## FAQs

Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions api/controllers/api-logger-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const BaseController = require("./base-controller");

module.exports = class APILoggerController extends BaseController {
async get(ctx) {
let data = ctx.session.apiCalls;

if (!data) {
ctx.body = data;
return;
}

let filteredData = data.filter(x => !x.uri.trim().toLowerCase().endsWith("/healthcheck"));

let reversed = filteredData.reverse();

ctx.body = reversed;
}
};
2 changes: 2 additions & 0 deletions api/controllers/base-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module.exports = class BaseController {
};
Loading