Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- render() {
- const { auth } = this.props;
- //if (!auth.isLoaded) return null
- if (localStorage.getItem('logged') != 'true') return <Redirect to='/signin' />
- if(localStorage.getItem('isAdmin') === "false") {
- return (
- <div className="card z-depth-0 project-summary">
- <form onSubmit={this.handleSubmit} className="white">
- <h5 className="grey-text text-darken-3 center">Dados do Cliente</h5>
- <div>
- <label><h6><b>Nome:</b>{this.state.clientes.map((cb) => <option key={cb.id}
- value={cb.id}>{cb.nome} </option>)}
- </h6></label>
- <br/>
- <label><h6><b>E-mail:</b>{this.state.clientes.map((cl) => <option key={cl.id}
- value={cl.id}>{cl.email} </option>)}
- </h6></label>
- <br/>
- <label><h6><b>Morada:</b>{this.state.clientes.map((cl) => <option key={cl.id}
- value={cl.id}>{cl.morada} </option>)}
- </h6></label>
- <br/>
- <label><h6><b>NIF:</b>{this.state.clientes.map((cl) => <option key={cl.id}
- value={cl.id}>{cl.nif} </option>)}
- </h6></label>
- <br/>
- </div>
- </form>
- <div className="right">
- <button className="btn pink lighten-1 z-depth-0" onClick={this.handleClick1}>Voltar</button>
- </div>
- </div>
- )
- }else{
- return (
- <div className="card z-depth-0 project-summary">
- <form onSubmit={this.handleSubmit} className="white">
- <h5 className="grey-text text-darken-3 center">Dados do Cliente</h5>
- <div>
- <label><h6><b>Nome:</b>{this.state.clientes.map((cb) => <option key={cb.id}
- value={cb.id}>{cb.nome} </option>)}
- </h6></label>
- </div>
- </form>
- <div className="right">
- <button className="btn pink lighten-1 z-depth-0" onClick={this.handleClick1}>Voltar</button>
- </div>
- </div>
- )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement