-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from zwenie-tech/irshana/check
Irshana/check
- Loading branch information
Showing
8 changed files
with
1,248 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use client"; // Ensures this page uses client-side rendering | ||
|
||
import { useParams } from "next/navigation"; | ||
|
||
const EDITActivityPage = () => { | ||
const params = useParams(); // Access dynamic route parameters | ||
const { id } = params; // Get the dynamic ID from the URL | ||
|
||
return ( | ||
<div> | ||
<h1>Edit Activity</h1> | ||
<p>Activity ID: {id}</p> {/* Display the ID only */} | ||
</div> | ||
); | ||
}; | ||
|
||
export default EDITActivityPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,175 @@ | ||
import React from 'react' | ||
// import React from 'react' | ||
|
||
function Page() { | ||
return ( | ||
<div>activity</div> | ||
) | ||
} | ||
// function Page() { | ||
// return ( | ||
// <div>coordinators</div> | ||
// ) | ||
// } | ||
|
||
// export default Page | ||
"use client"; | ||
|
||
import { ClientSideRowModelModule } from "@ag-grid-community/client-side-row-model"; | ||
import { | ||
ColDef, | ||
ModuleRegistry, | ||
RowClickedEvent, | ||
} from "@ag-grid-community/core"; | ||
import { AgGridReact } from "@ag-grid-community/react"; | ||
// import "@ag-grid-community/styles/ag-grid.css"; | ||
// import "@ag-grid-community/styles/ag-theme-quartz.css"; | ||
import "../../admin/ag-grid-theme-builder.css"; | ||
import { useRouter } from "next/navigation"; | ||
import React, { StrictMode, useMemo, useState } from "react"; | ||
|
||
ModuleRegistry.registerModules([ClientSideRowModelModule]); | ||
|
||
export default Page | ||
const Activity = () => { | ||
const router = useRouter(); | ||
const [rowData, setRowData] = useState([ | ||
{ | ||
id: 1, | ||
name: "John", | ||
activityLink: "[email protected]", | ||
Description: "jonh", | ||
viewLike: "abc", | ||
value: "India", | ||
groupname: "Kerala", | ||
schoolcategory:"MLP", | ||
schooltypr:"Tirur", | ||
eductionDist:"edfs", | ||
educationSubDist:12, | ||
sohodaya:"ABCD", | ||
block:"Anus", | ||
project:"edfs", | ||
chapter:12, | ||
conutry:"ABCD", | ||
state:"Anus" | ||
}, | ||
{ | ||
id: 2, | ||
name: "John", | ||
activityLink: "[email protected]", | ||
Description: "jonh", | ||
viewLike: "abc", | ||
value: "India", | ||
groupname: "Kerala", | ||
schoolcategory:"MLP", | ||
schooltypr:"Tirur", | ||
eductionDist:"edfs", | ||
educationSubDist:12, | ||
sohodaya:"ABCD", | ||
block:"Anus", | ||
project:"edfs", | ||
chapter:12, | ||
conutry:"ABCD", | ||
state:"Anus" | ||
}, | ||
{ | ||
id: 3, | ||
name: "John", | ||
activityLink: "[email protected]", | ||
Description: "jonh", | ||
viewLike: "abc", | ||
value: "India", | ||
groupname: "Kerala", | ||
schoolcategory:"MLP", | ||
schooltypr:"Tirur", | ||
eductionDist:"edfs", | ||
educationSubDist:12, | ||
sohodaya:"ABCD", | ||
block:"Anus", | ||
project:"edfs", | ||
chapter:12, | ||
conutry:"ABCD", | ||
state:"Anus" | ||
}, | ||
{ | ||
id: 4, | ||
name: "John", | ||
activityLink: "[email protected]", | ||
Description: "jonh", | ||
viewLike: "abc", | ||
value: "India", | ||
groupname: "Kerala", | ||
schoolcategory:"MLP", | ||
schooltypr:"Tirur", | ||
eductionDist:"edfs", | ||
educationSubDist:12, | ||
sohodaya:"ABCD", | ||
block:"Anus", | ||
project:"edfs", | ||
chapter:12, | ||
conutry:"ABCD", | ||
state:"Anus"}, | ||
{ | ||
id: 5, | ||
name: "John", | ||
activityLink: "[email protected]", | ||
Description: "jonh", | ||
viewLike: "abc", | ||
value: "India", | ||
groupname: "Kerala", | ||
schoolcategory:"MLP", | ||
schooltype:"Tirur", | ||
eductionDist:"edfs", | ||
educationSubDist:12, | ||
sohodaya:"ABCD", | ||
block:"Anus", | ||
project:"edfs", | ||
chapter:12, | ||
conutry:"ABCD", | ||
state:"Anus" | ||
} | ||
]); | ||
|
||
const [columnDefs, setColumnDefs] = useState<ColDef[]>([ | ||
{ field: "name", headerName: "Name" }, | ||
{ field: "activityLink", headerName: "Activity Link" }, | ||
{ field: "Description", headerName: "Description" }, | ||
{ field: "viewLike", headerName: "View and Like" }, | ||
{ field: "value", headerName: "Value" }, | ||
{ field: "groupname", headerName: "Group Name" }, | ||
{ field: "schoolcategory", headerName: "School Category" }, | ||
{ field: "schooltype", headerName: "School Type" }, | ||
{ field: "eductionDist", headerName: "Education District" }, | ||
{ field: "educationSubDist", headerName: "Education Sub District" }, | ||
{ field: "sohodaya", headerName: "Sahodaya" }, | ||
{ field: "block", headerName: "Block" }, | ||
{ field: "project", headerName: "Project" }, | ||
{ field: "chapter", headerName: "Chapter" }, | ||
{ field: "conutry", headerName: "Conutry" }, | ||
{ field: "state", headerName: "State" }, | ||
]); | ||
|
||
const defaultColDef = useMemo(() => { | ||
return { | ||
filter: "agTextColumnFilter", | ||
floatingFilter: true, | ||
}; | ||
}, []); | ||
const onRowClicked = (event: RowClickedEvent) => { | ||
// console.log(event.data); | ||
const id = event.data.id; | ||
router.push(`activity/edit-activity/${id}`); | ||
}; | ||
|
||
return ( | ||
<div className=" bg-slate-100"> | ||
<div className={"ag-theme-quartz"} style={{ height: 600 }}> | ||
<AgGridReact | ||
rowData={rowData} | ||
columnDefs={columnDefs} | ||
defaultColDef={defaultColDef} | ||
onRowClicked={onRowClicked} | ||
rowSelection="multiple" | ||
suppressRowClickSelection={true} | ||
pagination={true} | ||
paginationPageSize={10} | ||
paginationPageSizeSelector={[10, 25, 50]} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default Activity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use client"; // Ensures this page uses client-side rendering | ||
|
||
import { useParams } from "next/navigation"; | ||
|
||
const EDITActivityPage = () => { | ||
const params = useParams(); // Access dynamic route parameters | ||
const { id } = params; // Get the dynamic ID from the URL | ||
|
||
return ( | ||
<div> | ||
<h1>Edit Activity</h1> | ||
<p>Activity ID: {id}</p> {/* Display the ID only */} | ||
</div> | ||
); | ||
}; | ||
|
||
export default EDITActivityPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,116 @@ | ||
import React from 'react' | ||
// import React from 'react' | ||
|
||
function Page() { | ||
return ( | ||
<div>contact-us-form</div> | ||
) | ||
} | ||
// function Page() { | ||
// return ( | ||
// <div>coordinators</div> | ||
// ) | ||
// } | ||
|
||
// export default Page | ||
"use client"; | ||
|
||
import { ClientSideRowModelModule } from "@ag-grid-community/client-side-row-model"; | ||
import { | ||
ColDef, | ||
ModuleRegistry, | ||
RowClickedEvent, | ||
} from "@ag-grid-community/core"; | ||
import { AgGridReact } from "@ag-grid-community/react"; | ||
// import "@ag-grid-community/styles/ag-grid.css"; | ||
// import "@ag-grid-community/styles/ag-theme-quartz.css"; | ||
import "../../admin/ag-grid-theme-builder.css"; | ||
import { useRouter } from "next/navigation"; | ||
import React, { StrictMode, useMemo, useState } from "react"; | ||
|
||
ModuleRegistry.registerModules([ClientSideRowModelModule]); | ||
|
||
export default Page | ||
const Contact = () => { | ||
const router = useRouter(); | ||
const [rowData, setRowData] = useState([ | ||
{ | ||
id: 1, | ||
name: "John", | ||
email: "[email protected]", | ||
subject: "jonh", | ||
messege: "abc", | ||
LSGD: "India", | ||
district: "Kerala", | ||
|
||
}, | ||
{ | ||
id: 2, | ||
name: "John", | ||
email: "[email protected]", | ||
subject: "jonh", | ||
messege: "abc", | ||
LSGD: "India", | ||
district: "Kerala", | ||
}, | ||
{ | ||
id: 3, | ||
name: "John", | ||
email: "[email protected]", | ||
subject: "jonh", | ||
messege: "abc", | ||
LSGD: "India", | ||
district: "Kerala", | ||
}, | ||
{ | ||
id: 4, | ||
name: "John", | ||
email: "[email protected]", | ||
subject: "jonh", | ||
messege: "abc", | ||
LSGD: "India", | ||
district: "Kerala",}, | ||
{ | ||
id: 5, | ||
name: "John", | ||
email: "[email protected]", | ||
subject: "jonh", | ||
messege: "abc", | ||
LSGD: "India", | ||
district: "Kerala", | ||
} | ||
]); | ||
|
||
const [columnDefs, setColumnDefs] = useState<ColDef[]>([ | ||
{ field: "name", headerName: "Name" }, | ||
{ field: "email", headerName: "Email" }, | ||
{ field: "subject", headerName: "Subject" }, | ||
{ field: "messege", headerName: "Messege" }, | ||
{ field: "LSGD", headerName: "LSGD" }, | ||
{ field: "district", headerName: "District " }, | ||
]); | ||
|
||
const defaultColDef = useMemo(() => { | ||
return { | ||
filter: "agTextColumnFilter", | ||
floatingFilter: true, | ||
}; | ||
}, []); | ||
const onRowClicked = (event: RowClickedEvent) => { | ||
// console.log(event.data); | ||
const id = event.data.id; | ||
router.push(`contact-us-form/edit-contact/${id}`); | ||
}; | ||
|
||
return ( | ||
<div className=" bg-slate-100"> | ||
<div className={"ag-theme-quartz"} style={{ height: 600 }}> | ||
<AgGridReact | ||
rowData={rowData} | ||
columnDefs={columnDefs} | ||
defaultColDef={defaultColDef} | ||
onRowClicked={onRowClicked} | ||
rowSelection="multiple" | ||
suppressRowClickSelection={true} | ||
pagination={true} | ||
paginationPageSize={10} | ||
paginationPageSizeSelector={[10, 25, 50]} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default Contact; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use client"; // Ensures this page uses client-side rendering | ||
|
||
import { useParams } from "next/navigation"; | ||
|
||
const EditCoordinatorPage = () => { | ||
const params = useParams(); // Access dynamic route parameters | ||
const { id } = params; // Get the dynamic ID from the URL | ||
|
||
return ( | ||
<div> | ||
<h1>Edit Coordinator</h1> | ||
<p>Coordinator ID: {id}</p> {/* Display the ID only */} | ||
</div> | ||
); | ||
}; | ||
|
||
export default EditCoordinatorPage; |
Oops, something went wrong.