Hello everyone,
I need to create an app where I've got a table with:
- Columns: day of selected month;
- Rows: firstname & lastname
In this app the user can add rows, and in every row he has to write the
working hours for each day.
The base data array is something like:
{
"WorkingHoursCalendar": [
{
"name": "Paul",
"days": [
{
"date": "1/08/2021",
"hours": 0
},
{
"date": "2/08/2021",
"hours": 0
},
{
"date": "3/08/2021",
"hours": 0
},
{
"date": "4/08/2021",
"hours": 0
},
{
"date": "5/08/2021",
"hours": 0
}
]
},
{
"name": "Anne",
"days": [
{
"date": "1/08/2021",
"hours": 0
},
{
"date": "2/08/2021",
"hours": 8
},
{
"date": "3/08/2021",
"hours": 8
},
{
"date": "4/08/2021",
"hours": 8
},
{
"date": "5/08/2021",
"hours": 0
}
]
},
{
"name": "John",
"days": [
{
"date": "1/08/2021",
"hours": 8
},
{
"date": "2/08/2021",
"hours": 0
},
{
"date": "3/08/2021",
"hours": 0
},
{
"date": "4/08/2021",
"hours": 0
},
{
"date": "5/08/2021",
"hours": 0
}
]
}
]
}
My problem is that I don't understand how to transform the {date,hours}
array in formComponent/formArray.
I created a formArray that contains one formComponent foreach "name" in the
array, but I really don't understand how to proceed after that.
Can someone help me?
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/angular/aafcca02-db05-42c0-8fb7-8533e020c7ban%40googlegroups.com.