Flip negated conditions to positive for readability (S7735)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+18
-18
@@ -178,9 +178,9 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
||||
case "dummy": //sonar-qube
|
||||
case "duration-list":
|
||||
copy.value = copy.value.map((v) =>
|
||||
v !== null
|
||||
? abbreviateNumber(new Decimal(v.toFixed(2)))
|
||||
: null,
|
||||
v === null
|
||||
? null
|
||||
: abbreviateNumber(new Decimal(v.toFixed(2))),
|
||||
);
|
||||
copy.value = copy.value.map((v) => (v ?? "").trim()).join(", ");
|
||||
break;
|
||||
@@ -194,15 +194,15 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
||||
switch (copy.type) {
|
||||
case "date":
|
||||
copy.value =
|
||||
copy.value !== null
|
||||
? moment(copy.value).format("YYYY/MM/DD HH:mm:ss")
|
||||
: null;
|
||||
copy.value === null
|
||||
? null
|
||||
: moment(copy.value).format("YYYY/MM/DD HH:mm:ss");
|
||||
break;
|
||||
case "float":
|
||||
copy.value =
|
||||
copy.value !== null
|
||||
? new Decimal(copy.value).toFixed(2)
|
||||
: null;
|
||||
copy.value === null
|
||||
? null
|
||||
: new Decimal(copy.value).toFixed(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -234,15 +234,15 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
||||
switch (copy.type) {
|
||||
case "date":
|
||||
copy.value =
|
||||
copy.value !== null
|
||||
? moment(copy.value).format("YYYY/MM/DD HH:mm:ss")
|
||||
: null;
|
||||
copy.value === null
|
||||
? null
|
||||
: moment(copy.value).format("YYYY/MM/DD HH:mm:ss");
|
||||
break;
|
||||
case "float":
|
||||
copy.value =
|
||||
copy.value !== null
|
||||
? new Decimal(copy.value).toFixed(2)
|
||||
: null;
|
||||
copy.value === null
|
||||
? null
|
||||
: new Decimal(copy.value).toFixed(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -306,10 +306,10 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
||||
const api = getCheckApiBase(this);
|
||||
try {
|
||||
const response = await apiClient.get(api);
|
||||
if (!getRouteFile) {
|
||||
this.allConformanceTempReportData = response.data;
|
||||
} else {
|
||||
if (getRouteFile) {
|
||||
this.allRouteFile = response.data.file;
|
||||
} else {
|
||||
this.allConformanceTempReportData = response.data;
|
||||
}
|
||||
} catch (error) {
|
||||
apiError(error, "Failed to Get the Temporary Log Conformance Report.");
|
||||
|
||||
Reference in New Issue
Block a user