Migration to the new CRUD

From wiki.ferrari.mo.it
Jump to navigation Jump to search

List (valid both for single or multiple page)[edit]

list html[edit]

Add mat-card-header;

list ts[edit]

Function editX must pass element and not element.id;

If possible, use the function populateTable instead of rewriting it;

Then, you can delete the 2 ViewChild lines as they are no more necessary;

Use super.iconize instead of defaulticonize;

Add filterPredicate function

Single page (not tab)[edit]

detail html (compare with unit-detail.component.html)[edit]

Add mat-card-header;

Remove ngIf loaded;

Change isEdit with !isNew();

Invert color of save and back;

Eventually, change subTitle with getSubTitle();

Move onBack out of the form;

detail ts (compare with unit-detail.component.ts)[edit]

Change iconize function;

Add subtitle function;

Modify populate function;

Add bookmark function;

Multiple page (tab)[edit]

detail html (main)[edit]

Mat-card-header;

Change isEdit with !isNew;

[id]="stateAsValue.id" in maindata and [element]="stateAsValue.element" in other main tabs

detail ts (main)[edit]

Change getSubtitle function;

Change iconize function;

Change bookmark function;

Add updateAsParent function

Defaultsaveorpudate with parameter goback = false.

maindata html[edit]

Change color of save button;

Change color of back button;

Change isEdit with !isNew and !isEdit with isNew

maindata ts[edit]

Change populate function;

Add input id and refer to it in populate

Backend[edit]

In endpoint (post), add id of response;

In service (create), return created;

Tests to be performed[edit]

Create;

Edit;

Delete;

Iconize and resume for list;

Iconize and resume for detail (or new);