Skip to content

Commit

Permalink
Skeletons there for new public form. WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
micheal-w-wells committed Jul 17, 2024
1 parent a13ed8a commit ccc68ef
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
Binary file added app/public/assets/bear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/src/UI/Overlay/Landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ export const LandingComponent = (props) => {
}
};

const reportInvasivesPublic = async () => {
history.push('/ReportInvasive');
/*
dispatch({
type: TOGGLE_PANEL,
payload: { panelOpen: true, fullScreen: true }
});
*/
}
};

const { authenticated, workingOffline, username, displayName, email, roles } = useSelector(selectAuth);
const { loaded: userInfoLoaded, activated } = useSelector(selectUserInfo);
return (
Expand Down Expand Up @@ -172,6 +183,17 @@ export const LandingComponent = (props) => {
<InformationalLinkBox />
</>
)}
<Typography variant="h5">
<br />
<strong>To report invasive species as a member of the public, please submit a Report Invasives form</strong>
</Typography>
{connected && !activated && (
<Box mt={2} paddingBottom={'50px'}>
<Button variant="outlined" color="primary" onClick={reportInvasivesPublic}>
Report Invasives
</Button>
</Box>
)}
{roles.length === 0 && (
<Typography variant="h5">
<br />
Expand Down
15 changes: 15 additions & 0 deletions sharedAPI/src/openapi/api-doc/Activities/Plant/Observations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ export const Activity_Observation_PlantAquatic = {
}
}
};

export const Activity_Observation_Plant_Public = {
type: 'object',
properties: {
activity_data: {
...Activity
},
activity_type_data: {
...Observation
},
activity_subtype_data: {
...Subtype_Data_Observation_PlantAquatic
}
}
};
10 changes: 10 additions & 0 deletions sharedAPI/src/openapi/api-doc/PublicReportInvasive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const PublicReportInvasive = {
type: 'object',
email: { type: 'string' },
telephone: { type: 'string' },
personObserving: { type: 'string' },
date_observed: { type: 'string' },
suspected_species: { type: 'string' },
location: { type: 'string' },
area_of_infestation_comments: { type: 'string' },
}
2 changes: 2 additions & 0 deletions sharedAPI/src/openapi/api-doc/api-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Activity_Monitoring_ChemicalTerrestrialAquaticPlant,
Activity_Monitoring_MechanicalTerrestrialAquaticPlant
} from './Activities/Plant/Monitorings';
import { PublicReportInvasive} from './PublicReportInvasive';
import {
Activity_Observation_PlantAquatic,
Activity_Observation_PlantTerrestrial
Expand Down Expand Up @@ -166,6 +167,7 @@ export const api_doc = {
AdminDefinedShapeResultItem,

AdminDefinedShapeResponse,
PublicReportInvasive: PublicReportInvasive,

//treatments
Activity_Treatment_ChemicalPlantTerrestrial: Activity_Treatment_ChemicalPlantTerrestrial,
Expand Down

0 comments on commit ccc68ef

Please sign in to comment.