@eqproject/eqp-dynamic-module 2.7.7 → 2.7.8

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.
@@ -4421,31 +4421,11 @@ class DbgetterComponent {
4421
4421
  if (this.field.DataGetter.DataGetterValue.openedFields.find(x => x.QueryPropertyValue == '?') != null) {
4422
4422
  // Il modulo ha almeno una risposta con "?"
4423
4423
  this.haveQuestions = true;
4424
+ this.showButtonReply = true;
4424
4425
  }
4425
4426
  if (this.field.DataGetter.DataGetterValue.openedFields.find(x => x.QueryPropertyValue.indexOf('!') != -1) != null) {
4426
4427
  // Il modulo ha almeno una risposta con "!"
4427
4428
  this.haveRelations = true;
4428
- this.field.DataGetter.DataGetterValue.openedFields.filter(x => x.QueryPropertyValue.indexOf('!') != -1).forEach((fieldWithRelation) => {
4429
- var fieldRelated = fieldWithRelation.QueryPropertyValue.replace("!", "");
4430
- if (this.record[fieldRelated] == null) {
4431
- console.log("this.record[fieldRelated] E' NULL", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4432
- this.interval = setInterval(() => {
4433
- console.log("this.record[fieldRelated] CHECK", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4434
- if (this.record[fieldRelated] != null) {
4435
- console.log("this.record[fieldRelated] E' CAMBIATO E NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4436
- fieldWithRelation.QueryPropertyValue = this.record[fieldRelated];
4437
- this.relationsLoaded = true;
4438
- clearInterval(this.interval);
4439
- }
4440
- }, 1000);
4441
- }
4442
- else {
4443
- console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4444
- fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
4445
- this.relationsLoaded = true;
4446
- }
4447
- this.showButtonReply = true;
4448
- });
4449
4429
  }
4450
4430
  else {
4451
4431
  this.relationsLoaded = true;
@@ -4507,6 +4487,21 @@ class DbgetterComponent {
4507
4487
  }
4508
4488
  }
4509
4489
  onClickButtonReply() {
4490
+ if (this.haveRelations) {
4491
+ var relationLoaded = true;
4492
+ this.field.DataGetter.DataGetterValue.openedFields.filter(x => x.QueryPropertyValue.indexOf('!') != -1).forEach((fieldWithRelation) => {
4493
+ var fieldRelated = fieldWithRelation.QueryPropertyValue.replace("!", "");
4494
+ if (this.record[fieldRelated] != null) {
4495
+ console.log("this.record[fieldRelated] NON E' NULL!! :)", this.field.Name, fieldRelated, this.record[fieldRelated], this.record);
4496
+ fieldWithRelation.QueryPropertyValue = this.record[fieldRelated] != null ? this.record[fieldRelated] : '';
4497
+ }
4498
+ else {
4499
+ relationLoaded = false;
4500
+ }
4501
+ this.showButtonReply = true;
4502
+ });
4503
+ this.relationsLoaded = relationLoaded;
4504
+ }
4510
4505
  this.showTable = true;
4511
4506
  this.showQE = true;
4512
4507
  }