Dissimulation du bouton enregistrer en mode lecture seule

This commit is contained in:
wpetit 2020-09-10 19:27:17 +02:00
parent 596108b4f4
commit 978cc65c41
1 changed files with 9 additions and 5 deletions

View File

@ -22,7 +22,7 @@ export const DecisionSupportFilePage: FunctionComponent<DecisionSupportFilePageP
filter: {
ids: id !== 'new' ? [id] : undefined,
}
}
},
});
const [ state, setState ] = useState({
@ -114,10 +114,14 @@ export const DecisionSupportFilePage: FunctionComponent<DecisionSupportFilePageP
</div>
<div className="level-right">
<div className="level-item buttons">
<button className="button is-medium is-success" disabled={!canSave} onClick={saveDSF}>
<span className="icon"><i className="fa fa-save"></i></span>
<span>Enregistrer</span>
</button>
{
isAuthorized ?
<button className="button is-medium is-success" disabled={!canSave} onClick={saveDSF}>
<span className="icon"><i className="fa fa-save"></i></span>
<span>Enregistrer</span>
</button> :
null
}
</div>
</div>
</div>