-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat observation fields #352
Conversation
@achou11 alot of this is ported over from mapeo-mobile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of non-blocking nits but overall didn't find any notable issues when testing
|
||
const defaultAcc: Field[] = []; | ||
const fields = !fieldsQuery.data | ||
? undefined | ||
const fields = !data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: invert the ternary to avoid the negation
@@ -61,7 +59,7 @@ export const ObservationScreen: NativeNavigationComponent<'Observation'> = ({ | |||
const {lat, lon, createdBy} = observation; | |||
const isMine = deviceId === createdBy; | |||
// Currently only show photo attachments | |||
const photos = []; | |||
// const photos = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe just remove this + comment above?
// onPress: handleDetailsPress, | ||
// }); | ||
// } | ||
if (preset?.fieldIds && preset.fieldIds.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: think this can be shortened?
if (preset?.fieldIds && preset.fieldIds.length) { | |
if (preset?.fieldIds?.length) { |
{...m.title} | ||
values={{ | ||
current: questionNumber, | ||
total: !preset ? 0 : preset.fieldIds.length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: invert ternary
Add observation fields to observation edit screen and displays observations fields when viewing an observation