Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioklr committed Aug 26, 2024
1 parent a1a3334 commit ca15a6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const useProjectsStore = defineStore('projectsstore', {
}),
actions: {
async getProjects() {
const projects = await pb.collection('projects').getFullList({sort: '-year_completed'});
const projecttypes = await pb.collection('projecttypes').getFullList();
const projects = await pb.collection('project').getFullList({sort: '-year_completed'});
const projecttypes = await pb.collection('projecttype').getFullList();
projects.forEach(project => {
project.type = projecttypes.filter(pt => project.type.includes(pt.id)).map(pt => ({ id: pt.id, name: pt.name }));
});
Expand Down

0 comments on commit ca15a6f

Please sign in to comment.