-
Notifications
You must be signed in to change notification settings - Fork 100
Improve retrieval of properties from LOI documents #2235
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
base: master
Are you sure you want to change the base?
Conversation
|
@rfontanarosa Is this draft PR still valid / working? |
yes, but i have to add the changes merged in master. I'll do it once this (#2249) will be approved. |
# Conflicts: # functions/src/export-csv.ts
| if (!(ownerIdFilter ? loi[9] === 2 && loi[5] === ownerIdFilter : true)) | ||
| return; | ||
| if (ownerIdFilter) { | ||
| if (!(loi[9] === 2 && loi[5] === ownerIdFilter)) { |
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.
Do we have named constants we can refer to field numbers instead of using literals?
| const loi = doc.data(); | ||
| if (!(ownerIdFilter ? loi[9] === 2 && loi[5] === ownerIdFilter : true)) | ||
| return; | ||
| if (ownerIdFilter) { |
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.
Also, I think this is still a bit confusing.. maybe we want something like this:
if (canViewAll || loiOwnerId === userId) {
return extractLoiProperties(loi);
} else {
return undefined;
}Then we don't need ownerIdFilter at all
Uh oh!
There was an error while loading. Please reload this page.