-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: homepage projects custom priority (#1552)
- Ajout d'une colonne baserow spécifique pour privilégier des projets sur la page d'accueil. - Ajout du code nécessaire pour prendre en compte cette nouvelle priorisation uniquement sur la page d'accueil quand aucun tag n'est sélectionné. close #1430 close #1432 --------- Co-authored-by: Yohann Valentin <pro@yohannvalentin.com>
- Loading branch information
Showing
14 changed files
with
280 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { ProjectType as ProjectType } from '@/types' | ||
import { ComputedRef } from 'vue' | ||
|
||
export default class ProjectSorter { | ||
static readonly sort = (projects: ComputedRef<ProjectType[] | undefined>): ComputedRef<ProjectType[]> => { | ||
return computed(() => { | ||
if (!projects.value) { | ||
return [] | ||
static readonly highlightSort = (projects: ProjectType[]): ProjectType[] => { | ||
return projects.toSorted((a, b) => { | ||
if (!a.highlightPriority) { | ||
return 1 | ||
} | ||
|
||
return projects.value.slice().sort((a, b) => { | ||
return a.priority - b.priority | ||
}) | ||
if (!b.highlightPriority) { | ||
return -1 | ||
} | ||
return a.highlightPriority - b.highlightPriority | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.