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

Commit

Permalink
Merge pull request #168 from itk-dev/hotfix/3.2.1
Browse files Browse the repository at this point in the history
Hotfix/3.2.1
  • Loading branch information
samilesma authored Dec 4, 2023
2 parents 46b1431 + c810b14 commit a6738de
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 12 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.2.1] - 2023-12-04

### Changed

#### Bugfixes

- Docker compose server file added
- Being able to reopen a case
- Show correct day when concluding a case.

## [3.2.0] - 2023-12-03

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

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

[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...HEAD
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.1...HEAD
[3.2.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.1...3.2.0
[3.1.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.0...3.1.1
[3.1.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.0.0...3.1.0
Expand Down
7 changes: 6 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All upgrade notes for this project will be documented in this file.

## [Unreleased]

## [3.2.1] - 2023-12-04

Nothing has been changed

## [3.2.0] - 2023-12-03

Nothing has been changed
Expand Down Expand Up @@ -41,7 +45,8 @@ Nothing has been changed
DEFAULT_URI=''
```

[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...HEAD
[Unreleased]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.1...HEAD
[3.2.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.1...3.2.0
[3.1.1]: https://github.com/itk-dev/kontrolgruppen/compare/3.1.0...3.1.1
[3.1.0]: https://github.com/itk-dev/kontrolgruppen/compare/3.0.0...3.1.0
Expand Down
2 changes: 2 additions & 0 deletions core/Command/ReportExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf('Result written to file: %s', $result->getFilename()));
}
}

return 0;
}
}
14 changes: 13 additions & 1 deletion core/Controller/ProcessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,14 @@ public function complete(Request $request, Process $process, ServiceRepository $
* @param Request $request
* @param Process $process
* @param ProcessStatusRepository $processStatusRepository
* @param DatafordelerService $datafordelerService
*
* @return Response
*
* @throws \Doctrine\ORM\NoResultException
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function resume(Request $request, Process $process, ProcessStatusRepository $processStatusRepository): Response
public function resume(Request $request, Process $process, ProcessStatusRepository $processStatusRepository, DatafordelerService $datafordelerService): Response
{
$this->denyAccessUnlessGranted('edit', $process);

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

$form->handleRequest($request);
$processClientIdentifier = $process->getProcessClient()->getIdentifier();
// Get client type
$clientType = $process->getProcessClient()->getType();

if (ProcessClientPerson::PERSON === $clientType) {
$processClientIdentifier = preg_replace('/\D+/', '', $processClientIdentifier);
$data = $datafordelerService->getPersonData($processClientIdentifier);
} elseif (ProcessClientCompany::COMPANY === $clientType) {
$data = $datafordelerService->getVirksomhedData($processClientIdentifier);
}

if ($form->isSubmitted() && $form->isValid()) {
$process->setCompletedAt(null);
Expand All @@ -624,6 +635,7 @@ public function resume(Request $request, Process $process, ProcessStatusReposito
$process
),
'process' => $process,
'data' => $data,
'form' => $form->createView(),
]
);
Expand Down
8 changes: 1 addition & 7 deletions core/Resources/translations/messages.da.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,8 @@ process:
performed_company_check: Har der været udført virksomhedskontrol?
police_report: Sagen er politianmeldt
processing_time: Sagens behandlingstid
processing_time_value: 'En dag|%days% dage'
processing_time_value: '%days% dage'
# # @see https://symfony.com/doc/current/translation/message_format.html#pluralization
# processing_time_value: >
# {days, plural,
# =0 {Nul dage}
# one {én dag}
# other {%days% dage}
# }
status: Status ved sagens afslutning
submit: Godkend afslutning af sag
title: Afslut sag %case_number%
Expand Down
3 changes: 1 addition & 2 deletions core/Resources/views/process/_form_complete.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
<strong>
{{ process.createdAt|date('d-m-Y') }} – {{ 'now'|date('d-m-Y') }}

{# @see https://stackoverflow.com/questions/15657687/twig-date-difference #}
{% set start_date = process.createdAt %}
{% set end_date = 'now' %}
{% set days = date(end_date).diff(date(start_date)).days + 1 %}
({{ 'process.complete.processing_time_value'|trans({'days': days}) }})
({{ 'process.complete.processing_time_value'|trans({'%days%': days}) }})
</strong>
</div>
</div>
Expand Down
47 changes: 47 additions & 0 deletions docker-compose.server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# itk-version: 2.0.1
version: "3"

networks:
frontend:
external: true
app:
driver: bridge
internal: false

services:
phpfpm:
image: itkdev/php8.2-fpm:alpine
restart: unless-stopped
networks:
- app
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=128M
- COMPOSER_VERSION=2
volumes:
- .:/app:delegated

nginx:
image: nginxinc/nginx-unprivileged:alpine
restart: unless-stopped
networks:
- app
- frontend
depends_on:
- phpfpm
ports:
- '8080'
volumes:
- ${PWD}/.docker/vhost.conf:/etc/nginx/conf.d/default.conf:ro
- ./:/app:rw
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"

0 comments on commit a6738de

Please sign in to comment.