-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Anlegen einer Subsite mit dem Titel des entsprechenden Gruppennamens (#…
…17) Co-authored-by: Thomas Schley <thomas.schley@lmis.de>
- Loading branch information
Showing
14 changed files
with
357 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, {ChangeEventHandler, MouseEventHandler} from 'react'; | ||
import {Button, Form} from 'react-bootstrap'; | ||
import {NavLink} from 'react-router'; | ||
|
||
import AgriCrop from '../models/AgriCrop'; | ||
import Sensor from '../models/Sensor'; | ||
|
||
import styles from './SingleSelectionGroups.module.css'; | ||
|
||
interface Props { | ||
agriCrops: AgriCrop[], | ||
handleChange: ChangeEventHandler, | ||
handleReset: MouseEventHandler, | ||
selectedAgriCrop: AgriCrop | undefined, | ||
selectedSensor: Sensor | undefined, | ||
sensors: Sensor[] | ||
} | ||
|
||
function SingleSelectionGroupContents({ agriCrops, handleChange, handleReset, selectedAgriCrop, selectedSensor, sensors }: Props) { | ||
return <> | ||
<h4>Übersicht der Gruppeninhalte:</h4> | ||
<Form id="group_contents"> | ||
{sensors.map((sensor) => ( | ||
<Form.Check | ||
className={styles.groups} | ||
type="radio" | ||
id={sensor.id} | ||
key={sensor.id} | ||
label={sensor.id} | ||
value={sensor.id} | ||
name="group_contents" | ||
checked={selectedSensor?.id === sensor.id} | ||
onChange={handleChange} | ||
/> | ||
))} | ||
{agriCrops.map((agriCrops) => ( | ||
<Form.Check | ||
className={styles.groups} | ||
type="radio" | ||
id={agriCrops.id} | ||
key={agriCrops.id} | ||
label={agriCrops.id} | ||
value={agriCrops.id} | ||
name="group_contents" | ||
checked={selectedAgriCrop?.id === agriCrops.id} | ||
onChange={handleChange} | ||
/> | ||
))} | ||
<NavLink className="btn btn-secondary mt-5" to="/">Zurück</NavLink> | ||
<Button className="ms-5 mt-5" variant="secondary" onClick={handleReset} disabled={!selectedSensor && !selectedAgriCrop}> | ||
Auswahl aufheben | ||
</Button> | ||
</Form> | ||
</>; | ||
} | ||
|
||
export default SingleSelectionGroupContents; |
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
Oops, something went wrong.