feature : Puschases & Sales / fix : tasks

This commit is contained in:
elforjani3
2020-09-04 00:41:22 +02:00
92 changed files with 4642 additions and 1610 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
export default function DivFieldCell({ cell: { value: initialValue } }) {
export const DivFieldCell = ({ cell: { value: initialValue } }) => {
const [value, setValue] = useState(initialValue);
useEffect(() => {
@@ -8,4 +8,13 @@ export default function DivFieldCell({ cell: { value: initialValue } }) {
}, [initialValue]);
return <div>${value}</div>;
}
};
export const EmptyDiv = ({ cell: { value: initialValue } }) => {
const [value, setValue] = useState(initialValue);
useEffect(() => {
setValue(initialValue);
}, [initialValue]);
return <div>{value}</div>;
};

View File

@@ -4,7 +4,7 @@ import InputGroupCell from './InputGroupCell';
import ContactsListFieldCell from './ContactsListFieldCell';
import EstimatesListFieldCell from './EstimatesListFieldCell';
import PercentFieldCell from './PercentFieldCell';
import DivFieldCell from './DivFieldCell';
import { DivFieldCell,EmptyDiv } from './DivFieldCell';
export {
AccountsListFieldCell,
MoneyFieldCell,
@@ -13,4 +13,5 @@ export {
EstimatesListFieldCell,
PercentFieldCell,
DivFieldCell,
EmptyDiv,
};