Fix typos: updataFilter, updataConformance, setPrevioiusPage, reallyDeldet, tooken, pageAdimin
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ export default defineStore('allMapDataStore', {
|
||||
ruleData: [], // Funnle view's data
|
||||
isRuleData: [], // toggle button data
|
||||
allFunnelData: [],
|
||||
isUpdataFilter: false, // 是否成功儲存 Filter 檔
|
||||
isUpdateFilter: false, // 是否成功儲存 Filter 檔
|
||||
selectTimeFrame: [], // user select time start and end
|
||||
infinite404: null, // 無限滾動式是否到底要換頁
|
||||
infiniteStart: 0, // 無限滾動 case 開始的數字
|
||||
@@ -354,19 +354,19 @@ export default defineStore('allMapDataStore', {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Updata an Existing Filter
|
||||
* Update an Existing Filter
|
||||
*/
|
||||
async updataFilter() {
|
||||
async updateFilter() {
|
||||
let createFilterId = this.createFilterId
|
||||
const api = `/api/filters/${createFilterId}`;
|
||||
const data = this.postRuleData;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.put(api, data);
|
||||
this.isUpdataFilter = response.status === 200;
|
||||
this.isUpdateFilter = response.status === 200;
|
||||
this.tempFilterId = null;
|
||||
}catch(error) {
|
||||
apiError(error, 'Failed to updata an Existing Filter.');
|
||||
apiError(error, 'Failed to update an Existing Filter.');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ export default defineStore('conformanceStore', {
|
||||
isStartSelected: null, // start & end 連動先選擇 start
|
||||
isEndSelected: null, // start & end 連動先選擇 end
|
||||
conformanceRuleData: null, // create checkId's data to save
|
||||
isUpdataConformance: false, // 成功儲存後要跳 Modal
|
||||
isUpdateConformance: false, // 成功儲存後要跳 Modal
|
||||
conformanceFileName: null, // 儲存成功的 Modal 用
|
||||
}),
|
||||
getters: {
|
||||
@@ -436,9 +436,9 @@ export default defineStore('conformanceStore', {
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Updata an Existing Conformance Check, log and filter
|
||||
* Update an Existing Conformance Check, log and filter
|
||||
*/
|
||||
async updataConformance() {
|
||||
async updateConformance() {
|
||||
let logCreateCheckId = this.conformanceLogCreateCheckId;
|
||||
let filterCreateCheckId = this.conformanceFilterCreateCheckId;
|
||||
let api = '';
|
||||
@@ -450,11 +450,11 @@ export default defineStore('conformanceStore', {
|
||||
|
||||
try {
|
||||
const response = await this.$axios.put(api, data);
|
||||
this.isUpdataConformance = response.status === 200;
|
||||
this.isUpdateConformance = response.status === 200;
|
||||
this.conformanceLogTempCheckId = null;
|
||||
this.conformanceFilterTempCheckId = null;
|
||||
}catch(error) {
|
||||
apiError(error, 'Failed to updata an Existing Conformance.');
|
||||
apiError(error, 'Failed to update an Existing Conformance.');
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -88,7 +88,7 @@ export default defineStore('loginStore', {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Logout, tooken expired
|
||||
* Logout, token expired
|
||||
*/
|
||||
logOut() {
|
||||
delete axios.defaults.headers.common["Authorization"];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { mapPageNameToCapitalUnifiedName } from "../utils/pageUtils";
|
||||
const printPageAdiminLog = false;
|
||||
const printPageAdminLog = false;
|
||||
|
||||
// There are at least two ways to trigger a page navigation:
|
||||
// clicking the navigation button and refreshing the page.
|
||||
@@ -23,7 +23,7 @@ export default defineStore('pageAdminStore', {
|
||||
setActivePageComputedByRoute(routeMatched){
|
||||
if (routeMatched.length && routeMatched[routeMatched.length - 1]
|
||||
&& routeMatched[routeMatched.length - 1].name) {
|
||||
printPageAdiminLog && console.log('setActivePageComputedByRoute()', mapPageNameToCapitalUnifiedName(routeMatched[routeMatched.length - 1].name));
|
||||
printPageAdminLog && console.log('setActivePageComputedByRoute()', mapPageNameToCapitalUnifiedName(routeMatched[routeMatched.length - 1].name));
|
||||
this.activePageComputedByRoute = mapPageNameToCapitalUnifiedName(
|
||||
routeMatched[routeMatched.length - 1].name);
|
||||
}
|
||||
@@ -33,20 +33,20 @@ export default defineStore('pageAdminStore', {
|
||||
* @param {string} activePage
|
||||
*/
|
||||
setActivePage(activePage) {
|
||||
printPageAdiminLog && console.log("setActivePage", activePage)
|
||||
printPageAdminLog && console.log("setActivePage", activePage)
|
||||
this.activePage = mapPageNameToCapitalUnifiedName(activePage);
|
||||
},
|
||||
/**
|
||||
* Specify previous page state value.
|
||||
* @param {string} prevPage
|
||||
*/
|
||||
setPrevioiusPage(prevPage) {
|
||||
setPreviousPage(prevPage) {
|
||||
this.previousPage = mapPageNameToCapitalUnifiedName(prevPage);
|
||||
},
|
||||
/**
|
||||
* Set the previous(usually current) pages to the ones we just decide.
|
||||
*/
|
||||
setPrevioiusPageUsingActivePage() {
|
||||
setPreviousPageUsingActivePage() {
|
||||
this.previousPage = this.activePage;
|
||||
},
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ export default defineStore('pageAdminStore', {
|
||||
* Copy(transit) the value of pendingActivePage to activePage
|
||||
*/
|
||||
copyPendingPageToActivePage() {
|
||||
printPageAdiminLog && console.log('pinia copying this.pendingActivePage', this.pendingActivePage);
|
||||
printPageAdminLog && console.log('pinia copying this.pendingActivePage', this.pendingActivePage);
|
||||
this.activePage = this.pendingActivePage;
|
||||
},
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ export default defineStore('pageAdminStore', {
|
||||
* @param {string} pendingActivePage
|
||||
*/
|
||||
setPendingActivePage(argPendingActivePage) {
|
||||
printPageAdiminLog && console.log('pinia setting this.pendingActivePage', this.pendingActivePage);
|
||||
printPageAdminLog && console.log('pinia setting this.pendingActivePage', this.pendingActivePage);
|
||||
this.pendingActivePage = mapPageNameToCapitalUnifiedName(argPendingActivePage);
|
||||
},
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ export default defineStore('pageAdminStore', {
|
||||
* instead, we apply the previous page.
|
||||
*/
|
||||
keepPreviousPage() {
|
||||
printPageAdiminLog && console.log('pinia keeping this.previousPage', this.previousPage);
|
||||
printPageAdminLog && console.log('pinia keeping this.previousPage', this.previousPage);
|
||||
this.activePage = this.previousPage;
|
||||
this.shouldKeepPreviousPage = true;
|
||||
},
|
||||
@@ -95,7 +95,7 @@ export default defineStore('pageAdminStore', {
|
||||
* Clean up the state of the boolean related to modal showing phase
|
||||
*/
|
||||
clearShouldKeepPreviousPageBoolean(){
|
||||
printPageAdiminLog && console.log('clearShouldKeepPreviousPageBoolean()');
|
||||
printPageAdminLog && console.log('clearShouldKeepPreviousPageBoolean()');
|
||||
this.shouldKeepPreviousPage = false;
|
||||
},
|
||||
setCurrentMapFile(fileName){
|
||||
|
||||
Reference in New Issue
Block a user