1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 22:44:19 +00:00

🔧 Use loading in BoxRepositoryCreate

This commit is contained in:
Steffo 2021-05-17 15:58:24 +02:00
parent 5e3ef20785
commit 2b13ef41d6
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 5 additions and 2 deletions

View file

@ -19,7 +19,7 @@ import { useHistory } from "react-router"
* @returns {JSX.Element} * @returns {JSX.Element}
* @constructor * @constructor
*/ */
export default function BoxRepositoryCreate({ ...props }) { export default function BoxRepositoryCreate({ running, ...props }) {
const { const {
id, id,
evaluationMode, evaluationMode,
@ -80,6 +80,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faBackward} icon={faBackward}
color={"Red"} color={"Red"}
onClick={() => revert()} onClick={() => revert()}
disabled={running}
> >
Annulla modifiche Annulla modifiche
</Button> </Button>
@ -88,6 +89,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faPencilAlt} icon={faPencilAlt}
color={"Green"} color={"Green"}
onClick={_ => goToOnSuccess(save, history, "/repositories")()} onClick={_ => goToOnSuccess(save, history, "/repositories")()}
disabled={running}
> >
Salva modifiche Salva modifiche
</Button> </Button>
@ -98,6 +100,7 @@ export default function BoxRepositoryCreate({ ...props }) {
icon={faPlus} icon={faPlus}
color={"Green"} color={"Green"}
onClick={_ => goToOnSuccess(save, history, "/repositories")()} onClick={_ => goToOnSuccess(save, history, "/repositories")()}
disabled={running}
> >
Crea repository Crea repository
</Button> </Button>

View file

@ -147,7 +147,7 @@ export default function RepositoryEditor({
<BoxConditionUser className={Style.SearchByUser}/> <BoxConditionUser className={Style.SearchByUser}/>
<BoxConditionDatetime className={Style.SearchByTimePeriod}/> <BoxConditionDatetime className={Style.SearchByTimePeriod}/>
<BoxConditions className={Style.Conditions}/> <BoxConditions className={Style.Conditions}/>
<BoxRepositoryCreate className={Style.CreateDialog}/> <BoxRepositoryCreate running={loading} className={Style.CreateDialog}/>
</div> </div>
</ContextRepositoryEditor.Provider> </ContextRepositoryEditor.Provider>
) )