Implement Add New / Undo conventions on Teacher Edit

Issue #380 resolved
Brian Lewis repo owner created an issue

When adding new teachers in sequence, undo changes may revert you to previous data, not an empty record.

When Undo-ing changes to an existing record, gives an error on setting tPhoto ( not setter)

In general handling of Undo (and New) I propose -- on an existing record, reread the record from the server. this ensures we are back to pristine data, and its up-to-date with other changes, simpler to implement.

-- on a new record, give the server responsibility for creating the prototype New record. e.g. it may contain some default values.

Since [GET] entityname/id (e.g. teachers/34059) reads the record with that key, I propose the convention

[GET] entityname/0

to get a new record. Any other invalid primary key will return status 404.

Comments (7)

  1. Ghislain Hachey

    Since in most cases currently teachers are “added” to the EMIS through the loading of workbooks so this does not affect too much. This is very low priority and we will get back only once all requirements for this current year are complete.

  2. Brian Lewis reporter

    Changing name and upping the priority of this because there are some general principals involved.

    Relates to the simpler format of Api .ts classes being implemented as of Aug / Sep 2019

  3. Log in to comment