IO-2667 Employee Tasks report

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2024-04-18 13:42:42 -07:00
parent cf82a8013f
commit 7d22dcab7c
7 changed files with 103 additions and 6 deletions

View File

@@ -0,0 +1,37 @@
import { Select, Space, Tag } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
const { Option } = Select;
//To be used as a form element only.
const EmployeeSearchSelectEmail = ({ options, ...props }) => {
const { t } = useTranslation();
return (
<Select
showSearch
// value={option}
style={{
width: 400
}}
optionFilterProp="search"
{...props}
>
{options
? options.map((o) => (
<Option key={o.id} value={o.user_email} search={`${o.employee_number} ${o.first_name} ${o.last_name}`}>
<Space>
{`${o.employee_number} ${o.first_name} ${o.last_name}`}
<Tag color="green">
{o.flat_rate ? t("timetickets.labels.flat_rate") : t("timetickets.labels.straight_time")}
</Tag>
</Space>
</Option>
))
: null}
</Select>
);
};
export default EmployeeSearchSelectEmail;