Skip to content

Commit

Permalink
Primeiro modelo MVC funcional
Browse files Browse the repository at this point in the history
programação em pares Pedro Victor e Patrick Anderson
  • Loading branch information
pedroslrn committed Jun 19, 2024
1 parent 3cbd01c commit e1192e3
Show file tree
Hide file tree
Showing 650 changed files with 65,798 additions and 1,377 deletions.
56 changes: 0 additions & 56 deletions Beta do Database

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
Binary file added Front-view/img/about/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/about/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/about/team/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/about/team/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/about/team/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/about/team/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/background/hero-bg-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/background/hero-bg-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/background/parallax-blank.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Front-view/img/background/parallax-contact.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added Front-view/img/logo-dark.png
Binary file added Front-view/img/logo-footer.png
Binary file added Front-view/img/logo-light.png
Binary file added Front-view/img/logo.jpg
Binary file added Front-view/img/menu/1.jpg
Binary file added Front-view/img/menu/10.jpg
Binary file added Front-view/img/menu/11.jpg
Binary file added Front-view/img/menu/12.jpg
Binary file added Front-view/img/menu/2.JPG
Binary file added Front-view/img/menu/3.jpg
Binary file added Front-view/img/menu/4.jpg
Binary file added Front-view/img/menu/5.jpg
Binary file added Front-view/img/menu/6.jpg
Binary file added Front-view/img/menu/7.jpg
Binary file added Front-view/img/menu/8.jpg
Binary file added Front-view/img/menu/9.jpg
Binary file added Front-view/img/services/benefits/1.jpg
Binary file added Front-view/img/services/offers/1.jpg
1,093 changes: 230 additions & 863 deletions docs/c2-php/index-02.html → Front-view/index-01.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/c2-php/js/dinex.js → Front-view/js/dinex.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ $(function() {
var r = $(this).serialize();
$.post($(this).attr("action"), r, function() {
$("form#form-2").slideUp("fast", function() {
$(this).before('<div class="success-r">Your reservation has been received.</div>');
$(this).before('<div class="success-r">Sua Reserva foi Recebida com Sucesso!</div>');
});
});
}
Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions Front-view/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
document.addEventListener('DOMContentLoaded', () => {
const form = document.getElementById('form-2');
const feedbackMessage = document.getElementById('feedback-message');

form.addEventListener('submit', async (event) => {
event.preventDefault(); // Impede o envio padrão do formulário

const formData = new FormData(form);
const data = Object.fromEntries(formData.entries());

try {
const response = await fetch('/api/reservar_mesa', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});

if (response.ok) {
const result = await response.text();
feedbackMessage.textContent = result;
feedbackMessage.style.color = 'green';
} else {
const errorText = await response.text();
feedbackMessage.textContent = errorText;
feedbackMessage.style.color = 'red';
}
} catch (error) {
feedbackMessage.textContent = 'Erro ao tentar reservar a mesa. Por favor, tente novamente.';
feedbackMessage.style.color = 'red';
}
});
});
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
50 changes: 0 additions & 50 deletions api/__main__.py

This file was deleted.

8 changes: 0 additions & 8 deletions api/main.py

This file was deleted.

11 changes: 11 additions & 0 deletions config/db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { Pool } = require('pg');

const pool = new Pool({
user: 'postgres',
host: 'localhost',
database: 'mesaFacil',
password: 'xpedro03',
port: 5432,
});

module.exports = pool;
Loading

0 comments on commit e1192e3

Please sign in to comment.