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

Timestamps for Grants #38

Closed
carletex opened this issue Feb 22, 2024 · 4 comments
Closed

Timestamps for Grants #38

carletex opened this issue Feb 22, 2024 · 4 comments

Comments

@carletex
Copy link
Contributor

Let's save the timestamp (it seems that Firestore doesn't have any internal ones as I thought) for different actions.

Maybe we can track the timestamp when the grant changes to: "proposed" (apply) | "approved" | "submitted" | "completed" (rejected is not very important, but we could too).

Not sure what approach is best:

type GrantData = {
  timestamps: {
    proposed: number;
    approved: number;
    //.....
}

or

type GrantData = {
  proposedTimestamp:number;
  approvedTimestamp:number
  // ....
}

If we can query / sort them correctly... I guess it doesn't matter

@carletex carletex changed the title Timestamp for grant Timestamps for Grants Feb 22, 2024
@carletex
Copy link
Contributor Author

cc @technophile-04

@technophile-04
Copy link
Member

Umm I was thinking going with second for simplicity and maybe change name from proposedTimestamp => proposedAt 😂

Because orderBy(fieldName) will be easy and fast.

It seems firebase also supports orderBy(subcollection.filedName) (since in first way we need to create timestamps subcollection).

But yeah I think going with just fieldName will be easy, will draft a PR and we could decide if need to other way 🙌

@carletex
Copy link
Contributor Author

Sounds great @technophile-04

@Pabl0cks
Copy link
Member

Merged in #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants