master-control 0.2.81 → 0.2.82
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/esm2022/lib/medial-questions/medial-questions.component.mjs +471 -134
- package/esm2022/lib/textbox/textbox.component.mjs +15 -3
- package/fesm2022/master-control.mjs +484 -135
- package/fesm2022/master-control.mjs.map +1 -1
- package/lib/medial-questions/medial-questions.component.d.ts +2 -0
- package/master-control-0.2.82.tgz +0 -0
- package/package.json +2 -2
- package/master-control-0.2.81.tgz +0 -0
|
@@ -336,6 +336,18 @@ class TextboxComponent {
|
|
|
336
336
|
setDisabledState(isDisabled) { }
|
|
337
337
|
;
|
|
338
338
|
onInputChange(event) {
|
|
339
|
+
let min = null;
|
|
340
|
+
let max = null;
|
|
341
|
+
let value = event.target.value;
|
|
342
|
+
if (!this.masterService.checkIfValueIsEmpty(this.field()?.configData) && !this.masterService.checkIfValueIsEmpty(this.field()?.configData?.minValue) && !this.masterService.checkIfValueIsEmpty(this.field()?.configData?.maxValue)) {
|
|
343
|
+
min = parseInt(this.field()?.configData?.minValue);
|
|
344
|
+
max = parseInt(this.field()?.configData?.maxValue);
|
|
345
|
+
}
|
|
346
|
+
if (!this.masterService.checkIfValueIsEmpty(this.field()?.configData?.inputType) && this.field()?.configData?.inputType === 'number' && !this.masterService.checkIfValueIsEmpty(max) && !this.masterService.checkIfValueIsEmpty(min)) {
|
|
347
|
+
if (parseInt(value) < min || parseInt(value) > max) {
|
|
348
|
+
event.target.value = parseInt(event.target.value.toString().slice(0, -1));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
339
351
|
this.inputValue = this.field()?.configData?.isTextCapitalized ? (event.target.value).toUpperCase() : event.target.value;
|
|
340
352
|
this._onChange(this.inputValue);
|
|
341
353
|
}
|
|
@@ -350,7 +362,7 @@ class TextboxComponent {
|
|
|
350
362
|
useExisting: TextboxComponent,
|
|
351
363
|
multi: true
|
|
352
364
|
}
|
|
353
|
-
], ngImport: i0, template: "<label\r\n class=\"field-lable\"\r\n *ngIf=\"field() && field()?.isVisible && field().isShowLabel\"\r\n >{{ field()?.label\r\n }}<span style=\"color: red\" *ngIf=\"field() && field()?.validators?.isRequired\"\r\n >*</span\r\n ></label\r\n>\r\n<mat-form-field\r\n class=\"w-100\"\r\n appearance=\"outline\"\r\n *ngIf=\"field() && field()?.isVisible\"\r\n [ngStyle]=\"{\r\n'--custom-border-color': field()?.controlStyle?.borderColor ,\r\n'--custom-border-width': field()?.controlStyle?.borderWidth ,\r\n'--custom-border-radius': field()?.controlStyle?.borderRadius ,\r\n'--custom-bg-color': field()?.controlStyle?.background ,\r\n'--custom-border-color-focus': field()?.controlStyle?.focusBorderColor ,\r\n'--custom-border-width-focus': field()?.controlStyle?.focusBorderWidth ,\r\n'--custom-bg-color-focus': field()?.controlStyle?.focusBackground ,\r\n'--custom-border-color-hover': field()?.controlStyle?.hoverBorderColor ,\r\n'--custom-border-width-hover': field()?.controlStyle?.hoverBorderWidth ,\r\n'--custom-border-color-error': field()?.controlStyle?.errorBorderColor ,\r\n'--custom-border-width-error': field()?.controlStyle?.errorBorderWidth ,\r\n'--custom-font-size': field()?.controlStyle?.fontSize ,\r\n'--custom-font-weight': field()?.controlStyle?.fontWeight ,\r\n'--custom-font-family': field()?.controlStyle?.fontFamily ,\r\n'--custom-font-color': field()?.controlStyle?.color ,\r\n'--custom-caret-color': field()?.controlStyle?.caretColor ,\r\n'--custom-font-color-disabled' : field()?.controlStyle?.disableColor ,\r\n'--custom-bg-color-disabled' : field()?.controlStyle?.disableBackground ,\r\n'--custom-width': field()?.controlStyle?.width ,\r\n}\"\r\n>\r\n @if(reactiveFormControlobject()) {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n [formControl]=\"reactiveFormControlobject()\"\r\n />\r\n }@else {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n />\r\n }\r\n <mat-hint *ngIf=\"field()?.configData?.helperText\">{{field()?.configData?.helperText}}</mat-hint>\r\n\r\n <mat-error *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}\r\n </mat-error>\r\n</mat-form-field>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}.\r\n</div>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.patternMessage }}.\r\n</div>\r\n", styles: [".field-lable{font-size:12px!important;font-weight:700!important;color:#444!important;margin-bottom:5px}.error-message{color:red}*{font-family:mulish!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--custom-border-color-focus, #ffbb00)!important;border-width:var(--custom-border-width-focus, 1.5px)!important}::ng-deep .mat-mdc-form-field{background-color:var(--custom-bg-color, #ffffff)!important;border-radius:var(--custom-border-radius , 4px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color, #dddddd)!important;border-width:var(--custom-border-width, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--custom-caret-color, #ffbb00)!important;font-size:12px!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important;color:var(--custom-font-color, #444444)!important}::ng-deep .mat-form-field-invalid .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled{background:var(--custom-bg-color-disabled, #ECECEC)!important}::ng-deep .mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--custom-font-color-disabled, #999999)!important}::ng-deep .mdc-label{color:var(--custom-font-color, #444)!important;font-size:var(--custom-font-size, 16px)!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important}::placeholder{color:#8f8f8f!important;font-size:12px!important}::ng-deep .mat-mdc-form-field-hint-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error{color:#e00!important;font-size:12px;font-weight:500;font-family:Mulish!important;letter-spacing:0}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: var(--custom-border-radius , 4px) !important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
365
|
+
], ngImport: i0, template: "<label\r\n class=\"field-lable\"\r\n *ngIf=\"field() && field()?.isVisible && field().isShowLabel\"\r\n >{{ field()?.label\r\n }}<span style=\"color: red\" *ngIf=\"field() && field()?.validators?.isRequired\"\r\n >*</span\r\n ></label\r\n>\r\n<mat-form-field\r\n class=\"w-100\"\r\n appearance=\"outline\"\r\n *ngIf=\"field() && field()?.isVisible\"\r\n [ngStyle]=\"{\r\n'--custom-border-color': field()?.controlStyle?.borderColor ,\r\n'--custom-border-width': field()?.controlStyle?.borderWidth ,\r\n'--custom-border-radius': field()?.controlStyle?.borderRadius ,\r\n'--custom-bg-color': field()?.controlStyle?.background ,\r\n'--custom-border-color-focus': field()?.controlStyle?.focusBorderColor ,\r\n'--custom-border-width-focus': field()?.controlStyle?.focusBorderWidth ,\r\n'--custom-bg-color-focus': field()?.controlStyle?.focusBackground ,\r\n'--custom-border-color-hover': field()?.controlStyle?.hoverBorderColor ,\r\n'--custom-border-width-hover': field()?.controlStyle?.hoverBorderWidth ,\r\n'--custom-border-color-error': field()?.controlStyle?.errorBorderColor ,\r\n'--custom-border-width-error': field()?.controlStyle?.errorBorderWidth ,\r\n'--custom-font-size': field()?.controlStyle?.fontSize ,\r\n'--custom-font-weight': field()?.controlStyle?.fontWeight ,\r\n'--custom-font-family': field()?.controlStyle?.fontFamily ,\r\n'--custom-font-color': field()?.controlStyle?.color ,\r\n'--custom-caret-color': field()?.controlStyle?.caretColor ,\r\n'--custom-font-color-disabled' : field()?.controlStyle?.disableColor ,\r\n'--custom-bg-color-disabled' : field()?.controlStyle?.disableBackground ,\r\n'--custom-width': field()?.controlStyle?.width ,\r\n}\"\r\n>\r\n @if(reactiveFormControlobject()) {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.configData?.inputType ? field()?.configData?.inputType : field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n [formControl]=\"reactiveFormControlobject()\"\r\n />\r\n }@else {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.configData?.inputType ? field()?.configData?.inputType : field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n />\r\n }\r\n <mat-hint *ngIf=\"field()?.configData?.helperText\">{{field()?.configData?.helperText}}</mat-hint>\r\n\r\n <mat-error *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}\r\n </mat-error>\r\n <!-- <mat-error *ngIf=\"field()?.configData?.isInvalidPattern && !masterService.checkIfValueIsEmpty(field()?.validators?.patternMessage)\">\r\n {{ field()?.validators?.patternMessage }}\r\n </mat-error> -->\r\n</mat-form-field>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}.\r\n</div>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.patternMessage }}.\r\n</div>\r\n", styles: [".field-lable{font-size:12px!important;font-weight:700!important;color:#444!important;margin-bottom:5px}.error-message{color:red}*{font-family:mulish!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--custom-border-color-focus, #ffbb00)!important;border-width:var(--custom-border-width-focus, 1.5px)!important}::ng-deep .mat-mdc-form-field{background-color:var(--custom-bg-color, #ffffff)!important;border-radius:var(--custom-border-radius , 4px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color, #dddddd)!important;border-width:var(--custom-border-width, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--custom-caret-color, #ffbb00)!important;font-size:12px!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important;color:var(--custom-font-color, #444444)!important}::ng-deep .mat-form-field-invalid .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled{background:var(--custom-bg-color-disabled, #ECECEC)!important}::ng-deep .mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--custom-font-color-disabled, #999999)!important}::ng-deep .mdc-label{color:var(--custom-font-color, #444)!important;font-size:var(--custom-font-size, 16px)!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important}::placeholder{color:#8f8f8f!important;font-size:12px!important}::ng-deep .mat-mdc-form-field-hint-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error{color:#e00!important;font-size:12px;font-weight:500;font-family:Mulish!important;letter-spacing:0}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: var(--custom-border-radius , 4px) !important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
354
366
|
}
|
|
355
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
356
368
|
type: Component,
|
|
@@ -365,7 +377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
365
377
|
useExisting: TextboxComponent,
|
|
366
378
|
multi: true
|
|
367
379
|
}
|
|
368
|
-
], template: "<label\r\n class=\"field-lable\"\r\n *ngIf=\"field() && field()?.isVisible && field().isShowLabel\"\r\n >{{ field()?.label\r\n }}<span style=\"color: red\" *ngIf=\"field() && field()?.validators?.isRequired\"\r\n >*</span\r\n ></label\r\n>\r\n<mat-form-field\r\n class=\"w-100\"\r\n appearance=\"outline\"\r\n *ngIf=\"field() && field()?.isVisible\"\r\n [ngStyle]=\"{\r\n'--custom-border-color': field()?.controlStyle?.borderColor ,\r\n'--custom-border-width': field()?.controlStyle?.borderWidth ,\r\n'--custom-border-radius': field()?.controlStyle?.borderRadius ,\r\n'--custom-bg-color': field()?.controlStyle?.background ,\r\n'--custom-border-color-focus': field()?.controlStyle?.focusBorderColor ,\r\n'--custom-border-width-focus': field()?.controlStyle?.focusBorderWidth ,\r\n'--custom-bg-color-focus': field()?.controlStyle?.focusBackground ,\r\n'--custom-border-color-hover': field()?.controlStyle?.hoverBorderColor ,\r\n'--custom-border-width-hover': field()?.controlStyle?.hoverBorderWidth ,\r\n'--custom-border-color-error': field()?.controlStyle?.errorBorderColor ,\r\n'--custom-border-width-error': field()?.controlStyle?.errorBorderWidth ,\r\n'--custom-font-size': field()?.controlStyle?.fontSize ,\r\n'--custom-font-weight': field()?.controlStyle?.fontWeight ,\r\n'--custom-font-family': field()?.controlStyle?.fontFamily ,\r\n'--custom-font-color': field()?.controlStyle?.color ,\r\n'--custom-caret-color': field()?.controlStyle?.caretColor ,\r\n'--custom-font-color-disabled' : field()?.controlStyle?.disableColor ,\r\n'--custom-bg-color-disabled' : field()?.controlStyle?.disableBackground ,\r\n'--custom-width': field()?.controlStyle?.width ,\r\n}\"\r\n>\r\n @if(reactiveFormControlobject()) {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n [formControl]=\"reactiveFormControlobject()\"\r\n />\r\n }@else {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n />\r\n }\r\n <mat-hint *ngIf=\"field()?.configData?.helperText\">{{field()?.configData?.helperText}}</mat-hint>\r\n\r\n <mat-error *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}\r\n </mat-error>\r\n</mat-form-field>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}.\r\n</div>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.patternMessage }}.\r\n</div>\r\n", styles: [".field-lable{font-size:12px!important;font-weight:700!important;color:#444!important;margin-bottom:5px}.error-message{color:red}*{font-family:mulish!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--custom-border-color-focus, #ffbb00)!important;border-width:var(--custom-border-width-focus, 1.5px)!important}::ng-deep .mat-mdc-form-field{background-color:var(--custom-bg-color, #ffffff)!important;border-radius:var(--custom-border-radius , 4px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color, #dddddd)!important;border-width:var(--custom-border-width, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--custom-caret-color, #ffbb00)!important;font-size:12px!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important;color:var(--custom-font-color, #444444)!important}::ng-deep .mat-form-field-invalid .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled{background:var(--custom-bg-color-disabled, #ECECEC)!important}::ng-deep .mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--custom-font-color-disabled, #999999)!important}::ng-deep .mdc-label{color:var(--custom-font-color, #444)!important;font-size:var(--custom-font-size, 16px)!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important}::placeholder{color:#8f8f8f!important;font-size:12px!important}::ng-deep .mat-mdc-form-field-hint-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error{color:#e00!important;font-size:12px;font-weight:500;font-family:Mulish!important;letter-spacing:0}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: var(--custom-border-radius , 4px) !important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}\n"] }]
|
|
380
|
+
], template: "<label\r\n class=\"field-lable\"\r\n *ngIf=\"field() && field()?.isVisible && field().isShowLabel\"\r\n >{{ field()?.label\r\n }}<span style=\"color: red\" *ngIf=\"field() && field()?.validators?.isRequired\"\r\n >*</span\r\n ></label\r\n>\r\n<mat-form-field\r\n class=\"w-100\"\r\n appearance=\"outline\"\r\n *ngIf=\"field() && field()?.isVisible\"\r\n [ngStyle]=\"{\r\n'--custom-border-color': field()?.controlStyle?.borderColor ,\r\n'--custom-border-width': field()?.controlStyle?.borderWidth ,\r\n'--custom-border-radius': field()?.controlStyle?.borderRadius ,\r\n'--custom-bg-color': field()?.controlStyle?.background ,\r\n'--custom-border-color-focus': field()?.controlStyle?.focusBorderColor ,\r\n'--custom-border-width-focus': field()?.controlStyle?.focusBorderWidth ,\r\n'--custom-bg-color-focus': field()?.controlStyle?.focusBackground ,\r\n'--custom-border-color-hover': field()?.controlStyle?.hoverBorderColor ,\r\n'--custom-border-width-hover': field()?.controlStyle?.hoverBorderWidth ,\r\n'--custom-border-color-error': field()?.controlStyle?.errorBorderColor ,\r\n'--custom-border-width-error': field()?.controlStyle?.errorBorderWidth ,\r\n'--custom-font-size': field()?.controlStyle?.fontSize ,\r\n'--custom-font-weight': field()?.controlStyle?.fontWeight ,\r\n'--custom-font-family': field()?.controlStyle?.fontFamily ,\r\n'--custom-font-color': field()?.controlStyle?.color ,\r\n'--custom-caret-color': field()?.controlStyle?.caretColor ,\r\n'--custom-font-color-disabled' : field()?.controlStyle?.disableColor ,\r\n'--custom-bg-color-disabled' : field()?.controlStyle?.disableBackground ,\r\n'--custom-width': field()?.controlStyle?.width ,\r\n}\"\r\n>\r\n @if(reactiveFormControlobject()) {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.configData?.inputType ? field()?.configData?.inputType : field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n [formControl]=\"reactiveFormControlobject()\"\r\n />\r\n }@else {\r\n <input\r\n matInput\r\n autocomplete=\"none\"\r\n [type]=\"field()?.configData?.inputType ? field()?.configData?.inputType : field()?.controlType\"\r\n [name]=\"field()?.fieldName\"\r\n [id]=\"field()?.fieldName\"\r\n [placeholder]=\"field()?.placeHolder\"\r\n [maxLength]=\"field()?.validators?.maxLength\"\r\n [minLength]=\"field()?.validators?.minLength\"\r\n [disabled]=\"field()?.isDisable\"\r\n [required]=\"field()?.validators?.isRequired\"\r\n [pattern]=\"field()?.validators?.pattern\"\r\n (input)=\"onInputChange($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n [value]=\"inputValue\"\r\n />\r\n }\r\n <mat-hint *ngIf=\"field()?.configData?.helperText\">{{field()?.configData?.helperText}}</mat-hint>\r\n\r\n <mat-error *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}\r\n </mat-error>\r\n <!-- <mat-error *ngIf=\"field()?.configData?.isInvalidPattern && !masterService.checkIfValueIsEmpty(field()?.validators?.patternMessage)\">\r\n {{ field()?.validators?.patternMessage }}\r\n </mat-error> -->\r\n</mat-form-field>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.isRequiredMessage }}.\r\n</div>\r\n<div class=\"error-message\" *ngIf=\"false\">\r\n {{ field()?.validators?.patternMessage }}.\r\n</div>\r\n", styles: [".field-lable{font-size:12px!important;font-weight:700!important;color:#444!important;margin-bottom:5px}.error-message{color:red}*{font-family:mulish!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--custom-border-color-focus, #ffbb00)!important;border-width:var(--custom-border-width-focus, 1.5px)!important}::ng-deep .mat-mdc-form-field{background-color:var(--custom-bg-color, #ffffff)!important;border-radius:var(--custom-border-radius , 4px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--custom-border-color-hover, #ffbb00)!important;border-width:var(--custom-border-width-hover, 1.5px)!important}::ng-deep .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color, #dddddd)!important;border-width:var(--custom-border-width, 1.5px)!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--custom-caret-color, #ffbb00)!important;font-size:12px!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important;color:var(--custom-font-color, #444444)!important}::ng-deep .mat-form-field-invalid .mdc-text-field--outlined .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field.mat-form-field-disabled{background:var(--custom-bg-color-disabled, #ECECEC)!important}::ng-deep .mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--custom-font-color-disabled, #999999)!important}::ng-deep .mdc-label{color:var(--custom-font-color, #444)!important;font-size:var(--custom-font-size, 16px)!important;font-weight:var(--custom-font-weight, 400)!important;font-family:var(--custom-font-family, \"Mulish\")!important}::placeholder{color:#8f8f8f!important;font-size:12px!important}::ng-deep .mat-mdc-form-field-hint-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error-wrapper{padding:0!important}::ng-deep .mat-mdc-form-field-error{color:#e00!important;font-size:12px;font-weight:500;font-family:Mulish!important;letter-spacing:0}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-container-shape: var(--custom-border-radius , 4px) !important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--custom-border-color-error, red)!important;border-width:var(--custom-border-width-error, 1.5px)!important}::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none!important}\n"] }]
|
|
369
381
|
}], ctorParameters: () => [{ type: MasterControlService }], propDecorators: { blur: [{
|
|
370
382
|
type: Output
|
|
371
383
|
}] } });
|
|
@@ -2932,12 +2944,12 @@ class MedialQuestionsComponent {
|
|
|
2932
2944
|
medicalQuestionsHeightUnitTypes = [
|
|
2933
2945
|
{
|
|
2934
2946
|
label: 'Cm',
|
|
2935
|
-
value: 'CM'
|
|
2947
|
+
value: 'CM',
|
|
2936
2948
|
},
|
|
2937
2949
|
{
|
|
2938
2950
|
label: 'Feet',
|
|
2939
|
-
value: 'FEET'
|
|
2940
|
-
}
|
|
2951
|
+
value: 'FEET',
|
|
2952
|
+
},
|
|
2941
2953
|
];
|
|
2942
2954
|
showDropdown = false;
|
|
2943
2955
|
addressSuggestions = [];
|
|
@@ -2949,7 +2961,8 @@ class MedialQuestionsComponent {
|
|
|
2949
2961
|
}
|
|
2950
2962
|
ngOnInit() { }
|
|
2951
2963
|
ngOnChanges(changes) {
|
|
2952
|
-
if (changes['medialQuestionResponse'] &&
|
|
2964
|
+
if (changes['medialQuestionResponse'] &&
|
|
2965
|
+
!this.checkIfValueIsEmpty(changes['medialQuestionResponse'].currentValue)) {
|
|
2953
2966
|
if ('geolocation' in navigator) {
|
|
2954
2967
|
navigator.geolocation.getCurrentPosition((position) => {
|
|
2955
2968
|
this.latitude = position.coords.latitude;
|
|
@@ -2972,7 +2985,7 @@ class MedialQuestionsComponent {
|
|
|
2972
2985
|
this.autocomplete = new google.maps.places.Autocomplete(this.addressInput?.nativeElement, {
|
|
2973
2986
|
types: ['address'],
|
|
2974
2987
|
componentRestrictions: { country: 'IN' },
|
|
2975
|
-
fields: ['place_id', 'geometry', 'name', 'formatted_address']
|
|
2988
|
+
fields: ['place_id', 'geometry', 'name', 'formatted_address'],
|
|
2976
2989
|
});
|
|
2977
2990
|
this.autocomplete.addListener('place_changed', () => {
|
|
2978
2991
|
this.ngZone.run(() => {
|
|
@@ -2989,7 +3002,7 @@ class MedialQuestionsComponent {
|
|
|
2989
3002
|
const location = place.geometry.location;
|
|
2990
3003
|
this.center = {
|
|
2991
3004
|
lat: location.lat(),
|
|
2992
|
-
lng: location.lng()
|
|
3005
|
+
lng: location.lng(),
|
|
2993
3006
|
};
|
|
2994
3007
|
this.currentCoordinates = this.center;
|
|
2995
3008
|
if (place.geometry.viewport) {
|
|
@@ -3001,7 +3014,7 @@ class MedialQuestionsComponent {
|
|
|
3001
3014
|
console.log('Selected place:', {
|
|
3002
3015
|
name: place.name,
|
|
3003
3016
|
address: place.formatted_address,
|
|
3004
|
-
coordinates: this.center
|
|
3017
|
+
coordinates: this.center,
|
|
3005
3018
|
});
|
|
3006
3019
|
this.storeSelectedAddress(place);
|
|
3007
3020
|
}
|
|
@@ -3010,7 +3023,7 @@ class MedialQuestionsComponent {
|
|
|
3010
3023
|
placeId: place.place_id,
|
|
3011
3024
|
name: place.name,
|
|
3012
3025
|
formattedAddress: place.formatted_address,
|
|
3013
|
-
coordinates: this.center
|
|
3026
|
+
coordinates: this.center,
|
|
3014
3027
|
};
|
|
3015
3028
|
}
|
|
3016
3029
|
searchAddress(address) {
|
|
@@ -3021,7 +3034,7 @@ class MedialQuestionsComponent {
|
|
|
3021
3034
|
this.ngZone.run(() => {
|
|
3022
3035
|
this.center = {
|
|
3023
3036
|
lat: location.lat(),
|
|
3024
|
-
lng: location.lng()
|
|
3037
|
+
lng: location.lng(),
|
|
3025
3038
|
};
|
|
3026
3039
|
this.currentCoordinates = this.center;
|
|
3027
3040
|
this.zoom = 15;
|
|
@@ -3048,7 +3061,8 @@ class MedialQuestionsComponent {
|
|
|
3048
3061
|
return;
|
|
3049
3062
|
}
|
|
3050
3063
|
else if (event.key === 'Enter') {
|
|
3051
|
-
if (this.hoveredIndex >= 0 &&
|
|
3064
|
+
if (this.hoveredIndex >= 0 &&
|
|
3065
|
+
this.addressSuggestions[this.hoveredIndex]) {
|
|
3052
3066
|
this.selectAddress(this.addressSuggestions[this.hoveredIndex]);
|
|
3053
3067
|
}
|
|
3054
3068
|
return;
|
|
@@ -3072,14 +3086,15 @@ class MedialQuestionsComponent {
|
|
|
3072
3086
|
const service = new google.maps.places.AutocompleteService();
|
|
3073
3087
|
service.getPlacePredictions({
|
|
3074
3088
|
input: query,
|
|
3075
|
-
types: ['address']
|
|
3089
|
+
types: ['address'],
|
|
3076
3090
|
}, (predictions, status) => {
|
|
3077
|
-
if (status === google.maps.places.PlacesServiceStatus.OK &&
|
|
3078
|
-
|
|
3091
|
+
if (status === google.maps.places.PlacesServiceStatus.OK &&
|
|
3092
|
+
predictions) {
|
|
3093
|
+
this.addressSuggestions = predictions.map((prediction) => ({
|
|
3079
3094
|
place_id: prediction.place_id,
|
|
3080
3095
|
main_text: prediction.structured_formatting.main_text,
|
|
3081
3096
|
secondary_text: prediction.structured_formatting.secondary_text,
|
|
3082
|
-
description: prediction.description
|
|
3097
|
+
description: prediction.description,
|
|
3083
3098
|
}));
|
|
3084
3099
|
this.showDropdown = true;
|
|
3085
3100
|
this.hoveredIndex = -1;
|
|
@@ -3098,7 +3113,7 @@ class MedialQuestionsComponent {
|
|
|
3098
3113
|
const service = new google.maps.places.PlacesService(document.createElement('div'));
|
|
3099
3114
|
service.getDetails({
|
|
3100
3115
|
placeId: suggestion.place_id,
|
|
3101
|
-
fields: ['geometry', 'formatted_address']
|
|
3116
|
+
fields: ['geometry', 'formatted_address'],
|
|
3102
3117
|
}, (place, status) => {
|
|
3103
3118
|
if (status === google.maps.places.PlacesServiceStatus.OK && place) {
|
|
3104
3119
|
const lat = place.geometry?.location?.lat();
|
|
@@ -3128,7 +3143,8 @@ class MedialQuestionsComponent {
|
|
|
3128
3143
|
data['questionsResponse'].forEach((singleQuestionObj) => {
|
|
3129
3144
|
personUwIdArray.push(singleQuestionObj['personUWId']);
|
|
3130
3145
|
});
|
|
3131
|
-
if (!this.checkIfValueIsEmpty(data) &&
|
|
3146
|
+
if (!this.checkIfValueIsEmpty(data) &&
|
|
3147
|
+
!this.checkIfValueIsEmpty(data['questionsResponse'])) {
|
|
3132
3148
|
if (!this.checkIfValueIsEmpty(data['questionsResponse'])) {
|
|
3133
3149
|
let distinctSteps = [];
|
|
3134
3150
|
data['questionsResponse'].forEach((singlePersonObject) => {
|
|
@@ -3137,10 +3153,12 @@ class MedialQuestionsComponent {
|
|
|
3137
3153
|
if (singleQuestion['title'] === 'Medical Details') {
|
|
3138
3154
|
singleQuestion['questionText'] = singleQuestion['questionText'].replace(/\\n/g, '\n');
|
|
3139
3155
|
}
|
|
3140
|
-
singleQuestion['domainValues'] =
|
|
3156
|
+
singleQuestion['domainValues'] =
|
|
3157
|
+
data['domainValues'][singleQuestion['domainName']];
|
|
3141
3158
|
singleQuestion['field'] = this.getField(singleQuestion);
|
|
3142
3159
|
if (singleQuestion['cammundaQuestionCode'] === 'PAN') {
|
|
3143
|
-
singleQuestion['validations'] =
|
|
3160
|
+
singleQuestion['validations'] =
|
|
3161
|
+
'{"Type":"AlphaNumeric","MinValue":"10","MaxValue":"10","regexPattern":"/^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/"}';
|
|
3144
3162
|
}
|
|
3145
3163
|
// if (singleQuestion['cammundaQuestionCode'] === 'FtcaCntcDetls') {
|
|
3146
3164
|
// singleQuestion['validations'] = '{"customValidation":[{"country":"IN","MinValue":"10","MaxValue":"10","regexPattern":"((^[6-9]){1}([0-9]){9}$)"},{"country":"OTHER","MinValue":"5","MaxValue":"14"}]}';
|
|
@@ -3148,14 +3166,17 @@ class MedialQuestionsComponent {
|
|
|
3148
3166
|
if (singleQuestion['questionType'] === 'CHECKBOX' &&
|
|
3149
3167
|
!this.checkIfValueIsEmpty(singleQuestion['questionRelation'])) {
|
|
3150
3168
|
singleQuestion['questionRelation'].forEach((singleQuestionRelationObj) => {
|
|
3151
|
-
let nextQuestionObject = singlePersonObject['questionList'].filter((object) => object['questionId'] ===
|
|
3169
|
+
let nextQuestionObject = singlePersonObject['questionList'].filter((object) => object['questionId'] ===
|
|
3170
|
+
singleQuestionRelationObj['nextQuestionId']);
|
|
3152
3171
|
if (nextQuestionObject.length > 0) {
|
|
3153
|
-
nextQuestionObject[0]['answeredValue'] =
|
|
3172
|
+
nextQuestionObject[0]['answeredValue'] =
|
|
3173
|
+
singleQuestionRelationObj['parentQuestionValue'];
|
|
3154
3174
|
}
|
|
3155
3175
|
});
|
|
3156
3176
|
}
|
|
3157
3177
|
if (singleQuestion['questionType'] === 'CHECKBOX') {
|
|
3158
|
-
if (!this.checkIfValueIsEmpty(singleQuestion['domainName']) &&
|
|
3178
|
+
if (!this.checkIfValueIsEmpty(singleQuestion['domainName']) &&
|
|
3179
|
+
!this.checkIfValueIsEmpty(data['domainValues'][singleQuestion['domainName']])) {
|
|
3159
3180
|
data['domainValues'][singleQuestion['domainName']].forEach((singleDomainValue) => {
|
|
3160
3181
|
if (!this.checkIfValueIsEmpty(singleDomainValue['domainInternalValue'])) {
|
|
3161
3182
|
this.listOfDomainValuesForCheckBox.push(singleDomainValue['domainInternalValue']);
|
|
@@ -3177,11 +3198,154 @@ class MedialQuestionsComponent {
|
|
|
3177
3198
|
this.medicalQuestionsFeetList = question['domainValues'];
|
|
3178
3199
|
this.medQuestionObj['QHTF'] = question;
|
|
3179
3200
|
this.medQuestionObj['QHTF']['field']['isShowLabel'] = false;
|
|
3201
|
+
this.medQuestionObj['QHTF']['field']['controlStyle'] = {
|
|
3202
|
+
controlType: 'select',
|
|
3203
|
+
borderColor: '#ffffff',
|
|
3204
|
+
borderWidth: '1.5px',
|
|
3205
|
+
borderRadius: null,
|
|
3206
|
+
fontSize: '16px',
|
|
3207
|
+
fontWeight: '400',
|
|
3208
|
+
fontFamily: 'Mulish',
|
|
3209
|
+
color: '#444444',
|
|
3210
|
+
background: '#FFFFFF',
|
|
3211
|
+
caretColor: '#ffbb00',
|
|
3212
|
+
nudgeDisplayImage: null,
|
|
3213
|
+
dropdownOptionBgColor: '#FFFFFF',
|
|
3214
|
+
dropdownOptionColor: '#444444',
|
|
3215
|
+
dropdownOptionFontWeight: '400',
|
|
3216
|
+
width: null,
|
|
3217
|
+
focusBorderWidth: '1.5px',
|
|
3218
|
+
focusBorderColor: '#ffffff',
|
|
3219
|
+
focusBackground: null,
|
|
3220
|
+
focusColor: '#444444',
|
|
3221
|
+
focusDropdownOptionBgColor: null,
|
|
3222
|
+
focusDropdownOptionColor: null,
|
|
3223
|
+
focusDropdownOptionFontWeight: null,
|
|
3224
|
+
focusDropdownOptionBorderLeft: null,
|
|
3225
|
+
focusDropdownOptionBorderRadius: null,
|
|
3226
|
+
hoverBorderColor: '#ffffff',
|
|
3227
|
+
hoverBorderWidth: '1.5px',
|
|
3228
|
+
hoverColor: '#444444',
|
|
3229
|
+
disableColor: '#ECECEC',
|
|
3230
|
+
disableBackground: '#ECECEC',
|
|
3231
|
+
errorBorderColor: '#EE0000',
|
|
3232
|
+
errorBorderWidth: '1.5px',
|
|
3233
|
+
errorColor: '#444444',
|
|
3234
|
+
createdDate: null,
|
|
3235
|
+
padding: null,
|
|
3236
|
+
margin: null,
|
|
3237
|
+
isMasterCss: null,
|
|
3238
|
+
controlMetaId: 'LI_COM_GEN_CTRL_select_downloadDocuments_V1',
|
|
3239
|
+
borderStyle: null,
|
|
3240
|
+
height: null,
|
|
3241
|
+
minHeight: null,
|
|
3242
|
+
maxHeight: null,
|
|
3243
|
+
minWidth: null,
|
|
3244
|
+
maxWidth: null,
|
|
3245
|
+
cssClass: null,
|
|
3246
|
+
};
|
|
3180
3247
|
}
|
|
3181
3248
|
if (question['cammundaQuestionCode'] === 'QHTI') {
|
|
3182
3249
|
this.medicalQuestionsInchesList = question['domainValues'];
|
|
3183
3250
|
this.medQuestionObj['QHTI'] = question;
|
|
3184
3251
|
this.medQuestionObj['QHTI']['field']['isShowLabel'] = false;
|
|
3252
|
+
this.medQuestionObj['QHTI']['field']['controlStyle'] = {
|
|
3253
|
+
controlType: 'select',
|
|
3254
|
+
borderColor: '#ffffff',
|
|
3255
|
+
borderWidth: '1.5px',
|
|
3256
|
+
borderRadius: null,
|
|
3257
|
+
fontSize: '16px',
|
|
3258
|
+
fontWeight: '400',
|
|
3259
|
+
fontFamily: 'Mulish',
|
|
3260
|
+
color: '#444444',
|
|
3261
|
+
background: '#FFFFFF',
|
|
3262
|
+
caretColor: '#ffbb00',
|
|
3263
|
+
nudgeDisplayImage: null,
|
|
3264
|
+
dropdownOptionBgColor: '#FFFFFF',
|
|
3265
|
+
dropdownOptionColor: '#444444',
|
|
3266
|
+
dropdownOptionFontWeight: '400',
|
|
3267
|
+
width: null,
|
|
3268
|
+
focusBorderWidth: '1.5px',
|
|
3269
|
+
focusBorderColor: '#ffffff',
|
|
3270
|
+
focusBackground: null,
|
|
3271
|
+
focusColor: '#444444',
|
|
3272
|
+
focusDropdownOptionBgColor: null,
|
|
3273
|
+
focusDropdownOptionColor: null,
|
|
3274
|
+
focusDropdownOptionFontWeight: null,
|
|
3275
|
+
focusDropdownOptionBorderLeft: null,
|
|
3276
|
+
focusDropdownOptionBorderRadius: null,
|
|
3277
|
+
hoverBorderColor: '#ffffff',
|
|
3278
|
+
hoverBorderWidth: '1.5px',
|
|
3279
|
+
hoverColor: '#444444',
|
|
3280
|
+
disableColor: '#ECECEC',
|
|
3281
|
+
disableBackground: '#ECECEC',
|
|
3282
|
+
errorBorderColor: '#EE0000',
|
|
3283
|
+
errorBorderWidth: '1.5px',
|
|
3284
|
+
errorColor: '#444444',
|
|
3285
|
+
createdDate: null,
|
|
3286
|
+
padding: null,
|
|
3287
|
+
margin: null,
|
|
3288
|
+
isMasterCss: null,
|
|
3289
|
+
controlMetaId: 'LI_COM_GEN_CTRL_select_downloadDocuments_V1',
|
|
3290
|
+
borderStyle: null,
|
|
3291
|
+
height: null,
|
|
3292
|
+
minHeight: null,
|
|
3293
|
+
maxHeight: null,
|
|
3294
|
+
minWidth: null,
|
|
3295
|
+
maxWidth: null,
|
|
3296
|
+
cssClass: null,
|
|
3297
|
+
};
|
|
3298
|
+
}
|
|
3299
|
+
if (question['cammundaQuestionCode'] === 'QHT') {
|
|
3300
|
+
this.medicalQuestionsInchesList = question['domainValues'];
|
|
3301
|
+
this.medQuestionObj['QHT'] = question;
|
|
3302
|
+
this.medQuestionObj['QHT']['field']['isShowLabel'] = false;
|
|
3303
|
+
this.medQuestionObj['QHT']['field']['controlStyle'] = {
|
|
3304
|
+
controlType: 'FREETEXT',
|
|
3305
|
+
borderColor: '#ffffff',
|
|
3306
|
+
borderWidth: '1.5px',
|
|
3307
|
+
borderRadius: null,
|
|
3308
|
+
fontSize: '16px',
|
|
3309
|
+
fontWeight: '400',
|
|
3310
|
+
fontFamily: 'Mulish',
|
|
3311
|
+
color: '#444444',
|
|
3312
|
+
background: '#FFFFFF',
|
|
3313
|
+
caretColor: '#ffbb00',
|
|
3314
|
+
nudgeDisplayImage: null,
|
|
3315
|
+
dropdownOptionBgColor: '#FFFFFF',
|
|
3316
|
+
dropdownOptionColor: '#444444',
|
|
3317
|
+
dropdownOptionFontWeight: '400',
|
|
3318
|
+
width: null,
|
|
3319
|
+
focusBorderWidth: '1.5px',
|
|
3320
|
+
focusBorderColor: '#ffffff',
|
|
3321
|
+
focusBackground: null,
|
|
3322
|
+
focusColor: '#444444',
|
|
3323
|
+
focusDropdownOptionBgColor: null,
|
|
3324
|
+
focusDropdownOptionColor: null,
|
|
3325
|
+
focusDropdownOptionFontWeight: null,
|
|
3326
|
+
focusDropdownOptionBorderLeft: null,
|
|
3327
|
+
focusDropdownOptionBorderRadius: null,
|
|
3328
|
+
hoverBorderColor: '#ffffff',
|
|
3329
|
+
hoverBorderWidth: '1.5px',
|
|
3330
|
+
hoverColor: '#444444',
|
|
3331
|
+
disableColor: '#ECECEC',
|
|
3332
|
+
disableBackground: '#ECECEC',
|
|
3333
|
+
errorBorderColor: '#EE0000',
|
|
3334
|
+
errorBorderWidth: '1.5px',
|
|
3335
|
+
errorColor: '#444444',
|
|
3336
|
+
createdDate: null,
|
|
3337
|
+
padding: null,
|
|
3338
|
+
margin: null,
|
|
3339
|
+
isMasterCss: null,
|
|
3340
|
+
controlMetaId: 'LI_COM_GEN_CTRL_select_downloadDocuments_V1',
|
|
3341
|
+
borderStyle: null,
|
|
3342
|
+
height: null,
|
|
3343
|
+
minHeight: null,
|
|
3344
|
+
maxHeight: null,
|
|
3345
|
+
minWidth: null,
|
|
3346
|
+
maxWidth: null,
|
|
3347
|
+
cssClass: null,
|
|
3348
|
+
};
|
|
3185
3349
|
}
|
|
3186
3350
|
if (question['questionType'] === 'DECLARATION') {
|
|
3187
3351
|
if (question['cammundaQuestionCode'] === 'recvSftCopy') {
|
|
@@ -3189,13 +3353,13 @@ class MedialQuestionsComponent {
|
|
|
3189
3353
|
question['domainValues'] = [];
|
|
3190
3354
|
question['domainValues'].push({
|
|
3191
3355
|
domainInternalValue: question['questionId'],
|
|
3192
|
-
domainUiValue: 'N'
|
|
3356
|
+
domainUiValue: 'N',
|
|
3193
3357
|
});
|
|
3194
3358
|
}
|
|
3195
3359
|
question['domainValues'] = [];
|
|
3196
3360
|
question['domainValues'].push({
|
|
3197
3361
|
domainInternalValue: question['questionId'],
|
|
3198
|
-
domainUiValue: 'Y'
|
|
3362
|
+
domainUiValue: 'Y',
|
|
3199
3363
|
});
|
|
3200
3364
|
}
|
|
3201
3365
|
if (question['cammundaQuestionCode'] === 'hardCopyLang') {
|
|
@@ -3210,46 +3374,50 @@ class MedialQuestionsComponent {
|
|
|
3210
3374
|
let obj = {
|
|
3211
3375
|
step: steps,
|
|
3212
3376
|
personUWId: singlePersonObject['personUWId'].toString(),
|
|
3213
|
-
questions: !this.checkIfValueIsEmpty(filteredObj)
|
|
3214
|
-
|
|
3377
|
+
questions: !this.checkIfValueIsEmpty(filteredObj)
|
|
3378
|
+
? filteredObj
|
|
3379
|
+
: [],
|
|
3380
|
+
sectionName: !this.checkIfValueIsEmpty(filteredObj)
|
|
3381
|
+
? filteredObj[0]['title']
|
|
3382
|
+
: '',
|
|
3215
3383
|
isMedicalSubQuestion: false,
|
|
3216
|
-
showSection: true
|
|
3384
|
+
showSection: true,
|
|
3217
3385
|
};
|
|
3218
3386
|
if (!this.checkIfValueIsEmpty(filteredObj)) {
|
|
3219
3387
|
// Hard Copy and Map question
|
|
3220
3388
|
let filteredHardCopyQuestion = filteredObj.filter((singleQuestion) => singleQuestion['cammundaQuestionCode'] === 'recvSftCopy');
|
|
3221
3389
|
if (!this.checkIfValueIsEmpty(filteredHardCopyQuestion)) {
|
|
3222
3390
|
obj['questions'].push({
|
|
3223
|
-
questionType:
|
|
3391
|
+
questionType: 'MAP',
|
|
3224
3392
|
isShowQuestionInUI: true,
|
|
3225
3393
|
parentQuestionRelation: {
|
|
3226
3394
|
parentQuestionId: filteredHardCopyQuestion[0]['questionId'],
|
|
3227
|
-
parentQuestionAnswer: 'Y'
|
|
3228
|
-
}
|
|
3395
|
+
parentQuestionAnswer: 'Y',
|
|
3396
|
+
},
|
|
3229
3397
|
});
|
|
3230
3398
|
}
|
|
3231
3399
|
// if NRI then passport upload is required
|
|
3232
3400
|
let filteredNationalityQuestion = filteredObj.filter((singleQuestion) => singleQuestion['cammundaQuestionCode'] === 'Nationality');
|
|
3233
3401
|
if (!this.checkIfValueIsEmpty(filteredNationalityQuestion)) {
|
|
3234
3402
|
singlePersonObject['questionList'].push({
|
|
3235
|
-
questionType:
|
|
3403
|
+
questionType: 'PASSPORT_UPLOAD',
|
|
3236
3404
|
optionalQuestion: 'N',
|
|
3237
3405
|
questionText: 'Passport Details ',
|
|
3238
3406
|
isShowQuestionInUI: true,
|
|
3239
3407
|
parentQuestionRelation: {
|
|
3240
3408
|
parentQuestionId: filteredNationalityQuestion[0]['questionId'],
|
|
3241
|
-
parentQuestionAnswer: 'forgnNational'
|
|
3242
|
-
}
|
|
3409
|
+
parentQuestionAnswer: 'forgnNational',
|
|
3410
|
+
},
|
|
3243
3411
|
});
|
|
3244
3412
|
obj['questions'].push({
|
|
3245
|
-
questionType:
|
|
3413
|
+
questionType: 'PASSPORT_UPLOAD',
|
|
3246
3414
|
optionalQuestion: 'N',
|
|
3247
3415
|
questionText: 'Passport Details ',
|
|
3248
3416
|
isShowQuestionInUI: true,
|
|
3249
3417
|
parentQuestionRelation: {
|
|
3250
3418
|
parentQuestionId: filteredNationalityQuestion[0]['questionId'],
|
|
3251
|
-
parentQuestionAnswer: 'forgnNational'
|
|
3252
|
-
}
|
|
3419
|
+
parentQuestionAnswer: 'forgnNational',
|
|
3420
|
+
},
|
|
3253
3421
|
});
|
|
3254
3422
|
}
|
|
3255
3423
|
}
|
|
@@ -3266,42 +3434,87 @@ class MedialQuestionsComponent {
|
|
|
3266
3434
|
}
|
|
3267
3435
|
this.removeSubQuestionValues();
|
|
3268
3436
|
this.medQuestionObj['heightObjectTypes'] = {
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3437
|
+
controlStyle: {
|
|
3438
|
+
controlType: 'select',
|
|
3439
|
+
borderColor: '#ffffff',
|
|
3440
|
+
borderWidth: '1.5px',
|
|
3441
|
+
borderRadius: null,
|
|
3442
|
+
fontSize: '16px',
|
|
3443
|
+
fontWeight: '400',
|
|
3444
|
+
fontFamily: 'Mulish',
|
|
3445
|
+
color: '#444444',
|
|
3446
|
+
background: '#FFFFFF',
|
|
3447
|
+
caretColor: '#ffbb00',
|
|
3448
|
+
nudgeDisplayImage: null,
|
|
3449
|
+
dropdownOptionBgColor: '#FFFFFF',
|
|
3450
|
+
dropdownOptionColor: '#444444',
|
|
3451
|
+
dropdownOptionFontWeight: '400',
|
|
3452
|
+
width: null,
|
|
3453
|
+
focusBorderWidth: '1.5px',
|
|
3454
|
+
focusBorderColor: '#ffffff',
|
|
3455
|
+
focusBackground: null,
|
|
3456
|
+
focusColor: '#444444',
|
|
3457
|
+
focusDropdownOptionBgColor: null,
|
|
3458
|
+
focusDropdownOptionColor: null,
|
|
3459
|
+
focusDropdownOptionFontWeight: null,
|
|
3460
|
+
focusDropdownOptionBorderLeft: null,
|
|
3461
|
+
focusDropdownOptionBorderRadius: null,
|
|
3462
|
+
hoverBorderColor: '#ffffff',
|
|
3463
|
+
hoverBorderWidth: '1.5px',
|
|
3464
|
+
hoverColor: '#444444',
|
|
3465
|
+
disableColor: '#ECECEC',
|
|
3466
|
+
disableBackground: '#ECECEC',
|
|
3467
|
+
errorBorderColor: '#EE0000',
|
|
3468
|
+
errorBorderWidth: '1.5px',
|
|
3469
|
+
errorColor: '#444444',
|
|
3470
|
+
createdDate: null,
|
|
3471
|
+
padding: null,
|
|
3472
|
+
margin: null,
|
|
3473
|
+
isMasterCss: null,
|
|
3474
|
+
controlMetaId: 'LI_COM_GEN_CTRL_select_downloadDocuments_V1',
|
|
3475
|
+
borderStyle: null,
|
|
3476
|
+
height: null,
|
|
3477
|
+
minHeight: null,
|
|
3478
|
+
maxHeight: null,
|
|
3479
|
+
minWidth: null,
|
|
3480
|
+
maxWidth: null,
|
|
3481
|
+
cssClass: null,
|
|
3482
|
+
},
|
|
3483
|
+
fieldName: null,
|
|
3484
|
+
label: 'feet / inches',
|
|
3485
|
+
placeHolder: '',
|
|
3486
|
+
metaId: '',
|
|
3487
|
+
isVisible: true,
|
|
3488
|
+
isDisable: false,
|
|
3489
|
+
validators: {
|
|
3490
|
+
isRequired: false,
|
|
3491
|
+
requiredMessage: 'This field cannot be empty',
|
|
3492
|
+
minLength: null,
|
|
3493
|
+
minLengthMessage: null,
|
|
3494
|
+
maxLength: 150,
|
|
3495
|
+
maxLengthMessage: null,
|
|
3496
|
+
pattern: null,
|
|
3497
|
+
patternMessage: '',
|
|
3285
3498
|
},
|
|
3286
|
-
|
|
3499
|
+
options: [
|
|
3287
3500
|
{
|
|
3288
|
-
|
|
3289
|
-
|
|
3501
|
+
label: 'Cm',
|
|
3502
|
+
value: 'CM',
|
|
3290
3503
|
},
|
|
3291
3504
|
{
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
}
|
|
3505
|
+
label: 'Feet',
|
|
3506
|
+
value: 'FEET',
|
|
3507
|
+
},
|
|
3295
3508
|
],
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3509
|
+
cssClass: null,
|
|
3510
|
+
value: null,
|
|
3511
|
+
style: null,
|
|
3512
|
+
imageUrl: null,
|
|
3513
|
+
configData: {},
|
|
3514
|
+
metaDataObj: null,
|
|
3515
|
+
isShowLabel: false,
|
|
3516
|
+
isMasterControl: false,
|
|
3517
|
+
controlType: 'select',
|
|
3305
3518
|
};
|
|
3306
3519
|
}
|
|
3307
3520
|
checkIfValueIsEmpty(value) {
|
|
@@ -3318,7 +3531,7 @@ class MedialQuestionsComponent {
|
|
|
3318
3531
|
if (header) {
|
|
3319
3532
|
if (this.questionHeader.includes(header.toLocaleLowerCase())) {
|
|
3320
3533
|
let val = header.split(' ');
|
|
3321
|
-
return
|
|
3534
|
+
return val[0].toUpperCase() + ' ' + this.toTitleCase(val[1]);
|
|
3322
3535
|
}
|
|
3323
3536
|
else {
|
|
3324
3537
|
if (header.toUpperCase() === 'FATCA DETAILS') {
|
|
@@ -3330,7 +3543,9 @@ class MedialQuestionsComponent {
|
|
|
3330
3543
|
}
|
|
3331
3544
|
toTitleCase(value) {
|
|
3332
3545
|
if (!this.checkIfValueIsEmpty(value)) {
|
|
3333
|
-
return value
|
|
3546
|
+
return value
|
|
3547
|
+
.toString()
|
|
3548
|
+
.replace(/\w\S*/g, (txt) => txt[0].toUpperCase() + txt.substr(1).toLowerCase());
|
|
3334
3549
|
}
|
|
3335
3550
|
}
|
|
3336
3551
|
getField(questionObj) {
|
|
@@ -3345,6 +3560,11 @@ class MedialQuestionsComponent {
|
|
|
3345
3560
|
}
|
|
3346
3561
|
let minLength = null;
|
|
3347
3562
|
let maxLength = null;
|
|
3563
|
+
let pattern = null;
|
|
3564
|
+
let patternMessage = null;
|
|
3565
|
+
let configData = !this.checkIfValueIsEmpty(this.field()?.configData)
|
|
3566
|
+
? this.field()?.configData
|
|
3567
|
+
: {};
|
|
3348
3568
|
if (!this.checkIfValueIsEmpty(questionObj['validations'])) {
|
|
3349
3569
|
let validationObj = JSON.parse(questionObj['validations']);
|
|
3350
3570
|
if (!this.checkIfValueIsEmpty(validationObj['MinValue'])) {
|
|
@@ -3353,11 +3573,38 @@ class MedialQuestionsComponent {
|
|
|
3353
3573
|
if (!this.checkIfValueIsEmpty(validationObj['MaxValue'])) {
|
|
3354
3574
|
maxLength = validationObj['MaxValue'];
|
|
3355
3575
|
}
|
|
3576
|
+
if (!this.checkIfValueIsEmpty(validationObj['Type'])) {
|
|
3577
|
+
pattern = validationObj['Type'] === 'Numeric' ? '^[0-9]+$' : null;
|
|
3578
|
+
patternMessage =
|
|
3579
|
+
validationObj['Type'] === 'Numeric'
|
|
3580
|
+
? 'Only numbers are allowed.'
|
|
3581
|
+
: null;
|
|
3582
|
+
configData['inputType'] = validationObj['Type'] === 'Numeric' ? 'number' : 'text';
|
|
3583
|
+
if (validationObj['Type'] === 'Numeric') {
|
|
3584
|
+
maxLength = '9'.repeat(Number(maxLength));
|
|
3585
|
+
configData['maxValue'] = maxLength;
|
|
3586
|
+
configData['minValue'] = 0;
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3356
3589
|
}
|
|
3357
3590
|
return {
|
|
3358
|
-
configData:
|
|
3591
|
+
configData: configData,
|
|
3359
3592
|
controlStyle: this.field()?.controlStyle,
|
|
3360
|
-
controlType: questionObj['questionType'] === 'FREE TEXT'
|
|
3593
|
+
controlType: questionObj['questionType'] === 'FREE TEXT'
|
|
3594
|
+
? 'text'
|
|
3595
|
+
: questionObj['questionType'] === 'RADIO BUTTON' ||
|
|
3596
|
+
questionObj['questionType'] === 'ADDMORE'
|
|
3597
|
+
? 'radio'
|
|
3598
|
+
: questionObj['questionType'] === 'CHECKBOX' ||
|
|
3599
|
+
questionObj['questionType'] === 'DECLARATION'
|
|
3600
|
+
? 'checkbox'
|
|
3601
|
+
: questionObj['questionType'] === 'CALENDAR'
|
|
3602
|
+
? 'date'
|
|
3603
|
+
: questionObj['questionType'] === 'DROPDOWN'
|
|
3604
|
+
? 'select'
|
|
3605
|
+
: questionObj['questionType'] === 'DOCUPLOAD'
|
|
3606
|
+
? 'file'
|
|
3607
|
+
: '',
|
|
3361
3608
|
fieldName: questionObj['cammundaQuestionCode'],
|
|
3362
3609
|
isDisable: false,
|
|
3363
3610
|
label: questionObj['questionText'],
|
|
@@ -3365,7 +3612,9 @@ class MedialQuestionsComponent {
|
|
|
3365
3612
|
validators: {
|
|
3366
3613
|
isRequired: questionObj['optionalQuestion'] === 'N' ? true : false,
|
|
3367
3614
|
minLength,
|
|
3368
|
-
maxLength
|
|
3615
|
+
maxLength,
|
|
3616
|
+
pattern,
|
|
3617
|
+
patternMessage,
|
|
3369
3618
|
},
|
|
3370
3619
|
isVisible: true,
|
|
3371
3620
|
options: optionsObj,
|
|
@@ -3399,11 +3648,14 @@ class MedialQuestionsComponent {
|
|
|
3399
3648
|
if (!this.checkIfValueIsEmpty(singleQuestion['domainValues'])) {
|
|
3400
3649
|
let isNoneInDomainValues = singleQuestion['domainValues'].filter((singleObj) => singleObj['domainUiValue'].toUpperCase() === 'NONE');
|
|
3401
3650
|
singleQuestion['domainValues'].forEach((singleDomainValue) => {
|
|
3402
|
-
if (!this.checkIfValueIsEmpty(isNoneInDomainValues) &&
|
|
3651
|
+
if (!this.checkIfValueIsEmpty(isNoneInDomainValues) &&
|
|
3652
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers[isNoneInDomainValues[0]['domainInternalValue']]) &&
|
|
3653
|
+
this.personUwAnswers[isNoneInDomainValues[0]['domainInternalValue']]) {
|
|
3403
3654
|
// none is selected
|
|
3404
3655
|
singleQuestion['domainValues'].forEach((singleDomainValue) => {
|
|
3405
3656
|
// remove all selected checkbox questions
|
|
3406
|
-
if (singleDomainValue.domainUiValue.toUpperCase() !==
|
|
3657
|
+
if (singleDomainValue.domainUiValue.toUpperCase() !==
|
|
3658
|
+
'NONE') {
|
|
3407
3659
|
singleDomainValue.isDisabled = true;
|
|
3408
3660
|
delete this.personUwAnswers[singleDomainValue['domainInternalValue']];
|
|
3409
3661
|
}
|
|
@@ -3468,30 +3720,39 @@ class MedialQuestionsComponent {
|
|
|
3468
3720
|
this.personUwResponseObj[0].questionList.forEach((singleQuestion) => {
|
|
3469
3721
|
let isSubQuestionObject = [];
|
|
3470
3722
|
if (!this.checkIfValueIsEmpty(singleQuestion['questionRelation'])) {
|
|
3471
|
-
isSubQuestionObject = singleQuestion['questionRelation'].filter((questionRelationObj) => questionRelationObj['nextQuestionId'] ===
|
|
3723
|
+
isSubQuestionObject = singleQuestion['questionRelation'].filter((questionRelationObj) => questionRelationObj['nextQuestionId'] ===
|
|
3724
|
+
currentQuestion['questionId']);
|
|
3472
3725
|
}
|
|
3473
3726
|
if (isSubQuestionObject.length > 0) {
|
|
3474
3727
|
subQuestions.push(singleQuestion);
|
|
3475
3728
|
isSubQuestionObject.forEach((singleSubQuestion) => {
|
|
3476
3729
|
if ((singleQuestion['questionType'] !== 'CHECKBOX' &&
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3730
|
+
singleSubQuestion['parentQuestionValue'].toString()[0] !== '!' &&
|
|
3731
|
+
this.personUwAnswers[singleQuestion['questionId']] ===
|
|
3732
|
+
singleSubQuestion['parentQuestionValue']) ||
|
|
3480
3733
|
(singleSubQuestion['parentQuestionValue'].toString()[0] === '!' &&
|
|
3481
3734
|
!this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestion['questionId']]) &&
|
|
3482
3735
|
this.personUwAnswers[singleQuestion['questionId']] !==
|
|
3483
|
-
singleSubQuestion['parentQuestionValue']
|
|
3484
|
-
|
|
3485
|
-
|
|
3736
|
+
singleSubQuestion['parentQuestionValue']
|
|
3737
|
+
.toString()
|
|
3738
|
+
.split('!')[1]) ||
|
|
3739
|
+
(singleQuestion['questionType'] === 'CHECKBOX' &&
|
|
3740
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestion['questionId']]) &&
|
|
3741
|
+
this.personUwAnswers[singleQuestion['questionId']].filter((singleObj) => singleObj['value'] ===
|
|
3742
|
+
singleSubQuestion['parentQuestionValue']).length > 0)) {
|
|
3486
3743
|
showQuestion = true;
|
|
3487
3744
|
}
|
|
3488
3745
|
});
|
|
3489
3746
|
}
|
|
3490
3747
|
});
|
|
3491
|
-
if (this.checkIfValueIsEmpty(subQuestions) &&
|
|
3748
|
+
if (this.checkIfValueIsEmpty(subQuestions) &&
|
|
3749
|
+
this.checkIfValueIsEmpty(currentQuestion['parentQuestionRelation'])) {
|
|
3492
3750
|
showQuestion = true;
|
|
3493
3751
|
}
|
|
3494
|
-
if (!this.checkIfValueIsEmpty(currentQuestion['parentQuestionRelation']) &&
|
|
3752
|
+
if (!this.checkIfValueIsEmpty(currentQuestion['parentQuestionRelation']) &&
|
|
3753
|
+
!this.checkIfValueIsEmpty(currentQuestion['parentQuestionRelation']['parentQuestionId']) &&
|
|
3754
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers[currentQuestion['parentQuestionRelation']['parentQuestionId']]) &&
|
|
3755
|
+
this.personUwAnswers[currentQuestion['parentQuestionRelation']['parentQuestionId']] === currentQuestion['parentQuestionRelation']['parentQuestionAnswer']) {
|
|
3495
3756
|
showQuestion = true;
|
|
3496
3757
|
}
|
|
3497
3758
|
if (currentQuestion['questionType'] === 'NODISPLAY') {
|
|
@@ -3874,16 +4135,25 @@ class MedialQuestionsComponent {
|
|
|
3874
4135
|
this.questionList.forEach((singleSection) => {
|
|
3875
4136
|
// if (!this.checkIfValueIsEmpty(singlePersonObj['questionList'])) {
|
|
3876
4137
|
// singlePersonObj['questionList'].forEach((singleSection: any) => {
|
|
3877
|
-
if (!this.checkIfValueIsEmpty(singleSection['sectionName']) &&
|
|
4138
|
+
if (!this.checkIfValueIsEmpty(singleSection['sectionName']) &&
|
|
4139
|
+
(singleSection['sectionName'].toUpperCase().replaceAll(' ', '_') ===
|
|
4140
|
+
'TELL_US_MORE' ||
|
|
4141
|
+
singleSection['sectionName'].toUpperCase().replaceAll(' ', '_') ===
|
|
4142
|
+
'BASIC_DETAILS')) {
|
|
3878
4143
|
// validation for height in cm
|
|
3879
4144
|
let heightInCentimeterObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHT');
|
|
3880
4145
|
let heightInInchesObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHTI');
|
|
3881
4146
|
let heightInFeetObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHTF');
|
|
3882
|
-
if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'CM' &&
|
|
4147
|
+
if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'CM' &&
|
|
4148
|
+
!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
4149
|
+
!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
4150
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionsHeightInput'])) {
|
|
3883
4151
|
// pass height in cm obj
|
|
3884
|
-
let cmObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) =>
|
|
4152
|
+
let cmObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInCentimeterObj[0]['questionId'] &&
|
|
4153
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3885
4154
|
if (cmObjInAnswersindex !== -1) {
|
|
3886
|
-
mainRequestForBothPersons[cmObjInAnswersindex]['answer'] =
|
|
4155
|
+
mainRequestForBothPersons[cmObjInAnswersindex]['answer'] =
|
|
4156
|
+
parseInt(this.personUwAnswers['medicalQuestionsHeightInput']).toString();
|
|
3887
4157
|
}
|
|
3888
4158
|
else {
|
|
3889
4159
|
mainRequestForBothPersons.push({
|
|
@@ -3897,10 +4167,14 @@ class MedialQuestionsComponent {
|
|
|
3897
4167
|
}
|
|
3898
4168
|
// height in inches
|
|
3899
4169
|
let heightInInches = (this.personUwAnswers['medicalQuestionsHeightInput'] * 0.393701).toFixed(2);
|
|
3900
|
-
let heightInFeet = parseFloat((heightInInches / 12).toString().split('.')[1]) > 12
|
|
3901
|
-
|
|
4170
|
+
let heightInFeet = parseFloat((heightInInches / 12).toString().split('.')[1]) > 12
|
|
4171
|
+
? (heightInInches / 12).toFixed(1)
|
|
4172
|
+
: (heightInInches / 12).toFixed(2);
|
|
4173
|
+
let inchesobjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInInchesObj[0]['questionId'] &&
|
|
4174
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3902
4175
|
if (inchesobjInAnswersindex !== -1) {
|
|
3903
|
-
mainRequestForBothPersons[inchesobjInAnswersindex]['answer'] =
|
|
4176
|
+
mainRequestForBothPersons[inchesobjInAnswersindex]['answer'] =
|
|
4177
|
+
parseInt(heightInInches).toString();
|
|
3904
4178
|
}
|
|
3905
4179
|
else {
|
|
3906
4180
|
mainRequestForBothPersons.push({
|
|
@@ -3913,9 +4187,11 @@ class MedialQuestionsComponent {
|
|
|
3913
4187
|
});
|
|
3914
4188
|
}
|
|
3915
4189
|
// height in feet
|
|
3916
|
-
let feetObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) =>
|
|
4190
|
+
let feetObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInFeetObj[0]['questionId'] &&
|
|
4191
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3917
4192
|
if (feetObjInAnswersindex !== -1) {
|
|
3918
|
-
mainRequestForBothPersons[feetObjInAnswersindex]['answer'] =
|
|
4193
|
+
mainRequestForBothPersons[feetObjInAnswersindex]['answer'] =
|
|
4194
|
+
parseFloat(heightInFeet).toString();
|
|
3919
4195
|
}
|
|
3920
4196
|
else {
|
|
3921
4197
|
mainRequestForBothPersons.push({
|
|
@@ -3928,27 +4204,39 @@ class MedialQuestionsComponent {
|
|
|
3928
4204
|
});
|
|
3929
4205
|
}
|
|
3930
4206
|
}
|
|
3931
|
-
else if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'FEET' &&
|
|
4207
|
+
else if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'FEET' &&
|
|
4208
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionFeetInput']) &&
|
|
4209
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionsInchesInput'])) {
|
|
3932
4210
|
if (!this.checkIfValueIsEmpty(heightInFeetObj)) {
|
|
3933
|
-
let heightInInches =
|
|
4211
|
+
let heightInInches = parseFloat(this.personUwAnswers['medicalQuestionFeetInput']) *
|
|
4212
|
+
12 +
|
|
4213
|
+
parseFloat(this.personUwAnswers['medicalQuestionsInchesInput']);
|
|
3934
4214
|
let heightInCm = (parseFloat(heightInInches) / 0.393701).toFixed(2);
|
|
3935
|
-
let feetObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) =>
|
|
4215
|
+
let feetObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInFeetObj[0]['questionId'] &&
|
|
4216
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3936
4217
|
if (feetObjInAnswersindex !== -1) {
|
|
3937
|
-
mainRequestForBothPersons[feetObjInAnswersindex]['answer'] =
|
|
4218
|
+
mainRequestForBothPersons[feetObjInAnswersindex]['answer'] =
|
|
4219
|
+
this.personUwAnswers['medicalQuestionFeetInput'].toString() +
|
|
4220
|
+
'.' +
|
|
4221
|
+
this.personUwAnswers['medicalQuestionsInchesInput'].toString();
|
|
3938
4222
|
}
|
|
3939
4223
|
else {
|
|
3940
4224
|
mainRequestForBothPersons.push({
|
|
3941
4225
|
personUWId: singleSection['personUWId'],
|
|
3942
4226
|
questionId: heightInFeetObj[0]['questionId'],
|
|
3943
|
-
answer: this.personUwAnswers['medicalQuestionFeetInput'].toString() +
|
|
4227
|
+
answer: this.personUwAnswers['medicalQuestionFeetInput'].toString() +
|
|
4228
|
+
'.' +
|
|
4229
|
+
this.personUwAnswers['medicalQuestionsInchesInput'].toString(),
|
|
3944
4230
|
personUWParentId: 0,
|
|
3945
4231
|
createdUser: this.getCookieValue('userId'),
|
|
3946
4232
|
clusterId: heightInFeetObj[0]['clusterId'],
|
|
3947
4233
|
});
|
|
3948
4234
|
}
|
|
3949
|
-
let inchesobjInAnswersindex = mainRequestForBothPersons.findIndex((obj) =>
|
|
4235
|
+
let inchesobjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInInchesObj[0]['questionId'] &&
|
|
4236
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3950
4237
|
if (inchesobjInAnswersindex !== -1) {
|
|
3951
|
-
mainRequestForBothPersons[inchesobjInAnswersindex]['answer'] =
|
|
4238
|
+
mainRequestForBothPersons[inchesobjInAnswersindex]['answer'] =
|
|
4239
|
+
parseInt(heightInInches).toString();
|
|
3952
4240
|
}
|
|
3953
4241
|
else {
|
|
3954
4242
|
mainRequestForBothPersons.push({
|
|
@@ -3960,9 +4248,11 @@ class MedialQuestionsComponent {
|
|
|
3960
4248
|
clusterId: heightInInchesObj[0]['clusterId'],
|
|
3961
4249
|
});
|
|
3962
4250
|
}
|
|
3963
|
-
let cmObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) =>
|
|
4251
|
+
let cmObjInAnswersindex = mainRequestForBothPersons.findIndex((obj) => obj.questionId === heightInCentimeterObj[0]['questionId'] &&
|
|
4252
|
+
obj['personUWId'] === singleSection['personUWId']);
|
|
3964
4253
|
if (cmObjInAnswersindex !== -1) {
|
|
3965
|
-
mainRequestForBothPersons[cmObjInAnswersindex]['answer'] =
|
|
4254
|
+
mainRequestForBothPersons[cmObjInAnswersindex]['answer'] =
|
|
4255
|
+
parseInt(heightInCm).toString();
|
|
3966
4256
|
}
|
|
3967
4257
|
else {
|
|
3968
4258
|
mainRequestForBothPersons.push({
|
|
@@ -3976,27 +4266,43 @@ class MedialQuestionsComponent {
|
|
|
3976
4266
|
}
|
|
3977
4267
|
}
|
|
3978
4268
|
}
|
|
3979
|
-
if (!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4269
|
+
if (!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
4270
|
+
!this.checkIfValueIsEmpty(heightInCentimeterObj[0]['questionId'])) {
|
|
4271
|
+
let heightInCmAnswerObject = mainRequestForBothPersons.filter((singleQuestion) => singleQuestion['questionId'] ===
|
|
4272
|
+
heightInCentimeterObj[0]['questionId']);
|
|
4273
|
+
if (!this.checkIfValueIsEmpty(heightInCmAnswerObject) &&
|
|
4274
|
+
!this.checkIfValueIsEmpty(heightInCmAnswerObject[0]['answer'])) {
|
|
4275
|
+
this.personUwAnswers[heightInCentimeterObj[0]['questionId']] =
|
|
4276
|
+
heightInCmAnswerObject[0]['answer'];
|
|
3983
4277
|
}
|
|
3984
4278
|
}
|
|
3985
|
-
if (!this.checkIfValueIsEmpty(heightInInchesObj) &&
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
4279
|
+
if (!this.checkIfValueIsEmpty(heightInInchesObj) &&
|
|
4280
|
+
!this.checkIfValueIsEmpty(heightInInchesObj[0]['questionId'])) {
|
|
4281
|
+
let heightInInchesAnswerObject = mainRequestForBothPersons.filter((singleQuestion) => singleQuestion['questionId'] ===
|
|
4282
|
+
heightInInchesObj[0]['questionId']);
|
|
4283
|
+
if (!this.checkIfValueIsEmpty(heightInInchesAnswerObject) &&
|
|
4284
|
+
!this.checkIfValueIsEmpty(heightInInchesAnswerObject[0]['answer'])) {
|
|
4285
|
+
this.personUwAnswers[heightInInchesObj[0]['questionId']] =
|
|
4286
|
+
heightInInchesAnswerObject[0]['answer'];
|
|
3989
4287
|
}
|
|
3990
4288
|
}
|
|
3991
|
-
if (!this.checkIfValueIsEmpty(heightInFeetObj) &&
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
4289
|
+
if (!this.checkIfValueIsEmpty(heightInFeetObj) &&
|
|
4290
|
+
!this.checkIfValueIsEmpty(heightInFeetObj[0]['questionId'])) {
|
|
4291
|
+
let heightInFeetAnswerObject = mainRequestForBothPersons.filter((singleQuestion) => singleQuestion['questionId'] ===
|
|
4292
|
+
heightInFeetObj[0]['questionId']);
|
|
4293
|
+
if (!this.checkIfValueIsEmpty(heightInFeetAnswerObject) &&
|
|
4294
|
+
!this.checkIfValueIsEmpty(heightInFeetAnswerObject[0]['answer'])) {
|
|
4295
|
+
this.personUwAnswers[heightInFeetObj[0]['questionId']] =
|
|
4296
|
+
heightInFeetAnswerObject[0]['answer'];
|
|
3995
4297
|
}
|
|
3996
4298
|
}
|
|
3997
4299
|
}
|
|
3998
|
-
let isNoDisplayQuestionInSection = !this.checkIfValueIsEmpty(singleSection['questions'])
|
|
3999
|
-
|
|
4300
|
+
let isNoDisplayQuestionInSection = !this.checkIfValueIsEmpty(singleSection['questions'])
|
|
4301
|
+
? singleSection['questions'].filter((singleData) => singleData['questionType'] === 'NODISPLAY')
|
|
4302
|
+
: [];
|
|
4303
|
+
if ((singleSection['showSection'] ||
|
|
4304
|
+
isNoDisplayQuestionInSection.length > 0) &&
|
|
4305
|
+
!this.checkIfValueIsEmpty(singleSection['questions'])) {
|
|
4000
4306
|
singleSection['questions'].forEach((singleQuestion) => {
|
|
4001
4307
|
if (singleQuestion['cammundaQuestionCode'] === 'hardCopyLang') {
|
|
4002
4308
|
if (singleQuestion['isShowQuestionInUI']) {
|
|
@@ -4009,14 +4315,20 @@ class MedialQuestionsComponent {
|
|
|
4009
4315
|
let checkedOptionsArr = [];
|
|
4010
4316
|
if (!this.checkIfValueIsEmpty(singleQuestion['domainValues'])) {
|
|
4011
4317
|
singleQuestion['domainValues'].forEach((singleDomainValue) => {
|
|
4012
|
-
if (!this.checkIfValueIsEmpty(this.personUwAnswers[singleDomainValue['domainInternalValue']]) &&
|
|
4318
|
+
if (!this.checkIfValueIsEmpty(this.personUwAnswers[singleDomainValue['domainInternalValue']]) &&
|
|
4319
|
+
this.personUwAnswers[singleDomainValue['domainInternalValue']]) {
|
|
4013
4320
|
checkedOptionsArr.push(singleDomainValue['domainInternalValue']);
|
|
4014
4321
|
}
|
|
4015
4322
|
});
|
|
4016
4323
|
}
|
|
4017
|
-
if (singleQuestion['isShowQuestionInUI'] &&
|
|
4324
|
+
if (singleQuestion['isShowQuestionInUI'] &&
|
|
4325
|
+
singleQuestion['questionType'] === 'CHECKBOX' &&
|
|
4326
|
+
!this.checkIfValueIsEmpty(checkedOptionsArr)) {
|
|
4018
4327
|
// for checkbox question
|
|
4019
|
-
let questionIndexInMainRequest = mainRequestForBothPersons.findIndex((singleAnswerObj) =>
|
|
4328
|
+
let questionIndexInMainRequest = mainRequestForBothPersons.findIndex((singleAnswerObj) => singleAnswerObj['questionId'] ===
|
|
4329
|
+
singleQuestion['questionId'] &&
|
|
4330
|
+
singleAnswerObj['personUWId'] ===
|
|
4331
|
+
singleSection['personUWId']);
|
|
4020
4332
|
if (questionIndexInMainRequest === -1) {
|
|
4021
4333
|
let obj = {
|
|
4022
4334
|
personUWId: singleSection['personUWId'],
|
|
@@ -4033,14 +4345,21 @@ class MedialQuestionsComponent {
|
|
|
4033
4345
|
mainRequestForBothPersons[questionIndexInMainRequest]['answer'] = checkedOptionsArr.toString();
|
|
4034
4346
|
}
|
|
4035
4347
|
}
|
|
4036
|
-
else if (singleQuestion['isShowQuestionInUI'] &&
|
|
4348
|
+
else if (singleQuestion['isShowQuestionInUI'] &&
|
|
4349
|
+
singleQuestion['questionType'] !== 'CHECKBOX' &&
|
|
4350
|
+
!this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestion['questionId']])) {
|
|
4037
4351
|
// non checkbox question
|
|
4038
|
-
let questionIndexInMainRequest = mainRequestForBothPersons.findIndex((singleAnswerObj) =>
|
|
4352
|
+
let questionIndexInMainRequest = mainRequestForBothPersons.findIndex((singleAnswerObj) => singleAnswerObj['questionId'] ===
|
|
4353
|
+
singleQuestion['questionId'] &&
|
|
4354
|
+
singleAnswerObj['personUWId'] ===
|
|
4355
|
+
singleSection['personUWId']);
|
|
4039
4356
|
if (questionIndexInMainRequest === -1) {
|
|
4040
4357
|
let obj = {
|
|
4041
4358
|
personUWId: singleSection['personUWId'],
|
|
4042
4359
|
questionId: singleQuestion['questionId'],
|
|
4043
|
-
answer: singleQuestion['questionType'] === 'CALENDAR'
|
|
4360
|
+
answer: singleQuestion['questionType'] === 'CALENDAR'
|
|
4361
|
+
? new Date(this.personUwAnswers[singleQuestion['questionId']])
|
|
4362
|
+
: this.personUwAnswers[singleQuestion['questionId']],
|
|
4044
4363
|
personUWParentId: 0,
|
|
4045
4364
|
createdUser: this.getCookieValue('userId'),
|
|
4046
4365
|
clusterId: singleQuestion['clusterId'],
|
|
@@ -4048,7 +4367,10 @@ class MedialQuestionsComponent {
|
|
|
4048
4367
|
mainRequestForBothPersons.push(obj);
|
|
4049
4368
|
}
|
|
4050
4369
|
else {
|
|
4051
|
-
mainRequestForBothPersons[questionIndexInMainRequest]['answer'] =
|
|
4370
|
+
mainRequestForBothPersons[questionIndexInMainRequest]['answer'] =
|
|
4371
|
+
singleQuestion['questionType'] === 'CALENDAR'
|
|
4372
|
+
? new Date(this.personUwAnswers[singleQuestion['questionId']])
|
|
4373
|
+
: this.personUwAnswers[singleQuestion['questionId']];
|
|
4052
4374
|
}
|
|
4053
4375
|
}
|
|
4054
4376
|
// if(singleQuestion['isShowQuestionInUI'] && !this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestion['questionId']])) {
|
|
@@ -4112,7 +4434,9 @@ class MedialQuestionsComponent {
|
|
|
4112
4434
|
// });
|
|
4113
4435
|
// }
|
|
4114
4436
|
});
|
|
4115
|
-
let distinctPersonIdFromRequest = [
|
|
4437
|
+
let distinctPersonIdFromRequest = [
|
|
4438
|
+
...new Set(mainRequestForBothPersons.map((item) => item.personUWId.toString())),
|
|
4439
|
+
];
|
|
4116
4440
|
if (!this.checkIfValueIsEmpty(distinctPersonIdFromRequest)) {
|
|
4117
4441
|
mainRequestForLa = mainRequestForBothPersons.filter((singleAnswer) => singleAnswer['personUWId'] === distinctPersonIdFromRequest[0]);
|
|
4118
4442
|
if (distinctPersonIdFromRequest.length === 2) {
|
|
@@ -4140,7 +4464,7 @@ class MedialQuestionsComponent {
|
|
|
4140
4464
|
let tokenName = '';
|
|
4141
4465
|
let tokenValue = '';
|
|
4142
4466
|
const index2 = 2;
|
|
4143
|
-
cookie.forEach(data => {
|
|
4467
|
+
cookie.forEach((data) => {
|
|
4144
4468
|
if (data.split('=')[0].includes(name) && !!data.split('=')[1]) {
|
|
4145
4469
|
tokenName = data.split('=')[0].trim();
|
|
4146
4470
|
tokenValue = data.split('=')[1];
|
|
@@ -4158,12 +4482,20 @@ class MedialQuestionsComponent {
|
|
|
4158
4482
|
let isValid = true;
|
|
4159
4483
|
this.questionList.forEach((singleSection) => {
|
|
4160
4484
|
if (!this.checkIfValueIsEmpty(singleSection['questions']) && isValid) {
|
|
4161
|
-
if (!this.checkIfValueIsEmpty(singleSection['sectionName']) &&
|
|
4485
|
+
if (!this.checkIfValueIsEmpty(singleSection['sectionName']) &&
|
|
4486
|
+
(singleSection['sectionName'].toUpperCase().replaceAll(' ', '_') ===
|
|
4487
|
+
'TELL_US_MORE' ||
|
|
4488
|
+
singleSection['sectionName'].toUpperCase().replaceAll(' ', '_') ===
|
|
4489
|
+
'BASIC_DETAILS') &&
|
|
4490
|
+
isValid) {
|
|
4162
4491
|
// validation for height entered in feet
|
|
4163
4492
|
if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'FEET') {
|
|
4164
4493
|
let heightInInchesObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHTI');
|
|
4165
4494
|
let heightInFeetObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHTF');
|
|
4166
|
-
if (!this.checkIfValueIsEmpty(heightInInchesObj) &&
|
|
4495
|
+
if (!this.checkIfValueIsEmpty(heightInInchesObj) &&
|
|
4496
|
+
!this.checkIfValueIsEmpty(heightInFeetObj) &&
|
|
4497
|
+
(this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionFeetInput']) ||
|
|
4498
|
+
this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionsInchesInput']))) {
|
|
4167
4499
|
isValid = false;
|
|
4168
4500
|
// if (this.sharedService.isMandatoryField && !savedraft && redirect) {
|
|
4169
4501
|
// if (this.sharedService.selectedQuestionTab !== singlePersonObj['role']) {
|
|
@@ -4189,7 +4521,8 @@ class MedialQuestionsComponent {
|
|
|
4189
4521
|
let heightInCentimeterObj = singleSection['questions'].filter((obj) => obj['cammundaQuestionCode'] === 'QHT');
|
|
4190
4522
|
if (this.personUwAnswers['medicalQuestionsHeightUnit'] === 'CM' &&
|
|
4191
4523
|
this.checkIfValueIsEmpty(this.personUwAnswers['medicalQuestionsHeightInput']) &&
|
|
4192
|
-
!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
4524
|
+
!this.checkIfValueIsEmpty(heightInCentimeterObj) &&
|
|
4525
|
+
isValid) {
|
|
4193
4526
|
isValid = false;
|
|
4194
4527
|
}
|
|
4195
4528
|
}
|
|
@@ -4207,11 +4540,11 @@ class MedialQuestionsComponent {
|
|
|
4207
4540
|
singleQuestionObj['cammundaQuestionCode'] !== 'QHTF' &&
|
|
4208
4541
|
singleQuestionObj['cammundaQuestionCode'] !== 'QHTI' &&
|
|
4209
4542
|
singleQuestionObj['optionalQuestion'].toString() === 'N' &&
|
|
4210
|
-
this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestionObj['questionId']])
|
|
4543
|
+
this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestionObj['questionId']]) &&
|
|
4211
4544
|
// ((singleQuestionObj['questionType'] !== 'CHECKBOX' &&
|
|
4212
4545
|
// this.checkIfValueIsEmpty(this.personUwAnswers[singlePersonObj['role']][singleQuestionObj['questionId']])) ||
|
|
4213
4546
|
// (singleQuestionObj['questionType'] === 'CHECKBOX' && !this.validateCheckBoxField(singleQuestionObj, singlePersonObj['role'])))
|
|
4214
|
-
|
|
4547
|
+
isValid) {
|
|
4215
4548
|
isValid = false;
|
|
4216
4549
|
}
|
|
4217
4550
|
// if (
|
|
@@ -4252,17 +4585,21 @@ class MedialQuestionsComponent {
|
|
|
4252
4585
|
// }
|
|
4253
4586
|
// }
|
|
4254
4587
|
// validation for declaration questions
|
|
4255
|
-
if (isValid &&
|
|
4588
|
+
if (isValid &&
|
|
4589
|
+
singleQuestionObj.questionType === 'DECLARATION' &&
|
|
4256
4590
|
singleQuestionObj['isShowQuestionInUI'] &&
|
|
4257
4591
|
!this.checkIfValueIsEmpty(singleQuestionObj['optionalQuestion']) &&
|
|
4258
4592
|
singleQuestionObj['optionalQuestion'] === 'N') {
|
|
4259
|
-
if (isValid &&
|
|
4593
|
+
if ((isValid &&
|
|
4260
4594
|
// !this.checkIfValueIsEmpty(this.personUwAnswers[singlePersonObj['role']]) &&
|
|
4261
4595
|
// (!this.checkIfValueIsEmpty(singleQuestionObj['domainValues']) &&
|
|
4262
4596
|
// !this.checkIfValueIsEmpty(singleQuestionObj['domainValues'][0]) &&
|
|
4263
4597
|
// !this.checkIfValueIsEmpty(singleQuestionObj['domainValues'][0]['domainInternalValue']) &&
|
|
4264
4598
|
// ((!this.checkIfValueIsEmpty(this.personUwAnswers[singlePersonObj['role']][singleQuestionObj['domainValues'][0]['domainInternalValue']]) &&
|
|
4265
|
-
this.personUwAnswers[singleQuestionObj['questionId']] ===
|
|
4599
|
+
this.personUwAnswers[singleQuestionObj['questionId']] ===
|
|
4600
|
+
'N') ||
|
|
4601
|
+
!this.personUwAnswers[singleQuestionObj['questionId']] ||
|
|
4602
|
+
this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestionObj['questionId']])
|
|
4266
4603
|
// )
|
|
4267
4604
|
// || this.checkIfValueIsEmpty(singleQuestionObj['domainValues'])
|
|
4268
4605
|
) {
|
|
@@ -4330,11 +4667,23 @@ class MedialQuestionsComponent {
|
|
|
4330
4667
|
sessionStorage.setItem('isMedicalQuestionsValid', isValid);
|
|
4331
4668
|
}
|
|
4332
4669
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MedialQuestionsComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
4333
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MedialQuestionsComponent, isStandalone: true, selector: "lib-medial-questions", inputs: { medialQuestionResponse: { classPropertyName: "medialQuestionResponse", publicName: "medialQuestionResponse", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "addressInput", first: true, predicate: ["addressInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div *ngFor=\"let section of questionList\">\r\n <div\r\n *ngIf=\"\r\n !checkIfValueIsEmpty(section['questions']) &&\r\n section['showSection']\r\n \"\r\n class=\"card p-3 my-2\"\r\n id=\"personUwMedicalQuestions\"\r\n >\r\n <h6 class=\"page-title bold-label\">\r\n {{ getTitleCase(section[\"sectionName\"]) }}\r\n </h6>\r\n <div *ngFor=\"let questions of section['questions']\">\r\n <!-- <div *ngIf=\"questions['questionType'] === 'IMAGE TEXT'\">\r\n <img [src]=\"questions['sampleS3Link']\" class=\"d-block mx-auto\" [alt]=\"questions['title']\">\r\n <h3 [innerHTML]=\"questions['questionText']\"></h3>\r\n </div> -->\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'FREE TEXT' &&\r\n questions['cammundaQuestionCode'] !== 'QHT' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- <label class=\"field-lable d-block\"\r\n >{{ questions[\"questionText\"] }}\r\n <span\r\n *ngIf=\"\r\n questions.optionalQuestion === 'N'\r\n \"\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label> -->\r\n <div class=\"col-12 px-0\">\r\n <lib-textbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (blur)=\"removeSubQuestionValues()\" />\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <label class=\"card-topic d-block field-lable\"\r\n >Height\r\n <span\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label>\r\n <div\r\n class=\"col-auto px-0 my-0 py-0 heightinput\"\r\n\r\n >\r\n <div\r\n class=\"col-7 py-0 heightInputs\"\r\n style=\"transform: translate(6px, 3px);\"\r\n *ngIf=\"\r\n personUwAnswers['medicalQuestionsHeightUnit'] === 'CM'\r\n \"\r\n >\r\n <lib-textbox [field]=\"questions['field']\" />\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n <div\r\n class=\"py-0\"\r\n style=\"display: flex;\"\r\n *ngIf=\"\r\n personUwAnswers[\r\n 'medicalQuestionsHeightUnit'\r\n ] === 'FEET'\r\n \"\r\n >\r\n <div class=\"col-4 py-0 heightInputs px-1\">\r\n <lib-select [field]=\"medQuestionObj['QHTF']['field']\" />\r\n </div>\r\n <div class=\"col-4 py-0 heightInputs px-1\">\r\n <lib-select [field]=\"medQuestionObj['QHTI']['field']\" />\r\n </div>\r\n <div\r\n class=\"col-4 py-0 heightInputs px-1\"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"row mt-0 pt-0\"\r\n *ngIf=\"\r\n questions['questionType'] === 'MAP' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n\r\n\r\n <div class=\"map-container\">\r\n <div class=\"address-search-container mb-3\">\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Longitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"longitude\"\r\n placeholder=\"Enter longitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Latitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"latitude\"\r\n placeholder=\"Enter latitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n </div>\r\n\r\n <input\r\n #addressInput\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"Search for address\"\r\n (keyup)=\"onAddressInputKeyup($event)\"\r\n (focus)=\"showDropdown = true\"\r\n (blur)=\"onInputBlur()\"\r\n autocomplete=\"off\"\r\n >\r\n <div\r\n *ngIf=\"showDropdown && addressSuggestions.length > 0\"\r\n class=\"autocomplete-dropdown position-absolute w-100 mt-1\"\r\n style=\"z-index: 1000; max-height: 200px; overflow-y: auto; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\"\r\n >\r\n <div\r\n *ngFor=\"let suggestion of addressSuggestions; let i = index\"\r\n class=\"dropdown-item p-2\"\r\n style=\"cursor: pointer; border-bottom: 1px solid #eee;\"\r\n (mousedown)=\"selectAddress(suggestion)\"\r\n (mouseenter)=\"hoveredIndex = i\"\r\n [class.bg-light]=\"hoveredIndex === i\"\r\n >\r\n <div class=\"fw-bold\">{{ suggestion.main_text }}</div>\r\n <small class=\"text-muted\">{{ suggestion.secondary_text }}</small>\r\n </div>\r\n </div>\r\n <small class=\"text-muted\">Start typing to search for addresses</small>\r\n </div>\r\n <google-map [center]=\"center\" [zoom]=\"zoom\">\r\n <map-marker [position]=\"currentCoordinates\"></map-marker>\r\n </google-map>\r\n </div>\r\n </div>\r\n\r\n\r\n <div\r\n class=\"medicalQues\"\r\n *ngIf=\"\r\n (questions['questionType'] === 'RADIO BUTTON' ||\r\n questions['questionType'] === 'ADDMORE') &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-radio [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CHECKBOX' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-multiple-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DECLARATION' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-checkbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DROPDOWN' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CALENDAR' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-dob [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <!-- <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n </div> -->\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DOCUPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-upload [field]=\"questions['field']\" />\r\n </div>\r\n\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'PASSPORT_UPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- pending -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n", styles: [".map-container{width:100%;position:relative}.address-search-container{position:relative}.address-search-container input{width:100%;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}.address-search-container input:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 2px #4285f433}.pac-container{z-index:10000!important;border-radius:4px;border:1px solid #ddd;box-shadow:0 2px 6px #0000004d}.pac-item{padding:10px;border-bottom:1px solid #eee;cursor:pointer}.pac-item:hover{background-color:#f5f5f5}.selected-address{padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #28a745}.map-container ::ng-deep google-map>div{height:400px!important;width:auto!important}.medicalQues{font-size:12px;font-style:normal;font-weight:400;line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: TextboxComponent, selector: "lib-textbox", inputs: ["field", "reactiveFormControlobject"], outputs: ["blur"] }, { kind: "component", type: RadioComponent, selector: "lib-radio", inputs: ["reactiveFormControlobject", "field"], outputs: ["change"] }, { kind: "component", type: CheckboxComponent, selector: "lib-checkbox", inputs: ["field", "reactiveFormControlobject"], outputs: ["change"] }, { kind: "component", type: SelectComponent, selector: "lib-select", inputs: ["field", "reactiveFormControlobject"], outputs: ["selectionChange"] }, { kind: "component", type: DobComponent, selector: "lib-dob", inputs: ["field", "reactiveFormControlobject"], outputs: ["blur"] }, { kind: "component", type: UploadComponent, selector: "lib-upload", inputs: ["field", "reactiveFormControlobject"], outputs: ["filesChanged", "fileRemoved"] }, { kind: "component", type: MultipleSelectComponent, selector: "lib-multiple-select", inputs: ["field", "reactiveFormControlobject"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: GoogleMapsModule }, { kind: "component", type: i3$1.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapId", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "directive", type: i3$1.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged", "markerInitialized"], exportAs: ["mapMarker"] }] });
|
|
4670
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MedialQuestionsComponent, isStandalone: true, selector: "lib-medial-questions", inputs: { medialQuestionResponse: { classPropertyName: "medialQuestionResponse", publicName: "medialQuestionResponse", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "addressInput", first: true, predicate: ["addressInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<div *ngFor=\"let section of questionList\">\r\n <div\r\n *ngIf=\"\r\n !checkIfValueIsEmpty(section['questions']) &&\r\n section['showSection']\r\n \"\r\n class=\"card p-3 my-2\"\r\n id=\"personUwMedicalQuestions\"\r\n >\r\n <h6 class=\"page-title bold-label\">\r\n {{ getTitleCase(section[\"sectionName\"]) }}\r\n </h6>\r\n <div *ngFor=\"let questions of section['questions']\">\r\n <!-- <div *ngIf=\"questions['questionType'] === 'IMAGE TEXT'\">\r\n <img [src]=\"questions['sampleS3Link']\" class=\"d-block mx-auto\" [alt]=\"questions['title']\">\r\n <h3 [innerHTML]=\"questions['questionText']\"></h3>\r\n </div> -->\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'FREE TEXT' &&\r\n questions['cammundaQuestionCode'] !== 'QHT' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- <label class=\"field-lable d-block\"\r\n >{{ questions[\"questionText\"] }}\r\n <span\r\n *ngIf=\"\r\n questions.optionalQuestion === 'N'\r\n \"\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label> -->\r\n <div class=\"col-12 px-0\">\r\n <lib-textbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (blur)=\"removeSubQuestionValues()\" />\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <label class=\"card-topic d-block field-lable\"\r\n >Height\r\n <span\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label>\r\n <div\r\n class=\"col-auto px-0 my-0 py-0 heightinput\"\r\n\r\n >\r\n <div class=\"row col-12\" *ngIf=\"personUwAnswers['medicalQuestionsHeightUnit'] === 'CM'\">\r\n <div class=\"col-7 py-0 heightInputs\">\r\n <lib-textbox [field]=\"medQuestionObj['QHT']['field']\" />\r\n </div>\r\n <div class=\"col-5\">\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n <div\r\n class=\"row col-12 mx-1\"\r\n *ngIf=\"\r\n personUwAnswers[\r\n 'medicalQuestionsHeightUnit'\r\n ] === 'FEET'\r\n \"\r\n >\r\n <div class=\"col-4 py-0\">\r\n <lib-select [field]=\"medQuestionObj['QHTF']['field']\" />\r\n </div>\r\n <div class=\"col-4 py-0\">\r\n <lib-select [field]=\"medQuestionObj['QHTI']['field']\" />\r\n </div>\r\n <div\r\n class=\"col-4 py-0\"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"row mt-0 pt-0\"\r\n *ngIf=\"\r\n questions['questionType'] === 'MAP' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n\r\n\r\n <div class=\"map-container\">\r\n <div class=\"address-search-container mb-3\">\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Longitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"longitude\"\r\n placeholder=\"Enter longitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Latitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"latitude\"\r\n placeholder=\"Enter latitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n </div>\r\n\r\n <input\r\n #addressInput\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"Search for address\"\r\n (keyup)=\"onAddressInputKeyup($event)\"\r\n (focus)=\"showDropdown = true\"\r\n (blur)=\"onInputBlur()\"\r\n autocomplete=\"off\"\r\n >\r\n <div\r\n *ngIf=\"showDropdown && addressSuggestions.length > 0\"\r\n class=\"autocomplete-dropdown position-absolute w-100 mt-1\"\r\n style=\"z-index: 1000; max-height: 200px; overflow-y: auto; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\"\r\n >\r\n <div\r\n *ngFor=\"let suggestion of addressSuggestions; let i = index\"\r\n class=\"dropdown-item p-2\"\r\n style=\"cursor: pointer; border-bottom: 1px solid #eee;\"\r\n (mousedown)=\"selectAddress(suggestion)\"\r\n (mouseenter)=\"hoveredIndex = i\"\r\n [class.bg-light]=\"hoveredIndex === i\"\r\n >\r\n <div class=\"fw-bold\">{{ suggestion.main_text }}</div>\r\n <small class=\"text-muted\">{{ suggestion.secondary_text }}</small>\r\n </div>\r\n </div>\r\n <small class=\"text-muted\">Start typing to search for addresses</small>\r\n </div>\r\n <google-map [center]=\"center\" [zoom]=\"zoom\">\r\n <map-marker [position]=\"currentCoordinates\"></map-marker>\r\n </google-map>\r\n </div>\r\n </div>\r\n\r\n\r\n <div\r\n class=\"medicalQues\"\r\n *ngIf=\"\r\n (questions['questionType'] === 'RADIO BUTTON' ||\r\n questions['questionType'] === 'ADDMORE') &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-radio [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CHECKBOX' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-multiple-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DECLARATION' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-checkbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DROPDOWN' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CALENDAR' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-dob [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <!-- <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n </div> -->\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DOCUPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-upload [field]=\"questions['field']\" />\r\n </div>\r\n\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'PASSPORT_UPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- pending -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n", styles: [".map-container{width:100%;position:relative}.address-search-container{position:relative}.address-search-container input{width:100%;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}.address-search-container input:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 2px #4285f433}.pac-container{z-index:10000!important;border-radius:4px;border:1px solid #ddd;box-shadow:0 2px 6px #0000004d}.pac-item{padding:10px;border-bottom:1px solid #eee;cursor:pointer}.pac-item:hover{background-color:#f5f5f5}.selected-address{padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #28a745}.map-container ::ng-deep google-map>div{height:400px!important;width:auto!important}.medicalQues{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.heightinput{border:2px solid #fb0;padding:10px;border-radius:4px;width:fit-content}.heightInputs{display:flex;align-items:center;gap:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: TextboxComponent, selector: "lib-textbox", inputs: ["field", "reactiveFormControlobject"], outputs: ["blur"] }, { kind: "component", type: RadioComponent, selector: "lib-radio", inputs: ["reactiveFormControlobject", "field"], outputs: ["change"] }, { kind: "component", type: CheckboxComponent, selector: "lib-checkbox", inputs: ["field", "reactiveFormControlobject"], outputs: ["change"] }, { kind: "component", type: SelectComponent, selector: "lib-select", inputs: ["field", "reactiveFormControlobject"], outputs: ["selectionChange"] }, { kind: "component", type: DobComponent, selector: "lib-dob", inputs: ["field", "reactiveFormControlobject"], outputs: ["blur"] }, { kind: "component", type: UploadComponent, selector: "lib-upload", inputs: ["field", "reactiveFormControlobject"], outputs: ["filesChanged", "fileRemoved"] }, { kind: "component", type: MultipleSelectComponent, selector: "lib-multiple-select", inputs: ["field", "reactiveFormControlobject"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: GoogleMapsModule }, { kind: "component", type: i3$1.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapId", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "directive", type: i3$1.MapMarker, selector: "map-marker", inputs: ["title", "position", "label", "clickable", "options", "icon", "visible"], outputs: ["animationChanged", "mapClick", "clickableChanged", "cursorChanged", "mapDblclick", "mapDrag", "mapDragend", "draggableChanged", "mapDragstart", "flatChanged", "iconChanged", "mapMousedown", "mapMouseout", "mapMouseover", "mapMouseup", "positionChanged", "mapRightclick", "shapeChanged", "titleChanged", "visibleChanged", "zindexChanged", "markerInitialized"], exportAs: ["mapMarker"] }] });
|
|
4334
4671
|
}
|
|
4335
4672
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MedialQuestionsComponent, decorators: [{
|
|
4336
4673
|
type: Component,
|
|
4337
|
-
args: [{ selector: 'lib-medial-questions', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, TextboxComponent, RadioComponent, CheckboxComponent, SelectComponent, DobComponent, UploadComponent, MultipleSelectComponent, GoogleMapsModule], template: "\r\n<div *ngFor=\"let section of questionList\">\r\n <div\r\n *ngIf=\"\r\n !checkIfValueIsEmpty(section['questions']) &&\r\n section['showSection']\r\n \"\r\n class=\"card p-3 my-2\"\r\n id=\"personUwMedicalQuestions\"\r\n >\r\n <h6 class=\"page-title bold-label\">\r\n {{ getTitleCase(section[\"sectionName\"]) }}\r\n </h6>\r\n <div *ngFor=\"let questions of section['questions']\">\r\n <!-- <div *ngIf=\"questions['questionType'] === 'IMAGE TEXT'\">\r\n <img [src]=\"questions['sampleS3Link']\" class=\"d-block mx-auto\" [alt]=\"questions['title']\">\r\n <h3 [innerHTML]=\"questions['questionText']\"></h3>\r\n </div> -->\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'FREE TEXT' &&\r\n questions['cammundaQuestionCode'] !== 'QHT' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- <label class=\"field-lable d-block\"\r\n >{{ questions[\"questionText\"] }}\r\n <span\r\n *ngIf=\"\r\n questions.optionalQuestion === 'N'\r\n \"\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label> -->\r\n <div class=\"col-12 px-0\">\r\n <lib-textbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (blur)=\"removeSubQuestionValues()\" />\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <label class=\"card-topic d-block field-lable\"\r\n >Height\r\n <span\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label>\r\n <div\r\n class=\"col-auto px-0 my-0 py-0 heightinput\"\r\n\r\n >\r\n <div\r\n class=\"col-7 py-0 heightInputs\"\r\n style=\"transform: translate(6px, 3px);\"\r\n *ngIf=\"\r\n personUwAnswers['medicalQuestionsHeightUnit'] === 'CM'\r\n \"\r\n >\r\n <lib-textbox [field]=\"questions['field']\" />\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n <div\r\n class=\"py-0\"\r\n style=\"display: flex;\"\r\n *ngIf=\"\r\n personUwAnswers[\r\n 'medicalQuestionsHeightUnit'\r\n ] === 'FEET'\r\n \"\r\n >\r\n <div class=\"col-4 py-0 heightInputs px-1\">\r\n <lib-select [field]=\"medQuestionObj['QHTF']['field']\" />\r\n </div>\r\n <div class=\"col-4 py-0 heightInputs px-1\">\r\n <lib-select [field]=\"medQuestionObj['QHTI']['field']\" />\r\n </div>\r\n <div\r\n class=\"col-4 py-0 heightInputs px-1\"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"row mt-0 pt-0\"\r\n *ngIf=\"\r\n questions['questionType'] === 'MAP' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n\r\n\r\n <div class=\"map-container\">\r\n <div class=\"address-search-container mb-3\">\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Longitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"longitude\"\r\n placeholder=\"Enter longitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Latitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"latitude\"\r\n placeholder=\"Enter latitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n </div>\r\n\r\n <input\r\n #addressInput\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"Search for address\"\r\n (keyup)=\"onAddressInputKeyup($event)\"\r\n (focus)=\"showDropdown = true\"\r\n (blur)=\"onInputBlur()\"\r\n autocomplete=\"off\"\r\n >\r\n <div\r\n *ngIf=\"showDropdown && addressSuggestions.length > 0\"\r\n class=\"autocomplete-dropdown position-absolute w-100 mt-1\"\r\n style=\"z-index: 1000; max-height: 200px; overflow-y: auto; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\"\r\n >\r\n <div\r\n *ngFor=\"let suggestion of addressSuggestions; let i = index\"\r\n class=\"dropdown-item p-2\"\r\n style=\"cursor: pointer; border-bottom: 1px solid #eee;\"\r\n (mousedown)=\"selectAddress(suggestion)\"\r\n (mouseenter)=\"hoveredIndex = i\"\r\n [class.bg-light]=\"hoveredIndex === i\"\r\n >\r\n <div class=\"fw-bold\">{{ suggestion.main_text }}</div>\r\n <small class=\"text-muted\">{{ suggestion.secondary_text }}</small>\r\n </div>\r\n </div>\r\n <small class=\"text-muted\">Start typing to search for addresses</small>\r\n </div>\r\n <google-map [center]=\"center\" [zoom]=\"zoom\">\r\n <map-marker [position]=\"currentCoordinates\"></map-marker>\r\n </google-map>\r\n </div>\r\n </div>\r\n\r\n\r\n <div\r\n class=\"medicalQues\"\r\n *ngIf=\"\r\n (questions['questionType'] === 'RADIO BUTTON' ||\r\n questions['questionType'] === 'ADDMORE') &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-radio [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CHECKBOX' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-multiple-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DECLARATION' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-checkbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DROPDOWN' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CALENDAR' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-dob [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <!-- <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n </div> -->\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DOCUPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-upload [field]=\"questions['field']\" />\r\n </div>\r\n\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'PASSPORT_UPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- pending -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n", styles: [".map-container{width:100%;position:relative}.address-search-container{position:relative}.address-search-container input{width:100%;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}.address-search-container input:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 2px #4285f433}.pac-container{z-index:10000!important;border-radius:4px;border:1px solid #ddd;box-shadow:0 2px 6px #0000004d}.pac-item{padding:10px;border-bottom:1px solid #eee;cursor:pointer}.pac-item:hover{background-color:#f5f5f5}.selected-address{padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #28a745}.map-container ::ng-deep google-map>div{height:400px!important;width:auto!important}.medicalQues{font-size:12px;font-style:normal;font-weight:400;line-height:normal}\n"] }]
|
|
4674
|
+
args: [{ selector: 'lib-medial-questions', standalone: true, imports: [
|
|
4675
|
+
CommonModule,
|
|
4676
|
+
FormsModule,
|
|
4677
|
+
ReactiveFormsModule,
|
|
4678
|
+
TextboxComponent,
|
|
4679
|
+
RadioComponent,
|
|
4680
|
+
CheckboxComponent,
|
|
4681
|
+
SelectComponent,
|
|
4682
|
+
DobComponent,
|
|
4683
|
+
UploadComponent,
|
|
4684
|
+
MultipleSelectComponent,
|
|
4685
|
+
GoogleMapsModule,
|
|
4686
|
+
], template: "\r\n<div *ngFor=\"let section of questionList\">\r\n <div\r\n *ngIf=\"\r\n !checkIfValueIsEmpty(section['questions']) &&\r\n section['showSection']\r\n \"\r\n class=\"card p-3 my-2\"\r\n id=\"personUwMedicalQuestions\"\r\n >\r\n <h6 class=\"page-title bold-label\">\r\n {{ getTitleCase(section[\"sectionName\"]) }}\r\n </h6>\r\n <div *ngFor=\"let questions of section['questions']\">\r\n <!-- <div *ngIf=\"questions['questionType'] === 'IMAGE TEXT'\">\r\n <img [src]=\"questions['sampleS3Link']\" class=\"d-block mx-auto\" [alt]=\"questions['title']\">\r\n <h3 [innerHTML]=\"questions['questionText']\"></h3>\r\n </div> -->\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'FREE TEXT' &&\r\n questions['cammundaQuestionCode'] !== 'QHT' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- <label class=\"field-lable d-block\"\r\n >{{ questions[\"questionText\"] }}\r\n <span\r\n *ngIf=\"\r\n questions.optionalQuestion === 'N'\r\n \"\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label> -->\r\n <div class=\"col-12 px-0\">\r\n <lib-textbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (blur)=\"removeSubQuestionValues()\" />\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <label class=\"card-topic d-block field-lable\"\r\n >Height\r\n <span\r\n style=\"color: #ee0000\"\r\n >*</span\r\n >\r\n </label>\r\n <div\r\n class=\"col-auto px-0 my-0 py-0 heightinput\"\r\n\r\n >\r\n <div class=\"row col-12\" *ngIf=\"personUwAnswers['medicalQuestionsHeightUnit'] === 'CM'\">\r\n <div class=\"col-7 py-0 heightInputs\">\r\n <lib-textbox [field]=\"medQuestionObj['QHT']['field']\" />\r\n </div>\r\n <div class=\"col-5\">\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n <div\r\n class=\"row col-12 mx-1\"\r\n *ngIf=\"\r\n personUwAnswers[\r\n 'medicalQuestionsHeightUnit'\r\n ] === 'FEET'\r\n \"\r\n >\r\n <div class=\"col-4 py-0\">\r\n <lib-select [field]=\"medQuestionObj['QHTF']['field']\" />\r\n </div>\r\n <div class=\"col-4 py-0\">\r\n <lib-select [field]=\"medQuestionObj['QHTI']['field']\" />\r\n </div>\r\n <div\r\n class=\"col-4 py-0\"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers['medicalQuestionsHeightUnit']\" [field]=\"medQuestionObj['heightObjectTypes']\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"row mt-0 pt-0\"\r\n *ngIf=\"\r\n questions['questionType'] === 'MAP' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n\r\n\r\n <div class=\"map-container\">\r\n <div class=\"address-search-container mb-3\">\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Longitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"longitude\"\r\n placeholder=\"Enter longitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n <div class=\"col-6\">\r\n <label class=\"form-label card-topic\">Latitude</label>\r\n <input\r\n type=\"number\"\r\n class=\"form-control\"\r\n [(ngModel)]=\"latitude\"\r\n placeholder=\"Enter latitude\"\r\n step=\"any\"\r\n readonly\r\n >\r\n </div>\r\n </div>\r\n\r\n <input\r\n #addressInput\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"Search for address\"\r\n (keyup)=\"onAddressInputKeyup($event)\"\r\n (focus)=\"showDropdown = true\"\r\n (blur)=\"onInputBlur()\"\r\n autocomplete=\"off\"\r\n >\r\n <div\r\n *ngIf=\"showDropdown && addressSuggestions.length > 0\"\r\n class=\"autocomplete-dropdown position-absolute w-100 mt-1\"\r\n style=\"z-index: 1000; max-height: 200px; overflow-y: auto; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\"\r\n >\r\n <div\r\n *ngFor=\"let suggestion of addressSuggestions; let i = index\"\r\n class=\"dropdown-item p-2\"\r\n style=\"cursor: pointer; border-bottom: 1px solid #eee;\"\r\n (mousedown)=\"selectAddress(suggestion)\"\r\n (mouseenter)=\"hoveredIndex = i\"\r\n [class.bg-light]=\"hoveredIndex === i\"\r\n >\r\n <div class=\"fw-bold\">{{ suggestion.main_text }}</div>\r\n <small class=\"text-muted\">{{ suggestion.secondary_text }}</small>\r\n </div>\r\n </div>\r\n <small class=\"text-muted\">Start typing to search for addresses</small>\r\n </div>\r\n <google-map [center]=\"center\" [zoom]=\"zoom\">\r\n <map-marker [position]=\"currentCoordinates\"></map-marker>\r\n </google-map>\r\n </div>\r\n </div>\r\n\r\n\r\n <div\r\n class=\"medicalQues\"\r\n *ngIf=\"\r\n (questions['questionType'] === 'RADIO BUTTON' ||\r\n questions['questionType'] === 'ADDMORE') &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-radio [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CHECKBOX' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-multiple-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DECLARATION' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-checkbox [(ngModel)]=\"personUwAnswers[questions.questionId]\" (ngModelChange)=\"removeSubQuestionValues()\" [field]=\"questions['field']\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DROPDOWN' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-select [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'CALENDAR' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-dob [(ngModel)]=\"personUwAnswers[questions.questionId]\" [field]=\"questions['field']\" (ngModelChange)=\"removeSubQuestionValues()\" />\r\n </div>\r\n\r\n <!-- <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'HEIGHTINPUT' &&\r\n questions['cammundaQuestionCode'] === 'QHTF' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n </div> -->\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'DOCUPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <lib-upload [field]=\"questions['field']\" />\r\n </div>\r\n\r\n\r\n <div\r\n class=\"\"\r\n *ngIf=\"\r\n questions['questionType'] === 'PASSPORT_UPLOAD' &&\r\n questions['isShowQuestionInUI']\r\n \"\r\n >\r\n <!-- pending -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n", styles: [".map-container{width:100%;position:relative}.address-search-container{position:relative}.address-search-container input{width:100%;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}.address-search-container input:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 2px #4285f433}.pac-container{z-index:10000!important;border-radius:4px;border:1px solid #ddd;box-shadow:0 2px 6px #0000004d}.pac-item{padding:10px;border-bottom:1px solid #eee;cursor:pointer}.pac-item:hover{background-color:#f5f5f5}.selected-address{padding:8px;background-color:#f8f9fa;border-radius:4px;border-left:3px solid #28a745}.map-container ::ng-deep google-map>div{height:400px!important;width:auto!important}.medicalQues{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.heightinput{border:2px solid #fb0;padding:10px;border-radius:4px;width:fit-content}.heightInputs{display:flex;align-items:center;gap:10px}\n"] }]
|
|
4338
4687
|
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { addressInput: [{
|
|
4339
4688
|
type: ViewChild,
|
|
4340
4689
|
args: ['addressInput']
|