fix #293. stay at MAP page. Remove calling of copyPending.......
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { mapPageNameToCapitalUnifiedName } from "../utils/pageUtils";
|
||||
const printPageAdiminLog = false;
|
||||
|
||||
// There are at least two ways to trigger a page navigation:
|
||||
// clicking the navigation button and refreshing the page.
|
||||
@@ -21,7 +22,7 @@ export default defineStore('pageAdminStore', {
|
||||
setActivePageComputedByRoute(routeMatched){
|
||||
if (routeMatched.length && routeMatched[routeMatched.length - 1]
|
||||
&& routeMatched[routeMatched.length - 1].name) {
|
||||
// console.log('setActivePageComputedByRoute()', mapPageNameToCapitalUnifiedName(routeMatched[routeMatched.length - 1].name));
|
||||
printPageAdiminLog && console.log('setActivePageComputedByRoute()', mapPageNameToCapitalUnifiedName(routeMatched[routeMatched.length - 1].name));
|
||||
this.activePageComputedByRoute = mapPageNameToCapitalUnifiedName(
|
||||
routeMatched[routeMatched.length - 1].name);
|
||||
}
|
||||
@@ -32,7 +33,7 @@ export default defineStore('pageAdminStore', {
|
||||
* @param {string} activePage
|
||||
*/
|
||||
setActivePage(activePage) {
|
||||
// console.log("setActivePage", activePage)
|
||||
printPageAdiminLog && console.log("setActivePage", activePage)
|
||||
this.activePage = mapPageNameToCapitalUnifiedName(activePage);
|
||||
},
|
||||
/**
|
||||
@@ -61,7 +62,7 @@ export default defineStore('pageAdminStore', {
|
||||
* Copy(transit) the value of pendingActivePage to activePage
|
||||
*/
|
||||
copyPendingPageToActivePage() {
|
||||
// console.log('pinia copying this.pendingActivePage', this.pendingActivePage);
|
||||
printPageAdiminLog && console.log('pinia copying this.pendingActivePage', this.pendingActivePage);
|
||||
this.activePage = this.pendingActivePage;
|
||||
},
|
||||
/**
|
||||
@@ -72,7 +73,7 @@ export default defineStore('pageAdminStore', {
|
||||
* @param {string} pendingActivePage
|
||||
*/
|
||||
setPendingActivePage(argPendingActivePage) {
|
||||
// console.log('pinia setting this.pendingActivePage', this.pendingActivePage);
|
||||
printPageAdiminLog && console.log('pinia setting this.pendingActivePage', this.pendingActivePage);
|
||||
this.pendingActivePage = mapPageNameToCapitalUnifiedName(argPendingActivePage);
|
||||
},
|
||||
/**
|
||||
@@ -87,7 +88,7 @@ export default defineStore('pageAdminStore', {
|
||||
* instead, we apply the previous page.
|
||||
*/
|
||||
keepPreviousPage() {
|
||||
// console.log('pinia keeping this.previousPage', this.previousPage);
|
||||
printPageAdiminLog && console.log('pinia keeping this.previousPage', this.previousPage);
|
||||
this.activePage = this.previousPage;
|
||||
this.shouldKeepPreviousPage = true;
|
||||
},
|
||||
@@ -95,7 +96,7 @@ export default defineStore('pageAdminStore', {
|
||||
* Clean up the state of the boolean related to modal showing phase
|
||||
*/
|
||||
clearShouldKeepPreviousPageBoolean(){
|
||||
// console.log('clearShouldKeepPreviousPageBoolean()');
|
||||
printPageAdiminLog && console.log('clearShouldKeepPreviousPageBoolean()');
|
||||
this.shouldKeepPreviousPage = false;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user