James-Lycett / workplace-wellness

0 stars 0 forks source link

Entries Generator #8

Closed James-Lycett closed 3 months ago

James-Lycett commented 3 months ago

I made one of those seed generators like I made for my restaurant reservation system.

This one is a little more straightforward and a little more actually random, it starts at the current date minus 30 days and creates one entry per day for users 1, 2, and 3 up to whatever number of days is input in the function arg. Pretty much all the values for each entry are individually randomized. I seeded it out to sometime next year.

I had to make some adjustments to include the generator in the seed file and to the readPerson function in entries.service so it wouldn't load up all these future entries when we visit the "Past Reports" page.

Don't forget to 'npm i' to make sure moment is installed on the frontend and the backend

cozyfestiv commented 3 months ago

I love this is like your signature move. It's a good one!