Skip to content
Snippets Groups Projects
Commit 655d893f authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

feat: us821 sge retours

parent 700bf918
No related branches found
No related tags found
6 merge requests!96Deploy OpenShift v2,!95MEP fix liens undefined,!91MEP: removed Meilisearch,!79Fix: nginx unprivileged image,!77Back-office SGE before canary release,!57Feat/us821 sge retours
...@@ -266,6 +266,7 @@ const Consents: React.FC = () => { ...@@ -266,6 +266,7 @@ const Consents: React.FC = () => {
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
handleSearchChange(e.target.value) handleSearchChange(e.target.value)
} }
disabled={isShowingSelection}
></input> ></input>
</div> </div>
</div> </div>
...@@ -304,7 +305,11 @@ const Consents: React.FC = () => { ...@@ -304,7 +305,11 @@ const Consents: React.FC = () => {
<button <button
className="btnDelete" className="btnDelete"
onClick={isShowingSelection ? continueSelection : resetSelection} onClick={isShowingSelection ? continueSelection : resetSelection}
disabled={selectedNodes !== null && selectedNodes.length === 0} disabled={
!isShowingSelection &&
selectedNodes &&
selectedNodes.length === 0
}
> >
{isShowingSelection {isShowingSelection
? 'Continuer ma sélection' ? 'Continuer ma sélection'
...@@ -315,13 +320,7 @@ const Consents: React.FC = () => { ...@@ -315,13 +320,7 @@ const Consents: React.FC = () => {
onClick={ onClick={
!isShowingSelection ? showCurrentSelection : toggleOpenModal !isShowingSelection ? showCurrentSelection : toggleOpenModal
} }
disabled={ disabled={selectedNodes && selectedNodes.length <= 0}
!isShowingSelection &&
selectedNodes &&
selectedNodes?.length <= 0
? true
: false
}
> >
{!isShowingSelection ? 'Voir mes sélections' : 'Télécharger'} {!isShowingSelection ? 'Voir mes sélections' : 'Télécharger'}
<span>{selectedNodes?.length}</span> <span>{selectedNodes?.length}</span>
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
height: 40px; height: 40px;
padding: 0 0.5rem; padding: 0 0.5rem;
width: 500px; width: 500px;
&:disabled {
opacity: 0.8;
cursor: not-allowed;
}
} }
} }
} }
......
...@@ -31,7 +31,7 @@ export class ConsentService { ...@@ -31,7 +31,7 @@ export class ConsentService {
"Unauthorized : You don't have the rights to do this operation" "Unauthorized : You don't have the rights to do this operation"
) )
} else { } else {
toast.error('Failed to create mail subject') toast.error('Failed to search consents')
} }
console.error(e) console.error(e)
return null return null
...@@ -66,7 +66,7 @@ export class ConsentService { ...@@ -66,7 +66,7 @@ export class ConsentService {
"Unauthorized : You don't have the rights to do this operation" "Unauthorized : You don't have the rights to do this operation"
) )
} else { } else {
toast.error('Failed to create mail subject') toast.error('Failed to get consents')
} }
console.error(e) console.error(e)
return null return null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment