Changeset ff641e1


Ignore:
Timestamp:
01/24/25 00:22:25 (3 months ago)
Author:
Ljubomir Ilievski <ilievski.ljubomir@…>
Branches:
master
Children:
34aa6cc
Parents:
d10a9aa
Message:

Sredeno so inicijalnite fechovi

Location:
ReserveNGo-frontend/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • ReserveNGo-frontend/src/App.vue

    rd10a9aa rff641e1  
    2222  <RouterView />-->
    2323
    24   <NavBar></NavBar>
    25   <router-view/>
     24  <div class="wrapper">
     25    <NavBar></NavBar>
     26    <main>
     27      <router-view/>
     28    </main>
     29    <footer>
     30      <div class="container-fluid">
     31        <div class="row">
     32          <Footer_></Footer_>
     33        </div>
     34      </div>
     35    </footer>
     36  </div>
    2637
    2738
    2839
    29   <Footer_></Footer_>
     40
     41
    3042
    3143<!--  <Locale_listing_container></Locale_listing_container>
     
    3749
    3850<style scoped>
     51
     52.wrapper {
     53  display: flex;
     54  flex-direction: column;
     55  min-height: 100vh;
     56}
     57
     58main {
     59  flex: 1; /*istrazi*/
     60}
    3961
    4062template{ background: #FBFFF1;}
  • ReserveNGo-frontend/src/PiniaStores/restaurantStore.js

    rd10a9aa rff641e1  
    1010      name: '',
    1111      address: '',
    12       workingHours: '00:50',
     12      workingHours: '',
    1313      availableServices: [],
    1414      averageRating: 0
     
    1717  },
    1818  actions: {
    19     setDetails (name, address, workingHours) {
     19    setDetails (name, address, workingHours, availableServices) {
    2020      this.name = name
    2121      this.address = address
    2222      this.workingHours = workingHours
    23       //this.availableServices = availableServices
     23      this.availableServices = availableServices
    2424    }
    2525  },
  • ReserveNGo-frontend/src/components/Project/Locale_details.vue

    rd10a9aa rff641e1  
    2222      <p>Local details...</p>
    2323      <p>Working hours: {{restaurantStore.workingHours}}</p>
    24       <ul>
    25         <li>Service 1</li>
    26         <li>Service 2</li>
    27         <li>Service 3</li>
     24      <ul v-for="service in restaurantStore.availableServices" :key="service">
     25        <li>{{service}}</li>
    2826      </ul>
    2927      <p>Average rating...</p>
  • ReserveNGo-frontend/src/components/Project/Locale_listing_container.vue

    rd10a9aa rff641e1  
    66  components: { Local_in_local_listing },
    77
    8 
    9   data(){
     8  data() {
    109    return {
    11       locale: {
     10      /*locale: {
    1211        name: 'Restaurant name',
    1312        address: 'Restaurant address',
    1413        workingHours: '00:00',
    1514        availableServices: ['pet Friendly', 'WiFI'],
    16         averageRating: 0
    17       }
     15        averageRating: 0,
     16      },*/
     17      locals: [],
    1818    }
    19   }
    20 
     19  },
     20  mounted() {
     21     fetch('http://localhost:8080/api/locals')
     22      .then(res => res.json())
     23      .then(data => this.locals = data)
     24       .catch(err => console.log(err));
     25  },
    2126})
    22 
    2327</script>
    2428
    2529<template>
    26 
    27 
    2830  <div id="container" class="border">
    29 
    30     <div v-for="locale_ in 5" :key="locale_">
    31 
    32       <Local_in_local_listing :name="locale.name+locale_" :address="locale.address+locale_" :workingHours="locale.workingHours+locale_" />
    33 <!--      <Local_in_local_listing/>-->
     31    <div v-for="locale in locals" :key="locale">
     32      <Local_in_local_listing
     33      :local="locale"/>
     34      <!--      <Local_in_local_listing/>-->
    3435    </div>
    3536
    36 <!--    <Local_in_local_listing/>
     37    <!--    <Local_in_local_listing/>
    3738    <Local_in_local_listing/>
    3839    <Local_in_local_listing/>
    3940    <Local_in_local_listing/>-->
    40 
    41 
    4241  </div>
    43 
    44 
    45 
    46 
    47 
    4842</template>
    4943
    5044<style scoped>
    51 
    5245#container {
    53 
    54 
    55 
    5646}
    57 
    58 
    5947</style>
  • ReserveNGo-frontend/src/components/Project/Nav_bar_new.vue

    rd10a9aa rff641e1  
    8787}
    8888
    89 #component{
    90   width: 90%;
    91   height: 5%;
    92 }
     89
    9390nav{
    9491  background: #8377D1;
  • ReserveNGo-frontend/src/components/Project/local_in_local_listing.vue

    rd10a9aa rff641e1  
    1818  },
    1919  props: {
    20     name: {
     20   /* name: {
    2121      type: String,
    2222      required: true,
     
    3232      required: false,
    3333      default: "Working hours not provided"
     34    },*/
     35    local:{
     36      required: true,
    3437    }
    3538  },
     
    4043      let restaurantStore_ = restaurantStore()
    4144
    42       restaurantStore_.setDetails(this.name, this.address, this.workingHours)
     45      restaurantStore_.setDetails(this.local.name, this.local.address, this.local.workingHours, this.local.availableServices)
    4346
    4447
     
    5558
    5659  <div id="container" class="border my-3 p-2" @click="handleClick()">
    57 <h3>{{name}}</h3>
    58   <h5>{{address}}</h5>
     60<h3>{{local.name}}</h3>
     61  <h5>{{local.address}}</h5>
    5962
    6063  </div>
  • ReserveNGo-frontend/src/components/Project/login_.vue

    rd10a9aa rff641e1  
    1111
    1212      <div class="col-3">
    13         <form action="" method="POST">
     13        <form action="http://localhost:8080/api/auth/login" method="POST">
    1414
    1515      <label for="email" class="form-label">Email</label>
  • ReserveNGo-frontend/src/components/Project/register_.vue

    rd10a9aa rff641e1  
    1 <script setup>
     1<script>
     2
     3
     4export default {
     5  data() {
     6    return {
     7      path: '',
     8      url: 'http://localhost:8080/api/auth/register/',
     9
     10    }
     11  },
     12
     13  methods: {
     14
     15  },
     16  /*computed: {
     17    somevariabletest(){
     18      return this.url+this.path;
     19    }
     20  }*/
     21
     22
     23}
     24
     25
    226
    327</script>
     
    933
    1034  <div class="col-3">
    11     <form action="" method="POST">
     35    <form v-bind:action="url+path" method="POST">
    1236      <label for="name" class="form-label" >Name</label>
    13       <input type="text" id="name" name="name" class="form-control" placeholder="Name" required>
     37      <input type="text" id="name" name="firstName" class="form-control" placeholder="Name" required>
    1438
    1539      <label for="surname" class="form-label">Surname</label>
    16       <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname" required>
     40      <input type="text" id="surname" name="lastName" class="form-control" placeholder="Surname" required>
    1741
    1842      <label for="phone_number" class="form-label">Phone Number</label>
    19       <input type="text" id="phone_number" name="phone-number" class="form-control" required>
     43      <input type="text" id="phone_number" name="phoneNumber" class="form-control" required>
    2044
    2145      <label for="email" class="form-label">Email Address</label>
     
    2448      <label for="password" class="form-label">Password</label>
    2549      <input type="password" id="password" name="password" class="form-control">
     50
     51      <label for="role" class="form-label">Role</label>
     52      <select class="form-control" id="role" v-model="path">
     53
     54        <option value="customer">Customer</option>
     55
     56        <option value="local-worker">Local Worker</option>
     57
     58        <option value="local-manager">Local Manager</option>
     59
     60      </select>
    2661
    2762      <button type="submit" class="btn btn-dark">Register</button>
Note: See TracChangeset for help on using the changeset viewer.