I have to integrate service data to angular mat table but it should change like below scenarios.
- if start date & end date difference is < 21 days then it should show
dd/mm
betweenstart_date
&end_date
in header - if start date & end date difference in < 70 days then it should show header with week number.
- if start date & end date difference is > 70 days & less than 1 year then header values should be month names. Data from service look like below:
let arr =[
{
Code: 1234,
Type: first
Codedata: [{
Ward: abc,
Start_date:. 10/10/2022,
End_date : 15/10/2022
},{
Ward: xyz,
Start_date:. 15/10/2022,
End_date : 15/12/2022
}
]
}]
I tried to change headers dynamically so I am getting error as could not find column id with [id]