Skip to content

Commit

Permalink
Fixed autofill year bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bsaikiran618 committed Jan 27, 2021
1 parent 27865ad commit 183545c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
Binary file added backend/LetterGenerated/FINAL_CAMPAIGNING.docx
Binary file not shown.
37 changes: 23 additions & 14 deletions backend/details.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"department": "Department of Computer Science and Engineering",
"subject": "Permission for attending a wedding",
"date": "2020-06-18",
"respects": "Sir",
"your_name": "M Yasaswi Raj",
"year": "Second",
"section": "C",
"roll_no": "18P61A05C2",
"reason": "attenDinG a WeDdIng",
"start_date": "2020-06-19",
"end_date": "2020-06-20",
"hod_name": "Sridhar",
"faculty_name": "kiran",
"faculty": "Principal"
"designation": "Director",
"department": "Department of Electrical and Electronics Engineering",
"subject": "asfsdfasdfasdf",
"date": "2021-01-20",
"respects": "Ma'am",
"team_name": "asdfasdfasdf",
"event_name": "sadfasdfasdfasd",
"fromdate": "2021-01-14",
"todate": "2021-01-23",
"start_hour": "4",
"start_min": "20",
"start_meridian": "AM",
"end_hour": "8",
"end_min": "50",
"end_meridian": "PM",
"letter_body": "sadfasdfasdfasdfasdf",
"where": "Inside",
"studentdetails": [
{
"Name": "asdfasdfasdaf",
"Roll": "18p61a05j1"
}
]
}
2 changes: 1 addition & 1 deletion backend/validkeys.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"dummy":"dummyval","CODINGSTUDIO":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.Q09ESU5HU1RVRElP.xPXSKV8gyEmY1X4pcqorKxmDcGAkCPrSCRLS6JlqeTc","userType":"FORUM"},"SSVFORUM":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.U1NWRk9SVU0.EO2d5fAXCSmc7UXTkMNBI1fG5JS-m7pT147KyVxeytY","userType":"FORUM"},"17P61A0407":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.NzkzNDkxN1A2MUEwNDA3.d2qaTXhKomhQGkM2XTBPbt-kg7HYeN2qgySw1cnupTg","userType":"FACULTY"}}
{"dummy":"dummyval","CODINGSTUDIO":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.Q09ESU5HU1RVRElP.xPXSKV8gyEmY1X4pcqorKxmDcGAkCPrSCRLS6JlqeTc","userType":"FORUM"},"SSVFORUM":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.U1NWRk9SVU0.EO2d5fAXCSmc7UXTkMNBI1fG5JS-m7pT147KyVxeytY","userType":"FORUM"},"CODING.STUDIO();":{"accessToken":"eyJhbGciOiJIUzI1NiJ9.MTMwOTRDT0RJTkcuU1RVRElPKCk7.hd24K8usvYltZGrmyj0UbrpggEGjaEli3Clqx7W55Bw","userType":"FORUM"}}
6 changes: 3 additions & 3 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react/src/modules/RequestCreate/CreateRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getRollNumberParts = (rollNumber) => {

let year = Number(rollNumber.slice(0, 2));
if(!year){console.log("Year incorrect!");return undefined};
year = (new Date().getFullYear()) - (2000 + year) + 1;
year = (new Date().getFullYear()) - (2000 + year);
var branch = rollNumber.slice(6,8);
branch = Number(branch);
if(!branch) return undefined;
Expand Down

0 comments on commit 183545c

Please sign in to comment.