Exclude approved-without-signature documents from employee approvals
Filter out approval decisions where state is APPROVED but electronic_signature_id is NULL, removing historical approved entries that lack an electronic signature from the employee approvals page. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -173,6 +173,7 @@ func (f *DocumentFilter) SQLFragment() string {
|
||||
INNER JOIN iam_membership_profiles p ON dvad.approver_id = p.id
|
||||
WHERE dv.document_id = documents.id
|
||||
AND p.identity_id = @employee_identity_id::text
|
||||
AND NOT (dvad.state = 'APPROVED' AND dvad.electronic_signature_id IS NULL)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -95,6 +95,7 @@ func (f *DocumentVersionFilter) SQLFragment() string {
|
||||
INNER JOIN iam_membership_profiles p ON dvad.approver_id = p.id
|
||||
WHERE dvaq.version_id = document_versions.id
|
||||
AND p.identity_id = @employee_identity_id::text
|
||||
AND NOT (dvad.state = 'APPROVED' AND dvad.electronic_signature_id IS NULL)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user