Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jbecerra0 authored Nov 6, 2022
0 parents commit 36941d2
Show file tree
Hide file tree
Showing 15 changed files with 521 additions and 0 deletions.
Binary file added images/ada.jpeg
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 images/ba1.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 images/ba2.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 images/ba3.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 images/bill.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 images/codoacodo.png
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 images/final_front_2021.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 images/hawaii.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 images/hawaii2.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 images/hawaii3.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 images/honolulu.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 images/steve.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
492 changes: 492 additions & 0 deletions index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const divResult = document.getElementById("divResult");
const btnSummary = document.getElementById("btnSummary");
const btnDelete = document.getElementById("btnDelete");
const form = document.forms[1];

const discountCategory = {
estudiante: 0.80,
trainee: 0.50,
junior: 0.15,
};

btnSummary.addEventListener("click", (e) => {
e.preventDefault();

const amount = parseInt(form["amount"].value);
const category = form["category"].value;
const total = amount * 200;

const totalToPay = total - (total * discountCategory[category]);
document.getElementById("total").innerText = totalToPay;

divResult.style.display = "block";
});

btnDelete.addEventListener("click", (e) => {
e.preventDefault();
divResult.style.display = "none";
form.reset();
});
Empty file added style.css
Empty file.

0 comments on commit 36941d2

Please sign in to comment.