Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement "School" entity, list and details view #42

Closed
3 tasks done
sleidig opened this issue Oct 7, 2016 · 8 comments
Closed
3 tasks done

Reimplement "School" entity, list and details view #42

sleidig opened this issue Oct 7, 2016 · 8 comments
Assignees
Labels
Type: Feature new user-facing feature
Milestone

Comments

@sleidig
Copy link
Member

sleidig commented Oct 7, 2016

Reimplement the School module of the existing prototype for the HELGO project.

  • School Entity
  • School List Component
  • School Details Component
@sleidig sleidig added this to the HELGO DB Rewrite milestone Oct 7, 2016
@sleidig sleidig self-assigned this Oct 7, 2016
@sleidig sleidig modified the milestones: HELGO Features, TypeScript/Angular2/Architecture Rewrite May 24, 2018
@codingfabi
Copy link
Contributor

what exactly should the school details feature look like? just a list of childs visiting this school? or more details of the school itself?

@Lorsbyjm Lorsbyjm assigned codingfabi and unassigned TheSlimvReal Jun 7, 2018
@sleidig
Copy link
Member Author

sleidig commented Jun 8, 2018

School entities should have some general details about the school (this is what is currently in use):

  • Medium [select] (i.e. the primary language in which classes are taught)
  • Board [select] (i.e. which government organisation is accrediting the school)
  • Private School [checkbox]
  • Address [text]
  • Website
  • School Timing [text]
  • Working Days [text]

Also, a list of the students studying in that school queried from the database would be good

@TheSlimvReal
Copy link
Collaborator

I figured out a design for the connection between schools and children:

  • every school has an array of ID's from children visiting this school
  • every child has the ID of the school the child is visiting
  • when creating/editing a child, a school can be selected from the already created schools in the database
  • Routing is possible between:
  • SchoolList to SchoolDetails
  • SchoolDetails to ChildDetails and vice versa

@sleidig
Copy link
Member Author

sleidig commented Jun 22, 2018

Sounds good. For the displaying and navigation between Child and School you can use the ChildBlockComponent and SchoolBlockComponent.

But if you are saving the link on school as well as child side, isn't that redundant and in danger of becoming inconsistent when an edit is not properly implemented (or simply disturbed by connectivity problems)?

In the long run I would like a history of schools a child has attended (i.e. 2015: class 9 at School X; 2016: class 10 at School X; 2017: class 11 at School Y). But for now let's keep it simple for the first implementation.

@TheSlimvReal
Copy link
Collaborator

I was also thinking about implementing it on just one side. But ist'nt it a kind of slow when you always have to look through every child in every school object to find the school a child is visting, when you just save the child ID's in the school object.

@sleidig
Copy link
Member Author

sleidig commented Jun 25, 2018

Yeah, might be slow, especially with many child records in the db. But saving redundant information is a big anti-pattern. To improve performance we could set up an index in pouchdb if necessary (Although the search, which is doing that, seems really slow as well on the pilot site).
relational-pouch (see #108) would probably do this internally.

Maybe we should go for the desired endresult right away:

  • new Entity type "SchoolEnrollment" with child, school, dateFrom, dateUntil, grade
  • Child is considered in the School, whose dateFrom-dateUntil interval falls into the current date
  • an index (or relational-pouch setup) give efficient access to all enrollments of a child or a school

@sleidig
Copy link
Member Author

sleidig commented Jul 26, 2018

Any work happening on this?

Let's keep the student link/lookup as it is, for the time being. Once we look further into modeling school enrollment, this can be refined. I would like to release a proper UI for SchoolDetails, including some basic fields (see #42 (comment))

@sleidig
Copy link
Member Author

sleidig commented Dec 14, 2018

PR #204 will close this issue. Further work regarding the school-child-relationship is still happening in #152 and discussed there. In case of further issues related to the relationship, let's open a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature new user-facing feature
Projects
None yet
Development

No branches or pull requests

3 participants