Skip to content

Commit 1008415

Browse files
Merge pull request #141 from harshitap1305/fix-bugs-and-redesign
Fix bugs and redesign
2 parents 3334d63 + 78b1164 commit 1008415

4 files changed

Lines changed: 211 additions & 341 deletions

File tree

backend/routes/skillsRoutes.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ router.get("/user-skills/:userId",isAuthenticated, async (req, res) => {
9494
const userId = req.params.userId;
9595
try {
9696
const userSkills = await UserSkill.find({ user_id: userId })
97-
.populate("skill_id", "name")
98-
.populate("position_id", "title");
97+
.populate("skill_id")
98+
.populate({
99+
path: "position_id",
100+
populate: {
101+
path: "unit_id",
102+
select: "name",
103+
},
104+
});
99105
res.json(userSkills);
100106
} catch (err) {
101107
console.error("Failed to get user skills:", err);

frontend/src/Components/Events/EventList.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const EventList = () => {
2828

2929
useEffect(() => {
3030
const fetchEvents = async () => {
31-
if (!userRole) return;
31+
if (!userRole) {return;}
3232

3333
try {
3434
setLoading(true);
@@ -330,8 +330,8 @@ const EventList = () => {
330330

331331
{/* EventForm modal for editing */}
332332
{editingEvent && (
333-
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-start pt-10 z-50">
334-
<div className="bg-white rounded-xl w-full max-w-4xl p-4 relative">
333+
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-start pt-10 z-50 overflow-y-auto">
334+
<div className="bg-white rounded-xl w-full max-w-4xl p-4 relative my-8">
335335
<button
336336
className="absolute top-2 right-2 text-gray-700 font-bold"
337337
onClick={() => setEditingEvent(null)}

frontend/src/Components/Events/RoomRequest.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const RoomRequestModal = ({ eventId, onClose, onSubmit }) => {
142142
<button
143143
type="submit"
144144
disabled={submitting}
145-
className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:bg-blue-300 disabled:cursor-not-allowed"
145+
className="px-4 py-2 bg-stone-700 text-white rounded-md hover:bg-stone-800 transition-colors disabled:bg-blue-300 disabled:cursor-not-allowed"
146146
>
147147
{submitting ? "Submitting..." : "Submit Request"}
148148
</button>

0 commit comments

Comments
 (0)