diff --git a/src/API/api.ts b/src/API/api.ts
index 67ba70d..ee00204 100644
--- a/src/API/api.ts
+++ b/src/API/api.ts
@@ -4,9 +4,9 @@ import axios from "axios";
// baseURL: "http://10.10.10.64:8080/api/v1/",
// });
const instance = axios.create({
- // baseURL: "https://board-api.ontime-logs.com/api/v1/",
- baseURL: "https://api.tteld.co/api/v1/",
- // baseURL: "http://10.10.10.64:8000/api/v1/",
+ baseURL: "https://board-api.ontime-logs.com/api/v1/",
+ // baseURL: "https://api.tteld.co/api/v1/",
+ // baseURL: "http://10.10.10.29:8000/api/v1/",
});
const token: string | null = localStorage.getItem("access");
diff --git a/src/App.tsx b/src/App.tsx
index 38873b2..2b68966 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -286,8 +286,8 @@ const App: React.FC = () => {
// );
// taskSocket = new WebSocket(`wss://api.tteld.co/global/?user_id=${admin_id}`);
taskSocket = new WebSocket(
- // `wss://board-socket.ontime-logs.com/global/?user_id=${admin_id}`
- `wss://ontime-socket.tteld.co/global/?user_id=${admin_id}`
+ `wss://board-api.ontime-logs.com/global/?user_id=${admin_id}`
+ // `wss://ontime-socket.tteld.co/global/?user_id=${admin_id}`
// `ws://10.10.10.64:8000/global/?user_id=${admin_id}`
);
diff --git a/src/Components/Accounting/AccountingHistory.tsx b/src/Components/Accounting/AccountingHistory.tsx
index 4fc6dfb..0ce5eb6 100644
--- a/src/Components/Accounting/AccountingHistory.tsx
+++ b/src/Components/Accounting/AccountingHistory.tsx
@@ -467,81 +467,80 @@ const AccountingHistory: React.FC = () => {
{years.length === 0 ? (
) : (
- years.map((year) => (
-
-
{year}
- {userData &&
- userData.salaries
- .filter((salary) => salary.year === year)
- .map((filteredSalary) => (
-
,
- dataIndex: "no",
- width: "5%",
- align: "center",
- render: (text, record, index) => index + 1,
- },
- { title: "Year", dataIndex: "year" },
- { title: "Month", dataIndex: "month" },
+ years.map((year) => {
+ const salariesForYear =
+ userData?.salaries?.filter((salary) => salary.year === year) ||
+ [];
- {
- title: "Total Charges",
- dataIndex: "total_charges",
- render: (text: string, record: any) => (
-
${record.total_charges}
- ),
- },
- {
- title: "Total Bonus",
- dataIndex: "total_bonuses",
- render: (text: string, record: any) => (
-
${record.total_bonuses}
- ),
- },
- {
- title: "Total Salary",
- dataIndex: "total_salary",
- render: (text: string, record: any) => (
-
${record.total_salary}
- ),
- },
- {
- title: "Action",
- dataIndex: "salary_document_path",
- align: "center",
- render: (text, record) => (
-
- }
- onClick={() =>
- record.salary_document_path &&
- window.open(record.salary_document_path)
- }
- disabled={!record.salary_document_path}
- />
-
- ),
- },
- ]}
- rowKey="id"
- pagination={false}
- bordered
- />
- ))}
-
- ))
+ return (
+
+
{year}
+
,
+ dataIndex: "no",
+ width: "5%",
+ align: "center",
+ render: (text, record, index) => index + 1,
+ },
+ { title: "Year", dataIndex: "year" },
+ { title: "Month", dataIndex: "month" },
+ {
+ title: "Total Charges",
+ dataIndex: "total_charges",
+ render: (text: string, record: any) => (
+
${record.total_charges}
+ ),
+ },
+ {
+ title: "Total Bonus",
+ dataIndex: "total_bonuses",
+ render: (text: string, record: any) => (
+
${record.total_bonuses}
+ ),
+ },
+ {
+ title: "Total Salary",
+ dataIndex: "total_salary",
+ render: (text: string, record: any) => (
+
${record.total_salary}
+ ),
+ },
+ {
+ title: "Action",
+ dataIndex: "salary_document_path",
+ align: "center",
+ render: (text, record) => (
+
+ }
+ onClick={() =>
+ record.salary_document_path &&
+ window.open(record.salary_document_path)
+ }
+ disabled={!record.salary_document_path}
+ />
+
+ ),
+ },
+ ]}
+ rowKey="id"
+ pagination={false}
+ bordered
+ />
+
+ );
+ })
)}
diff --git a/src/Components/Updates/UpdateEdit.tsx b/src/Components/Updates/UpdateEdit.tsx
index 1e1c1f6..90b7e9b 100644
--- a/src/Components/Updates/UpdateEdit.tsx
+++ b/src/Components/Updates/UpdateEdit.tsx
@@ -210,9 +210,9 @@ const UpdateEdit = () => {
// readOnly
// />
)} */}
- {data?.company.id !== undefined && (
+ {data?.company?.id !== null && (
)}
diff --git a/src/Components/Updates/UpdateTable.tsx b/src/Components/Updates/UpdateTable.tsx
index cd1125c..5a2644e 100644
--- a/src/Components/Updates/UpdateTable.tsx
+++ b/src/Components/Updates/UpdateTable.tsx
@@ -192,8 +192,8 @@ const UpdateTable = ({
render: (status: string) => (
{status === "Done" && Done
}
- {status === "Checking" && (
- Checking
+ {status === "In Progress" && (
+ In Progress
)}
{status === "New" && New
}
{status === "Setup" && Setup
}