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

Next #353

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open

Next #353

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
34de886
TASK-400 Export and refresh DB from modal (#320)
Dimonium-239 Apr 16, 2021
89d040e
TASK-418 Disallow working shifts that cross 7am (#341)
kaplonpaulina Apr 16, 2021
76ad3f4
Task 438 new app structure (#340)
Qwebeck Apr 6, 2021
8eb4b7d
Task-455 Css refactor buttons dropdown (#343)
pectom Apr 18, 2021
c937019
TASK-107 app localization (#355)
net-runner Apr 18, 2021
8347216
TASK-451 App version fetched from GitHub (#357)
przemec Apr 18, 2021
68e9750
TASK-444 test refactor part 2, from origin/next (#360)
kopcion Apr 23, 2021
8463bdd
TASK-442 Introduce WTC errors (#359)
pectom Apr 26, 2021
29a937e
TASK-450 Algorithm errors found info (#361)
Sig00rd Apr 27, 2021
d5a2198
Task 421 new version modal (#363)
przemec Apr 28, 2021
5134ab1
TASK-459 Styled components migration (#362)
pectom Apr 30, 2021
a027459
Task 437 typescript migration (#364)
Qwebeck May 1, 2021
f5bbeb3
TASK-482 (#366)
przemec May 2, 2021
a890213
Task 307 Add holidays information in request to the server (#367)
Ehevi May 3, 2021
eecfa55
Added pre-push config (#365)
Qwebeck May 4, 2021
fc8da26
Removed unused code (#372)
Qwebeck May 6, 2021
632eb70
Split shift cell on smaller parts (#374)
Qwebeck May 11, 2021
4db98b4
TASK-356 'come back to now' button work test (#371)
przemec May 11, 2021
a4ccb68
TASK-153 Change worker hours e2e test. (#368)
net-runner May 14, 2021
fc9b5e2
TASK-449 Export of monthly leaves (#369)
Ehevi May 15, 2021
305223c
TASK-354 not saved schedule changes are not displayed e2e test (#373)
net-runner May 15, 2021
2b78051
Task 466 implementing redux best practices (#381)
Qwebeck May 24, 2021
3863da4
TASK-497 Setup SonarQube (#383)
pectom May 28, 2021
6869beb
Change sonar project key (#384)
pectom May 28, 2021
9bf3225
Sonarqube setup (#387)
pectom May 28, 2021
fec9b70
TASK-358 change workers shift type e2e test (#377)
net-runner May 29, 2021
db54328
TASK-172 Add test badge (#370)
kopcion May 30, 2021
8efcfec
TASK-498 Fix Sonarqube detected problems (#390)
net-runner Jun 2, 2021
00212d1
Task 465 refactor database interface (#380)
pectom Jun 2, 2021
27abe3a
Task 474 todo walkthrough+task 467 useless components removal (#392)
Qwebeck Jun 4, 2021
b5d61fc
Update README.md
kopcion Jun 8, 2021
9c5c6bc
TASK-473 styles migration to styled components (#378)
przemec Jun 11, 2021
e3dfc47
error modal style fixed + useless code cleanup (#394)
przemec Jun 16, 2021
fbfda73
Fixes sonar qube errors (#397)
Qwebeck Jun 19, 2021
1d350d9
Fixed problem with bad hour calculation (#395)
Qwebeck Jun 19, 2021
2201f90
Fixes bad export of worker hours (#396)
Qwebeck Jun 19, 2021
d327211
TASK-475 & 472 styledcomponents theme implementation and css style re…
net-runner Jun 20, 2021
bb9f0e1
Fixed bug where application state revert where not possible (#400)
Qwebeck Jul 3, 2021
4e309f9
Fixed error in name to uuid mapping (#399)
Qwebeck Jul 3, 2021
1af1c6f
TASK-427 Export single worker calendar to xlsx (#388)
venglov Jul 9, 2021
f239146
TASK-515 new schedule design implementation (#401)
net-runner Jul 23, 2021
9f180c2
Rework package.json scripts (#405)
pectom Aug 22, 2021
011fb68
Added firebase (#403)
Qwebeck Aug 22, 2021
dea2cd8
Next pwa firebase sync (#406)
Qwebeck Apr 26, 2022
3dff84f
Revert "Next pwa firebase sync (#406)" (#407)
Qwebeck Apr 26, 2022
9b07845
Next pwa firebase sync (#415)
Qwebeck Apr 30, 2022
071c603
closes 414 remove buttons for edition from shift management tab (#416)
net-runner May 1, 2022
165ad2c
408+413 (#419)
Qwebeck May 3, 2022
30b1132
Error modal restyle finished. (#423)
net-runner Jul 15, 2022
35e89b5
Now dropdown button group has a visible feedback on hover. (#424)
net-runner Jul 15, 2022
094da1c
#431: disables shift editing in read mode (#432)
Qwebeck Jul 21, 2022
c605000
#410: remove area selection functionality (#430)
Qwebeck Jul 21, 2022
0cf04c5
Updates react and ts versions (#436)
Qwebeck Aug 6, 2022
a6826da
429 Change Glider Logo (#437)
net-runner Aug 6, 2022
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORT=3000
EXTEND_ESLINT=true
ESLINT_NO_DEV_ERRORS=true
FIXED_WINDOW_SIZE=true
REACT_APP_SOLVER_API_URL=https://kirk.kis.agh.edu.pl/nurse_scheduler/
REACT_APP_EMAIL_KEY="user_gkDGsV6502nLQs0mPf4xk"
Expand All @@ -8,3 +9,4 @@ REACT_APP_SENTRY_DSN=https://[email protected]
REACT_APP_ERROR_WORKER="maciej"
REACT_APP_TEST_MODE=true
REACT_APP_VERSION=$npm_package_version
REACT_APP_SENTRY_ENABLED=true
153 changes: 153 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"env": {
"browser": true,
"es2021": true
},
"ignorePatterns": [
"snapshots.js"
],
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"cypress",
"header"
],
"rules": {
"no-debugger": "off",
"quotes": "off",
"no-underscore-dangle": [
"error",
{
"allowAfterThis": true,
"allow": [
"_rev",
"_id"
]
}
],
"camelcase": [
"error",
{
"allow": [
"schedule_info",
"month_info",
"employee_info",
"shift_types",
"month_number",
"children_number",
"extra_workers",
"frozen_shifts",
"day_time",
"include_docs",
"is_working_shift"
]
}
],
"import/order": "off",
"spaced-comment": "off",
"no-unused-vars": "off",
"consistent-return": [
"error",
{
"treatUndefinedAsUnspecified": false
}
],
"import/no-named-as-default": "off",
"object-curly-newline": "off",
"import/no-cycle": "off",
"no-console": "warn",
"import/prefer-default-export": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/triple-slash-reference": "off",
"class-methods-use-this": "off",
"no-case-declarations": "off",
"no-plusplus": "off",
"react/jsx-props-no-spreading": "off",
"function-paren-newline": "off",
"implicit-arrow-linebreak": "off",
"comma-dangle": "off",
"max-len": "off",
"max-classes-per-file": "off",
"react/no-unused-prop-types": "off",
"no-void": "off",
"import/no-duplicates": "off",
"no-else-return": "off",
"react/no-danger": "off",
"import/newline-after-import": "off",
// accessibility
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/no-autofocus": "off",
// fix me
"react/no-array-index-key": "off",
"no-param-reassign": "off",
"no-shadow": "off",
"react/destructuring-assignment": "off",
"no-nested-ternary": "off",
"react/require-default-props": "off",
"no-await-in-loop": "off",
"prefer-destructuring": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"overrides": [
{
"files": [
"**/*.ts?(x)"
],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"no-use-before-define": "off",
"default-case": "off",
"no-unused-expressions": "off",
"no-useless-constructor": "off",
"no-restricted-syntax": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [
".tsx"
]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
}
}
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
}
12 changes: 12 additions & 0 deletions .eslintrc.pre-push.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": ".eslintrc.json",
"rules": {
"no-debugger": "error",
"header/header": ["error", "config/license-header.js"],
"import/order": "error",
"spaced-comment": "error",
"quotes": ["error", "double", { "avoidEscape": true }],
"no-console": "error",
"import/newline-after-import": "error"
}
}
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- Change the ## to your pull request number -->
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kopcion/792d640ad8dad0e4c316a487f04cf471/raw/nurse-scheduling-problem-frontend__pull_##.json)

**Notes for reviewer:**

*
73 changes: 73 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
browser: [google-chrome]
containers: [1, 2, 3, 4, 5]
timeout-minutes: 10

steps:
- name: Checkout project
uses: actions/checkout@v2
Expand All @@ -29,6 +30,8 @@ jobs:
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=cypressConfig::$content"
mkdir coverage
touch coverage/coverage-final.json

- name: Run Cypress
uses: cypress-io/github-action@v2
Expand All @@ -45,3 +48,73 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLICATION_URL: ${{ fromJson(steps.read_config.outputs.cypressConfig).env.baseUrl }}
- name: Rename coverage
run: |
mv coverage/coverage-final.json coverage/coverage-final-${{ matrix.containers }}.json
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: parallel-job-${{ matrix.containers }}
path: coverage/coverage-final-${{ matrix.containers }}.json
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: parallel-job
path: coverage/coverage-final-${{ matrix.containers }}.json

badge:
needs: cypress
runs-on: [self-hosted]
strategy:
fail-fast: false
timeout-minutes: 10

steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 12

- name: Read cypress config
id: read_config
run: |
content=`cat cypress.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=cypressConfig::$content"

- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
with:
path: reports
- name: Get Coverage for badge
run: |
mv reports/parallel-job-1/coverage-final-1.json reports
mv reports/parallel-job-2/coverage-final-2.json reports
mv reports/parallel-job-3/coverage-final-3.json reports
mv reports/parallel-job-4/coverage-final-4.json reports
mv reports/parallel-job-5/coverage-final-5.json reports
npx nyc merge reports ./.nyc_output/out.json
npx nyc report --reporter=text-summary -t ./.nyc_output
SUMMARY="$(npx nyc report --reporter=text-summary -t ./.nyc_output | tail -2 | head -1)"
TOKENS=($SUMMARY)
echo "COVERAGE=$(echo ${TOKENS[2]})" >> $GITHUB_ENV
REF="${{ github.ref }}"
IFS='/' read -ra PATHS <<< "$REF"
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}"
echo "BRANCH=\"${BRANCH_NAME}\"" >> $GITHUB_ENV

- name: Create the Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 792d640ad8dad0e4c316a487f04cf471
filename: "nurse-scheduling-problem-frontend__${env.BRANCH}.json"
label: Test Coverage
message: ${{ env.COVERAGE }}
color: green

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/node_modules
/.pnp
.pnp.js
.scannerwork

# testing
/coverage
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "all",
"tabWidth": 4,
"semi": false,
"printWidth": 90,
"jsxBracketSameLine": true,
"arrowParens": "always"
}
14 changes: 14 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.projectKey=Project-Summer-AI-Lab-Glider_nurse-scheduling-problem-frontend
sonar.projectName=Project-Summer-AI-Lab-Glider_nurse-scheduling-problem-frontend
sonar.verbose=true
sonar.host.url=http://149.156.207.66
sonar.organization=project-summer-ai-lab-glider

sonar.sources=./src
sonar.tests=./cypress/integration
sonar.test.inclusions=**/*.spec.ts

sonar.cpd.exclusions=src/assets/translations/*, snapshots.js, src/assets/devMode/*
sonar.language=ts
sonar.typescript.tsconfigPath=./tsconfig.json
sonar.javascript.lcov.reportPaths=coverage/lcov.info
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Nurse Scheduling Problem
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kopcion/792d640ad8dad0e4c316a487f04cf471/raw/nurse-scheduling-problem-frontend__heads_next.json)
# Nurse Scheduling Problem

The algorithm implementation is a part of solution created for [Fundacja Rodzin Adopcyjnych](https://adopcja.org.pl), the adoption foundation in Warsaw (Poland) during Project Summer [AILab](http://www.ailab.agh.edu.pl) & [Glider](http://www.glider.agh.edu.pl) 2020 event. The aim of the system is to improve the operation of the foundation by easily and quickly creating work schedules for its employees and volunteers. So far, this has been done manually in spreadsheets, which is a cumbersome and tedious job.

Expand All @@ -17,11 +18,15 @@ This repository contains the frontend web application, and also a mock backend s
```
git clone https://github.com/Project-Summer-AI-Lab-Glider/nurse-scheduling-problem-frontend.git nurse-scheduling
cd nurse-scheduling
git checkout develop
npm install
npm start
```
## Electron


## Test account

```
npm run e-start
login: [email protected] password: xsw2!QAZ
```


2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"trashAssetsBeforeRuns": true,
"retries": 1,
"baseUrl": "http://localhost:3000"
}
}
Loading