diff --git a/frontend/src/components/Sidebar/Sidebar.vue b/frontend/src/components/Sidebar/Sidebar.vue index c6b6b22f788994ae6b5499fa5f3e86726dba1c48..dcc61d8457400c05e208ee54f85add73bc0610af 100644 --- a/frontend/src/components/Sidebar/Sidebar.vue +++ b/frontend/src/components/Sidebar/Sidebar.vue @@ -152,10 +152,10 @@ export default { this.username = email.split("@", 1)[0]; if (localStorage.urole === "DEFAULT_USER") { - if (localStorage.uemail.includes("lecturer")) { - this.role = "lecturer"; - } else if (localStorage.uemail.includes("student")) { + if (localStorage.uemail.includes("mahasiswa")) { this.role = "student"; + } else { + this.role = "lecturer"; } } else { this.role = "admin"; diff --git a/frontend/src/store/authenticationRoleChecker.js b/frontend/src/store/authenticationRoleChecker.js new file mode 100644 index 0000000000000000000000000000000000000000..7d8472f88ff37cb7c5d787ca99406eef8f649b81 --- /dev/null +++ b/frontend/src/store/authenticationRoleChecker.js @@ -0,0 +1,11 @@ +function checkRole(email) { + if (email.includes("mahasiswa")) { + return "student"; + } else { + return "lecturer"; + } +} + +module.exports = { + checkRole +}; diff --git a/frontend/src/views/Authentication/Authentication.scss b/frontend/src/views/Authentication/Authentication.scss index fb40cfc1590065280306ed942b1118846837917d..24720686db328f80a5749ae7785f5595c7e473c5 100644 --- a/frontend/src/views/Authentication/Authentication.scss +++ b/frontend/src/views/Authentication/Authentication.scss @@ -45,6 +45,12 @@ transition: transform 1.2s ease-in-out, -webkit-transform 1.2s ease-in-out; } + .cas { + margin: 0; + position: absolute; + top: 20%; + } + label { span { font-size: 14px; diff --git a/frontend/src/views/Authentication/Authentication.vue b/frontend/src/views/Authentication/Authentication.vue index 6a6dec61e88d5e721517de8391fb67721f44ecf2..eeff54f4283128407e2c0b6d7116b832a83ac5a9 100644 --- a/frontend/src/views/Authentication/Authentication.vue +++ b/frontend/src/views/Authentication/Authentication.vue @@ -2,7 +2,7 @@ <div class="container-login d-flex flex-column"> <div class="cont"> <!-- SIGN IN --> - <div class="form sign-in align-middle"> + <div class="form cas sign-in"> <!-- Logo ITB --> <div class="text-center"> <img @@ -27,15 +27,20 @@ <div class="img"> <div class="img-text m-up"> <h2 class="my-5">INSTITUT TEKNOLOGI BANDUNG</h2> - <h2 class="pt-3 pb-3"> - Sistem Informasi<br /> + <h2 class="pt-2 pb-4"> + SIX <br /> + Sistem Informasi <br /> Akademix </h2> <p class="text-white"> Mari tetap semangat <br /> - belajar demi masa<br /> - depan yang luar biasa! + belajar bersama di <br /> + kampus tercinta demi <br /> + masa depan luar biasa! </p> + <h2 class="pt-3 pb-3"> + In Harmonia Progressio + </h2> </div> </div> </div> @@ -45,6 +50,7 @@ <script> import axios from "axios"; +import { checkRole } from "../../store/authenticationRoleChecker"; export default { name: "Authentication", @@ -106,10 +112,11 @@ export default { }); }, register() { + const role = checkRole(this.credential.email); const applicant = { email: this.credential.email, password: "12345678", - role: "student" + role: role }; axios .post(process.env.VUE_APP_API_ENDPOINT + "/auth/register", applicant)