-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CM-880: added picker for source and task type
- Loading branch information
1 parent
0a16121
commit 3a4f124
Showing
6 changed files
with
121 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { ConstantBasedPicker } from '@openimis/fe-core'; | ||
import { TASK_AVAILABLE_SOURCES } from '../constants'; | ||
|
||
function TaskSourcesPicker(props) { | ||
const { | ||
required, withNull, readOnly, onChange, value, nullLabel, withLabel, | ||
} = props; | ||
return ( | ||
<ConstantBasedPicker | ||
module="tasksManagement" | ||
label="task.source" | ||
constants={TASK_AVAILABLE_SOURCES} | ||
onChange={onChange} | ||
value={value} | ||
required={required} | ||
readOnly={readOnly} | ||
withNull={withNull} | ||
nullLabel={nullLabel} | ||
withLabel={withLabel} | ||
/> | ||
); | ||
} | ||
|
||
export default TaskSourcesPicker; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { ConstantBasedPicker } from '@openimis/fe-core'; | ||
import { TASK_AVAILABLE_TYPES } from '../constants'; | ||
|
||
function TaskTypesPicker(props) { | ||
const { | ||
required, withNull, readOnly, onChange, value, nullLabel, withLabel, | ||
} = props; | ||
return ( | ||
<ConstantBasedPicker | ||
module="tasksManagement" | ||
label="task.type" | ||
constants={TASK_AVAILABLE_TYPES} | ||
onChange={onChange} | ||
value={value} | ||
required={required} | ||
readOnly={readOnly} | ||
withNull={withNull} | ||
nullLabel={nullLabel} | ||
withLabel={withLabel} | ||
/> | ||
); | ||
} | ||
|
||
export default TaskTypesPicker; |
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