Skip to content
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

Edit Trip Implementation #73

Merged
merged 29 commits into from
Jul 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
764eb5c
Initial implementation of edit trips.
zghera Jul 16, 2020
78a9356
Rename placeholderObj to defaultFormObj now that these values are use…
zghera Jul 16, 2020
2e4398c
Fix placeholder for edit trip bug: now edit trip modal form inputs ar…
zghera Jul 16, 2020
fbb72f0
Rename tripObj to tripData for clarity (it is the document data).
zghera Jul 16, 2020
7f85290
Update form control creation function JSDoc.
zghera Jul 16, 2020
dc8f49b
Merge branch 'edit-trip-modal-infra' into edit-trip-implementation
zghera Jul 16, 2020
62993fd
Fix bug: current user was displayed when editting collaborators and c…
zghera Jul 16, 2020
6ac1b0c
Update document writen/overwritten success console.logs.
zghera Jul 16, 2020
f0139c9
Improve JSDoc in save-trip-modal.js.
zghera Jul 16, 2020
244b0cc
Rename isNewtripForm to isAddNewTripForm and make it instance variabl…
zghera Jul 16, 2020
e869354
Revert "Update document writen/overwritten success console.logs."
zghera Jul 16, 2020
39e437d
Merge branch 'edit-trip-modal-infra' into edit-trip-implementation
zghera Jul 16, 2020
be634f8
Merge branch 'edit-trip-modal-infra' into edit-trip-implementation
zghera Jul 17, 2020
15e66a3
single quotes.
zghera Jul 17, 2020
20390d6
Include use of both placeholders and default form values.
zghera Jul 17, 2020
4de61bb
Remove placeholder values from defaultFormObj for adding trips.
zghera Jul 17, 2020
849d149
Merge branch 'edit-trip-modal-infra' into edit-trip-implementation
zghera Jul 17, 2020
f069221
Add timestampToISOString to time utils.
zghera Jul 17, 2020
de6f5a9
Improve JSDoc for time util timestamp <--> iso date string functions.
zghera Jul 17, 2020
b95c3ab
Chang logic for the default form object for add trip.
zghera Jul 21, 2020
da82254
Add documentation to getDefaultFormField.
zghera Jul 21, 2020
cdf593d
Merge branch 'edit-trip-modal-infra' into edit-trip-implementation
zghera Jul 21, 2020
b872490
Change trip struct/object to use same fields as in database.js to ens…
zghera Jul 21, 2020
4169b5c
Space out props for Trip component declaration.
zghera Jul 21, 2020
f4efb4a
Add '#' to all issue numbers.
zghera Jul 21, 2020
e07693d
Tighten annotation requirements.
zghera Jul 21, 2020
576a23b
Move save trip modal form element creation functions to separate file.
zghera Jul 22, 2020
3bca825
Move save trip modal form element creation functions to separate file.
zghera Jul 22, 2020
bd20865
Merge branch 'master' into edit-trip-implementation
zghera Jul 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve JSDoc for time util timestamp <--> iso date string functions.
zghera committed Jul 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit de6f5a9d270cb8cd3f639cde47c1310099fcd6ba
6 changes: 3 additions & 3 deletions frontend/src/components/Utils/time.js
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ export function timestampToFormatted(msTimestamp, timezone = "America/New_York")
/**
* Return a Firestore Timestamp corresponding to the date in `dateStr`.
*
* @param {string} dateStr String containing a date in the form 'yyyy-mm-dd'.
* @param {string} dateStr String containing a date in the form 'YYYY-MM-DD'.
* @return {firebase.firestore.Timestamp} Firestore timestamp object created.
*/
export function getTimestampFromDateString(dateStr) {
@@ -75,10 +75,10 @@ export function getTimestampFromDateString(dateStr) {
}

/**
* Returns a date string in ISO format.
* Formats a Firestore timestamp into a date string in ISO format.
*
* @param {firebase.firestore.Timestamp} timestamp Firestore timestamp object.
* @return {string} ISO formatted date string.
* @return {string} ISO formatted date string: "YYYY-MM-DD or 2020-05-12".
*/
export function timestampToISOString(timestamp) {
return timestamp.toDate().toISOString().substring(0,10);