AddMenu.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import Page from "./Page.js";
  2. import Elem from "../Elem.js";
  3. export default class AddMenu extends Page{
  4. constructor(){
  5. super("AddMenu");
  6. const logoutSvg = '<?xml version="1.0" encoding="UTF-8"?><svg stroke-width="2.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>'
  7. this.render(logoutSvg);
  8. }
  9. render(logoutSvg){
  10. new Elem("button")
  11. .innerHtml(logoutSvg)
  12. .addClass("circleButton")
  13. .onclick(()=>{changePage("home")})
  14. .appendTo(this.container);
  15. new Elem("button")
  16. .text("New Transaction")
  17. .addClass("button")
  18. .onclick(()=>{changePage("createTransaction")})
  19. .focus()
  20. .appendTo(this.container);
  21. new Elem("button")
  22. .text("New Income")
  23. .addClass("button")
  24. .onclick(()=>{changePage("createIncome")})
  25. .appendTo(this.container);
  26. new Elem("button")
  27. .text("New Bill")
  28. .addClass("button")
  29. .onclick(()=>{changePage("createBill")})
  30. .appendTo(this.container);
  31. new Elem("button")
  32. .text("New Allowance")
  33. .addClass("button")
  34. .onclick(()=>{changePage("createAllowance")})
  35. .appendTo(this.container);
  36. new Elem("button")
  37. .text("New Account")
  38. .addClass("button")
  39. .onclick(()=>{changePage("createAccount")})
  40. .appendTo(this.container);
  41. }
  42. }