Prepare front to edit events

This commit is contained in:
Chocobozzz
2019-09-02 14:35:50 +02:00
parent 57f839c17a
commit 2cfb777a9d
10 changed files with 213 additions and 145 deletions

5
js/src/utils/object.ts Normal file
View File

@@ -0,0 +1,5 @@
export function buildObjectCollection<T, U>(collection: T[] | undefined, builder: (new (p: T) => U)) {
if (!collection || Array.isArray(collection) === false) return [];
return collection.map(v => new builder(v));
}