Migration to the new CRUD

From wiki.ferrari.mo.it
Revision as of 13:57, 8 August 2022 by 193.207.151.76 (talk) (→‎Multiple page (tab))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

List (valid both for single or multiple page)

list html

Add mat-card-header;

list ts

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)

detail html (compare with unit-detail.component.html)

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)

Change iconize function;

Add subtitle function;

Modify populate function;

Add bookmark function;

Multiple page (tab)

detail html (main)

Mat-card-header;

Change isEdit with !isNew;

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

detail ts (main)

Change getSubtitle function;

Change iconize function;

Change bookmark function;

Add updateAsParent function

Defaultsaveorpudate with parameter goback = false.

maindata html

Change color of save button;

Change color of back button;

Change isEdit with !isNew and !isEdit with isNew

maindata ts

Change populate function;

Add input id and refer to it in populate

Backend

In endpoint (post), add id of response;

In service (create), return created;

Tests to be performed

Create;

Edit;

Delete;

Iconize and resume for list;

Iconize and resume for detail (or new);