mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 13:04:19 +00:00
🔧 Use loading in BoxRepositoryCreate
This commit is contained in:
parent
5e3ef20785
commit
2b13ef41d6
2 changed files with 5 additions and 2 deletions
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue