Difference between revisions of "Migration to the new CRUD"

From wiki.ferrari.mo.it
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= List (valid both for single or multiple page =
+
= List (valid both for single or multiple page) =
  
 
== list html ==
 
== list html ==
Line 61: Line 61:
 
Change bookmark function;
 
Change bookmark function;
  
Change color of back button;
+
Add updateAsParent function
  
Add updateAsParent function
+
Defaultsaveorpudate with parameter goback = false.
  
 
== maindata html ==
 
== maindata html ==
  
 
Change color of save button;
 
Change color of save button;
 +
 +
Change color of back button;
  
 
Change isEdit with !isNew and !isEdit with isNew
 
Change isEdit with !isNew and !isEdit with isNew
 
Defaultsaveorpudate with parameter goback = false.
 
  
 
== maindata ts ==
 
== maindata ts ==
Line 81: Line 81:
 
= Backend =
 
= Backend =
  
In endpoint (post), add element as response;
+
In endpoint (post), add id of response;
  
 
In service (create), return created;
 
In service (create), return created;

Latest revision as of 13:57, 8 August 2022

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);