Enhance school form for editing

Issue #85 closed
Brian Lewis repo owner created an issue

Based on Issue #83 , make a tab in the SchoolItem form to allow edit of all school details as currently contained in the desktop application school form.

This is the visual appearance:

Capture2.PNG

This shows the data bindings - these will translate directly to ng-model.

Capture.PNG

Ghislain I will merge Pull Rquest 23, and also some of the refactoring that makes error reporting standardised between both grid editing and page editing.

So, you could branch from Issue 83, or if you prefer branch straight from develop.

Comments (16)

  1. Brian Lewis reporter

    Note that all these fields can be implemented with lookupSelector component:

    • school type
    • authority
    • schRegStatus
    • island Code (iCode)
    • Electorate N
    • electorate L
    • language
    • class
  2. Ghislain Hachey

    Great yes, looking forward to take this. I've got some prep work to do before leaving to RMI but will get on this soon.

    How about I just pick up work directly in branch issue83 (no need to branch from it). You can simply leave it to me, I think that should work? Or did you plan on continuing some work in issue83? Where's your current effort?

  3. Brian Lewis reporter

    Reviewing the where we got to in Branch 83:

    1) SchoolController.ts is the controller that takes responsibility for managing the save functions for the school. But there is actually nothing specific to School in here - the save function uses the put() and post() methods that already on the data object, courtesy of restangular.
    I think we can generalise with an EditController.ts that manages these functions. If down the track we do need something specific to a particular object, we can subclass EditController to add those new methods.

    2) It would be good to have UI elements consistent between single page edits (ie pages that edit a single record) for different objects. We can use MVC to accomplish this, by creating a master layout for such pages, and injecting the object-type specific material into that template. This means that we can refine the UI around , saving , edit , undo, etc in a single place, and have it applied to all relevant cases.

    I will create a new issue and branch for these changes. Development of the School Edit page in Issue83 can build on this. You can continue to build the layout in the screen shots on this page in the meantime.

  4. Ghislain Hachey

    "language" lookup does not seem present in DSLookups.cs. I did not bother adding it as I do not want to interrupt my flow. The lookup-selector will be in the school form though and should just plugin.

  5. Ghislain Hachey

    1) SchoolController.ts is the controller that takes responsibility for managing the save functions for the school.

    Yes.

  6. Ghislain Hachey

    2) It would be good to have UI elements consistent between single page edits (ie pages that edit a single record) for different objects.

    Not sure what the is benefit of this compare to proper use of CSS. In fact, for now I am incline to just get the features working. I do make use of CSS to try to make it sort of acceptly polished. Also how will this approach play with a fully materialised design (which I thought was the preferred way for the future)? I'm not a big fan of mix and matching approaches (e.g. Bootstrap, materialised, server templating). I may not "get" what you are proposing though and I'll surely look at it more closely.

    I'll have issue83 pushed to origin/issue83 for you to look at within an hour or two. I want to wrap this up and move to the next thing.

  7. Brian Lewis reporter

    Not sure what the is benefit of this compare to proper use of CSS.

    Look at EditPageLayout in Issue89 you'll see that the point is to avoid cloning html elements from page to page, having them in one place.

  8. Ghislain Hachey

    I have not looked yet but I think I get you now. The MVC terminology in MS land is used a lot more broadly. Seem you refer to simple template inheritence from a templating engine (razor in this case). I'm fine with that. I'll re-write what needs to be re-written with that in a separate issue or mergin upstream back into my issue83 if the work is not too involved. I've never really looked at materialise (so I would know if it address this sort of stuff). I know that Angular templates where not so flexible though I don't know about angular 2 templates.

  9. Brian Lewis reporter

    Seem you refer to simple template inheritence from a templating engine (razor in this case).

    yes, all we are using mvc for is to serve up templates. All templateUrls in angular code will point to a "virtual" mvc route that may invoke some server-side processing before returning the result.

  10. Ghislain Hachey

    feat(SchoolItem.cshtml): school edit page

    Includes: - cleanup HTML - improve styling - add new Dashboard tab for school item - add new School Info tab for the school edit page

    Closes #83, #85

    → <<cset 6c74f308cd71>>

  11. Brian Lewis reporter

    feat(SchoolItem.cshtml): school edit page

    Includes: - cleanup HTML - improve styling - add new Dashboard tab for school item - add new School Info tab for the school edit page

    Closes #83, #85

    → <<cset 6c74f308cd71>>

  12. Log in to comment