diff --git a/js/views/03_revenue/helpers.js b/js/views/03_revenue/helpers.js index 47d8d2e..06709c5 100644 --- a/js/views/03_revenue/helpers.js +++ b/js/views/03_revenue/helpers.js @@ -3,7 +3,7 @@ import { formatCurrency } from '../../utils/common_utils.js' import { REVENUE } from '../../init.js' import Body from '../../components/body/body.js' import NavButtons from '../../components/nav_buttons/nav_buttons.js' -import { pauseAndContinue } from '../view_logic.js' +import { nextPage } from '../view_logic.js' import Subtitle from '../../components/header/header.js' import Modal from '../../components/modal/modal.js' import Form from '../../components/form/form.js' @@ -23,7 +23,7 @@ export function preparePageView(){ export function setUpNavButtons(){ // clicking 'confirm' will also take us to the next page - Prompt.Buttons.Left.addAction(pauseAndContinue); + Prompt.Buttons.Left.addAction(nextPage); // TODO: allow user to edit revenue here Modal.Link.add('option2'); handleErrorComment(); @@ -31,7 +31,7 @@ export function setUpNavButtons(){ export function removeButtonEvents(){ // remove event listeners on prompt buttons - Prompt.Buttons.Left.removeAction(pauseAndContinue); + Prompt.Buttons.Left.removeAction(nextPage); Modal.Link.remove('option2'); } diff --git a/js/views/06_new_initiatives/helpers.js b/js/views/06_new_initiatives/helpers.js index c18e2dd..6e8773f 100644 --- a/js/views/06_new_initiatives/helpers.js +++ b/js/views/06_new_initiatives/helpers.js @@ -5,9 +5,9 @@ import Form from '../../components/form/form.js' import Table from '../../components/table/table.js' import Body from '../../components/body/body.js' import NavButtons from '../../components/nav_buttons/nav_buttons.js' -import { pauseAndContinue } from '../view_logic.js' import Subtitle from '../../components/header/header.js' import Sidebar from '../../components/sidebar/sidebar.js' +import { nextPage } from '../view_logic.js' export function initializePageView() { // Prepare page view @@ -24,7 +24,7 @@ export function initializePageView() { Prompt.Buttons.Left.updateText('Yes'); Prompt.Buttons.Right.updateText('No'); // clicking 'no new initialitives' will also take us to the next page - Prompt.Buttons.Right.addAction(pauseAndContinue); + Prompt.Buttons.Right.addAction(nextPage); Prompt.Buttons.Left.addAction(NavButtons.Next.enable); } @@ -111,7 +111,7 @@ export function removeModalLinks(){ } export function removePromptButtonListeners(){ - Prompt.Buttons.Right.removeAction(pauseAndContinue); + Prompt.Buttons.Right.removeAction(nextPage); Prompt.Buttons.Left.removeAction(NavButtons.Next.enable); Modal.clear(); } \ No newline at end of file diff --git a/js/views/view_logic.js b/js/views/view_logic.js index 3d1001c..d4f2b76 100644 --- a/js/views/view_logic.js +++ b/js/views/view_logic.js @@ -78,9 +78,4 @@ export function lastPage(){ // go to that page visitPage(lastKey); } -} - -export async function pauseAndContinue(){ - await pauseExecution(0.1); - nextPage(); } \ No newline at end of file