Hey i am make a schedule component in Angular and where i have a form that the user fills out ->
Model:_____ StartDate: _____ QTY: ______
Now, I would like it to be stores in that each one is its own record: For example, if i put quantity as 5, it will have 5 records (this way i can make each unit complete). What I have so far is below:
for (let counter = 1; counter < Qty + 1; Counter++)
{
db.collection("sched").add({
Model: "FakeModel",
StartDate: "06-06-2020",
UnitNumber: counter,
complete: false
});
}
There seems like there should be a better way?
Thanks in advance!