mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: Filter financial reports by items, customers or vendors.
This commit is contained in:
@@ -297,6 +297,10 @@ export const saveInvoke = (func, ...rest) => {
|
||||
return func && func(...rest);
|
||||
};
|
||||
|
||||
export const safeInvoke = (func, ...rest) => {
|
||||
return func && func(...rest);
|
||||
};
|
||||
|
||||
export const transformToForm = (obj, emptyInitialValues) => {
|
||||
return _.pickBy(
|
||||
obj,
|
||||
@@ -432,11 +436,10 @@ export function flatObject(obj) {
|
||||
const path = []; // current path
|
||||
|
||||
function dig(obj) {
|
||||
if (obj !== Object(obj))
|
||||
/*is primitive, end of path*/
|
||||
return (flatObject[path.join('.')] = obj); /*<- value*/
|
||||
if (obj !== Object(obj)) {
|
||||
return (flatObject[path.join('.')] = obj);
|
||||
}
|
||||
|
||||
//no? so this is an object with keys. go deeper on each key down
|
||||
for (let key in obj) {
|
||||
path.push(key);
|
||||
dig(obj[key]);
|
||||
|
||||
Reference in New Issue
Block a user