Replace loose equality (== null, != null) with strict equality
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
</section>
|
||||
<!-- Loop group -->
|
||||
<section>
|
||||
<div v-if="data.loops == null"></div>
|
||||
<div v-if="data.loops === null"></div>
|
||||
<div v-else>
|
||||
<p class="h2 text-base">Loop List</p>
|
||||
<div class="border rounded border-neutral-300 p-2 bg-neutral-10 w-full">
|
||||
@@ -138,12 +138,12 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
<div v-if="(data.issues?.length == 0 || data.issues == null) && data.timeTrend.chart == null"></div>
|
||||
<div v-if="(data.issues?.length === 0 || data.issues === null) && data.timeTrend.chart === null"></div>
|
||||
<p v-else="data.loops === null" class="h2 text-base">Non-conformance Issues</p>
|
||||
</div>
|
||||
<div class="flex w-full" :class="data.issues === null || data.issues?.length === 0 ? '' : 'gap-4'">
|
||||
<!-- Issues chart -->
|
||||
<div v-if="data.timeTrend.chart != null" class="border rounded border-neutral-300 p-2 bg-neutral-10" :class="data.issues === null || data.issues?.length === 0 ? 'w-full' : 'w-1/2'">
|
||||
<div v-if="data.timeTrend.chart !== null" class="border rounded border-neutral-300 p-2 bg-neutral-10" :class="data.issues === null || data.issues?.length === 0 ? 'w-full' : 'w-1/2'">
|
||||
<p class="h2 p-2 flex justify-between items-center">
|
||||
<span>Time Trend<span class="material-symbols-outlined !text-sm align-middle ml-2" v-tooltip.bottom="tooltip.timeTrend">info</span></span>
|
||||
<span class="text-2xl"><span class="text-cfm-secondary">{{ data.timeTrend.not_conforming }}</span> / {{ data.timeTrend.total }}</span>
|
||||
@@ -284,7 +284,7 @@ export default {
|
||||
watch: {
|
||||
conformanceTempReportData: {
|
||||
handler: function(newValue) {
|
||||
if(newValue?.rule && newValue.rule.min != null) {
|
||||
if(newValue?.rule && newValue.rule.min !== null) {
|
||||
this.selectDurationTime = {
|
||||
min: newValue.rule.min,
|
||||
max: newValue.rule.max,
|
||||
|
||||
@@ -40,12 +40,12 @@ export default {
|
||||
handler: function(newValue, oldValue) {
|
||||
this.durationMax = null
|
||||
this.durationMin = null
|
||||
if(newValue == null) {
|
||||
if(newValue === null) {
|
||||
this.timeData = {
|
||||
min: 0,
|
||||
max: 0
|
||||
};
|
||||
}else if(newValue != null) {
|
||||
}else if(newValue !== null) {
|
||||
this.timeData = {
|
||||
min: newValue.min,
|
||||
max: newValue.max
|
||||
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
if(newValue) this.createCy();
|
||||
},
|
||||
taskSeq: function(newValue){
|
||||
if (newValue != null) this.createCy();
|
||||
if (newValue !== null) this.createCy();
|
||||
},
|
||||
traceId: function(newValue) {
|
||||
// 當 traceId 屬性變化時更新 showTraceId
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
// 避免每次渲染都重複累加
|
||||
this.processMap.nodes = [];
|
||||
// 將 api call 回來的資料帶進 node
|
||||
if(this.taskSeq != null) {
|
||||
if(this.taskSeq !== null) {
|
||||
this.taskSeq.forEach((node, index) => {
|
||||
this.processMap.nodes.push({
|
||||
data: {
|
||||
@@ -220,7 +220,7 @@ export default {
|
||||
*/
|
||||
setEdgesData(){
|
||||
this.processMap.edges = [];
|
||||
if(this.taskSeq != null) {
|
||||
if(this.taskSeq !== null) {
|
||||
this.taskSeq.forEach((edge, index) => {
|
||||
this.processMap.edges.push({
|
||||
data: {
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
|
||||
this.setNodesData();
|
||||
this.setEdgesData();
|
||||
if(graphId != null) cytoscapeMapTrace(this.processMap.nodes, this.processMap.edges, graphId);
|
||||
if(graphId !== null) cytoscapeMapTrace(this.processMap.nodes, this.processMap.edges, graphId);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -543,7 +543,7 @@ export default {
|
||||
case 'int':
|
||||
case 'float':
|
||||
case 'date':
|
||||
return !(this.selectAttribute?.key && this.selectAttribute?.min != null && this.selectAttribute?.max != null);
|
||||
return !(this.selectAttribute?.key && this.selectAttribute?.min !== null && this.selectAttribute?.max !== null);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user