Changes in / [7d8eeab:bf78464]
- Location:
- ReserveNGo-frontend/src
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ReserveNGo-frontend/src/PiniaStores/restaurantStore.js
r7d8eeab rbf78464 24 24 this.workingHours = workingHours 25 25 this.availableServices = availableServices 26 },27 newRestaurant (id) {28 this.id = id29 26 } 30 27 }, -
ReserveNGo-frontend/src/components/Project/Nav_bar_new.vue
r7d8eeab rbf78464 89 89 <a v-if="userStore_.data.role==='UN_AUTHENTICATED'" class="btn btn-dark ms-2">Register</a> 90 90 </router-link> 91 <router-link to="/addRestaurant">92 <a v-if="userStore_.data.role==='ROLE_LOCAL_MANAGER' || userStore_.data.role==='ROLE_ADMIN'" class="btn btn-dark me-2">Add Restaurant</a>93 </router-link>94 91 <logout_></logout_> 95 92 </li> -
ReserveNGo-frontend/src/components/Project/login_.vue
r7d8eeab rbf78464 28 28 await fetch(this.url, { 29 29 method: 'POST', 30 headers: { 'Content-Type': 'application/ json'},31 body: JSON.stringify({32 email: this.form_info.email,33 password: this.form_info.password,30 headers: { 'Content-Type': 'application/x-www-form-urlencoded'}, 31 body: new URLSearchParams({ 32 email: this.form_info.email, 33 password: this.form_info.password 34 34 }) 35 35 }).then((response) => response.json()) -
ReserveNGo-frontend/src/components/Project/register_.vue
r7d8eeab rbf78464 36 36 37 37 methods: { 38 39 38 async register() { 39 await fetch(this.wholeUrl, { 40 40 method: 'POST', 41 headers: { 'Content-Type': 'application/ json' },42 body: JSON.stringify({41 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 42 body: new URLSearchParams({ 43 43 firstName: this.form_info.firstName, 44 44 lastName: this.form_info.lastName, 45 45 email: this.form_info.email, 46 46 password: this.form_info.password, 47 phoneNumber: this.form_info.phoneNumber 48 }) 49 }) 50 .then((response) => response.json()) 51 .then((json) => { 52 this.userStore_.setLocalStorage(json); 53 router.push('/'); 54 }); 55 //console.log("Data received:", this.data); 47 phoneNumber: this.form_info.phoneNumber}) 48 }).then((response) => response.json()) 49 .then((json) => {this.userStore_.setLocalStorage(json); 50 router.push('/')}) 51 //console.log("Data received:", this.data); 56 52 //this.userStore_.setLocalStorage(json) 57 53 //console.log(json) -
ReserveNGo-frontend/src/router/index.js
r7d8eeab rbf78464 8 8 import my_reservations from '@/components/Project/My_reservations.vue' 9 9 import Locale_ from '@/components/Project/Locale_.vue' 10 import AddRestaurant from "@/components/Project/AddRestaurant.vue";11 10 12 11 const router = createRouter({ … … 46 45 name: 'more_details', 47 46 component: Locale_, 48 },49 {50 path: '/addRestaurant',51 name: 'addRestaurant',52 component: AddRestaurant,53 47 } 54 48 ],
Note:
See TracChangeset
for help on using the changeset viewer.