-
- {/*
{user?.full_name}
*/}
- {/*
{user?.role_type}
*/}
-
+
+
+
- } transition>
-
-
-
+
diff --git a/src/Pages/Project/Page.tsx b/src/Pages/Project/Page.tsx
index b792507..09b6c14 100644
--- a/src/Pages/Project/Page.tsx
+++ b/src/Pages/Project/Page.tsx
@@ -8,20 +8,35 @@ import { QueryStatusEnum } from '../../config/QueryStatus'
import { useNavigate } from 'react-router-dom'
import AddButton from '../../Layout/Dashboard/AddButton/AddButton'
import { useGetProject } from '../../api/Project'
+import SelectField from '../../Layout/Dashboard/SelectField'
function Page() {
const column =useTableColumns()
const {data ,status } = useGetProject()
const navigate = useNavigate()
-
+ const ExpandedComponent = ({ data }:any) => {
+ console.log(data,"data");
+
+ return (
+
+
description : {data?.description}
+
+ );
+ };
+ const typeselect = [
+ {label : "website" , value : "website"},
+ {label : "mobile" , value : "mobile"},
+
+
+ ]
return (
// Pass Status to Layout
-
+
navigate('/project/add')}>
@@ -32,6 +47,8 @@ function Page() {
isLoading={false}
columns={column}
is_pagination={false}
+ expandableRows
+ expandableRowsComponent={ExpandedComponent}
/>
diff --git a/src/Pages/Project/ProjectImage/DataTable/formUtil.ts b/src/Pages/Project/ProjectImage/DataTable/formUtil.ts
index a64b4e0..6079a48 100644
--- a/src/Pages/Project/ProjectImage/DataTable/formUtil.ts
+++ b/src/Pages/Project/ProjectImage/DataTable/formUtil.ts
@@ -9,7 +9,6 @@ export const getInitialValues = (objectToEdit: any | null = null): any => {
return {
id: objectToEdit?.id ?? null,
image: objectToEdit?.image ,
- type: objectToEdit?.type ,
is_active: objectToEdit?.is_active ,
@@ -29,7 +28,6 @@ export const getValidationSchema = (editMode: boolean = false): Yup.Schema
// Validate input
return Yup.object().shape({
image: Yup.string().required('Required'),
- type: Yup.string().required('Required'),
});
};
diff --git a/src/Pages/Project/ProjectImage/DataTable/useTableColumns.tsx b/src/Pages/Project/ProjectImage/DataTable/useTableColumns.tsx
index 110c4fb..2520719 100644
--- a/src/Pages/Project/ProjectImage/DataTable/useTableColumns.tsx
+++ b/src/Pages/Project/ProjectImage/DataTable/useTableColumns.tsx
@@ -30,18 +30,13 @@ const useTableColumns :any = () => {
}
},
- {
- name: t("type"),
- sortable: false,
- center: "true",
- cell: (row:any) => row?.type
- },
+
{
name: t("is_active"),
sortable: false,
center: "true",
- cell: (row:any) => row?.is_active
+ cell: (row:any) => row?.is_active === 1 ? "true" : "false"
},
{
name: "#",
@@ -59,7 +54,7 @@ const useTableColumns :any = () => {
},
],
- [deleteMutation, navigate, t]
+ [deleteMutation, t]
);
};
diff --git a/src/Pages/Project/ProjectImage/View/AddForm.tsx b/src/Pages/Project/ProjectImage/View/AddForm.tsx
index 9d4dafc..1dbc1fb 100644
--- a/src/Pages/Project/ProjectImage/View/AddForm.tsx
+++ b/src/Pages/Project/ProjectImage/View/AddForm.tsx
@@ -14,13 +14,8 @@ function Form() {
setFieldValue("is_active", checked ? 1 : 0)
};
- const typeselect = [
- {label : "website" , value : "website"},
- {label : "mobile" , value : "mobile"},
- ]
-
return (
@@ -29,7 +24,6 @@ function Form() {
-