feat: add event rows to Show Page Calendar tab (#4319)

* feat: add event rows to Show Page Calendar tab

Closes #4287

* refactor: use time as events group key instead of ISO string for easier sorting

* feat: implement data model changes

* refactor: improve sorting
This commit is contained in:
Thaïs
2024-03-07 07:13:22 -03:00
committed by GitHub
parent 9190bd8d7f
commit dd961209de
11 changed files with 692 additions and 4 deletions

View File

@ -17,10 +17,7 @@
* vegetable: [{ id: '2', type: 'vegetable' }],
* }
*/
export const groupArrayItemsBy = <
ArrayItem extends Record<string, unknown>,
Key extends string,
>(
export const groupArrayItemsBy = <ArrayItem, Key extends string | number>(
array: ArrayItem[],
computeGroupKey: (item: ArrayItem) => Key,
) =>