Skip to content

Commit 367129a

Browse files
committed
fix: redirect to envelope validation page after signing envelope file
When signing a file that is part of an envelope, the system was redirecting to the individual file validation page instead of the envelope validation page. This caused users to see only the single file information rather than the complete envelope view. This fix checks if the signed file has a parent envelope and returns the parent envelope UUID in the response, ensuring proper navigation to the envelope validation view. Signed-off-by: Vitor Mattos <[email protected]>
1 parent 4ec2116 commit 367129a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/Controller/SignFileController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,18 @@ public function sign(string $method, array $elements = [], string $identifyValue
132132
->setVisibleElements($elements)
133133
->sign();
134134

135+
$validationUuid = $libreSignFile->getUuid();
136+
if ($libreSignFile->hasParent()) {
137+
$parentFile = $this->signFileService->getFile($libreSignFile->getParentFileId());
138+
$validationUuid = $parentFile->getUuid();
139+
}
140+
135141
return new DataResponse(
136142
[
137143
'action' => JSActions::ACTION_SIGNED,
138144
'message' => $this->l10n->t('File signed'),
139145
'file' => [
140-
'uuid' => $libreSignFile->getUuid()
146+
'uuid' => $validationUuid
141147
]
142148
],
143149
Http::STATUS_OK

0 commit comments

Comments
 (0)