Skip to content

Conversation

@khushishorey
Copy link

No description provided.

Copy link
Owner

@23abdul23 23abdul23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If confused, ask me about more implemntation details

{/* <Stack.Screen name="Emergency" component={EmergencyScreen} /> */}
{/* <Stack.Screen name="Profile" component={ProfileScreen} /> */}
<Stack.Screen name="Scan" component={Scanner} />

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are here these comments when they are not being used.

required: true,
unique: true,
sparse: true,
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device id doesn't make sense we can remove this from every model schema. Because it is possible that someone has logged in to some new device.

Remove all occurances and use of 'deviceID'

createdAt: {
fontSize: SIZES.xs,
color: COLORS.gray[500],
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the need of making new OUTPASS component , when there was already OutpaasCard.js the component was already their , u need to simply reuse that and modify it a little bit.

what you can do is add a simple code block

if (role == 'student')
...simple outpass card

if (role =='warden')

....add two buttons of Approve and Reject

(Chat GPT / Copilot jo bhi de sb mat use karo)

Copy link
Author

@khushishorey khushishorey Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those changes were complex to integrate and warden ka role related to outpass alag h its better uska alag card rhe and maine edit krke hi code use kiya h gpt se :|

console.log("INCOMING REGISTRATION DATA:", req.body);
const { name, email, password, studentId, guardId, wardenId, hostel, roomNumber, phoneNumber, securityPost, emergencyContact, gender, year, department, role} = req.body
const { name, email, password, studentId, guardId, wardenId, hostel, roomNumber, phoneNumber, securityPost, gender, year, department, role, deviceId} = req.body
let user;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove deviceID

}
})


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check when the outpass are being created , they are still getting auto approved. Change that to pending.

Also there is many not useful routes commented , delete all that is not so useful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok :|

/>
</View>
)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same outpassScreen.js can be used here also , just update the things as required using (role == 'warden')

Only make new files if introducing minor changes is too difficullt.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but warden role is different its better uska sb kuch alag rhe in my opinion

const { user, logout } = useAuth()

const isStudent = user.role === "student"
const isWarden = user.role === "warden"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable is not used anywhere??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its used below. its usage is to separate components to be displayed in a students profile section and in a warden's profile section. like for a student we want to display the "Academic Info" but we dont want this for warden ...so basically vo neeche ek jagah use horha

createOutpass: (data) => api.post("/outpass/generate", data),
updateOutpass: (id, data) => api.put(`/outpass/${id}`, data),
getHistory: (params) => api.get("/outpass/history", { params }),
getPendingRequests: () => api.get("/outpass/warden/requests"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do the required changes for the fetchProfile and other api routes , refactor them accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants