factn / resilience-app

Mutual Aid World - Local Resilience App. Providing ready made, constantly evolving software to meet the needs of local mutual aid projects.
https://mutualaidworld.gitbook.io/docs/
GNU General Public License v3.0
80 stars 65 forks source link

createdDate and fundedDate should be Timestamps not string #407

Open utunga opened 4 years ago

utunga commented 4 years ago

If we switch these to timestamp, as described here https://firebase.google.com/docs/reference/js/firebase.firestore.Timestamp

Then we can resolve two of the TODOs in the below.

Attention has to be paid to the mock data uploader, which is python based. https://github.com/factn/resilience-app/blob/master/scheme/data.py

Perhaps leave the python step as is and convert to Timestamp objects before upload in UploadMock.js

export interface MissionInterface {
  id: string;
  type: MissionType;
  createdDate: string; // TODO should be a date?
  missionDetails: FoodBoxDetails | {};

  status: MissionStatus;
  fundedStatus: MissionFundedStatus;
  fundedDate: string | null; // TODO should be a date?
  // TODO make sure this gets set when things get funded
  readyToStart: boolean;
  organizationId: string;
mat10tng commented 4 years ago

@qdozaq had some idea about using unix timestamp instead

qdozaq commented 4 years ago

I think it makes sense to use the firestore timestamps just not sure how we would generate that in the python script