Changeset 47f4eaf for phonelux-frontend/src/components
- Timestamp:
- 11/20/22 16:34:52 (2 years ago)
- Branches:
- master
- Parents:
- ffd50db
- Location:
- phonelux-frontend/src/components
- Files:
-
- 7 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-frontend/src/components/EditOfferComponent/EditOfferComponent.js
rffd50db r47f4eaf 17 17 18 18 componentDidMount(){ 19 // if(!localStorage.getItem('token'))20 // {21 // window.location.href = "/"22 // }23 24 // if(this.context.role != 'ADMIN' && this.context.role != 'SUPERADMIN')25 // {26 // window.location.href = "/"27 // }28 29 19 var config = { 30 20 method: 'get', -
phonelux-frontend/src/components/HomepageComponent.js
rffd50db r47f4eaf 220 220 render() { 221 221 // console.log(this.context) 222 //console.log(localStorage.getItem('token'))222 console.log(localStorage.getItem('token')) 223 223 // console.log(this.state) 224 224 return ( -
phonelux-frontend/src/components/LoginRegisterComponents/LoginFormComponent.css
rffd50db r47f4eaf 162 162 background-color: rgb(251, 224, 224); 163 163 } 164 165 .login-with-facebook-image{ 166 width: 40%; 167 } 168 169 .login-with-facebook-image:hover{ 170 cursor: pointer; 171 } 172 173 .login-with-facebook-wrapper{ 174 display: flex; 175 justify-content: center; 176 } -
phonelux-frontend/src/components/LoginRegisterComponents/LoginFormComponent.js
rffd50db r47f4eaf 6 6 import { Link } from 'react-router-dom'; 7 7 import axios from 'axios'; 8 import FacebookLogin from 'react-facebook-login' 8 9 9 10 export class LoginFormComponent extends Component { … … 18 19 } 19 20 } 20 21 changeHandler = (e) =>{ 22 this.setState({[e.target.name] : e.target.value}) 23 } 21 24 22 25 23 submitHandler = (e) => { -
phonelux-frontend/src/components/NavbarComponent/NavbarComponent.js
rffd50db r47f4eaf 12 12 import SupervisorAccountIcon from '@mui/icons-material/SupervisorAccount'; 13 13 import CompareIcon from '@mui/icons-material/Compare'; 14 import BugReportIcon from '@mui/icons-material/BugReport'; 15 import ReportIcon from '@mui/icons-material/Report'; 16 import UpdateIcon from '@mui/icons-material/Update'; 14 17 15 18 export class NavbarComponent extends Component { … … 36 39 <Link style={{color: 'black'}} to={"/management/users"}> 37 40 <SupervisorAccountIcon style={{fontSize: '40px', marginTop: '10px', marginRight: '10px' }} className='navbar-superadmin-icon'/> 41 </Link> 42 </Tippy> : <></> 43 } 44 { 45 localStorage.getItem('token') && this.context.role == 'SUPERADMIN' ? 46 <Tippy placement='bottom' content='Преземање на содржина'> 47 <Link style={{color: 'black'}} to={"/scrapperinfo"}> 48 <UpdateIcon style={{fontSize: '40px', marginTop: '10px', marginRight: '10px' }} className='navbar-superadmin-icon'/> 49 </Link> 50 </Tippy> : <></> 51 } 52 { 53 localStorage.getItem('token') && (this.context.role == 'SUPERADMIN' || this.context.role == 'ADMIN') ? 54 <Tippy placement='bottom' content='Пријавени понуди'> 55 <Link style={{color: 'black'}} to={"/offerreport/reports"}> 56 <BugReportIcon style={{fontSize: '40px', marginTop: '10px', marginRight: '10px' }} className='navbar-offerreports-icon'/> 38 57 </Link> 39 58 </Tippy> : <></> -
phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.css
rffd50db r47f4eaf 140 140 } 141 141 142 .offerdetails-report-icon{ 143 cursor: pointer; 144 } 142 145 143 146 147 -
phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.js
rffd50db r47f4eaf 9 9 import VisibilityIcon from '@mui/icons-material/Visibility'; 10 10 import VisibilityOffIcon from '@mui/icons-material/VisibilityOff'; 11 import ReportIcon from '@mui/icons-material/Report'; 11 12 12 13 … … 61 62 } 62 63 64 reportOffer = () =>{ 65 alert('Пратена е пријава до администратор за невалидност на спецификациите на понудата!') 66 var config = { 67 method: 'post', 68 url: '/offerreport/'+this.state.offerId+'/'+this.context.userId, 69 headers: { 70 'Authorization': 'Bearer '+localStorage.getItem('token') 71 } 72 }; 73 74 axios(config) 75 .then(function (response) { 76 console.log(JSON.stringify(response.data)); 77 }) 78 .catch(function (error) { 79 console.log(error); 80 }); 81 } 82 63 83 render() { 64 84 console.log(this.state) … … 71 91 { 72 92 localStorage.getItem('token') ? 93 <Tippy placement='bottom' content='Пријави понуда за неточни спецификации'> 94 <ReportIcon onClick={this.reportOffer} className='offerdetails-report-icon' style={{fontSize: '45px'}}/> 95 </Tippy> : <></> 96 } 97 { 98 localStorage.getItem('token') ? 73 99 this.state.showAllSpecs ? 74 100 <Tippy placement='bottom' content='Прикажи ги избраните спецификации'> … … 103 129 104 130 })()} 131 105 132 </div> 106 133 <div className='phone-offer-details-last-updated-wrapper'></div> … … 109 136 <table className='phone-offer-details-table'> 110 137 <thead> 111 <tr><th colSpan={2}>Детали за понудата</th></tr> 138 <tr><th colSpan={2}> 139 Детали за понудата 140 </th></tr> 112 141 </thead> 113 142 <tbody> -
phonelux-frontend/src/components/SuperAdminComponent/SuperAdminComponent.js
rffd50db r47f4eaf 69 69 70 70 componentDidMount(){ 71 // if(!localStorage.getItem('token'))72 // {73 // window.location.href = "/"74 // }75 76 // if(this.context.role != 'SUPERADMIN')77 // {78 // window.location.href = "/"79 // }80 71 this.getUsers() 81 72 }
Note:
See TracChangeset
for help on using the changeset viewer.