BOD-23 Added labor pages tab + finalized time ticket tab + created allocation calculations

This commit is contained in:
Patrick Fic
2020-04-15 15:39:05 -07:00
parent 325a82ac86
commit 8e12320c19
20 changed files with 724 additions and 132 deletions

View File

@@ -5,7 +5,13 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
const { Option } = Select;
//To be used as a form element only.
const EmployeeSearchSelect = ({ value, onChange, options, onSelect }) => {
const EmployeeSearchSelect = ({
value,
onChange,
options,
onSelect,
onBlur,
}) => {
const [option, setOption] = useState(value);
const { t } = useTranslation();
useEffect(() => {
@@ -24,6 +30,7 @@ const EmployeeSearchSelect = ({ value, onChange, options, onSelect }) => {
onChange={setOption}
optionFilterProp="search"
onSelect={onSelect}
onBlur={onBlur}
>
{options
? options.map((o) => (
@@ -39,7 +46,7 @@ const EmployeeSearchSelect = ({ value, onChange, options, onSelect }) => {
<Tag color="red">
<CurrencyFormatter>{o.base_rate}</CurrencyFormatter>
</Tag>
<Tag color="red">
<Tag color="green">
{o.flat_rate
? t("timetickets.labels.flat_rate")
: t("timetickets.labels.straight_time")}