-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
3,363 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
vendor | ||
composer.lock | ||
node_modules | ||
yarn.lock | ||
|
||
src/Controller/SF1601Controller.php.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<!-- markdownlint-disable MD024 --> | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic | ||
Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [3.0.1] | ||
|
||
### Fixed | ||
|
||
- Fixed issue with wrong service being injected. | ||
[PR-50](https://github.com/itk-dev/os2forms_digital_post/pull/50) | ||
|
||
## [3.0.0] | ||
|
||
### Added | ||
|
||
- Added API for sending digital post | ||
[PR-40](https://github.com/itk-dev/os2forms_digital_post/pull/40) | ||
|
||
### Changed | ||
|
||
- Changed dependency on CPR and CVR lookup modules. Handled physical post | ||
(“forsendelse”) | ||
[PR-37](https://github.com/itk-dev/os2forms_digital_post/pull/37) | ||
|
||
### Removed | ||
|
||
- Removed support for [SF-1600](https://digitaliseringskataloget.dk/integration/sf1600). | ||
|
||
## [2.0.2] | ||
|
||
### Added | ||
|
||
- Added the `CPR / Navn validering` element to allowed recipient element names | ||
[PR-43](https://github.com/itk-dev/os2forms_digital_post/pull/43) | ||
|
||
## Changed | ||
|
||
- Changed composer name to `os2forms/os2forms_digital_post` | ||
[PR-47](https://github.com/itk-dev/os2forms_digital_post/pull/47) | ||
|
||
## [2.0.1] | ||
|
||
## Changed | ||
|
||
- Updated allowed attachment elements to contain `os2forms_attachment` | ||
|
||
## [2.0.0] | ||
|
||
### Changed | ||
|
||
- Updates `dompdf/dompdf` requirement to `^2.0` | ||
[PR-41](https://github.com/itk-dev/os2forms_digital_post/pull/41) | ||
|
||
## [1.2.3] | ||
|
||
### Changed | ||
|
||
- Updated recipient element names | ||
[PR-38](https://github.com/itk-dev/os2forms_digital_post/pull/38) | ||
|
||
## [1.2.2] | ||
|
||
### Added | ||
|
||
- Added creation of Beskedfordeler table. | ||
|
||
## [1.2.0] | ||
|
||
### Added | ||
|
||
- Added handling of CVR recipients. | ||
- Added handling of Beskedfordeler messages. | ||
|
||
### Changed | ||
|
||
- Update dompdf dependency. | ||
|
||
## [1.1.2] | ||
|
||
- Updated logging. | ||
- Fixed setting person id | ||
|
||
## [1.1.1] | ||
|
||
### Changed | ||
|
||
- Remove CPR from exception | ||
- Added more recipient field types | ||
- Fixed error logging. | ||
|
||
## [1.1.0] | ||
|
||
### Added | ||
|
||
- Added support for [SF1601 » | ||
“KombiPostAfsend”](https://digitaliseringskataloget.dk/integration/sf1601). | ||
- Added GitHub Actions for coding standards checks and code analysis. | ||
|
||
[Unreleased]: https://github.com/itk-dev/os2forms_digital_post/compare/3.0.1...HEAD | ||
[3.0.1]: https://github.com/itk-dev/os2forms_digital_post/compare/3.0.0...3.0.1 | ||
[3.0.0]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.2...3.0.0 | ||
[2.0.2]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.1...2.0.2 | ||
[2.0.1]: https://github.com/itk-dev/os2forms_digital_post/compare/2.0.0...2.0.1 | ||
[2.0.0]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.3...2.0.0 | ||
[1.2.3]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.2...1.2.3 | ||
[1.2.2]: https://github.com/itk-dev/os2forms_digital_post/compare/1.2.0...1.2.2 | ||
[1.2.0]: https://github.com/itk-dev/os2forms_digital_post/compare/1.1.2...1.2.0 | ||
[1.1.2]: https://github.com/itk-dev/os2forms_digital_post/compare/1.1.1...1.1.2 | ||
[1.1.1]: https://github.com/itk-dev/os2forms_digital_post/compare/1.1.0...1.1.1 | ||
[1.1.0]: https://github.com/itk-dev/os2forms_digital_post/compare/1.0.2...1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# OS2Forms Digital Post | ||
|
||
Send Digital Post to danish citizens from a webform. | ||
|
||
This module uses the | ||
[SF1601](https://digitaliseringskataloget.dk/integration/sf1601) service from | ||
Serviceplatformen. Information and documentation can be obtained by following | ||
that link. | ||
|
||
## Usage | ||
|
||
This module provides functionality for sending digital post to danish citizens. | ||
A WebformHandler is provided that you can add to your webform, and if configured | ||
it will send the submitted data as digital post. | ||
|
||
## Beskedfordeler endpoint | ||
|
||
This module provides an endpoint, | ||
`/os2forms_digital_post/PostStatusBeskedModtag`, for | ||
“[PostStatusBeskedModtag](https://digitaliseringskataloget.dk/integration/sf1601)” | ||
to get information on how or why not a digital post has been delivered. See | ||
“PostStatusBeskedHent” on | ||
<https://digitaliseringskataloget.dk/integration/sf1601> for details. | ||
|
||
## Installation | ||
|
||
Require it with composer: | ||
|
||
```shell | ||
composer require "os2forms/os2forms_digital_post" | ||
``` | ||
|
||
Enable it with drush: | ||
|
||
```shell | ||
drush pm:enable os2forms_digital_post | ||
``` | ||
|
||
### Example forms | ||
|
||
See [OS2Forms Digital Post | ||
examples](modules/os2forms_digital_post_examples/README.md). | ||
|
||
## Configuration | ||
|
||
Go to `/admin/os2forms_digital_post/settings` to set up global settings for | ||
digital post. | ||
|
||
## Drush commands | ||
|
||
```sh | ||
drush --uri=$(itkdev-docker-compose url) os2forms_digital_post:digital-post:send --help | ||
|
||
drush --uri=$(itkdev-docker-compose url) os2forms_digital_post:digital-post:memo-show --help | ||
``` | ||
|
||
## Queue | ||
|
||
Digital post is sent via jobs via an [Advanced | ||
Queue](https://www.drupal.org/project/advancedqueue) called | ||
`os2forms_digital_post`. | ||
|
||
The queue is processed via [Drupal's cron | ||
run](https://www.drupal.org/docs/administering-a-drupal-site/cron-automated-tasks/cron-automated-tasks-overview), | ||
but you can manually process the queue with `drush` if you want to process it | ||
more often than other Drupal cron jobs: | ||
|
||
```sh | ||
drush advancedqueue:queue:process os2forms_digital_post | ||
``` | ||
|
||
List the queue (and all other queues) with | ||
|
||
```sh | ||
drush advancedqueue:queue:list | ||
``` | ||
|
||
or go to `/admin/config/system/queues/jobs/os2forms_digital_post` for a | ||
graphical overview of jobs in the queue. | ||
|
||
<!-- markdownlint-enable MD013 --> | ||
<!-- markdownlint-enable MD022 --> | ||
<!-- markdownlint-enable MD025 --> | ||
<!-- markdownlint-enable MD031 --> | ||
<!-- markdownlint-enable MD032 --> | ||
## Coding standards | ||
|
||
All coding standards are checked with [GitHub | ||
Actions](https://github.com/features/actions) when a pull request is made (cf. | ||
<.github/workflows/pr.yaml>). | ||
|
||
Check coding standards: | ||
|
||
```sh | ||
docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer install | ||
docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer coding-standards-check | ||
|
||
docker run --rm --interactive --tty --volume ${PWD}:/app node:18 yarn --cwd /app install | ||
docker run --rm --interactive --tty --volume ${PWD}:/app node:18 yarn --cwd /app coding-standards-check | ||
``` | ||
|
||
Apply coding standards: | ||
|
||
```shell | ||
docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer coding-standards-apply | ||
|
||
docker run --rm --interactive --tty --volume ${PWD}:/app node:18 yarn --cwd /app coding-standards-apply | ||
``` |
16 changes: 16 additions & 0 deletions
16
...s_digital_post/config/install/advancedqueue.advancedqueue_queue.os2forms_digital_post.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- os2forms_digital_post | ||
enforced: | ||
module: | ||
- os2forms_digital_post | ||
id: os2forms_digital_post | ||
label: 'OSForms digital post' | ||
backend: database | ||
backend_configuration: | ||
lease_time: 300 | ||
processor: cron | ||
processing_time: 90 | ||
locked: false |
11 changes: 11 additions & 0 deletions
11
modules/os2forms_digital_post/modules/os2forms_digital_post_examples/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OS2Forms Digital Post examples | ||
|
||
Examples for OS2Forms Digital Post. | ||
|
||
## Installation | ||
|
||
```sh | ||
drush pm:enable os2forms_digital_post_examples | ||
``` | ||
|
||
Go to `/admin/structure/webform?category=Example` to see the example forms. |
Oops, something went wrong.