## [2.0.0](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web/compare/diff?targetBranch=refs%2Ftags%2Fv1.5.0&sourceBranch=refs%2Ftags%2Fv2.0.0) (2021-09-24) ### ⚠ BREAKING CHANGES * **deltagare:** up into several components. remove activeTab-observable etc commit ce2145f09438240d786e58f60e286e6e6f8e7a29 Merge: afc398914739fbAuthor: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Sep 23 14:05:05 2021 +0200 Merged develop and resolved conflicts commit afc39892ea33d2e1add92b2d5cb0d9f23b963666 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Sep 23 13:39:01 2021 +0200 Added handledare information to avrop-data and removed id from deltagare-card commit 1f7454a3cb4af09d3fdcb60c1298677d01a5a64a Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Sep 23 12:59:47 2021 +0200 Implemented more logic inside component instead of service commit 5af4a9a9f74707169892ce9fe02f7c93285f48cc Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Sep 23 10:50:14 2021 +0200 Added part of role-check to be able to access deltagare-card commit 7cf7c1d379583788e5fcbef5fff44b158d028f76 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Wed Sep 22 15:07:40 2021 +0200 WIP commit 8466394d617fa573663f3d199414354394d22b31 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Wed Sep 22 11:42:32 2021 +0200 Moved around content for deltagare-card ### Features * **avvikelserapport:** added max width to select and text area elements. [TV-407](https://jira.arbetsformedlingen.se/browse/TV-407)-max-width ([ed2e19a](ed2e19a47d)) * **avrop:** Changed intro-text inside avrop. ([TV-518](https://jira.arbetsformedlingen.se/browse/TV-518)) ([fc2916f](fc2916fb0d)) * **avvikelserapport:** changed router navigation, cleanup /[TV-407](https://jira.arbetsformedlingen.se/browse/TV-407)-2 to develop ([2236cc9](2236cc9ec8)), closes [TV-407-2](https://jira.arbetsformedlingen.se/browse/TV-407-2) [TV-407-2](https://jira.arbetsformedlingen.se/browse/TV-407-2) * **avvikelserapport:** fixed validation for dayOrPartOfDay [TV-407](https://jira.arbetsformedlingen.se/browse/TV-407)-fix ([71b00c6](71b00c6e90)) * **avrop:** Implemented custom filters for avrop. ([TV-344](https://jira.arbetsformedlingen.se/browse/TV-344)) ([1feed30](1feed30f6f)) * **employees:** Implemented loader inside employees-list when pagination/filtering. ([TV-597](https://jira.arbetsformedlingen.se/browse/TV-597)) ([bc8b09d](bc8b09d0dc)) * **deltagare:** Implemented role-check and fetching data when needed. ([TV-639](https://jira.arbetsformedlingen.se/browse/TV-639)) ([62fb35c](62fb35ca7e)) * **avvikelserapport:** implementerat report layout för avvikelserapport. [TV-667](https://jira.arbetsformedlingen.se/browse/TV-667) ([454699b](454699b785)), closes [feature/TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [feature/TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [origin/feature/TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [feature/TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [feature/TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [TV-633](https://jira.arbetsformedlingen.se/browse/TV-633) [TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [feature/TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [TV-634](https://jira.arbetsformedlingen.se/browse/TV-634) [TV-624](https://jira.arbetsformedlingen.se/browse/TV-624) * **Deltagarlista:** Lade till startdatum, slutdatum, avbrott samt Visa händelser, som öppnar en modal med en deltagares händelser ([TV-606](https://jira.arbetsformedlingen.se/browse/TV-606)) ([68c5c8d](68c5c8d4a8)) * **deltagare:** Moved around content between tabs inside deltagare-card. ([TV-638](https://jira.arbetsformedlingen.se/browse/TV-638)) ([14739fb](14739fb9e1)) * **employee:** Now possible to edit employee and remove data, also changed validation-rules. ([TV-631](https://jira.arbetsformedlingen.se/browse/TV-631)) ([1bbfd57](1bbfd57910)) * **avvikelserapport:** show selected questions in preview, renaming. [TV-633](https://jira.arbetsformedlingen.se/browse/TV-633)-2 ([71a98f5](71a98f5257)), closes [TV-633-2](https://jira.arbetsformedlingen.se/browse/TV-633-2) [TV-633-2](https://jira.arbetsformedlingen.se/browse/TV-633-2) * **employee-invite:** Updated validation of email-addresses and changed text for assigned users. ([TV-628](https://jira.arbetsformedlingen.se/browse/TV-628)) ([84f8737](84f8737ec4)) * Uppdatering av rolltexter ([5c30fc7](5c30fc7e50)) * **employee:** Utförande verksamheter select is now wrapping long text instead of ellipsis. Also when toggling the "Alla utförande verksamheter" checkbox the select is resetted. ([TV-620](https://jira.arbetsformedlingen.se/browse/TV-620)) ([91eeb1d](91eeb1d8dc)) ### Bug Fixes * **employees:** Currentpage is now set to default page inside pagination-component. ([TV-596](https://jira.arbetsformedlingen.se/browse/TV-596)) ([9155cdc](9155cdc9ac)) * Fix mock-api login functionality ([52cd7ad](52cd7ad6f4)) * **edit-employee:** Removed duplicate border-color on utförande verksamheter button which falsly overrode styling. ([TV-590](https://jira.arbetsformedlingen.se/browse/TV-590)) ([0f60300](0f60300d97)) * Sidans titel ändras nu korrekt när man går tillbaka till startsidan. ([TV-643](https://jira.arbetsformedlingen.se/browse/TV-643)) ([0302b1a](0302b1a1ad)) * **my-account:** Typo fix inside my-account. ([TV-593](https://jira.arbetsformedlingen.se/browse/TV-593)) ([3bfb8d8](3bfb8d8be1)) * Ändra ordning på sidornas title så att sidans innehåll kommer först ([TV-644](https://jira.arbetsformedlingen.se/browse/TV-644)) ([caf235a](caf235a2b4))
mina-sidor-fa
The project was generated using Nx.
Quick Start & Documentation
For all commands we will refer to the npm scripts located inside package.json. When using these commands, you do not need to have @angular/cli installed globally on your computer.
To get started, clone the repository and run npm install in the root of the project, this will install all dependencies.
Development server mina-sidor-fa
Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Dotnet API
Run npm run start:api to run against the Dotnet API.
Generate an application
Run npm run new-app my-app to generate an application. When using Nx, you can create multiple applications and libraries in the same workspace.
Generate a library
Run npm run new-lib my-lib to generate a library. Libraries are shareable across libraries and applications. They can be imported from @mina-sidor-fa/mylib.
Code scaffolding
Run npm run new-component my-component --project=my-app to generate a new component.
Build mina-sidor-fa
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Mock-api
If you want to use the mock-api, read the README here.
Dotnet API
Run npm run build:api to build the project using the Dotnet API.
Running unit tests on mina-sidor-fa
Run npm run test to execute the unit tests via Jest.
Run npm run nx affected:test to execute the unit tests affected by a change.
Running end-to-end tests on mina-sidor-fa
Run npm run e2e to execute the end-to-end tests via Cypress.
Run npm run nx affected:e2e to execute the end-to-end tests affected by a change.
Understand your workspace
Run npm run nx dep-graph to see a diagram of the dependencies of your projects.
Git workflow
-
Use branching model Gitflow.
- Example:
feature/TV-XXXXorbugfix/TV-XXXX - A useful CLI helper tool can be used: gitflow-avh.
- Example:
-
Clone origin, create feature/bugfix branches and push back to origin.
-
Don't forget to commit and push your changes regulary!
-
Create a pull request for each feature branch.
-
When merging the pull request, follow conventional commits structure inside the merge message.
-
The merge-message, which follows conventional commits, will be added to the CHANGELOG after a release is made.
-
A commit message could look like this:
feat(startpage): Added headings and description to the startpage (TV-1234). -
The changelog would look something like this:
### Features - **startpage:** Added headings and description to the startpage ([TV-1234](https://jira.arbetsformedlingen.se/browse/TV-1234)) ([commit-hash](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web/commits/commit-hash))
-
-
Upon merge, Open Shift will deploy the application to AUTO and SYS.
Release and deploy
We use a semi-automated release and deploy to different test-enviroments. A release script is used in combination with semantic-release to add the correct version of the application and changes to the changelog. The deployments are made depending on which branches are updated:
developis automatically deployed to AUTO and SYS.nextis automatically deployed to TEST.mainis automatically deployed to ACC. After this is completed, a question needs to be answered whether the image should be deployed to PROD.
Deploy to TEST
To deploy the application to TEST you need to create a release. Make sure you are in the develop branch and are up-to-date with origin. Then run npm run release. This will:
- Update the CHANGELOG.md and copies the CHANGELOG to assets.
- Bump the applications version according to semantic versioning.
- Commits the CHANGELOG to
developand pushes it to origin. - Merge
developintonextand pushesnextto origin.
Open Shift will deploy the application to TEST.
Release to ACC and PROD
To release the latest version of next to ACC and eventually to PROD; a pull request should be created to merge next into main. The next branch is protected and will not be deleted upon merge.
Open Shift will deploy the application to ACC and a question inside the pipeline is asked if the application also should be deployed to PROD. This question will persist for 24 hours.