Ignore:
Timestamp:
11/20/22 16:34:52 (20 months ago)
Author:
Marko <Marko@…>
Branches:
master
Parents:
ffd50db
Message:

Final features implemented

Location:
phonelux-frontend/src/components
Files:
7 added
8 edited

Legend:

Unmodified
Added
Removed
  • phonelux-frontend/src/components/EditOfferComponent/EditOfferComponent.js

    rffd50db r47f4eaf  
    1717
    1818    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 
    2919        var config = {
    3020            method: 'get',
  • phonelux-frontend/src/components/HomepageComponent.js

    rffd50db r47f4eaf  
    220220  render() {
    221221    // console.log(this.context)
    222     // console.log(localStorage.getItem('token'))
     222    console.log(localStorage.getItem('token'))
    223223    // console.log(this.state)
    224224    return (
  • phonelux-frontend/src/components/LoginRegisterComponents/LoginFormComponent.css

    rffd50db r47f4eaf  
    162162  background-color: rgb(251, 224, 224);
    163163 }
     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  
    66import { Link } from 'react-router-dom';
    77import axios from 'axios';
     8import FacebookLogin from 'react-facebook-login'
    89
    910export class LoginFormComponent extends Component {
     
    1819    }
    1920  }
    20  
    21   changeHandler = (e) =>{
    22       this.setState({[e.target.name] : e.target.value})
    23   }
     21
    2422
    2523  submitHandler = (e) => {
  • phonelux-frontend/src/components/NavbarComponent/NavbarComponent.js

    rffd50db r47f4eaf  
    1212import SupervisorAccountIcon from '@mui/icons-material/SupervisorAccount';
    1313import CompareIcon from '@mui/icons-material/Compare';
     14import BugReportIcon from '@mui/icons-material/BugReport';
     15import ReportIcon from '@mui/icons-material/Report';
     16import UpdateIcon from '@mui/icons-material/Update';
    1417
    1518export class NavbarComponent extends Component {
     
    3639            <Link style={{color: 'black'}} to={"/management/users"}>
    3740              <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'/>
    3857            </Link>
    3958          </Tippy> : <></>
  • phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.css

    rffd50db r47f4eaf  
    140140}
    141141
     142.offerdetails-report-icon{
     143    cursor: pointer;
     144}
    142145
    143146
     147
  • phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.js

    rffd50db r47f4eaf  
    99import VisibilityIcon from '@mui/icons-material/Visibility';
    1010import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
     11import ReportIcon from '@mui/icons-material/Report';
    1112
    1213
     
    6162  }
    6263
     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
    6383  render() {
    6484    console.log(this.state)
     
    7191          {
    7292            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') ?
    7399            this.state.showAllSpecs ?
    74100              <Tippy placement='bottom' content='Прикажи ги избраните спецификации'>
     
    103129
    104130          })()}
     131
    105132        </div>
    106133        <div className='phone-offer-details-last-updated-wrapper'></div>
     
    109136        <table className='phone-offer-details-table'>
    110137          <thead>
    111           <tr><th colSpan={2}>Детали за понудата</th></tr>
     138          <tr><th colSpan={2}>
     139            Детали за понудата
     140          </th></tr>
    112141          </thead>
    113142          <tbody>
  • phonelux-frontend/src/components/SuperAdminComponent/SuperAdminComponent.js

    rffd50db r47f4eaf  
    6969
    7070    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       // }
    8071      this.getUsers()
    8172    }
Note: See TracChangeset for help on using the changeset viewer.