-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove edit page dependency on erSistPublisert
- Loading branch information
1 parent
cf38ee0
commit 730007d
Showing
3 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import { Concept } from '../../types'; | ||
import {Concept} from '../../types'; | ||
|
||
export const isConceptEditable = (concept: Concept | undefined) => { | ||
if (concept == null) { | ||
return false; | ||
} | ||
const { id, erPublisert, erSistPublisert, revisjonAvSistPublisert } = concept; | ||
const editable = | ||
id == null || (erPublisert && erSistPublisert) || revisjonAvSistPublisert; | ||
|
||
return editable; | ||
const { id, erPublisert } = concept; | ||
return id == null || !erPublisert; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters