Refactor the school dashboard page to use the dashboard architecture

Issue #427 resolved
Brian Lewis repo owner created an issue

As described in issue #400, and 'model' dashboard can take a complex object as a binding, expose this as a data source to children.

Rebuild the school dashboard page in this way, refactoring the existing components.

Comments (6)

  1. Ghislain Hachey

    @softwords we are talking about the individual School dashboard here and not the Schools dashboard right?

    @jeremy_kells You'll find three simple dashboard components there which you need to convert to the new dashboard architecture. This should be pretty straight forward and will set the foundation for further dashboard components for individual schools.

  2. Brian Lewis reporter

    we are talking about the individual School dashboard here and not the Schools dashboard right?

    Correct.

  3. Brian Lewis reporter

    So broad outline of how the dashboard will look:

    Create a school dashboard component. The Controller will derive from Dashboard base class.

    The component will introduce a a binding to 'School' . This will be supplied by the enclosing school item

    <school-dashboard school="vm.model"></school-dashboard>
    

    school will be a public member of the controller.

    then in the $onChanges event of the controller, increment dashboardReady when the school binding is set. the components can then work with school ( and most likely its collection properties surveys etc) .

    e.g.

    ng-repeat="s in vm.dashboard.school.surveys"

  4. Log in to comment