Skip to content

Commit d52d18d

Browse files
committed
fix: preserve sign page config state
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 5cbb915 commit d52d18d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/Controller/PageController.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,7 @@ public function signPPath(string $uuid): TemplateResponse {
340340
#[FrontpageRoute(verb: 'GET', url: '/p/sign/{uuid}')]
341341
public function sign(string $uuid): TemplateResponse {
342342
$this->initialState->provideInitialState('action', JSActions::ACTION_SIGN);
343-
$this->initialState->provideInitialState('config',
344-
$this->accountService->getConfig($this->userSession->getUser())
345-
);
343+
$config = $this->accountService->getConfig($this->userSession->getUser());
346344
$this->initialState->provideInitialState('filename', $this->getFileEntity()->getName());
347345
$file = $this->fileService
348346
->setFile($this->getFileEntity())
@@ -355,9 +353,9 @@ public function sign(string $uuid): TemplateResponse {
355353
->showSigners()
356354
->showSettings()
357355
->toArray();
358-
$this->initialState->provideInitialState('config', [
356+
$this->initialState->provideInitialState('config', array_merge($config, [
359357
'identificationDocumentsFlow' => $file['settings']['needIdentificationDocuments'] ?? false,
360-
]);
358+
]));
361359
$this->initialState->provideInitialState('id', $file['id']);
362360
$this->initialState->provideInitialState('nodeId', $file['nodeId']);
363361
$this->initialState->provideInitialState('needIdentificationDocuments', $file['settings']['needIdentificationDocuments'] ?? false);

0 commit comments

Comments
 (0)