mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
EQMS-1484: Fixed permission checks when sending a QMS document for approval from the Workflow Validation tab (#8628)
Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
+5
-2
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import documents from '@hcengineering/controlled-documents'
|
||||
import documents, { ControlledDocumentState } from '@hcengineering/controlled-documents'
|
||||
import { Label, Button, showPopup } from '@hcengineering/ui'
|
||||
|
||||
import TeamPopup from '../../TeamPopup.svelte'
|
||||
@@ -15,9 +15,12 @@
|
||||
return
|
||||
}
|
||||
|
||||
const isReviewed = $controlledDocument.controlledState === ControlledDocumentState.Reviewed
|
||||
|
||||
const teamPopupData: TeamPopupData = {
|
||||
controlledDoc: $controlledDocument,
|
||||
requestClass: documents.class.DocumentApprovalRequest
|
||||
requestClass: documents.class.DocumentApprovalRequest,
|
||||
requireSignature: !isReviewed
|
||||
}
|
||||
|
||||
showPopup(TeamPopup, teamPopupData, 'center')
|
||||
|
||||
+4
-2
@@ -15,7 +15,8 @@
|
||||
import documentsRes from '../../../plugin'
|
||||
import {
|
||||
$controlledDocument as controlledDocument,
|
||||
$documentSnapshots as documentSnapshots
|
||||
$documentSnapshots as documentSnapshots,
|
||||
$isDocumentOwner as isDocumentOwner
|
||||
} from '../../../stores/editors/document'
|
||||
import DocumentApprovalGuideItem from './DocumentApprovalGuideItem.svelte'
|
||||
import DocumentApprovalItem from './DocumentApprovalItem.svelte'
|
||||
@@ -61,7 +62,8 @@
|
||||
ControlledDocumentState.Rejected,
|
||||
ControlledDocumentState.InApproval
|
||||
]
|
||||
$: hasGuide = doc && doc.state === DocumentState.Draft && !noGuideStates.includes(doc.controlledState)
|
||||
$: hasGuide =
|
||||
doc && doc.state === DocumentState.Draft && !noGuideStates.includes(doc.controlledState) && $isDocumentOwner
|
||||
</script>
|
||||
|
||||
<RightPanelTabHeader>
|
||||
|
||||
Reference in New Issue
Block a user