Ignore:
Timestamp:
09/17/22 01:24:24 (2 years ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
5201690
Parents:
775e15e
Message:

Added more components

Location:
phonelux-frontend/src/components/PhoneOfferDetailsComponent
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.css

    r775e15e r7e88e46  
    1919.phone-offer-details-table-row{
    2020    border: 1px solid gainsboro;
    21 
    2221}
    2322
     
    6766.phone-offer-details-last-updated-wrapper{
    6867    display: flex;
     68    width: 100%;
    6969    justify-content: start;
     70    align-items: center;
     71}
     72
     73.phone-offer-details-edit-header{
     74    width: 100%;
     75    margin-left: 20px;
     76    padding-top: 10px;
     77    border: 1px solid black;
     78    background-color:  rgb(232, 243, 121);
     79    border-radius: 30px;
     80    text-align: center;
     81    padding: 10px;
     82}
     83
     84.phone-offer-details-edit-header:hover{
     85    cursor: pointer;
     86    background-color: rgb(212, 219, 140);
     87    box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
     88    transition: box-shadow 0.5s, background-color 0.5s ;   
     89}
     90
     91.link-offer-edit{
     92    width: 15%;
     93    height: fit-content;
     94    text-decoration: none;
     95    display: flex;
    7096}
    7197
  • phonelux-frontend/src/components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent.js

    r775e15e r7e88e46  
    33import './PhoneOfferDetailsComponent.css'
    44import HeaderComponent from '../HeaderComponent/HeaderComponent'
     5import UserContext from '../../context/UserContext'
     6import { Link } from 'react-router-dom'
    57
    68
     
    2628
    2729  render() {
    28     console.log(this.state)
    2930    return (
    3031      <div className='phone-offer-details-main'>
     
    3334          <h3 className='phone-offer-details-last-updated-header'>Последно ажурирана: {this.state.offer == null ||
    3435          this.state.offer.last_updated == null ? '#' : this.state.offer.last_updated.split('T')[0]}</h3>
     36          {
     37            localStorage.getItem('token') && (this.context.role == 'ADMIN' || this.context.role == 'SUPERADMIN') ?
     38            <Link className='link-offer-edit' style={{color:'black'}} to={'/admin/editoffer/'+this.state.offerId}>
     39              <h3 className='phone-offer-details-edit-header'>Измени понуда</h3>
     40              </Link> : <></>
     41          }
    3542        </div>
    3643        <div className='phone-offer-details-table-wrapper'>
     
    116123}
    117124
     125PhoneOfferDetailsComponent.contextType = UserContext
     126
    118127export default PhoneOfferDetailsComponent
Note: See TracChangeset for help on using the changeset viewer.