@eqproject/eqp-dynamic-module 2.7.21 → 2.7.23
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 +24 -18
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +23 -17
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +23 -17
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/lib/components/private/dbgetter/dbgetter.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4421,6 +4421,7 @@ class DbgetterComponent {
|
|
|
4421
4421
|
if (this.field.DataGetter.DataGetterValue.openedFields.find(x => x.QueryPropertyValue == '?') != null) {
|
|
4422
4422
|
// Il campo ha almeno un valore con "?"
|
|
4423
4423
|
this.haveQuestions = true;
|
|
4424
|
+
this.showButtonReply = false;
|
|
4424
4425
|
}
|
|
4425
4426
|
if (this.field.DataGetter.DataGetterValue.openedFields.find(x => x.QueryPropertyValue.indexOf('!') != -1) != null) {
|
|
4426
4427
|
// Il campo ha almeno un valore con "!nomerelazione"
|
|
@@ -4429,31 +4430,42 @@ class DbgetterComponent {
|
|
|
4429
4430
|
var fieldRelated = fieldWithRelation.QueryPropertyValue.replace("!", "");
|
|
4430
4431
|
if (this.record[fieldRelated] == null) {
|
|
4431
4432
|
console.log("this.record[fieldRelated] E' NULL", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4432
|
-
this.relations.push({ field: fieldRelated, loaded: false });
|
|
4433
|
+
this.relations.push({ field: fieldRelated, loaded: false, actualvalue: this.record[fieldRelated] });
|
|
4433
4434
|
this.checkRelations();
|
|
4434
4435
|
this.interval = setInterval(() => {
|
|
4435
4436
|
console.log("this.record[fieldRelated] CHECK", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4436
4437
|
if (this.record[fieldRelated] != null) {
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4438
|
+
var currentRelation = this.relations.find(x => x.field == fieldRelated);
|
|
4439
|
+
if (currentRelation != null) {
|
|
4440
|
+
if (currentRelation.actualvalue != null && this.record[fieldRelated] != currentRelation.actualvalue) {
|
|
4441
|
+
console.log("this.record[fieldRelated] HA CAMBIATO VALORE!!", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4442
|
+
this.record[this.field.Name] = '';
|
|
4443
|
+
}
|
|
4444
|
+
if (currentRelation.actualvalue == null && this.record[fieldRelated] != null) {
|
|
4445
|
+
console.log("this.record[fieldRelated] NON E' PIU' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4446
|
+
currentRelation.loaded = true;
|
|
4447
|
+
this.checkRelations();
|
|
4448
|
+
fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
|
|
4449
|
+
}
|
|
4450
|
+
}
|
|
4441
4451
|
}
|
|
4442
4452
|
}, 1000);
|
|
4443
4453
|
}
|
|
4444
4454
|
else {
|
|
4445
4455
|
console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
|
|
4446
4456
|
fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
|
|
4447
|
-
this.relations.push({ field: fieldRelated, loaded: true });
|
|
4457
|
+
this.relations.push({ field: fieldRelated, loaded: true, actualvalue: this.record[fieldRelated] });
|
|
4448
4458
|
this.checkRelations();
|
|
4449
4459
|
}
|
|
4450
|
-
this.showButtonReply =
|
|
4460
|
+
this.showButtonReply = false;
|
|
4451
4461
|
});
|
|
4452
4462
|
}
|
|
4453
|
-
|
|
4454
|
-
this.showButtonReply = true;
|
|
4463
|
+
if (!this.haveRelations) {
|
|
4455
4464
|
this.relationsLoaded = true;
|
|
4456
4465
|
}
|
|
4466
|
+
if (!this.haveQuestions && !this.haveRelations) {
|
|
4467
|
+
this.showButtonReply = true;
|
|
4468
|
+
}
|
|
4457
4469
|
}
|
|
4458
4470
|
else {
|
|
4459
4471
|
if (this.data == null) {
|
|
@@ -4495,14 +4507,8 @@ class DbgetterComponent {
|
|
|
4495
4507
|
}
|
|
4496
4508
|
else {
|
|
4497
4509
|
if (behaviours.indexOf("manage-question-in-dbgetter") != -1) {
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
this.showTable = false;
|
|
4501
|
-
}
|
|
4502
|
-
else {
|
|
4503
|
-
this.showButtonReply = false;
|
|
4504
|
-
this.showTable = true;
|
|
4505
|
-
}
|
|
4510
|
+
this.showButtonReply = false;
|
|
4511
|
+
this.showTable = true;
|
|
4506
4512
|
}
|
|
4507
4513
|
else {
|
|
4508
4514
|
if (!this.DirectlyOpenTable) {
|