Changeset a26f6a1 for frontend/src/Dashboard
- Timestamp:
- 08/09/22 16:09:32 (2 years ago)
- Branches:
- master
- Children:
- a569b7c
- Parents:
- 899b19d
- Location:
- frontend/src/Dashboard
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Dashboard/Menu.js
r899b19d ra26f6a1 25 25 const addMenu = (data) => { 26 26 setLoadingSave(true); 27 axios.post(env.api + 'Menu/',{...data,price: parseInt(data.price)}, { headers: {Authorization: sessionStorage.getItem('Auth')}27 axios.post(env.api + 'Menu/',{...data,price: parseInt(data.price)}, { headers: {Authorization: localStorage.getItem('Auth')} 28 28 }).then(res => { 29 29 notification['success']({ … … 42 42 43 43 const deleteMenu = (id) => { 44 axios.delete(env.api + 'Menu/'+id, {headers: {Authorization: sessionStorage.getItem('Auth')}44 axios.delete(env.api + 'Menu/'+id, {headers: {Authorization: localStorage.getItem('Auth')} 45 45 }).then(res => { 46 46 notification['success']({ -
frontend/src/Dashboard/Reservations.js
r899b19d ra26f6a1 26 26 from: date[0].format('YYYY-MM-DDThh:mm:ss') + 'Z', 27 27 to: date[1].format('YYYY-MM-DDThh:mm:ss') + 'Z' 28 }, headers: {Authorization: sessionStorage.getItem('Auth')}28 }, headers: {Authorization: localStorage.getItem('Auth')} 29 29 }).then(res => { 30 30 axios.get(env.api + 'Reservations/new', { 31 headers: {Authorization: sessionStorage.getItem('Auth')}31 headers: {Authorization: localStorage.getItem('Auth')} 32 32 }).then(newres=>{ 33 33 setNewReservations(newres.data); … … 54 54 params: { 55 55 status: newStatus 56 }, headers: {Authorization: sessionStorage.getItem('Auth')}56 }, headers: {Authorization: localStorage.getItem('Auth')} 57 57 }).then(res => { 58 58 getReservations() … … 68 68 params: { 69 69 tableId: ev.target.value == '' ? 0 : ev.target.value 70 }, headers: {Authorization: sessionStorage.getItem('Auth')}70 }, headers: {Authorization: localStorage.getItem('Auth')} 71 71 }).then(res => { 72 72 console.log("success"); -
frontend/src/Dashboard/Restaurant.js
r899b19d ra26f6a1 37 37 const submitEdit = (form) => { 38 38 setLoadingSave(true); 39 axios.put(env.api + 'Restaurants/',{...form}, { headers: {Authorization: sessionStorage.getItem('Auth')}39 axios.put(env.api + 'Restaurants/',{...form}, { headers: {Authorization: localStorage.getItem('Auth')} 40 40 }).then(res => { 41 41 notification['success']({ -
frontend/src/Dashboard/Review.js
r899b19d ra26f6a1 1 1 import React, {useEffect, useState} from 'react' 2 import {Button, Card, Input, List, Rate, Spin, Tooltip} from "antd";2 import {Button, Card, Input, List, notification, Rate, Spin, Tooltip} from "antd"; 3 3 import axios from "axios"; 4 4 import env from "../env"; … … 12 12 setLoading(true); 13 13 getRestaurant() 14 console.log(props.user) 14 15 },[]) 15 16 useEffect(()=> { … … 36 37 {props.front ? 37 38 (props.user? 38 <Button style={{float:'right'}} type={'primary'} onClick={()=>props. setVisible(true)}>Внеси оценка</Button>39 <Button style={{float:'right'}} type={'primary'} onClick={()=>props.user.isConfirmed ? props.setVisible(true) : notification['error']({message: <p>Мора да го потврдите вашиот мејл за да оставите оценка. <a href={'/confirm-email'}>Потврдете го тука</a></p>})}>Внеси оценка</Button> 39 40 : <Tooltip title={'Мора да се најавите за да оставите оценка'}><Button style={{float:'right'}} disabled type={'primary'} onClick={()=>props.setVisible(true)}>Внеси оценка</Button></Tooltip>) 40 41 : ''
Note:
See TracChangeset
for help on using the changeset viewer.