Skip to content

Commit

Permalink
Merge pull request #44 from ProjetosCMS/marcio
Browse files Browse the repository at this point in the history
Marcio
  • Loading branch information
marciosamuel authored Mar 18, 2021
2 parents 226e82a + f8e52bb commit 86b5902
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 132 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Este projeto está sob licença do MIT que permite a qualquer pessoa que obtém

- Dashboard

![Dashboard](./layouts/Dashboard%20Menu%20open-%20Bew%20-%20Desktop.png)
![Dashboard](./layouts/Dashboard%20Menu%20open-%20Bew%20-%20Desktop.jpeg)

Acesse o layout completo no [Figma](https://www.figma.com/file/VLJiXLRJlLLLioYwbZtI95/BEW?node-id=0%3A1) (ainda em construção).

Expand All @@ -53,12 +53,13 @@ Acesse o layout completo no [Figma](https://www.figma.com/file/VLJiXLRJlLLLioYwb
- [X] Dashboard
- [X] Adição e consulta de vendas
- [ ] Edição de vendas
- [ ] Adição, consulta e edição de compras
- [x] Adição e consulta de compras
- [ ] Edição de compras
- [X] Adição, consulta, edição e remoção de produtos
- [X] Adição, consulta, edição e remoção de fornecedores
- [X] Adição, consulta, edição e remoção de funcionários
- [X] Adição, consulta, edição e remoção de clientes
- [ ] Adição, consulta, edição e remoção de promoções
- [x] Adição, consulta, edição e remoção de promoções
- [X] Adição, consulta, edição e remoção de categorias
- [ ] Gerenciamento de relatórios

Expand Down
Binary file removed layouts/Dashboard - Bew - Desktop.png
Binary file not shown.
Binary file added layouts/Dashboard Menu open- Bew - Desktop.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions public/css/addProduct.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@ main .content .conteudo-cadastro select {
padding-left: 10px;
margin-left: 10%;
}

main .content .conteudo-cadastro select {
grid-area: select;
}
69 changes: 69 additions & 0 deletions public/css/addProductPromotion.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@import './modal.css';

#promocoes {
background-color: rgba(8, 102, 59, 0.47);
border-left-color: black;
}

#promocoes a {
color: #fff;
}

main header {
grid-template-columns: 10% 1fr;
}

main header h1 {
justify-self: center;
padding-right: 10vw;
}

main .content {
height: 90%;
margin-top: 1%;
}

main .content .conteudo-cadastro {
display: grid;
width: 70%;
height: 60%;
margin-left: 15%;
margin-right: 5%;
padding: 2.5% 5%;
grid-template-columns: 1fr 80% 1fr;
grid-template-rows: 12% 20% 12% 20% 12% 20%;
column-gap: 15px;
grid-template-areas:
'. label1 .'
'. promocao .'
'. label2 .'
'. produto .'
'. label3 .'
'. desconto .';
}

#idPromocao {
grid-area: promocao;
}

#idProduto {
grid-area: produto;
}

#valorDesconto {
grid-area: desconto;
}

select {
width: 80%;
height: 70%;
border: none;
outline: none;
border-radius: 6px;
color: var(--branco);
background-color: var(--cinza-escuro);
font-size: 18px;
padding: 5px;
padding-left: 10px;
margin-left: 10%;
}
53 changes: 53 additions & 0 deletions public/css/addPromotion.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@import './modal.css';

#promocoes {
background-color: rgba(8, 102, 59, 0.47);
border-left-color: black;
}

#promocoes a {
color: #fff;
}

main header {
grid-template-columns: 10% 1fr;
}

main header h1 {
justify-self: center;
padding-right: 10vw;
}

main .content {
height: 90%;
margin-top: 1%;
}

main .content .conteudo-cadastro {
display: grid;
width: 90%;
height: 60%;
margin-left: 5%;
margin-right: 5%;
padding: 2.5% 5%;
grid-template-columns: 50% 50%;
grid-template-rows: 15% 25% 15% 25%;
column-gap: 15px;
grid-template-areas:
'label1 label1'
'nome nome'
'label2 label3'
'data1 data2';
}

#nome {
grid-area: nome;
}

#dataInicio {
grid-area: data1;
}

#dataFim {
grid-area: data2;
}
115 changes: 75 additions & 40 deletions src/Views/AddPromotionProductView.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,76 @@
<?php
class AddPromotionProductView{
public function __construct($params){ ?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Relacionar promoção</title>
</head>
<body>
<form action="/adding/promotion-product" method="POST">
<label for="nome">Promoção</label>
<select name="idPromocao">
<option selected disabled>Selecione uma promoção</option>
<?php foreach($params['promotions'] as $promotion){?>
<option value="<?php echo $promotion['id'] ?>"><?php echo $promotion['nome'] ?></option>
<?php } ?>
</select></br>
<label for="dataInicio">Produto</label>
<select name="idProduto">
<option selected disabled>Selecione um produto</option>
<?php foreach($params['products'] as $products){?>
<option value="<?php echo $products['id'] ?>"><?php echo $products['nome'] ?></option>
<?php } ?>
</select></br>
<label for="valorDesconto">Valor de desconto</label>
<input type="text" name="valorDesconto"></br>
<button type="submit">Cadastrar</button>
</form>
<h1>
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
?>
</h1>
</body>
</html>
<?php }
}
?>
class AddPromotionProductView
{
public function __construct($params)
{
$env = parse_ini_file('env.ini')['HOST'];
?>
<!DOCTYPE html>
<html lang="pt-BR">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/public/css/addProductPromotion.css">
<title>Relacionar promoção</title>
<script>
const host = '<?php echo $env; ?>';
</script>
</head>

<body>
<?php include "components/Sidebar.php" ?>
<main>
<header>
<i class="menu-toggle disabled" data-feather="menu"></i>
<h1>ADICIONAR PRODUTO À UMA PROMOÇÃO</h1>
</header>

<div class="content">
<form action="/adding/promotion-product" method="POST">
<div class="conteudo-cadastro">
<label for="nome" class="label1">Promoção</label>
<select name="idPromocao" id="idPromocao">
<option selected disabled>Selecione uma promoção</option>
<?php foreach ($params['promotions'] as $promotion) { ?>
<option value="<?php echo $promotion['id'] ?>"><?php echo $promotion['nome'] ?></option>
<?php } ?>
</select></br>
<label for="dataInicio" class="label2">Produto</label>
<select name="idProduto" id="idProduto">
<option selected disabled>Selecione um produto</option>
<?php foreach ($params['products'] as $products) { ?>
<option value="<?php echo $products['id'] ?>"><?php echo $products['nome'] ?></option>
<?php } ?>
</select></br>
<label for="valorDesconto" class="label3">Valor de desconto</label>
<input type="text" name="valorDesconto" id="valorDesconto"></br>
</div>
<div class="botoes">
<button type="reset" onclick="location.href=`${host}/promotion-product`">CANCELAR <i data-feather="x"></i></button>
<button type="submit" class="submit">CADASTRAR <i data-feather="check"></i></button>
</div>
</form>
<div class="modal mensagem disabled">
<div>
<button type="button" onclick="location.href=`${host}/promotion-product`">
<i data-feather="x"></i>
</button>
<?php
if ($_SESSION['message'] != '') {
echo "<h3>" . $_SESSION['message'] . "</h3>";
unset($_SESSION['message']);
echo "<script type='text/javascript'>document.querySelector('.modal.mensagem').classList.toggle('disabled');</script>";
}
?>
</div>
</div>
</div>
</main>
<script src="/public/js/global.js"></script>
</body>

</html>
<?php }
}
?>
74 changes: 54 additions & 20 deletions src/Views/AddPromotionView.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,65 @@
<?php
class AddPromotionView{
public function __construct(){ ?>
class AddPromotionView
{
public function __construct()
{
$env = parse_ini_file('env.ini')['HOST']; ?>
<!DOCTYPE html>
<html lang="pt-BR">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/public/css/addPromotion.css">
<title>Cadastro de promoções</title>
<script>
const host = '<?php echo $env; ?>';
</script>
</head>

<body>
<form action="/adding/promotion" method="POST">
<label for="nome">Nome da promoção</label>
<input type="text" name="nome" id="nome"></br>
<label for="dataInicio">Data Inicio</label>
<input type="date" name="dataInicio" id="dataInicio"></br>
<label for="dataFim">Data Fim</label>
<input type="date" name="dataFim" id="dataFim"></br>
<button type="submit">Cadastrar</button>
</form>
<h1>
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
?>
</h1>
<?php include "components/Sidebar.php" ?>
<main>
<header>
<i class="menu-toggle disabled" data-feather="menu"></i>
<h1>CADASTRAR PROMOÇÃO</h1>
</header>

<div class="content">
<form action="/adding/promotion" method="POST">
<div class="conteudo-cadastro">
<label for="nome" class="label1">Nome da promoção</label>
<input type="text" name="nome" id="nome">
<label for="dataInicio" class="label2">Data Inicio</label>
<input type="date" name="dataInicio" id="dataInicio">
<label for="dataFim" class="label3">Data Fim</label>
<input type="date" name="dataFim" id="dataFim">
</div>
<div class="botoes">
<button type="reset" onclick="location.href=`${host}/promotion`">CANCELAR <i data-feather="x"></i></button>
<button type="submit" class="submit">CADASTRAR <i data-feather="check"></i></button>
</div>
</form>
<div class="modal mensagem disabled">
<div>
<button type="button" onclick="location.href=`${host}/promotion`">
<i data-feather="x"></i>
</button>
<?php
if ($_SESSION['message'] != '') {
echo "<h3>" . $_SESSION['message'] . "</h3>";
unset($_SESSION['message']);
echo "<script type='text/javascript'>document.querySelector('.modal.mensagem').classList.toggle('disabled');</script>";
}
?>
</div>
</div>
</div>
</main>
<script src="/public/js/global.js"></script>
</body>

</html>
<?php }
}
?>
<?php }
}
?>
5 changes: 3 additions & 2 deletions src/Views/DashboardView.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
class DashboardView
{
public function __construct($params){
$env = parse_ini_file('env.ini')['HOST']; ?>
public function __construct($params)
{
$env = parse_ini_file('env.ini')['HOST'];
?>
<!DOCTYPE html>
<html lang="pt-br">
Expand Down
Loading

0 comments on commit 86b5902

Please sign in to comment.