Flip negated conditions to positive for readability (S7735)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 00:59:37 +08:00
parent 5a936cad97
commit 804d78837b
14 changed files with 102 additions and 102 deletions

View File

@@ -129,23 +129,23 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
switch (copy.type) {
case "date":
copy.min =
copy.min !== null
? moment(copy.min).format("YYYY/MM/DD HH:mm")
: null;
copy.min === null
? null
: moment(copy.min).format("YYYY/MM/DD HH:mm");
copy.max =
copy.max !== null
? moment(copy.max).format("YYYY/MM/DD HH:mm")
: null;
copy.max === null
? null
: moment(copy.max).format("YYYY/MM/DD HH:mm");
break;
case "float":
copy.min =
copy.min !== null
? Number(new Decimal(copy.min).toFixed(2, 3))
: null;
copy.min === null
? null
: Number(new Decimal(copy.min).toFixed(2, 3));
copy.max =
copy.max !== null
? Number(new Decimal(copy.max).toFixed(2, 2))
: null;
copy.max === null
? null
: Number(new Decimal(copy.max).toFixed(2, 2));
break;
default:
break;
@@ -212,15 +212,15 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
switch (att.type) {
case "date":
att.value =
att.value !== null
? moment(att.value).format("YYYY/MM/DD HH:mm")
: null;
att.value === null
? null
: moment(att.value).format("YYYY/MM/DD HH:mm");
break;
case "float":
att.value =
att.value !== null
? Number(new Decimal(att.value).toFixed(2))
: null;
att.value === null
? null
: Number(new Decimal(att.value).toFixed(2));
break;
default:
break;
@@ -257,15 +257,15 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
switch (att.type) {
case "date":
att.value =
att.value !== null
? moment(att.value).format("YYYY/MM/DD HH:mm")
: null;
att.value === null
? null
: moment(att.value).format("YYYY/MM/DD HH:mm");
break;
case "float":
att.value =
att.value !== null
? Number(new Decimal(att.value).toFixed(2))
: null;
att.value === null
? null
: Number(new Decimal(att.value).toFixed(2));
break;
default:
break;
@@ -305,9 +305,9 @@ export const useAllMapDataStore = defineStore("allMapDataStore", {
this.allFilterTimeframe.x_axis.max_base = max;
// Convert to a time format without seconds
this.allFilterTimeframe.x_axis.min =
min !== null ? moment(min).format("YYYY/MM/DD HH:mm") : null;
min === null ? null : moment(min).format("YYYY/MM/DD HH:mm");
this.allFilterTimeframe.x_axis.max =
max !== null ? moment(max).format("YYYY/MM/DD HH:mm") : null;
max === null ? null : moment(max).format("YYYY/MM/DD HH:mm");
} catch (error) {
apiError(error, "Failed to load the Filter Parameters.");
}