@eqproject/eqp-dynamic-module 2.7.24 → 2.7.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/private/dbgetter/dbgetter.component.mjs +16 -5
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +15 -4
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +15 -4
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4437,14 +4437,25 @@ class DbgetterComponent {
|
|
|
4437
4437
|
if (this.record[fieldRelated] != null) {
|
|
4438
4438
|
var currentRelation = this.relations.find(x => x.field == fieldRelated);
|
|
4439
4439
|
if (currentRelation != null) {
|
|
4440
|
-
|
|
4440
|
+
// Gestione dei cambi di valore dei campi relazionati
|
|
4441
|
+
// Il campo relazionato INIZIALMENTE NON E' NULL, e cambia valore in qualcosa che NON E' NULL
|
|
4442
|
+
if (currentRelation.actualvalue != null && this.record[fieldRelated] != null && this.record[fieldRelated] != currentRelation.actualvalue) {
|
|
4441
4443
|
console.log("this.record[fieldRelated] HA CAMBIATO VALORE!!", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4442
4444
|
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4443
4445
|
currentRelation.loaded = true;
|
|
4444
4446
|
fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
|
|
4445
|
-
this.record[this.field.Name] =
|
|
4447
|
+
this.record[this.field.Name] = null;
|
|
4446
4448
|
}
|
|
4447
|
-
|
|
4449
|
+
// Il campo relazionato INIZIALMENTE NON E' NULL, e cambia valore IN NULL
|
|
4450
|
+
else if (currentRelation.actualvalue != null && this.record[fieldRelated] == null) {
|
|
4451
|
+
console.log("this.record[fieldRelated] E' TORNATO AD ESSERE NULL!! :(", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4452
|
+
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4453
|
+
currentRelation.loaded = false;
|
|
4454
|
+
fieldWithRelation.QueryPropertyValue = "!" + fieldRelated;
|
|
4455
|
+
this.record[this.field.Name] = null;
|
|
4456
|
+
}
|
|
4457
|
+
// Il campo relazionato INIZIALMENTE E' NULL, e cambia valore
|
|
4458
|
+
else if (currentRelation.actualvalue == null && this.record[fieldRelated] != null) {
|
|
4448
4459
|
console.log("this.record[fieldRelated] NON E' PIU' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4449
4460
|
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4450
4461
|
currentRelation.loaded = true;
|
|
@@ -4453,7 +4464,7 @@ class DbgetterComponent {
|
|
|
4453
4464
|
this.checkRelations();
|
|
4454
4465
|
}
|
|
4455
4466
|
}
|
|
4456
|
-
},
|
|
4467
|
+
}, 2000);
|
|
4457
4468
|
}
|
|
4458
4469
|
else {
|
|
4459
4470
|
console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|