Skip to content

Commit 6492017

Browse files
committed
Improve Small mistakes
1 parent bd48c68 commit 6492017

File tree

9 files changed

+76
-80
lines changed

9 files changed

+76
-80
lines changed

Diff for: src/AppRouter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const AppRouter = () => {
9494
<Route path='/dept/:dept/Achievement' element={ <Achievements /> } />
9595
{/* Faculty */}
9696
<Route path='/dept/:dept/Faculty' element={ <Faculty/> } />
97-
<Route path='/dept/:dept/Profile/:id' element={ <Profile/> } />
97+
<Route path='/dept/:dept/Faculty/:id' element={ <Profile/> } />
9898
<Route path='/dept/:dept/Staff' element={ <Staff/> } />
9999
<Route path='/dept/:dept/Student' element={ <Students/> } />
100100
<Route path='/dept/:dept/Alumni' element={ <Alumni/> } />

Diff for: src/components/Card.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
import React from 'react'
33
const Card = ({ title, body }) => {
44
return (
5-
<div className="max-w-md py-4 px-7 mx-1 border bg-white shadow-lg rounded-lg mt-16 mb-6">
5+
<div className="max-w-md w-full py-4 px-7 mx-1 border bg-white shadow-lg rounded-lg mt-16 mb-6">
66
<div className="w-32 h-32 flex-grow-0 flex-shrink-0 justify-center md:justify-end -mt-20 mb-1 ml-auto mr-0">
77
<img src="https://qph.cf2.quoracdn.net/main-qimg-d0139b5cabcff7d5adad435605016120-lq" className="w-full h-full object-cover object-center rounded-full shadow-xl flex-grow-0 flex-shrink-0" alt='...' />
88
</div>
9-
<div>
9+
<div className='h-[140px] overflow-clip w-full'>
1010
<h2 className="text-gray-800 text-2xl font-semibold">{title}</h2>
11-
<p className="mt-2 text-gray-600">{body}</p>
11+
<p className="mt-2 text-gray-600 h-24">{body}</p>
1212
</div>
1313
<div className="flex justify-end mt-4">
14-
<a href="/" className="text-xl font-medium text-indigo-500">Read More &rarr;</a>
14+
<a href="/" className="text-sm font-medium text-indigo-500">Read More &rarr;</a>
1515
</div>
1616
</div>
1717
)

Diff for: src/components/Departmentlower.js

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
import React from 'react'
2-
import { useNavigate } from 'react-router-dom'
1+
import React, { useState } from 'react'
2+
import { useNavigate, useLocation } from 'react-router-dom'
33
import Card from './Card';
44

55
const Departmentlower = (props) => {
66
let navigate = useNavigate();
7-
7+
const [url, setUrl] = useState(useLocation());
8+
const dept = url.pathname.split('/')[2];
89
return (
9-
<div className='flex flex-col md:flex-row w-[98%] justify-between items-center p-4 place-items-center mx-auto'>
10+
<div className='flex flex-col md:flex-row w-[98%] justify-around items-center p-4 place-items-center mx-auto'>
1011
{/* Club */}
1112
<Card title="Coding Club"
1213
body="Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae dolores deserunt ea doloremque natus error, rerum quas odio quaerat nam ex commodi hic, suscipit in a veritatis pariatur minus consequuntur!" />
1314
{/* HOD */}
14-
<div className="max-w-md py-4 px-7 mx-1 border bg-white shadow-lg rounded-lg mt-16 mb-6" onClick={() => navigate("/MessageofHOD")}>
15-
<div className="w-32 h-32 flex-grow-0 flex-shrink-0 flex justify-center md:justify-end -mt-20 mb-1 ml-auto mr-0">
16-
<img src={props.hod} className="w-full h-full object-cover object-left-top rounded-full shadow-xl flex-grow-0 flex-shrink-0" alt='' />
17-
<div className="max-w-md py-4 px-7 mx-1 border bg-white shadow-lg rounded-lg mt-16 mb-6" onClick={() => navigate("/messageofHOD")}>
18-
<div class="w-32 h-32 flex-grow-0 flex-shrink-0 flex justify-center md:justify-end -mt-20 mb-1 ml-auto mr-0">
19-
<img src={props?.img} class="w-full h-full object-cover object-left-top rounded-full shadow-xl flex-grow-0 flex-shrink-0" alt='' />
20-
</div>
21-
<div>
22-
<h2 className="text-gray-800 text-2xl font-semibold">Head Of Department</h2>
23-
<p className="mt-2 text-gray-600">{props?.message}</p>
24-
</div>
25-
<div className="flex justify-end mt-4">
26-
<a href="/" className="text-xl font-medium text-indigo-500">{props?.name}</a>
27-
</div>
28-
</div>
15+
16+
<div className="max-w-md w-full py-4 px-7 mx-1 border bg-white shadow-lg rounded-lg mt-16 mb-6" onClick={() => navigate(`/dept/${dept}/messageofHOD`)}>
17+
<div class="w-32 h-32 flex-grow-0 flex-shrink-0 flex justify-center md:justify-end -mt-20 mb-1 ml-auto mr-0">
18+
<img src={props?.img} class="w-full h-full object-cover object-left-top rounded-full shadow-xl flex-grow-0 flex-shrink-0" alt='' />
19+
</div>
20+
<span className='w-full inline-block h-[140px] overflow-hidden overflow-ellipsis'>
21+
<h2 className="text-blue-800 text-2xl font-semibold">{props?.name}</h2>
22+
<h2 className='font-medium'>(Head Of Department)</h2>
23+
<p className="mt-2 text-gray-600 flex-wrap">{props?.message}</p>
24+
</span>
25+
<div className="flex justify-end mt-4">
26+
<span className="text-sm font-medium text-indigo-500 cursor-pointer">Read More &rarr;</span>
2927
</div>
3028
</div>
3129
</div>

Diff for: src/components/Profile.js

+16-26
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ import Exceldownloadpdf from './Img/Exceldownload.png'
99
function Profile() {
1010
let navigate = useNavigate()
1111
const dept = useLocation().pathname.split('/')[2];
12-
var id = window.location.pathname;
13-
let i = id.length - 1;
14-
let str = "";
15-
while (id[i] !== '/') {
16-
str += id[i];
17-
i--;
18-
}
19-
id = parseInt(str);
20-
// const [url, setUrl] = useState(useLocation());
21-
// const { data, loading, error, reFetch } = useFetch(url.pathname);
12+
var id = useLocation().pathname.split('/').at(-1);
2213
const data = [
2314
{
2415
photo: 'https://www.nitj.ac.in/images/faculty/20071962443.jpg',
@@ -30,22 +21,21 @@ function Profile() {
3021
const Link = [
3122
{ Title: 'Personal Details', show: false, search: false, thead: [], data: [{}, {}, {}, {}, {}] },
3223
{ Title: 'Profile Links', show: false, search: false, thead: [], data: [{}, {}, {}, {}, {}] },
33-
{ Title: 'Research Profile', show: true, search: true, thead: [], data: [{}, {}, {}, {}, {}] },
34-
{ Title: 'Journal Publications', show: true, search: true, thead: ['Year', 'Journal', 'Publications'], data: [{ 1: '2022', 2: 'ACM Computing Surveys (SCI IF=14.324)', 3: 'Raj Mohan Singh, Lalit Kumar Awasthi, Geeta Sikka, "Towards Metaheuristic Scheduling Techniques in Cloud and Fog: An Extensive Taxonomic Review". (Online)' }] },
35-
{ Title: 'Conference Publications', show: true, search: true, thead: ['Year', 'Conference', 'Publications'], data: [{ 1: '2021', 2: '2nd International Conference on Secure Cyber Computing and Communications (ICSCCC). IEEE', 3: 'harma, P., & Sangal, A. L., Extensive Software Fault Prediction: An Ensemble based comparison, pp. 432-436.' }] },
36-
{ Title: 'Book/Chapter Publications', show: true, search: true, thead: ['Type', 'Title', 'Publisher', 'Authors', 'ISBN/ISSN/ No.', 'Year'], data: [{ 1: '', 2: '“Artificial intelligence technologies for computational biology”', 3: 'CRC Press (1st Edition Nov 2022)', 4: 'Rout Ranjeet Kumar,Umer Saiyed,Sheikh Sabhaa, Amrit Lal Sangal', 5: '978-100077868-7, 978-103216000-9', 6: '2022' }] },
37-
{ Title: 'Research Projects', show: true, search: true, thead: ['Role', 'Project Type', 'Title', 'Funding Agency', 'From', 'To', 'Amount', 'Status', 'Co-Investigator'], data: [] },
38-
{ Title: 'Events Organized', show: true, search: true, thead: ['Category', 'Type', 'Title', 'Venue', 'From', 'To', 'Designation'], data: [{ 1: 'Conference', 2: 'International', 3: '1st International Conference on Secure Cyber Computing and Communications (ICSCCC). IEEE', 4: 'Dr B R Ambedkar National Institute of Technology, Jalandhar', 5: '', 6: '', 7: '' }] },
39-
{ Title: 'Professional Affiliations', show: true, search: true, thead: ['Designation', 'Organization'], data: [{ 1: 'Member', 2: 'Indian Society for technical Education (ISTE)' }] },
40-
{ Title: 'PhD Supervised', show: true, search: true, thead: ['Scholar Name', 'Research Topic', 'Status', 'Year', 'Co-Supervisor'], data: [{ 1: 'Mr Himanshu Pattanayak', 2: 'An algorithm for detection of shared communities in social network', 3: 'Defended', 4: '2022', 5: 'Dr A L Sangal' }] },
41-
{ Title: 'PG Dissertation Guided', show: true, search: true, thead: ['Student Name', 'Dissertation Title', 'Status', 'Year', 'Co-Supervisor'], data: [{ 1: 'Ananya Sharma', 2: 'IGT:Tools for testing and maintaining GPU Drivers.', 3: 'Completed', 4: '2022', 5: '' }] },
24+
{ Title: 'Research Profile', thead: [], data: [{}, {}, {}, {}, {}] },
25+
{ Title: 'Journal Publications', thead: ['Year', 'Journal', 'Publications'], data: [{ 1: '2022', 2: 'ACM Computing Surveys (SCI IF=14.324)', 3: 'Raj Mohan Singh, Lalit Kumar Awasthi, Geeta Sikka, "Towards Metaheuristic Scheduling Techniques in Cloud and Fog: An Extensive Taxonomic Review". (Online)' }] },
26+
{ Title: 'Conference Publications', thead: ['Year', 'Conference', 'Publications'], data: [{ 1: '2021', 2: '2nd International Conference on Secure Cyber Computing and Communications (ICSCCC). IEEE', 3: 'harma, P., & Sangal, A. L., Extensive Software Fault Prediction: An Ensemble based comparison, pp. 432-436.' }] },
27+
{ Title: 'Book/Chapter Publications', thead: ['Type', 'Title', 'Publisher', 'Authors', 'ISBN/ISSN/ No.', 'Year'], data: [{ 1: '', 2: '“Artificial intelligence technologies for computational biology”', 3: 'CRC Press (1st Edition Nov 2022)', 4: 'Rout Ranjeet Kumar,Umer Saiyed,Sheikh Sabhaa, Amrit Lal Sangal', 5: '978-100077868-7, 978-103216000-9', 6: '2022' }] },
28+
{ Title: 'Research Projects', thead: ['Role', 'Project Type', 'Title', 'Funding Agency', 'From', 'To', 'Amount', 'Status', 'Co-Investigator'], data: [] },
29+
{ Title: 'Events Organized', thead: ['Category', 'Type', 'Title', 'Venue', 'From', 'To', 'Designation'], data: [{ 1: 'Conference', 2: 'International', 3: '1st International Conference on Secure Cyber Computing and Communications (ICSCCC). IEEE', 4: 'Dr B R Ambedkar National Institute of Technology, Jalandhar', 5: '', 6: '', 7: '' }] },
30+
{ Title: 'Professional Affiliations', thead: ['Designation', 'Organization'], data: [{ 1: 'Member', 2: 'Indian Society for technical Education (ISTE)' }] },
31+
{ Title: 'PhD Supervised', thead: ['Scholar Name', 'Research Topic', 'Status', 'Year', 'Co-Supervisor'], data: [{ 1: 'Mr Himanshu Pattanayak', 2: 'An algorithm for detection of shared communities in social network', 3: 'Defended', 4: '2022', 5: 'Dr A L Sangal' }] },
32+
{ Title: 'PG Dissertation Guided', thead: ['Student Name', 'Dissertation Title', 'Status', 'Year', 'Co-Supervisor'], data: [{ 1: 'Ananya Sharma', 2: 'IGT:Tools for testing and maintaining GPU Drivers.', 3: 'Completed', 4: '2022', 5: '' }] },
4233
{
43-
Title: 'Patents', show: true, search: true, thead: ['Name', 'Reg./Ref. No.', 'Date of Award/Filling', 'Organization', 'Status']
34+
Title: 'Patents', thead: ['Name', 'Reg./Ref. No.', 'Date of Award/Filling', 'Organization', 'Status']
4435
, data: [{ 1: 'A system of smartphone security using machine learning', 2: '202111040145', 3: '', 4: 'Patent Office India', 5: 'Filed' }]
4536
},
46-
{ Title: 'Admin. Responsiblities', show: true, search: true, thead: ['Position held', 'Organization', 'From', 'to'], data: [{ 1: 'Head, Computer Science & Engineering', 2: 'Dr B R Ambedkar National Institute of Technology, Jalandhar', 3: 'September 1992', 4: 'September 2006' }] },
47-
{ Title: 'Award and Honours', show: true, search: true, thead: ['Title', 'Activity', 'Given by', 'Year'], data: [] },
48-
{ Title: 'Download Profile as PDF', show: true, search: true, thead: [], data: [] },
37+
{ Title: 'Admin. Responsiblities', thead: ['Position held', 'Organization', 'From', 'to'], data: [{ 1: 'Head, Computer Science & Engineering', 2: 'Dr B R Ambedkar National Institute of Technology, Jalandhar', 3: 'September 1992', 4: 'September 2006' }] },
38+
{ Title: 'Award and Honours', thead: ['Title', 'Activity', 'Given by', 'Year'], data: [] },
4939
]
5040

5141
const [active, setActive] = useState(0);
@@ -81,7 +71,7 @@ function Profile() {
8171
{
8272
data.map((item, j) => {
8373
return (
84-
j === id && <div key={j} className="mt-16 py-4 w-[98%] mx-auto">
74+
<div key={j} className="mt-16 py-4 w-[98%] mx-auto">
8575
<div className="relative flex flex-col flex-auto w-full min-w-0 p-4 overflow-hidden break-words border shadow-md rounded-2xl bg-white/80 bg-clip-border mb-4 draggable mx-auto"
8676
draggable="true">
8777
<div className="flex flex-wrap items-center justify-between -mx-3">
@@ -139,8 +129,8 @@ function Profile() {
139129
<img src={Exceldownloadpdf} alt="Excel download" />
140130
</span>
141131
<span className={"cursor-pointer px-3 " + (edit ? 'hidden' : '')}><i className="fa-solid fa-eye"></i></span>
142-
<span className={"cursor-pointer px-3 " + (edit ? '' : 'hidden')} onClick={() => setview()}><i className="fa-solid fa-eye-slash"></i></span>
143-
<span className='cursor-pointer px-3' onClick={() => setedit()}><i className="fa-solid fa-pen-to-square"></i></span>
132+
<span title='View as Table' className={"cursor-pointer px-3 " + (edit ? '' : 'hidden')} onClick={() => setview()}><i className="fa-solid fa-eye-slash"></i></span>
133+
<span title='Add new data' className='cursor-pointer px-3' onClick={() => setedit()}><i className="fa-solid fa-pen-to-square"></i></span>
144134
</div>
145135
</div>
146136
<div className='p-2 mt-4'>

Diff for: src/forms/facultyprofile/Otherprofilelink.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import React from 'react'
1+
import React, {useState} from 'react'
22

33
function Otherprofilelink({ edit }) {
4+
const [link, setLink] = useState('');
5+
const [googlelink, setGooglelink] = useState('');
46
return (
57
<div className='overflow-x-auto'>
68
{
@@ -11,10 +13,10 @@ function Otherprofilelink({ edit }) {
1113
<label className="block uppercase tracking-wide text-gray-700 text-sm font-bold mb-2" htmlFor="grid-password">
1214
Personal Link
1315
</label>
14-
<input className="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 shadow-inner leading-tight focus:outline-none focus:border-gray-50" id="title" type="text" placeholder="Title" />
16+
<input className="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 shadow-inner leading-tight focus:outline-none focus:border-gray-50" id="title" onChange={(e)=>setLink(e.target.value)} value={link} type="text" placeholder="Title" />
1517
</div>
1618
<div className="w-full px-3">
17-
<label className="block uppercase tracking-wide text-gray-700 text-sm font-bold mb-2" htmlFor="grid-password">
19+
<label className="block uppercase tracking-wide text-gray-700 text-sm font-bold mb-2" htmlFor="grid-password" onChange={(e)=>setGooglelink(e.target.value)} value={googlelink}>
1820
Google Scholar Link
1921
</label>
2022
<input className="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:border-gray-50 shadow-inner" id="link" type="text" placeholder="" />

0 commit comments

Comments
 (0)