Flip negated conditions to positive for readability (S7735)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -408,12 +408,12 @@ watch(
|
||||
if (newAccount.length > 0 && newName.length > 0) {
|
||||
isConfirmDisabled.value = false;
|
||||
}
|
||||
if (whichCurrentModal.value !== MODAL_CREATE_NEW) {
|
||||
if (isResetPwdSectionShow.value && newPwd.length < PWD_VALID_LENGTH) {
|
||||
if (whichCurrentModal.value === MODAL_CREATE_NEW) {
|
||||
if (newPwd.length < PWD_VALID_LENGTH) {
|
||||
isConfirmDisabled.value = true;
|
||||
}
|
||||
} else {
|
||||
if (newPwd.length < PWD_VALID_LENGTH) {
|
||||
if (isResetPwdSectionShow.value && newPwd.length < PWD_VALID_LENGTH) {
|
||||
isConfirmDisabled.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1520,7 +1520,12 @@ function getAvgProcessTimeHorizontalBarChart(
|
||||
contentData.avgWaitingTime,
|
||||
"date",
|
||||
);
|
||||
if (compareDashboardData.value.time.avg_waiting_time_by_edge !== null) {
|
||||
if (compareDashboardData.value.time.avg_waiting_time_by_edge === null) {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] = [
|
||||
null,
|
||||
null,
|
||||
];
|
||||
} else {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] =
|
||||
getHorizontalBarChart(
|
||||
compareDashboardData.value.time.avg_waiting_time_by_edge,
|
||||
@@ -1528,11 +1533,6 @@ function getAvgProcessTimeHorizontalBarChart(
|
||||
false,
|
||||
"date",
|
||||
);
|
||||
} else {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] = [
|
||||
null,
|
||||
null,
|
||||
];
|
||||
}
|
||||
[freqData.value, freqOptions.value] = getLineChart(
|
||||
compareDashboardData.value.freq.cases,
|
||||
|
||||
@@ -588,19 +588,19 @@ function setActivityBgImage(mapData) {
|
||||
isLoading.value = true;
|
||||
switch (routeParams.type) {
|
||||
case "log":
|
||||
if (!isCheckPage) {
|
||||
logId.value = routeParams.fileId;
|
||||
baseLogId.value = routeParams.fileId;
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
logId.value = file.parent?.id;
|
||||
baseLogId.value = file.parent?.id;
|
||||
} else {
|
||||
logId.value = routeParams.fileId;
|
||||
baseLogId.value = routeParams.fileId;
|
||||
}
|
||||
break;
|
||||
case "filter":
|
||||
if (!isCheckPage) {
|
||||
createFilterId.value = routeParams.fileId;
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
createFilterId.value = file.parent?.id;
|
||||
} else {
|
||||
createFilterId.value = routeParams.fileId;
|
||||
}
|
||||
await allMapDataStore.fetchFunnel(createFilterId.value);
|
||||
isRuleData.value = Array.from(temporaryData.value);
|
||||
|
||||
@@ -85,16 +85,7 @@ let loadingTimerId = null;
|
||||
const file = route.meta.file;
|
||||
const isCheckPage = route.name.includes("Check");
|
||||
|
||||
if (!isCheckPage) {
|
||||
switch (params.type) {
|
||||
case "log":
|
||||
conformanceLogId.value = params.fileId;
|
||||
break;
|
||||
case "filter":
|
||||
conformanceFilterId.value = params.fileId;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
switch (params.type) {
|
||||
case "log":
|
||||
conformanceLogId.value = file.parent?.id;
|
||||
@@ -106,6 +97,15 @@ let loadingTimerId = null;
|
||||
break;
|
||||
}
|
||||
await conformanceStore.getConformanceReport();
|
||||
} else {
|
||||
switch (params.type) {
|
||||
case "log":
|
||||
conformanceLogId.value = params.fileId;
|
||||
break;
|
||||
case "filter":
|
||||
conformanceFilterId.value = params.fileId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
await conformanceStore.getConformanceParams();
|
||||
} catch (error) {
|
||||
|
||||
@@ -577,19 +577,19 @@ function setActivityBgImage(mapData) {
|
||||
isLoading.value = true;
|
||||
switch (routeParams.type) {
|
||||
case "log":
|
||||
if (!isCheckPage) {
|
||||
logId.value = routeParams.fileId;
|
||||
baseLogId.value = routeParams.fileId;
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
logId.value = file.parent?.id;
|
||||
baseLogId.value = file.parent?.id;
|
||||
} else {
|
||||
logId.value = routeParams.fileId;
|
||||
baseLogId.value = routeParams.fileId;
|
||||
}
|
||||
break;
|
||||
case "filter":
|
||||
if (!isCheckPage) {
|
||||
createFilterId.value = routeParams.fileId;
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
createFilterId.value = file.parent?.id;
|
||||
} else {
|
||||
createFilterId.value = routeParams.fileId;
|
||||
}
|
||||
await allMapDataStore.fetchFunnel(createFilterId.value);
|
||||
isRuleData.value = Array.from(temporaryData.value);
|
||||
|
||||
@@ -1059,10 +1059,10 @@ function getAvgWaitingTimeLineChart(chartData, content, yUnit) {
|
||||
const file = route.meta.file;
|
||||
let id;
|
||||
|
||||
if (!isCheckPage) {
|
||||
id = routeParams.fileId;
|
||||
} else {
|
||||
if (isCheckPage) {
|
||||
id = file.parent?.id;
|
||||
} else {
|
||||
id = routeParams.fileId;
|
||||
}
|
||||
|
||||
// Fetch Performance Data
|
||||
@@ -1112,7 +1112,12 @@ function getAvgWaitingTimeLineChart(chartData, content, yUnit) {
|
||||
contentData.avgWaitingTime,
|
||||
"date",
|
||||
);
|
||||
if (performanceData.value.time.avg_waiting_time_by_edge !== null) {
|
||||
if (performanceData.value.time.avg_waiting_time_by_edge === null) {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] = [
|
||||
null,
|
||||
null,
|
||||
];
|
||||
} else {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] =
|
||||
getHorizontalBarChart(
|
||||
performanceData.value.time.avg_waiting_time_by_edge,
|
||||
@@ -1120,11 +1125,6 @@ function getAvgWaitingTimeLineChart(chartData, content, yUnit) {
|
||||
false,
|
||||
"date",
|
||||
);
|
||||
} else {
|
||||
[avgWaitingTimeByEdgeData.value, avgWaitingTimeByEdgeOptions.value] = [
|
||||
null,
|
||||
null,
|
||||
];
|
||||
}
|
||||
|
||||
[casesByTaskData.value, casesByTaskOptions.value] = getHorizontalBarChart(
|
||||
|
||||
Reference in New Issue
Block a user