master-control 0.4.6 → 0.4.7

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.
@@ -4252,35 +4252,45 @@ class MedialQuestionsComponent {
4252
4252
  }
4253
4253
  });
4254
4254
  if (!this.checkIfValueIsEmpty(this.isMedicalSubQuestionsAvailable)) {
4255
- this.masterService.getSubQuestions(this.field()?.configData, this.isMedicalSubQuestionsAvailable['answer'], this.isMedicalSubQuestionsAvailable['personUWId']).subscribe((subQuestionResponse) => {
4255
+ this.masterService
4256
+ .getSubQuestions(this.field()?.configData, this.isMedicalSubQuestionsAvailable['answer'], this.isMedicalSubQuestionsAvailable['personUWId'])
4257
+ .subscribe((subQuestionResponse) => {
4256
4258
  let distinctSteps = [];
4257
- subQuestionResponse.forEach((subQuestion) => {
4258
- subQuestion['domainValues'] = this.medialQuestionResponse()['domainValues'][subQuestion['domainName']];
4259
- subQuestion['field'] = this.getField(subQuestion);
4260
- if (!distinctSteps.includes(subQuestion['clusterId'])) {
4261
- distinctSteps.push(subQuestion['clusterId']);
4262
- }
4263
- });
4264
- subQuestionResponse.sort((a, b) => a['step'] - b['step'] || a['displayOrder'] - b['displayOrder']);
4265
- distinctSteps.forEach((steps, ind) => {
4266
- let filteredObj = subQuestionResponse.filter((singleQuestion) => singleQuestion['clusterId'] === steps);
4267
- let obj = {
4268
- step: 1000 + ind,
4269
- questions: !this.checkIfValueIsEmpty(filteredObj) ? filteredObj : [],
4270
- sectionName: !this.checkIfValueIsEmpty(filteredObj) ? filteredObj[0]['title'] : '',
4271
- isMedicalSubQuestion: true,
4272
- showSection: true,
4273
- personUWId: this.isMedicalSubQuestionsAvailable['personUWId'].toString(),
4274
- };
4275
- // let LaIndex: any = this.personUwMasterObj.findIndex(
4276
- // (single: any) => single['role'] === singlePerson['role']
4277
- // );
4278
- this.questionList.push(obj);
4279
- });
4280
- this.medicalSubQuestionsResponse = subQuestionResponse;
4281
- // let laIndex: any = this.personUwResponseObj['questionsResponse'].findIndex((singlePersonObj: any) => singlePersonObj['role'] === singlePerson['role']);
4282
- this.medialQuestionResponse()['questionsResponse'][0]['questionList'] = this.medialQuestionResponse()['questionsResponse'][0]['questionList'].concat(this.medicalSubQuestionsResponse);
4283
- this.mapAnswersForOpenQuote();
4259
+ if (!this.checkIfValueIsEmpty(subQuestionResponse)) {
4260
+ subQuestionResponse.forEach((subQuestion) => {
4261
+ subQuestion['domainValues'] =
4262
+ this.medialQuestionResponse()['domainValues'][subQuestion['domainName']];
4263
+ subQuestion['field'] = this.getField(subQuestion);
4264
+ if (!distinctSteps.includes(subQuestion['clusterId'])) {
4265
+ distinctSteps.push(subQuestion['clusterId']);
4266
+ }
4267
+ });
4268
+ subQuestionResponse.sort((a, b) => a['step'] - b['step'] ||
4269
+ a['displayOrder'] - b['displayOrder']);
4270
+ distinctSteps.forEach((steps, ind) => {
4271
+ let filteredObj = subQuestionResponse.filter((singleQuestion) => singleQuestion['clusterId'] === steps);
4272
+ let obj = {
4273
+ step: 1000 + ind,
4274
+ questions: !this.checkIfValueIsEmpty(filteredObj)
4275
+ ? filteredObj
4276
+ : [],
4277
+ sectionName: !this.checkIfValueIsEmpty(filteredObj)
4278
+ ? filteredObj[0]['title']
4279
+ : '',
4280
+ isMedicalSubQuestion: true,
4281
+ showSection: true,
4282
+ personUWId: this.isMedicalSubQuestionsAvailable['personUWId'].toString(),
4283
+ };
4284
+ // let LaIndex: any = this.personUwMasterObj.findIndex(
4285
+ // (single: any) => single['role'] === singlePerson['role']
4286
+ // );
4287
+ this.questionList.push(obj);
4288
+ });
4289
+ this.medicalSubQuestionsResponse = subQuestionResponse;
4290
+ // let laIndex: any = this.personUwResponseObj['questionsResponse'].findIndex((singlePersonObj: any) => singlePersonObj['role'] === singlePerson['role']);
4291
+ this.medialQuestionResponse()['questionsResponse'][0]['questionList'] = this.medialQuestionResponse()['questionsResponse'][0]['questionList'].concat(this.medicalSubQuestionsResponse);
4292
+ this.mapAnswersForOpenQuote();
4293
+ }
4284
4294
  }, (err) => {
4285
4295
  this.mapAnswersForOpenQuote();
4286
4296
  });