Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/app/doubtfire-angularjs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import 'build/src/app/config/routing/routing.js';
import 'build/src/app/config/vendor-dependencies/vendor-dependencies.js';
import 'build/src/app/config/analytics/analytics.js';
import 'build/src/app/projects/projects.js';
import 'build/src/app/projects/states/groups/groups.js';
import 'build/src/app/projects/states/feedback/feedback.js';
import 'build/src/app/projects/states/states.js';
import 'build/src/app/projects/states/dashboard/directives/student-task-list/student-task-list.js';
Expand Down
17 changes: 16 additions & 1 deletion src/app/doubtfire.states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Ng2ViewDeclaration } from '@uirouter/angular';
import { TutorialsComponent } from './projects/states/tutorials/tutorials.component';
import {PortfoliosComponent} from './units/states/portfolios/portfolios.component';
import { RolloverComponent } from './units/states/rollover/rollover.component';

import { ProjectGroupsComponent } from './projects/states/groups/project-groups/project-groups.component';
/*
* Use this file to store any states that are sourced by angular components.
*/
Expand Down Expand Up @@ -456,6 +456,20 @@ const PortfoliosState: NgHybridStateDeclaration = {
},
};

const ProjectGroupsState: NgHybridStateDeclaration = {
name: 'projects/groups',
parent: 'projects2',
url: '/groups',
views: {
projectView: {
component: ProjectGroupsComponent,
},
},
data: {
task: 'Groups List',
pageTitle: 'Unit Groups',
},
};

const RolloverState: NgHybridStateDeclaration = {
name: 'units/rollover',
Expand Down Expand Up @@ -505,4 +519,5 @@ export const doubtfireStates = [
TutorialState,
PortfoliosState,
RolloverState,
ProjectGroupsState,
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container">
@if (unit.hasGroupwork()) {
<f-group-set-manager [project]="project" [unit]="unit" [selectedGroupSet]="selectedGroupSet">
<div class="container" *ngIf="project$ | async as project">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Project?

@if (project.unit.hasGroupwork()) {
<f-group-set-manager [project]="project" [unit]="project.unit" [selectedGroupSet]="selectedGroupSet">
</f-group-set-manager>
} @else {
<div class="flex flex-col justify-center items-center max-w-4xl mx-auto">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {GroupSet, Project} from 'src/app/api/models/doubtfire-model';
import {Unit} from 'src/app/api/models/unit';
import { Observable } from 'rxjs';

// This component is only displayed to students (projects)
@Component({
Expand All @@ -9,7 +9,6 @@ import {Unit} from 'src/app/api/models/unit';
styleUrl: './project-groups.component.scss',
})
export class ProjectGroupsComponent {
@Input() unit: Unit;
@Input() project: Project;
@Input() project$: Observable<Project>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to actually fetch the project from somewhere, currently the project$ does not resolve to anything.

Refer to the tutorials component to see how we fetch the project using its id - once all components are migrated we'll implement a service that automatically resolves project/units during the routing

@Input() selectedGroupSet: GroupSet;
}
1 change: 0 additions & 1 deletion src/app/projects/states/states.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ angular.module('doubtfire.projects.states', [
'doubtfire.projects.states.index'
'doubtfire.projects.states.dashboard'
'doubtfire.projects.states.portfolio'
'doubtfire.projects.states.groups'
'doubtfire.projects.states.outcomes'
])