fix: module filter and order by (#4040)

This commit is contained in:
Anmol Singh Bhatia 2024-03-22 18:36:09 +05:30 committed by GitHub
parent 72392d5731
commit cdf86391f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export const ModulesListView: React.FC = observer(() => {
</>
);
if (totalFilters > 0 || searchQuery.trim() !== "")
if (totalFilters > 0 && filteredModuleIds.length === 0)
return (
<div className="h-full w-full grid place-items-center">
<div className="text-center">

View File

@ -22,7 +22,7 @@ export const orderModules = (modules: IModule[], orderByKey: TModuleOrderByOptio
(m) => {
let progress = (m.completed_issues + m.cancelled_issues) / m.total_issues;
if (isNaN(progress)) progress = 0;
return orderByKey === "progress" ? progress : !progress;
return orderByKey === "progress" ? progress : -progress;
},
"name",
]);