feat: payment receive and made form.

This commit is contained in:
Ahmed Bouhuolia
2020-11-05 12:16:28 +02:00
parent 1738a333c7
commit 69e7612b62
42 changed files with 1100 additions and 750 deletions

View File

@@ -262,3 +262,15 @@ export const flatToNestedArray = (
export const orderingLinesIndexes = (lines, attribute = 'index') => {
return lines.map((line, index) => ({ ...line, [attribute]: index + 1 }));
};
export const transformToObject = (arr, key) => {
return arr.reduce(function(acc, cur, i) {
acc[key ? cur[key] : i] = cur;
return acc;
}, {});
}
export const itemsStartWith = (items, char) => {
return items.filter((item) => item.indexOf(char) === 0);
};