Difference between revisions of "Migration to the new CRUD"

From wiki.ferrari.mo.it
Jump to navigation Jump to search
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= List (valid both for single or multiple page =
+
= List (valid both for single or multiple page) =
  
== html ==
+
== list html ==
  
Add mat-card header;
+
Add mat-card-header;
  
== ts ==
+
== list ts ==
  
 
Function editX must pass element and not element.id;
 
Function editX must pass element and not element.id;
Line 14: Line 14:
  
 
Use super.iconize instead of defaulticonize;
 
Use super.iconize instead of defaulticonize;
 +
 +
Add filterPredicate function
  
 
= Single page (not tab) =
 
= Single page (not tab) =
  
= Multiple page (with 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);

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