sonar low
This commit is contained in:
@@ -122,16 +122,16 @@ export default {
|
|||||||
case 'Map':
|
case 'Map':
|
||||||
case 'CheckMap':
|
case 'CheckMap':
|
||||||
// 沒有 filter Id, 沒有暫存 tempFilterId Id 就不能存檔
|
// 沒有 filter Id, 沒有暫存 tempFilterId Id 就不能存檔
|
||||||
return this.tempFilterId ? false : true;
|
return !this.tempFilterId;
|
||||||
case 'Conformance':
|
case 'Conformance':
|
||||||
case 'CheckConformance':
|
case 'CheckConformance':
|
||||||
return this.conformanceFilterTempCheckId || this.conformanceLogTempCheckId ? false : true;
|
return !(this.conformanceFilterTempCheckId || this.conformanceLogTempCheckId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showIcon: function() {
|
showIcon: function() {
|
||||||
let result = true;
|
let result = true;
|
||||||
|
|
||||||
result = ['FILES', 'UPLOAD'].includes(this.navViewName) ? false : true;
|
result = !['FILES', 'UPLOAD'].includes(this.navViewName);
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
noShowSaveButton: function() {
|
noShowSaveButton: function() {
|
||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
if(this.$route.params.type === 'filter') {
|
if(this.$route.params.type === 'filter') {
|
||||||
this.createFilterId= this.$route.params.fileId;
|
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();
|
this.getNavViewName();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -251,9 +251,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'COMPARE':
|
case 'COMPARE':
|
||||||
switch(name) {
|
switch(name) {
|
||||||
|
case 'dummy':
|
||||||
case 'CompareDashboard':
|
case 'CompareDashboard':
|
||||||
valueToSet = 'DASHBOARD';
|
valueToSet = 'DASHBOARD';
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -274,7 +277,6 @@ export default {
|
|||||||
*/
|
*/
|
||||||
async saveModal() {
|
async saveModal() {
|
||||||
// 協助判斷 MAP, CONFORMANCE 儲存有「送出」或「取消」。
|
// 協助判斷 MAP, CONFORMANCE 儲存有「送出」或「取消」。
|
||||||
let isSaved;
|
|
||||||
// 傳給 Map,通知 Sidebar 要關閉。
|
// 傳給 Map,通知 Sidebar 要關閉。
|
||||||
this.$emitter.emit('saveModal', false);
|
this.$emitter.emit('saveModal', false);
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export async function saveFilter(addFilterId, next = null) {
|
|||||||
* @param { string } value File's name
|
* @param { string } value File's name
|
||||||
*/
|
*/
|
||||||
export async function savedSuccessfully(value) {
|
export async function savedSuccessfully(value) {
|
||||||
value = value ? value : '';
|
value = value || '';
|
||||||
await Swal.fire({
|
await Swal.fire({
|
||||||
title: 'SAVE COMPLETE',
|
title: 'SAVE COMPLETE',
|
||||||
html: `<span class="text-primary">${value}</span> has been saved in Lucia.`,
|
html: `<span class="text-primary">${value}</span> has been saved in Lucia.`,
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default defineStore('filesStore', {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await axios.put(api, data);
|
await axios.put(api, data);
|
||||||
this.uploadFileName = null;
|
this.uploadFileName = null;
|
||||||
await this.fetchAllFiles();
|
await this.fetchAllFiles();
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
|||||||
@@ -116,9 +116,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- All Files type of grid -->
|
<!-- All Files type of grid -->
|
||||||
<draggable tag="ul" :list="compareData" :group="{ name: 'files' }" itemKey="name" class="flex justify-start items-start gap-4 flex-wrap overflow-y-scroll overflow-x-hidden max-h-[calc(100vh_-_440px)] scrollbar" id="compareGridCards">
|
<ul>
|
||||||
|
<draggable tag="ul" :list="compareData" :group="{ name: 'files' }" itemKey="name" class="flex justify-start items-start gap-4
|
||||||
|
flex-wrap overflow-y-scroll overflow-x-hidden max-h-[calc(100vh_-_440px)] scrollbar" id="compareGridCards">
|
||||||
<template #item="{ element, index }">
|
<template #item="{ element, index }">
|
||||||
<li class="w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300 flex flex-col justify-between cursor-pointer" :title="element.name" :id="'compareFile' + index">
|
<li class="w-[216px] h-[168px] p-4 border rounded border-neutral-300 hover:bg-primary/10 hover:border-primary duration-300
|
||||||
|
flex flex-col justify-between cursor-pointer" :title="element.name" :id="'compareFile' + index">
|
||||||
<div>
|
<div>
|
||||||
<span class="material-symbols-outlined mb-2 !text-[32px] block">
|
<span class="material-symbols-outlined mb-2 !text-[32px] block">
|
||||||
{{ element.icon }}
|
{{ element.icon }}
|
||||||
@@ -136,6 +139,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</draggable>
|
</draggable>
|
||||||
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<!-- All & Discover -->
|
<!-- All & Discover -->
|
||||||
<section v-else>
|
<section v-else>
|
||||||
@@ -320,7 +324,7 @@
|
|||||||
* Compare Submit button disabled
|
* Compare Submit button disabled
|
||||||
*/
|
*/
|
||||||
isCompareDisabledButton: function() {
|
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;
|
return result;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user