Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#132 telas para visualizar, alterar e cadastrar servico #144

Merged
merged 1 commit into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/main/webapp/Cliente/agendarServico.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@
</p:panelGrid>
<p:panelGrid columns="4">
<p:outputLabel value="Data:"/>
<p:inputMask id="sd" value="#{controllerAgendamento.agenda.data}" mask="99/99/9999"
required="true" requiredMessage="falta a data!!!"/>
<p:calendar value="#{controllerAgendamento.agenda.data}" pattern="dd/MM/yyyy" mask="true" size="10" />
<p:outputLabel value="Hora:"/>
<p:selectOneMenu id="lazy" value="#{controllerAgendamento.agenda.hora}" style="width:125px">
<f:selectItem itemLabel="Horarios" itemValue=""/>
<f:selectItems value="#{controllerServico.servico.listaDeHorarios}" />
</p:selectOneMenu>
<p:calendar value="#{controllerAgendamento.agenda.hora}" pattern="HH:mm" timeOnly="true" size="7"/>

</p:panelGrid>

<p:commandButton value="agendar" action="#{controllerAgendamento.salvar()}" update="@form"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/Cliente/meusAgendamentos.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ui:define name="metadata">
<f:metadata>
<f:event listener="#{controllerAgendamento.listarAgendamentoCliente(autenticarBean.clienteLogin.idCliente)}" type="preRenderView"/>
<f:event listener="#{controllerAgendamento.listar(autenticarBean.clienteLogin.idCliente)}" type="preRenderView"/>
</f:metadata>
</ui:define>
<ui:define name="conteudo">
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/Cliente/visualizarServicos.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<div class="so">
<h:form id="formpesquisa">
<p:growl id="growl" life="10000" showDetail="true" showSummary="false"/>
<h:panelGrid columns="4">
<p:commandButton value="Novo" action="ProdutoCadastro.xhtml?faces-redirect=true"/>
<p:commandButton value="Alterar" action="AlterareDeletarProduto.xhtml?faces-redirect=true"/>
</h:panelGrid>
<center>
<p:dataTable emptyMessage="Nenhum registro encontrado..." value="#{controllerServico.listaServico}"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Petpalacy</title>
</h:head>
<h:body>
<ui:composition template="../templates/templateEmpresa.xhtml">
<ui:define name="head">
<h:outputStylesheet library="css" name="cadastrar.css" />
</ui:define>
<ui:define name="conteudo">
<p:growl id="gro" life="4000" />
<p:toolbar>
<f:facet name="left"><h:outputText value="ALTERAR DADOS EMPRESA" /></f:facet>
</p:toolbar>
<p:separator />
<div class="container_formcad">
<div class="content_formcad">
<h:form id="formCad">
<h1 class="titulo_cadservi">DADOS DO SERVIÇO</h1>
<p:panelGrid styleClass="panelgridcad" columns="3">
<h:outputText styleClass="output_text" value="Nome:"/>
<p:inputText id="txtNome" value="#{controllerServico.servico.nome}" required="true"
requiredMessage="Tá faltando preencher o campo nome!"/>
<p:message for="txtNome" />
<h:outputText styleClass="output_text" value="Valor:"/>
<p:inputMask id="txtValor" value="#{controllerServico.servico.valor}" mask="R$ 999.99,99"
required="true" requiredMessage="Tá faltando preencher o campo valor!"/>
<p:message for="txtValor" />
<h:outputText styleClass="output_text" value="Duração:"/>
<p:inputMask id="txtDuracao" value="#{controllerServico.servico.duracao}" mask="999"/>
<p:message for="txtDuracao" />
</p:panelGrid>
<br/>
<p:commandButton styleClass="button_cad" value="Alterar" action="#{controllerServico.alterar()}"
update=":formCad :gro" >
<p:confirm header="Atenção" message="Deseja realmente alterar?" />
</p:commandButton>
</h:form>
<p:confirmDialog id="dialConfirm" global="true" widgetVar="widDialConfirma" >
<h:form>
<p:commandButton value="sim" styleClass="ui-confirmdialog-yes" type="button" icon="ui-icon-check"/>
<p:commandButton value="não" styleClass="ui-confirmdialog-no" type="button" icon="ui-icon-close"/>
</h:form>
</p:confirmDialog>
</div>
</div>
</ui:define>
</ui:composition>
</h:body>
</html>
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Petpalacy</title>
</h:head>
<h:body>
<ui:composition template="../templates/templateEmpresa.xhtml">
<ui:define name="head">
<h:outputStylesheet library="css" name="cadastrar.css" />
</ui:define>

<ui:define name="conteudo">
<p:growl id="gro" life="4000" />

<p:toolbar>
<f:facet name="left"><h:outputText value="ALTERAR SERVIÇOS" /></f:facet>
</p:toolbar>

<p:separator />

<div class="container_formcad">
<div class="content_formcad">
<h:form id="formCad">
<h1 class="titulo_cadservi">DADOS DO SERVIÇO</h1>
<p:panelGrid styleClass="panelgridcad" columns="3">
<h:outputText styleClass="output_text" value="Nome:"/>
<p:inputText id="txtNome" value="#{controllerServico.servico.nome}" required="true"
requiredMessage="Tá faltando preencher o campo nome!"/>
<p:message for="txtNome" />

<h:outputText styleClass="output_text" value="Valor:"/>
<p:inputMask id="txtValor" value="#{controllerServico.servico.valor}" mask="999.99,99"
required="true" requiredMessage="Tá faltando preencher o campo valor!"/>
<p:message for="txtValor" />

<h:outputText styleClass="output_text" value="Duração:"/>
<p:inputMask id="txtDuracao" value="#{controllerServico.servico.duracao}" mask="999"/>
<p:message for="txtDuracao" />

</p:panelGrid>

<br/>
<p:commandButton styleClass="button_cad" value="Alterar" action="#{controllerServico.alterar()}"
update=":formCad :gro" >
<p:confirm header="Atenção" message="Deseja realmente alterar?" />
</p:commandButton>
</h:form>

<p:confirmDialog id="dialConfirm" global="true" widgetVar="widDialConfirma" >
<h:form>
<p:commandButton value="sim" styleClass="ui-confirmdialog-yes" type="button" icon="ui-icon-check"/>
<p:commandButton value="não" styleClass="ui-confirmdialog-no" type="button" icon="ui-icon-close"/>
</h:form>
</p:confirmDialog>
</div>
</div>
</ui:define>
</ui:composition>
</h:body>
</html>

118 changes: 118 additions & 0 deletions src/main/webapp/Empresa/alterarCadastroEmpresa.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Petpalacy</title>
</h:head>
<h:body>
<ui:composition template="../templates/templateEmpresa.xhtml">
<ui:define name="head">
<h:outputStylesheet library="css" name="cadastrar.css" />
</ui:define>

<ui:define name="conteudo">
<p:growl id="gro" life="4000" />

<p:toolbar>
<f:facet name="left"><h:outputText value="ALTERAR DADOS EMPRESA" /></f:facet>
</p:toolbar>

<p:separator />

<div class="container_formcad">
<div class="content_formcad">
<h:form id="formCad">
<h1 class="titulo_cadcli">Dados pessoais</h1>
<p:panelGrid styleClass="panelgridcad" columns="3">
<h:outputText styleClass="output_text" value="Nome:"/>
<p:inputText id="txtNome" value="#{empresaBean.selectedEmpresa.nome}" required="true"
requiredMessage="Tá faltando preencher o campo nome!"/>
<p:message for="txtNome" />

<h:outputText styleClass="output_text" value="CNPJ:"/>
<p:inputMask id="txtCnpj" value="#{empresaBean.selectedEmpresa.cnpj}" mask="99.999.999/9999-99"
required="true" requiredMessage="Tá faltando preencher o campo CNPJ!"/>
<p:message for="txtCnpj" />

<h:outputText styleClass="output_text" value="Telefone:"/>
<p:inputMask id="txtTelefone" value="#{empresaBean.selectedEmpresa.telefone}" mask="(99)99999-9999"
required="true" requiredMessage="Tá faltando preencher o campo telefone!"/>
<p:message for="txtTelefone" />

<h:outputText styleClass="output_text" value="Email:"/>
<p:inputText id="email" value="#{empresaBean.selectedEmpresa.email}" required="true"
requiredMessage="Tá faltando preencher o campo email!"/>
<p:message for="email"/>

<h:outputText styleClass="output_text" value="Senha:"/>
<p:password id="senha" feedback="true" value="#{empresaBean.selectedEmpresa.senha}" required="true"
requiredMessage="Tá faltando preencher o campo senha!" />
<p:message for="senha"/>

</p:panelGrid>

<h1 class="titulo_cadcli">Dados de endereço</h1>

<p:panelGrid styleClass="panelgrid_end" columns="3">
<h:outputText styleClass="output_text" value="Rua:"/>
<p:inputText id="txtRua" value="#{empresaBean.selectedEmpresa.endereco.logradouro}" required="true"
requiredMessage="Tá faltando preencher o campo rua!"/>
<p:message for="txtRua" />

<h:outputText styleClass="output_text" value="Número:"/>
<p:inputText id="txtNumero" value="#{empresaBean.selectedEmpresa.endereco.numero}" required="true"
requiredMessage="Tá faltando preencher o campo número!"/>
<p:message for="txtNumero" />

<h:outputText styleClass="output_text" value="Bairro:"/>
<p:inputText id="txtBairro" value="#{empresaBean.selectedEmpresa.endereco.bairro}" required="true"
requiredMessage="Tá faltando preencher o campo bairro!"/>
<p:message for="txtBairro" />

<h:outputText styleClass="output_text" value="Cidade:"/>
<p:selectOneMenu id="textCidade" value="#{empresaBean.selectedEmpresa.endereco.cidade}"
requiredMessage="Tá faltando preencher o campo cidade!">
<f:selectItem itemLabel="Selecione um cidade" itemValue="" />
<f:selectItem itemLabel="Arcoverde" itemValue="Arcoverde" />
<f:selectItem itemLabel="Belo Jardim" itemValue="Belo Jardim" />
<f:selectItem itemLabel="Bezerros" itemValue="Bezerros" />
<f:selectItem itemLabel="Cabo de Santo Agustinho" itemValue="Cabo de Santo Agustinho" />
<f:selectItem itemLabel="Caruaru" itemValue="Caruaru" />
<f:selectItem itemLabel="Garanhuns" itemValue="Garanhuns" />
<f:selectItem itemLabel="Gravata" itemValue="Gravata" />
<f:selectItem itemLabel="Jaboatao dos Guararapes" itemValue="Jaboatao dos Guararapes" />
<f:selectItem itemLabel="Olinda" itemValue="Olinda" />
<f:selectItem itemLabel="Recife" itemValue="Recife" />
<f:selectItem itemLabel="Pesqueira" itemValue="Pesqueira" />
<f:selectItem itemLabel="Petrolina" itemValue="Petrolina" />
<f:selectItem itemLabel="Santa Cruz do Capibaribe" itemValue="Santa Cruz do Capibaribe" />
<f:selectItem itemLabel="Serra Talhada" itemValue="Serra Talhada" />
<f:selectItem itemLabel="Vitoria de Santo Antao" itemValue="Vitoria de Santo Antao" />
</p:selectOneMenu>
<p:message for="textCidade"/>

</p:panelGrid>
<br/>
<p:commandButton styleClass="button_cad" value="Cadastrar" action="#{empresaBean.editarEmpresaAction()}"
update=":formCad :gro" >
<p:confirm header="Atenção" message="Deseja realmente salvar?" />
</p:commandButton>
</h:form>

<p:confirmDialog id="dialConfirm" global="true" widgetVar="widDialConfirma" >
<h:form>
<p:commandButton value="sim" styleClass="ui-confirmdialog-yes" type="button" icon="ui-icon-check"/>
<p:commandButton value="não" styleClass="ui-confirmdialog-no" type="button" icon="ui-icon-close"/>
</h:form>
</p:confirmDialog>
</div>
</div>
</ui:define>
</ui:composition>
</h:body>
</html>

Loading