Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 899cb39

Browse files
authored
Merge pull request #169 from itk-dev/master
Master
2 parents 29fa782 + cb0a338 commit 899cb39

File tree

7 files changed

+82
-12
lines changed

7 files changed

+82
-12
lines changed

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ Versioning](https://semver.org/spec/v2.0.0.html).
1010

1111
## [Unreleased]
1212

13+
## [3.2.1] - 2023-12-04
14+
15+
### Changed
16+
17+
#### Bugfixes
18+
19+
- Docker compose server file added
20+
- Being able to reopen a case
21+
- Show correct day when concluding a case.
22+
1323
## [3.2.0] - 2023-12-03
1424

1525
### Changed
@@ -264,7 +274,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
264274

265275
- [KON-361](https://github.com/aakb/kontrolgruppen/pull/81): Changed datepicker
266276

267-
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...HEAD
277+
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.1...HEAD
278+
[3.2.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...3.2.1
268279
[3.2.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.1...3.2.0
269280
[3.1.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.0...3.1.1
270281
[3.1.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.0.0...3.1.0

UPGRADE.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All upgrade notes for this project will be documented in this file.
66

77
## [Unreleased]
88

9+
## [3.2.1] - 2023-12-04
10+
11+
Nothing has been changed
12+
913
## [3.2.0] - 2023-12-03
1014

1115
Nothing has been changed
@@ -41,7 +45,8 @@ Nothing has been changed
4145
DEFAULT_URI=''
4246
```
4347

44-
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...HEAD
48+
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.1...HEAD
49+
[3.2.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...3.2.1
4550
[3.2.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.1...3.2.0
4651
[3.1.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.0...3.1.1
4752
[3.1.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.0.0...3.1.0

core/Command/ReportExportCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,7 @@ public function execute(InputInterface $input, OutputInterface $output)
148148
$output->writeln(sprintf('Result written to file: %s', $result->getFilename()));
149149
}
150150
}
151+
152+
return 0;
151153
}
152154
}

core/Controller/ProcessController.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,14 @@ public function complete(Request $request, Process $process, ServiceRepository $
589589
* @param Request $request
590590
* @param Process $process
591591
* @param ProcessStatusRepository $processStatusRepository
592+
* @param DatafordelerService $datafordelerService
592593
*
593594
* @return Response
594595
*
595596
* @throws \Doctrine\ORM\NoResultException
596597
* @throws \Doctrine\ORM\NonUniqueResultException
597598
*/
598-
public function resume(Request $request, Process $process, ProcessStatusRepository $processStatusRepository): Response
599+
public function resume(Request $request, Process $process, ProcessStatusRepository $processStatusRepository, DatafordelerService $datafordelerService): Response
599600
{
600601
$this->denyAccessUnlessGranted('edit', $process);
601602

@@ -604,6 +605,16 @@ public function resume(Request $request, Process $process, ProcessStatusReposito
604605
]);
605606

606607
$form->handleRequest($request);
608+
$processClientIdentifier = $process->getProcessClient()->getIdentifier();
609+
// Get client type
610+
$clientType = $process->getProcessClient()->getType();
611+
612+
if (ProcessClientPerson::PERSON === $clientType) {
613+
$processClientIdentifier = preg_replace('/\D+/', '', $processClientIdentifier);
614+
$data = $datafordelerService->getPersonData($processClientIdentifier);
615+
} elseif (ProcessClientCompany::COMPANY === $clientType) {
616+
$data = $datafordelerService->getVirksomhedData($processClientIdentifier);
617+
}
607618

608619
if ($form->isSubmitted() && $form->isValid()) {
609620
$process->setCompletedAt(null);
@@ -624,6 +635,7 @@ public function resume(Request $request, Process $process, ProcessStatusReposito
624635
$process
625636
),
626637
'process' => $process,
638+
'data' => $data,
627639
'form' => $form->createView(),
628640
]
629641
);

core/Resources/translations/messages.da.yaml

+1-7
Original file line numberDiff line numberDiff line change
@@ -514,14 +514,8 @@ process:
514514
performed_company_check: Har der været udført virksomhedskontrol?
515515
police_report: Sagen er politianmeldt
516516
processing_time: Sagens behandlingstid
517-
processing_time_value: 'En dag|%days% dage'
517+
processing_time_value: '%days% dage'
518518
# # @see https://symfony.com/doc/current/translation/message_format.html#pluralization
519-
# processing_time_value: >
520-
# {days, plural,
521-
# =0 {Nul dage}
522-
# one {én dag}
523-
# other {%days% dage}
524-
# }
525519
status: Status ved sagens afslutning
526520
submit: Godkend afslutning af sag
527521
title: Afslut sag %case_number%

core/Resources/views/process/_form_complete.html.twig

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
<strong>
1616
{{ process.createdAt|date('d-m-Y') }} – {{ 'now'|date('d-m-Y') }}
1717

18-
{# @see https://stackoverflow.com/questions/15657687/twig-date-difference #}
1918
{% set start_date = process.createdAt %}
2019
{% set end_date = 'now' %}
2120
{% set days = date(end_date).diff(date(start_date)).days + 1 %}
22-
({{ 'process.complete.processing_time_value'|trans({'days': days}) }})
21+
({{ 'process.complete.processing_time_value'|trans({'%days%': days}) }})
2322
</strong>
2423
</div>
2524
</div>

docker-compose.server.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# itk-version: 2.0.1
2+
version: "3"
3+
4+
networks:
5+
frontend:
6+
external: true
7+
app:
8+
driver: bridge
9+
internal: false
10+
11+
services:
12+
phpfpm:
13+
image: itkdev/php8.2-fpm:alpine
14+
restart: unless-stopped
15+
networks:
16+
- app
17+
extra_hosts:
18+
- "host.docker.internal:host-gateway"
19+
environment:
20+
- PHP_MAX_EXECUTION_TIME=30
21+
- PHP_MEMORY_LIMIT=128M
22+
- COMPOSER_VERSION=2
23+
volumes:
24+
- .:/app:delegated
25+
26+
nginx:
27+
image: nginxinc/nginx-unprivileged:alpine
28+
restart: unless-stopped
29+
networks:
30+
- app
31+
- frontend
32+
depends_on:
33+
- phpfpm
34+
ports:
35+
- '8080'
36+
volumes:
37+
- ${PWD}/.docker/vhost.conf:/etc/nginx/conf.d/default.conf:ro
38+
- ./:/app:rw
39+
labels:
40+
- "traefik.enable=true"
41+
- "traefik.docker.network=frontend"
42+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
43+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
44+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
45+
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
46+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
47+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"

0 commit comments

Comments
 (0)