@eqproject/eqp-dynamic-module 2.7.24 → 2.7.26
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 +28 -19
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +27 -18
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +27 -18
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4434,26 +4434,35 @@ class DbgetterComponent {
|
|
|
4434
4434
|
this.checkRelations();
|
|
4435
4435
|
this.interval = setInterval(() => {
|
|
4436
4436
|
console.log("this.record[fieldRelated] CHECK", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4437
|
+
var currentRelation = this.relations.find(x => x.field == fieldRelated);
|
|
4438
|
+
if (currentRelation != null) {
|
|
4439
|
+
// Gestione dei cambi di valore dei campi relazionati
|
|
4440
|
+
// Il campo relazionato INIZIALMENTE NON E' NULL, e cambia valore in qualcosa che NON E' NULL
|
|
4441
|
+
if (currentRelation.actualvalue != null && this.record[fieldRelated] != null && this.record[fieldRelated] != currentRelation.actualvalue) {
|
|
4442
|
+
console.log("this.record[fieldRelated] HA CAMBIATO VALORE!!", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4443
|
+
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4444
|
+
currentRelation.loaded = true;
|
|
4445
|
+
fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
|
|
4446
|
+
this.record[this.field.Name] = null;
|
|
4447
|
+
}
|
|
4448
|
+
// Il campo relazionato INIZIALMENTE NON E' NULL, e cambia valore IN NULL
|
|
4449
|
+
else if (currentRelation.actualvalue != null && this.record[fieldRelated] == null) {
|
|
4450
|
+
console.log("this.record[fieldRelated] E' TORNATO AD ESSERE NULL!! :(", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4451
|
+
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4452
|
+
currentRelation.loaded = false;
|
|
4453
|
+
fieldWithRelation.QueryPropertyValue = "!" + fieldRelated;
|
|
4454
|
+
this.record[this.field.Name] = null;
|
|
4455
|
+
}
|
|
4456
|
+
// Il campo relazionato INIZIALMENTE E' NULL, e cambia valore
|
|
4457
|
+
else if (currentRelation.actualvalue == null && this.record[fieldRelated] != null) {
|
|
4458
|
+
console.log("this.record[fieldRelated] NON E' PIU' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4459
|
+
currentRelation.actualvalue = this.record[fieldRelated];
|
|
4460
|
+
currentRelation.loaded = true;
|
|
4461
|
+
fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
|
|
4454
4462
|
}
|
|
4463
|
+
this.checkRelations();
|
|
4455
4464
|
}
|
|
4456
|
-
},
|
|
4465
|
+
}, 2000);
|
|
4457
4466
|
}
|
|
4458
4467
|
else {
|
|
4459
4468
|
console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|