-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove top back to overview button
- Loading branch information
ismay
committed
Jul 27, 2023
1 parent
6b50b13
commit 637724b
Showing
28 changed files
with
30 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Feature: Users should be able to navigate back to the job list | ||
|
||
Scenario: There are two links to the job list | ||
Scenario: There is a link to the job list | ||
Given a single system job exists | ||
And the user navigated to the view job page | ||
Then there are two links to the job list page | ||
Then there is a link to the job list page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,20 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { ReactFinalForm } from '@dhis2/ui' | ||
import history from '../../services/history' | ||
import { useSubmitJob } from '../../hooks/jobs' | ||
import JobAddForm from './JobAddForm' | ||
|
||
const { Form } = ReactFinalForm | ||
|
||
const JobAddFormContainer = ({ setIsPristine }) => { | ||
const JobAddFormContainer = () => { | ||
const redirect = () => { | ||
history.push('/') | ||
} | ||
const [submitJob] = useSubmitJob({ onSuccess: redirect }) | ||
|
||
/** | ||
* destroyOnUnregister is enabled so that dynamic fields will be unregistered | ||
* when they're removed from the form, for instance when the jobType changes. | ||
*/ | ||
return ( | ||
<Form | ||
onSubmit={submitJob} | ||
component={JobAddForm} | ||
setIsPristine={setIsPristine} | ||
destroyOnUnregister | ||
/> | ||
<Form onSubmit={submitJob} component={JobAddForm} destroyOnUnregister /> | ||
) | ||
} | ||
|
||
const { func } = PropTypes | ||
|
||
JobAddFormContainer.propTypes = { | ||
setIsPristine: func.isRequired, | ||
} | ||
|
||
export default JobAddFormContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.