Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. render() {
  2. const { auth } = this.props;
  3. //if (!auth.isLoaded) return null
  4. if (localStorage.getItem('logged') != 'true') return <Redirect to='/signin' />
  5. if(localStorage.getItem('isAdmin') === "false") {
  6. return (
  7.  
  8. <div className="card z-depth-0 project-summary">
  9. <form onSubmit={this.handleSubmit} className="white">
  10. <h5 className="grey-text text-darken-3 center">Dados do Cliente</h5>
  11. <div>
  12. <label><h6><b>Nome:</b>{this.state.clientes.map((cb) => <option key={cb.id}
  13. value={cb.id}>{cb.nome} </option>)}
  14. </h6></label>
  15. <br/>
  16. <label><h6><b>E-mail:</b>{this.state.clientes.map((cl) => <option key={cl.id}
  17. value={cl.id}>{cl.email} </option>)}
  18. </h6></label>
  19. <br/>
  20. <label><h6><b>Morada:</b>{this.state.clientes.map((cl) => <option key={cl.id}
  21. value={cl.id}>{cl.morada} </option>)}
  22. </h6></label>
  23. <br/>
  24. <label><h6><b>NIF:</b>{this.state.clientes.map((cl) => <option key={cl.id}
  25. value={cl.id}>{cl.nif} </option>)}
  26. </h6></label>
  27. <br/>
  28. </div>
  29. </form>
  30. <div className="right">
  31. <button className="btn pink lighten-1 z-depth-0" onClick={this.handleClick1}>Voltar</button>
  32. </div>
  33. </div>
  34. )
  35. }else{
  36. return (
  37.  
  38. <div className="card z-depth-0 project-summary">
  39. <form onSubmit={this.handleSubmit} className="white">
  40. <h5 className="grey-text text-darken-3 center">Dados do Cliente</h5>
  41. <div>
  42. <label><h6><b>Nome:</b>{this.state.clientes.map((cb) => <option key={cb.id}
  43. value={cb.id}>{cb.nome} </option>)}
  44. </h6></label>
  45. </div>
  46. </form>
  47. <div className="right">
  48. <button className="btn pink lighten-1 z-depth-0" onClick={this.handleClick1}>Voltar</button>
  49. </div>
  50. </div>
  51. )
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement