Ignore:
Timestamp:
09/23/22 02:03:14 (22 months ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
895cd87
Parents:
436e0da
Message:

Implemented all use cases

File:
1 edited

Legend:

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

    r436e0da r48f3030  
    9090                        <th className='compare-offer-table-headers'>Цена</th>
    9191                        {
    92                         this.state.offersToCompare.map((offer,idx) => <td key={idx}>{offer.price}</td>)
     92                        this.state.offersToCompare.map((offer,idx) => <td key={idx}>{offer.price} ден.</td>)
    9393                        }
    9494                    </tr>
     95                    { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("РАМ меморија") ?
    9596                    <tr className='compare-offers-table-row'>
    9697                        <th className='compare-offer-table-headers'>РАМ меморија</th>
     
    99100                            offer.ram_memory == '' ? '/' : offer.ram_memory}</td>)
    100101                        }
    101                     </tr>
     102                    </tr> : <></>
     103                    }
     104                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("РОМ меморија") ?
    102105                    <tr className='compare-offers-table-row'>
    103106                        <th className='compare-offer-table-headers'>РОМ меморија</th>
     
    106109                            offer.rom_memory == '' ? '/' : offer.rom_memory}</td>)
    107110                        }
    108                     </tr>
     111                    </tr> : <></>
     112                    }
     113                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Предна камера") ?
    109114                    <tr className='compare-offers-table-row'>
    110115                        <th className='compare-offer-table-headers'>Предна камера</th>
     
    113118                            offer.front_camera == '' ? '/' : offer.front_camera}</td>)
    114119                        }
    115                     </tr>
     120                    </tr> : <></>
     121                    }
     122                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Задна камера") ?
    116123                    <tr className='compare-offers-table-row'>
    117124                        <th className='compare-offer-table-headers'>Задна камера</th>
     
    120127                            offer.back_camera == '' ? '/' : offer.back_camera}</td>)
    121128                        }
    122                     </tr>
     129                    </tr> : <></>
     130                    }
     131                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Процесор") ?
    123132                    <tr className='compare-offers-table-row'>
    124133                        <th className='compare-offer-table-headers'>Процесор</th>
     
    127136                            offer.cpu == '' ? '/' : offer.cpu}</td>)
    128137                        }
    129                     </tr>
     138                    </tr> : <></>
     139                    }
     140                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Чипсет") ?
    130141                    <tr className='compare-offers-table-row'>
    131142                        <th className='compare-offer-table-headers'>Чипсет</th>
     
    134145                            offer.chipset == '' ? '/' : offer.chipset}</td>)
    135146                        }
    136                     </tr>
     147                    </tr> : <></>
     148                    }
     149                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Оперативен систем") ?
    137150                    <tr className='compare-offers-table-row'>
    138151                        <th className='compare-offer-table-headers'>Оперативен систем</th>
     
    141154                            offer.operating_system == '' ? '/' : offer.operating_system}</td>)
    142155                        }
    143                     </tr>
     156                    </tr> : <></>
     157                    }
     158                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Батерија") ?
    144159                    <tr className='compare-offers-table-row'>
    145160                        <th className='compare-offer-table-headers'>Батерија</th>
     
    148163                            offer.battery == '' ? '/' : offer.battery}</td>)
    149164                        }
    150                     </tr>
     165                    </tr> : <></>
     166                    }
     167                     { !localStorage.getItem('pickedSpecifications') || localStorage.getItem('pickedSpecifications').includes("Боја") ?
    151168                    <tr className='compare-offers-table-row'>
    152169                        <th className='compare-offer-table-headers'>Боја</th>
     
    155172                            offer.color == '' ? '/' : offer.color}</td>)
    156173                        }
    157                     </tr>
     174                    </tr> : <></>
     175                    }
    158176                </tbody>
    159177                </table>
Note: See TracChangeset for help on using the changeset viewer.