Squashed commit of the following: commit 3cf3d3cc0b6e69f0264779778ccd745a39017242 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Thu Aug 26 18:00:34 2021 +0200 fixed broken code after merge and re-instated old breadcrumb for edit-employee-page commit 661c51a775474eee2dececd5af18831cbf11bd16 Merge: e0cbda61f26e80Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Thu Aug 26 15:46:06 2021 +0200 merged with the new changes in develop branch - resolved some merge conflicts commit e0cbda6ccb61dc08e2f21c9bd695b35f99d2d696 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Thu Aug 26 09:07:08 2021 +0200 re-used previous method to select and remove tjanster from selectedTjanster list (TV-386) commit 005ff68d23994c62b3abb2f8a3460229f8fe2dcc Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Thu Aug 26 08:57:46 2021 +0200 renamed service-related variables and methods to tjanst/tjanster in edit-employee component commit 073db3b8d8f05f33f74df1717017ed2ebfa77b1d Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 22:29:17 2021 +0200 removed experimental code (TV-386) commit 83628b1e972350ad29ee6471043e073aa990622d Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 22:26:29 2021 +0200 minor change to make code shorter (TV-386) commit 709e317b22efb10aec67341584dbdfbe096a7b87 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 13:47:41 2021 +0200 added reset form default value after a service-tag is removed commit 434020d7c64d7f9ab6bc1b324557c6c24ef8c519 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 13:39:11 2021 +0200 removed unused imports and files (TV-386) commit a09bcc90f5e800e084731a64748752a8bebeda4f Merge: f1885dd0661d22Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 13:34:08 2021 +0200 Merge branch 'develop' into feature/TV-386 commit f1885dd194a0f8e39ed1654ae86e24b1a9ad8dd6 Merge: 93527ac50a83f7Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 07:25:58 2021 +0200 fixed conflict after mergeing in develop branch commit 93527ac238cf4e282332abd8529b23bf4189019d Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Wed Aug 25 00:32:49 2021 +0200 finalized re-implementation of service selection commit f69d090a56f87f6df1849222e097b7558a1dbe39 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Aug 24 17:01:25 2021 +0200 re-writing code for editing roles some more commit a95e01bc572b808d2a65efe4281813aba28fa340 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Aug 24 16:32:22 2021 +0200 re-writing code for editing services commit 6a0759e551f863af507b952b09f3ace965c97903 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Aug 24 14:08:54 2021 +0200 fixed broken code and html and css to get roles-selection to work commit cf3a75fb82c33c1081bd9645faac47bd3db1d33f Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Aug 24 14:08:29 2021 +0200 fixed broken code and html and css to get roles-selection to work commit 3f4d8ddba0a76c3079a028042318a948c39b7fe8 Merge: c305aff59ce393Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Tue Aug 24 12:35:20 2021 +0200 merged in develope and added som fixes to broken code (TV-386) commit c305aff00a0dedb7dc8988e80c85794331d58ce1 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Aug 23 09:25:00 2021 +0200 re-arranged the breadcrumbs when visiting the edit-employee card (TV-386) commit d73b6f97001a3ae36495dfebb14a554e23d1dff4 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Aug 23 08:25:40 2021 +0200 minor corrections commit 67f083bc31a5b7199eaf9d606e6cfb320b6a72e7 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Aug 23 07:52:45 2021 +0200 cleared unused imports (TV-386) commit 95c59bab20f5fa088f650af83dbf7b447a141636 Author: Aden Hassan <aden.hassan@arbetsformedlingen.se> Date: Mon Aug 23 07:31:27 2021 +0200 minor changes added (TV-386) ... and 3 more commits
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.
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-monorepo/commits/commit-hash))
-
-
Upon merge, Open Shift will deploy the application to AUTO and TEST.
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 TEST.nextis automatically deployed to SYS.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 SYS
To deploy the application to SYS 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 SYS.
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.