Add signer type differentiation for workflows

Added a method to determine if the signer is a 'person' or 'user'. Updated the signature template to handle both types accordingly, ensuring the correct entity type is displayed in workflow signatures.
This commit is contained in:
2024-09-10 14:19:14 +02:00
parent 669b967899
commit 1ddd283f26
2 changed files with 26 additions and 6 deletions

View File

@@ -140,4 +140,16 @@ class EntityWorkflowStepSignature implements TrackCreationInterface, TrackUpdate
{
return EntityWorkflowSignatureStateEnum::SIGNED == $this->getState();
}
/**
* @return 'person'|'user'
*/
public function getSignerKind(): string
{
if ($this->personSigner instanceof Person) {
return 'person';
}
return 'user';
}
}