mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-21 20:44:18 +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}
|
||||
* @constructor
|
||||
*/
|
||||
export default function BoxRepositoryCreate({ ...props }) {
|
||||
export default function BoxRepositoryCreate({ running, ...props }) {
|
||||
const {
|
||||
id,
|
||||
evaluationMode,
|
||||
|
@ -80,6 +80,7 @@ export default function BoxRepositoryCreate({ ...props }) {
|
|||
icon={faBackward}
|
||||
color={"Red"}
|
||||
onClick={() => revert()}
|
||||
disabled={running}
|
||||
>
|
||||
Annulla modifiche
|
||||
</Button>
|
||||
|
@ -88,6 +89,7 @@ export default function BoxRepositoryCreate({ ...props }) {
|
|||
icon={faPencilAlt}
|
||||
color={"Green"}
|
||||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||
disabled={running}
|
||||
>
|
||||
Salva modifiche
|
||||
</Button>
|
||||
|
@ -98,6 +100,7 @@ export default function BoxRepositoryCreate({ ...props }) {
|
|||
icon={faPlus}
|
||||
color={"Green"}
|
||||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||
disabled={running}
|
||||
>
|
||||
Crea repository
|
||||
</Button>
|
||||
|
|
|
@ -147,7 +147,7 @@ export default function RepositoryEditor({
|
|||
<BoxConditionUser className={Style.SearchByUser}/>
|
||||
<BoxConditionDatetime className={Style.SearchByTimePeriod}/>
|
||||
<BoxConditions className={Style.Conditions}/>
|
||||
<BoxRepositoryCreate className={Style.CreateDialog}/>
|
||||
<BoxRepositoryCreate running={loading} className={Style.CreateDialog}/>
|
||||
</div>
|
||||
</ContextRepositoryEditor.Provider>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue