Reformat all project files to use the prettier config file.

This commit is contained in:
Patrick Fic
2024-03-27 15:35:07 -07:00
parent b161530381
commit e1df64d592
873 changed files with 111387 additions and 125473 deletions

View File

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