diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 5402b6e..4e70599 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -122,16 +122,16 @@ export default { case 'Map': case 'CheckMap': // 沒有 filter Id, 沒有暫存 tempFilterId Id 就不能存檔 - return this.tempFilterId ? false : true; + return !this.tempFilterId; case 'Conformance': case 'CheckConformance': - return this.conformanceFilterTempCheckId || this.conformanceLogTempCheckId ? false : true; + return !(this.conformanceFilterTempCheckId || this.conformanceLogTempCheckId); } }, showIcon: function() { let result = true; - result = ['FILES', 'UPLOAD'].includes(this.navViewName) ? false : true; + result = !['FILES', 'UPLOAD'].includes(this.navViewName); return result; }, noShowSaveButton: function() { @@ -157,7 +157,7 @@ export default { if(this.$route.params.type === 'filter') { this.createFilterId= this.$route.params.fileId; } - this.showNavbarBreadcrumb = this.$route.matched[0].name !== ('AuthContainer') ? true : false; + this.showNavbarBreadcrumb = this.$route.matched[0].name !== ('AuthContainer'); this.getNavViewName(); }, methods: { @@ -251,9 +251,12 @@ export default { break; case 'COMPARE': switch(name) { + case 'dummy': case 'CompareDashboard': valueToSet = 'DASHBOARD'; break; + default: + break; } break; } @@ -274,7 +277,6 @@ export default { */ async saveModal() { // 協助判斷 MAP, CONFORMANCE 儲存有「送出」或「取消」。 - let isSaved; // 傳給 Map,通知 Sidebar 要關閉。 this.$emitter.emit('saveModal', false); diff --git a/src/module/alertModal.js b/src/module/alertModal.js index 7d482b7..8c6f73f 100644 --- a/src/module/alertModal.js +++ b/src/module/alertModal.js @@ -70,7 +70,7 @@ export async function saveFilter(addFilterId, next = null) { * @param { string } value File's name */ export async function savedSuccessfully(value) { - value = value ? value : ''; + value = value || ''; await Swal.fire({ title: 'SAVE COMPLETE', html: `${value} has been saved in Lucia.`, diff --git a/src/stores/files.js b/src/stores/files.js index 3997a04..4d99a29 100644 --- a/src/stores/files.js +++ b/src/stores/files.js @@ -214,7 +214,7 @@ export default defineStore('filesStore', { break; } try { - const response = await axios.put(api, data); + await axios.put(api, data); this.uploadFileName = null; await this.fetchAllFiles(); } catch(error) { diff --git a/src/views/Files/Files.vue b/src/views/Files/Files.vue index 6cdd860..f5ffc7c 100644 --- a/src/views/Files/Files.vue +++ b/src/views/Files/Files.vue @@ -116,26 +116,30 @@ - - + +
@@ -320,7 +324,7 @@ * Compare Submit button disabled */ isCompareDisabledButton: function() { - let result = this.primaryDragData.length === 0 || this.secondaryDragData.length === 0 ? true : false; + let result = this.primaryDragData.length === 0 || this.secondaryDragData.length === 0; return result; }, /**