diff --git a/src/Pages/Coupon/Page.tsx b/src/Pages/Coupon/Page.tsx
index 6145938..43fd85c 100644
--- a/src/Pages/Coupon/Page.tsx
+++ b/src/Pages/Coupon/Page.tsx
@@ -5,9 +5,6 @@ import DashHeader from '../../Layout/Dashboard/DashHeader'
import LyTable from '../../Layout/Dashboard/LyTable'
import useTableColumns from './useTableColumns'
import { QueryStatusEnum } from '../../config/QueryStatus'
-import { useGetProduct } from '../../api/product'
-import { Button } from 'antd'
-import { useTranslation } from 'react-i18next'
import { useNavigate } from 'react-router-dom'
import AddButton from '../../Layout/Dashboard/AddButton/AddButton'
import { useGetCoupon } from '../../api/Coupon'
@@ -17,7 +14,6 @@ function Page() {
const column =useTableColumns()
const {data ,status } = useGetCoupon()
- const [t] = useTranslation()
const navigate = useNavigate()
const totalRows = data?.meta?.total;
diff --git a/src/Pages/order/Edit/EditForm.tsx b/src/Pages/order/Edit/EditForm.tsx
index 17697c9..0e93a25 100644
--- a/src/Pages/order/Edit/EditForm.tsx
+++ b/src/Pages/order/Edit/EditForm.tsx
@@ -3,6 +3,7 @@ import React from 'react'
import { Col, Row } from 'reactstrap';
import ValidationField from '../../../Components/ValidationField/ValidationField';
import { useFormikContext } from 'formik';
+import { FaCheck, FaTimes, FaClock, FaBan } from 'react-icons/fa';
import { useTranslation } from 'react-i18next';
@@ -12,8 +13,11 @@ function Form() {
// 'pending_approve', 'approved', 'rejected', 'pending_cancellation', 'cancelled'
const stateSelect = [
- { label: "pending_approve", value: "pending_approve" }, { label: "approved", value: "approved" },
- { label: "rejected", value: "rejected" }, { label: "pending_cancellation", value: "pending_cancellation" }]
+ { label:
Pending Approve
, value: "pending_approve" },
+ { label: Approved
, value: "approved" },
+ { label: Rejected
, value: "rejected" },
+ { label: Pending Cancellation
, value: "pending_cancellation" }
+ ];
return (
diff --git a/src/Pages/order/useTableColumns.tsx b/src/Pages/order/useTableColumns.tsx
index f4c463e..b949ada 100644
--- a/src/Pages/order/useTableColumns.tsx
+++ b/src/Pages/order/useTableColumns.tsx
@@ -2,6 +2,7 @@ import { useTranslation } from "react-i18next";
import { useDeleteOrder } from "../../api/order";
import Actions from "../../Components/Ui/tables/Actions";
import { useNavigate } from "react-router-dom";
+import { FaCheck, FaTimes, FaClock, FaBan } from 'react-icons/fa';
const useTableColumns = () => {
const [t] = useTranslation();
@@ -31,18 +32,41 @@ const useTableColumns = () => {
selector:(row:any) => row?.user?.email,
},
+
{
name: t("status"),
center: true,
-
- cell:(row:any)=>{
-
- return row?.state;
- // return
-
+ width:"250",
+ cell: (row: any) => {
+ let status = row?.state;
+ let icon;
+
+ // Assigning an icon component based on the status
+ switch (status) {
+ case 'pending_approve':
+ icon = ;
+ break;
+ case 'approved':
+ icon = ;
+ break;
+ case 'rejected':
+ icon = ;
+ break;
+ case 'pending_cancellation':
+ icon = ;
+ break;
+ default:
+ icon = null;
+ }
+
+ // Rendering the status with its corresponding icon
+ return (
+
+ {icon} {status}
+
+ );
}
},
-
{
name: t("total"),
center: true,
diff --git a/src/Styles/Layout/Layout.scss b/src/Styles/Layout/Layout.scss
index 07db672..427c040 100644
--- a/src/Styles/Layout/Layout.scss
+++ b/src/Styles/Layout/Layout.scss
@@ -582,4 +582,27 @@ padding: 10px 40px;
.RightSide{
flex-wrap: wrap;
justify-content: flex-end;
-}
\ No newline at end of file
+}
+.orderStatus{
+ display: flex;
+ gap: 5px;
+ padding-inline: 10px;
+ text-wrap: nowrap;
+ width: 250px;
+ align-items: center;
+ justify-content: center;
+ svg{
+ color: var(--primary);
+ }
+
+}
+.orderStatus_select{
+ display: flex;
+ align-items: center;
+ gap: 5px;
+
+ svg{
+ color: var(--primary);
+ }
+
+}