mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
EQMS-1586: fixed training related editable state in qms doc's team tab (#9282)
Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
+2
-12
@@ -111,18 +111,7 @@
|
||||
selectedReviewInterval = interval.toString()
|
||||
}
|
||||
|
||||
$: canEdit =
|
||||
$isDocumentOwner &&
|
||||
$documentState != null &&
|
||||
![
|
||||
DocumentState.Archived,
|
||||
DocumentState.Deleted,
|
||||
DocumentState.Effective,
|
||||
DocumentState.Obsolete,
|
||||
ControlledDocumentState.InApproval,
|
||||
ControlledDocumentState.Approved,
|
||||
ControlledDocumentState.ToReview
|
||||
].includes($documentState)
|
||||
$: canEdit = $isDocumentOwner && $documentState === DocumentState.Draft
|
||||
|
||||
const hierarchy = client.getHierarchy()
|
||||
const documentTrainingClass = getDocumentTrainingClass(hierarchy)
|
||||
@@ -357,6 +346,7 @@
|
||||
kind="regular"
|
||||
width="max-content"
|
||||
value={$documentTraining.roles}
|
||||
readonly={!canEdit}
|
||||
onChange={(roles) => {
|
||||
void updateTraining({ roles })
|
||||
}}
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
width={width ?? 'min-content'}
|
||||
{kind}
|
||||
{size}
|
||||
disabled={readonly}
|
||||
{justify}
|
||||
on:click={onClick}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user