-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from ProjetosCMS/marcio
Marcio
- Loading branch information
Showing
11 changed files
with
390 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.