@@ -127,13 +144,12 @@ const RequestsEdit = ({
showSearch
style={{ width: 325 }}
placeholder="Search Driver"
- onSearch={(value: any) => setCustomerName(value)}
- onChange={(e: any) => setDriverId(e)}
+ onSearch={(value) => setCustomerName(value)}
+ onChange={(value: number) => optionClick(value)}
options={customerData?.data?.map((item) => ({
label: item?.name,
value: item?.id,
}))}
- value={customerName}
filterOption={false}
autoClearSearchValue={false}
allowClear
diff --git a/src/Components/Tasks/TaskTable.tsx b/src/Components/Tasks/TaskTable.tsx
index cc1e57b..811acf8 100644
--- a/src/Components/Tasks/TaskTable.tsx
+++ b/src/Components/Tasks/TaskTable.tsx
@@ -26,7 +26,10 @@ import ontime from "../../assets/ontimeicon.svg";
import tt from "../../assets/tticon.svg";
// @ts-ignore
import tagIcon from "../../assets/tagIcon.png";
+// @ts-ignore
+import tgIcon from "../../assets/telegram.png";
import { role } from "../../App";
+import { render } from "@testing-library/react";
const admin_id = localStorage.getItem("admin_id");
const TaskTable = ({
@@ -132,9 +135,50 @@ const TaskTable = ({
const columns = useMemo(() => {
const columns = [
{
- title:
,
+ title: "",
+ dataIndex: "no",
+ width: "4%",
+ render: (text: any, record: TTask) => (
+
+ {record.via_telegram && (
+
+
+
+ )}
+
+ ),
+ },
+ {
+ title: (
+
+
+
+ ),
dataIndex: "no",
width: "5%",
+ render: (text: any, record: TTask) => (
+
+ {text}
+
+ ),
},
{
title: "Company",
@@ -179,7 +223,7 @@ const TaskTable = ({
ellipsis: {
showTitle: false,
},
- render: (item: { title: string; id: number }) => (
+ render: (item: { title: string; id: number }, record: TTask) => (
{item.title}
diff --git a/src/Components/Updates/UpdateTable.tsx b/src/Components/Updates/UpdateTable.tsx
index 5b85faf..b817541 100644
--- a/src/Components/Updates/UpdateTable.tsx
+++ b/src/Components/Updates/UpdateTable.tsx
@@ -112,7 +112,7 @@ const UpdateTable = ({
{
title:
,
dataIndex: "no",
- width: "5%",
+ width: "4%",
},
{
title: "Company",
@@ -164,7 +164,7 @@ const UpdateTable = ({
),
},
{
- title: "Complited by",
+ title: "Completed by",
dataIndex: "executor",
ellipsis: {
showTitle: false,
diff --git a/src/assets/telegram.png b/src/assets/telegram.png
new file mode 100644
index 0000000..4651e73
Binary files /dev/null and b/src/assets/telegram.png differ
diff --git a/src/types/Tasks/TTasks.ts b/src/types/Tasks/TTasks.ts
index 004b47d..287e50f 100644
--- a/src/types/Tasks/TTasks.ts
+++ b/src/types/Tasks/TTasks.ts
@@ -12,6 +12,7 @@ export type TTask = {
is_active: boolean;
pti: boolean;
created_at: string;
+ via_telegram: boolean;
updated_at: string;
business: AssignedTo;
company: Company;