diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 12a9754..51e2373 100755 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -901,6 +901,15 @@ "tslib": "^1.9.0" } }, + "@digitalhurricane/ngx-photo-editor": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@digitalhurricane/ngx-photo-editor/-/ngx-photo-editor-1.1.1.tgz", + "integrity": "sha512-1BK+8o5ciT5abeWsqog5O4dZiEOINeXv4xRJeZZT3zc143zvIRmr9eZiIjzBqDYCCBJu/K7bq9QYeaVVTV82dw==", + "requires": { + "cropperjs": ">=1.5.7", + "tslib": "^1.9.0" + } + }, "@ngtools/webpack": { "version": "7.2.4", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.2.4.tgz", @@ -1584,6 +1593,14 @@ "positioning": "^1.3.1" } }, + "angular-cropperjs": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/angular-cropperjs/-/angular-cropperjs-1.0.2.tgz", + "integrity": "sha512-S+fy+bJUdQ1BCcAJ1yQHxJiPM5yhfeQXzjvSjNqPfrvB/pWKXyDLtVu2jl5Z4QW6WhH/vQPu5wBn4/KxXIMdEw==", + "requires": { + "tslib": "^1.9.0" + } + }, "angular-draggable-droppable": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-2.0.0.tgz", @@ -2280,6 +2297,11 @@ "multicast-dns-service-types": "^1.1.0" } }, + "bootstrap": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.3.tgz", + "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3254,6 +3276,11 @@ "sha.js": "^2.4.8" } }, + "cropperjs": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.5.12.tgz", + "integrity": "sha512-re7UdjE5UnwdrovyhNzZ6gathI4Rs3KGCBSc8HCIjUo5hO42CtzyblmWLj6QWVw7huHyDMfpKxhiO2II77nhDw==" + }, "cross-spawn": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", @@ -7069,9 +7096,9 @@ "dev": true }, "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" }, "js-base64": { "version": "2.6.4", @@ -7965,6 +7992,11 @@ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, + "merge-images": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-images/-/merge-images-2.0.0.tgz", + "integrity": "sha512-bpI4j54n/Zl6ZTgxaR3xWou/lqI53RAAt8peXijW37BKqoON83LQ7XCZqtFiwzBfEXIws1isYyR06584yffAyA==" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -8393,6 +8425,22 @@ } } }, + "ngx-photo-editor": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/ngx-photo-editor/-/ngx-photo-editor-0.4.3.tgz", + "integrity": "sha512-XwrsLfU/h45SZWwnkurzHnRoXG8IEzYcrNoDFsmTyqx5p46yVRRfxIDC+IgdyTJIMJFWiMO1PGFfiXBD1UgtWA==", + "requires": { + "cropperjs": ">=1.5.12", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, "ngx-viewer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ngx-viewer/-/ngx-viewer-1.0.1.tgz", diff --git a/ng6-seed/package.json b/ng6-seed/package.json index c9fb365..3c4e937 100755 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -39,11 +39,13 @@ "@types/file-saver": "^2.0.0", "amazon-cognito-identity-js": "^2.0.30", "angular-calendar": "0.23.3", + "angular-cropperjs": "^1.0.2", "angular-notifier": "^4.1.1", "angular-sortablejs": "^2.7.0", "angular-split": "^3.0.2", "angular-tree-component": "6.1.0", "blueimp-canvas-to-blob": "^3.28.0", + "bootstrap": "^4.1.3", "chart.js": "2.6.0", "core-js": "^2.6.5", "d3": "^4.9.1", @@ -52,10 +54,11 @@ "font-awesome": "4.7.0", "hammerjs": "2.0.8", "intl": "^1.2.4", - "jquery": "^3.5.1", + "jquery": "^3.6.0", "karma-jasmine": "^1.1.1", "leaflet": "^1.4.0", "mat-video": "^2.8.1", + "merge-images": "^2.0.0", "moment": "^2.24.0", "ng-pick-datetime": "^6.0.16", "ng2-charts": "1.6.0", @@ -70,6 +73,7 @@ "ngx-mat-daterange-picker": "^1.1.4", "ngx-mat-select-search": "^1.8.0", "ngx-perfect-scrollbar": "5.0.0-7", + "ngx-photo-editor": "^0.4.3", "ngx-viewer": "^1.0.1", "node-sass": "^4.14.1", "perfect-scrollbar": "^1.3.0", @@ -92,7 +96,7 @@ "@angular/compiler-cli": "^6.1.10", "@types/aws-sdk": "^2.7.0", "@types/jasmine": "2.5.52", - "@types/jquery": "3.2.0", + "@types/jquery": "^3.2.0", "@types/node": "^8.10.46", "aws-sdk": "^2.443.0", "codelyzer": "~4.1.0", diff --git a/ng6-seed/salespd_pwa___testing___22-08-2022.zip b/ng6-seed/salespd_pwa___testing___22-08-2022.zip new file mode 100644 index 0000000..11e6308 Binary files /dev/null and b/ng6-seed/salespd_pwa___testing___22-08-2022.zip differ diff --git a/ng6-seed/src/app/app.routing.ts b/ng6-seed/src/app/app.routing.ts index 58c3981..1fe1b9e 100755 --- a/ng6-seed/src/app/app.routing.ts +++ b/ng6-seed/src/app/app.routing.ts @@ -5,9 +5,23 @@ import { AuthLayoutComponent } from './layouts/auth/auth-layout.component'; import { CognitoService} from './AwsService/cognito.service'; import { AuthGuard } from './_guard/auth.guard'; // import { SalesPdComponent } from './sales-pd/sales-pd.component'; +// let role = localStorage.g('user_role'); +// console.log(role) +var route: string = "sales-pd-list"; +const role = JSON.parse(localStorage.getItem("user_role")); + +if (role == "20") { +//Fly-hi role + route = "fly-hi" +} else { + //normal user role + route = "sales-pd-list" +} +console.log(role,route) export const AppRoutes: Routes = [{ + path: '', - redirectTo: 'sales-pd-list', + redirectTo: route, pathMatch: 'full', }, { path: '', diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html index e8afd30..57777db 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html @@ -55,6 +55,7 @@
{{details.sales_pd_sno}}
+ {{details.sales_pd_type_master}}
diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts index 571e6f7..f8a53a5 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts @@ -66,6 +66,7 @@ export class FlyHiListComponent implements OnInit { this.roleID = localStorage.getItem('user_role') this.flyHiData = res['records']; + console.log(this.flyHiData) this.dataLengthTab4 = res['records'].length; this.dataSourceTab4.data = this.flyHiData; this.recordStatus=false diff --git a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts index dc622df..dbc972d 100644 --- a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts +++ b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts @@ -54,7 +54,7 @@ export class FormComponent implements OnInit { private awsService:AwsService,private loaderService:LoaderService) { this.role_id = localStorage.getItem('LenderRoleID') console.log(jsonData) - this.questions_JSON = this.jsonData.Json['sections'][0]; + this.questions_JSON = this.jsonData.Json['sections'][0]; // this.questions_JSON = this.jsonData.Json['sections'][0]; this.notifier = notifier; } @@ -228,6 +228,8 @@ export class FormComponent implements OnInit { loadTemplate() { this.commonFormGroup = new FormGroup({}) + + this.questions_JSON = this.jsonData.Json['sections'][0]; console.log(this.questions_JSON) diff --git a/ng6-seed/src/app/fly-hi/services/flyhi.service.ts b/ng6-seed/src/app/fly-hi/services/flyhi.service.ts index 729f1f9..5ac0ef5 100644 --- a/ng6-seed/src/app/fly-hi/services/flyhi.service.ts +++ b/ng6-seed/src/app/fly-hi/services/flyhi.service.ts @@ -107,19 +107,19 @@ loadCreditPDTemplate2(form_id,mapid,Formname,template_id):Observable { } -loadTemplate(form_id,mapid,Formname) { - console.log( Formname) +loadTemplatelocal() { + // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/'+form_id+'.json').map(rr=>{ // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/16.json').map(rr=>{ - if( Formname == 'Business Information'){ - return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json').map(rr=>{ - // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/'+form_id+'.json').map(rr=>{ - let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}} - // this.raw_credit_pd_template= returnValue.records.template - return returnValue - }) + // if( Formname == 'Business Information'){ + // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json').map(rr=>{ + // // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/'+form_id+'.json').map(rr=>{ + // let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}} + // // this.raw_credit_pd_template= returnValue.records.template + // return returnValue + // }) - }else{ + // }else{ // return this._http.get(this.apiUrl + "formWiseJSONTemplateV2?form_id="+form_id+"&map_id="+mapid+"").map(result=>{ // console.log(result) // let apivalue ={dataStatus:true,status:200,records:{template:JSON.stringify(result)}} @@ -127,13 +127,13 @@ loadTemplate(form_id,mapid,Formname) { // return apivalue // }) //return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/all/'+form_id+'.json').map(rr=>{ - return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/DONE/6.json').map(rr=>{ + return this._http.get('assets/data/flyhi.json').map(rr=>{ let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}} // this.raw_credit_pd_template= returnValue.records.template console.log("12345") return returnValue }) - } + // } } diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 65cda0d..a8f2752 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -906,4 +906,15 @@ loadTemplate(form_id) { ) } + getBase64ImageFromURL(url): Observable { + return this._http.post(this.apiUrl + 'convertBase64', { "img_url":url }) + .pipe(catchError(this.handleError('role', []))) + } + + updatePDPhoto(values): Observable { + values.fk_updatedby = this._aws.getlocale(); + return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values }) + .pipe(catchError(this.handleError('role', []))) + } + } diff --git a/ng6-seed/src/app/sales-pd/components/components.module.ts b/ng6-seed/src/app/sales-pd/components/components.module.ts index c550da0..3cf99fb 100755 --- a/ng6-seed/src/app/sales-pd/components/components.module.ts +++ b/ng6-seed/src/app/sales-pd/components/components.module.ts @@ -12,13 +12,17 @@ import { SingleCaptureBtnComponent } from './ques-template/single-capture-btn/si import { QuestionServiceService } from '../services/question-service.service'; import { SharedModule } from 'app/shared/shared.module'; import { MaterialModule } from '../material_modules/material.module'; + + +import { ImageEditComponent } from './ques-template/image-edit/image-edit.component'; +import { AngularCropperjsModule } from 'angular-cropperjs'; //import { SharedModule } from '../../../Shared/shared.module'; - + @NgModule({ - declarations: [QuesTemplateComponent, CaptureBtnComponent, SingleCaptureBtnComponent], + declarations: [QuesTemplateComponent, CaptureBtnComponent, SingleCaptureBtnComponent, ImageEditComponent], imports: [MatButtonToggleModule, MatAutocompleteModule, MatCardModule, @@ -53,8 +57,11 @@ import { MaterialModule } from '../material_modules/material.module'; MatStepperModule, MatFormFieldModule, NgxMatSelectSearchModule, + AngularCropperjsModule, + ReactiveFormsModule], - exports: [QuesTemplateComponent], + exports: [QuesTemplateComponent,CaptureBtnComponent, SingleCaptureBtnComponent,ImageEditComponent], + entryComponents: [ImageEditComponent], providers:[QuestionServiceService] }) export class ComponentsModule {} diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.html b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.html new file mode 100644 index 0000000..6da9334 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.html @@ -0,0 +1,216 @@ + +
+
+
+ + Photograph's Editing Tools +
+
+ +
+ +
+
+ +
+ +
+ + +
+
+
+
+
+
+
+
Images:
+
+ +
+
+ +
Toolbar:
+
+
+ + +
+ +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + + +
+ + +
+ + +
+ +
+ + + +
+ +
+
+ +
+ +
+
+
+
+
+ + +
+ + +
+
+
+
+
+
+
+ +
+
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.scss b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.scss new file mode 100644 index 0000000..6dc6278 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.scss @@ -0,0 +1,170 @@ +// @import "~bootstrap/dist/css/bootstrap.min.css"; + +.crop-res img { + max-width: 100%; +} +.btn-group, .btn-group-vertical { + position: relative; + display: -ms-inline-flexbox; + display: inline-flex; + vertical-align: middle; +} +.docs-buttons > .btn, .docs-buttons > .btn-group, .docs-buttons > .form-control { + margin-bottom: .5rem; + margin-right: .25rem; +} + +/*** animation preloader ***/ +.container-preloader { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + display: flex; +} + +.dash { + margin: 0 15px; + width: 35px; + height: 15px; + border-radius: 8px; + background: #FF2CBD; + box-shadow: 0 0 10px 0 #FECDFF; +} + +.uno { + margin-right: -18px; + transform-origin: center left; + animation: spin 3s linear infinite; +} + +.dos { + transform-origin: center right; + animation: spin2 3s linear infinite; + animation-delay: .2s; +} + +.tres { + transform-origin: center right; + animation: spin3 3s linear infinite; + animation-delay: .3s; +} + +.cuatro { + transform-origin: center right; + animation: spin4 3s linear infinite; + animation-delay: .4s; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 25% { + transform: rotate(360deg); + } + 30% { + transform: rotate(370deg); + } + 35% { + transform: rotate(360deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes spin2 { + 0% { + transform: rotate(0deg); + } + 20% { + transform: rotate(0deg); + } + 30% { + transform: rotate(-180deg); + } + 35% { + transform: rotate(-190deg); + } + 40% { + transform: rotate(-180deg); + } + 78% { + transform: rotate(-180deg); + } + 95% { + transform: rotate(-360deg); + } + 98% { + transform: rotate(-370deg); + } + 100% { + transform: rotate(-360deg); + } +} + +@keyframes spin3 { + 0% { + transform: rotate(0deg); + } + 27% { + transform: rotate(0deg); + } + 40% { + transform: rotate(180deg); + } + 45% { + transform: rotate(190deg); + } + 50% { + transform: rotate(180deg); + } + 62% { + transform: rotate(180deg); + } + 75% { + transform: rotate(360deg); + } + 80% { + transform: rotate(370deg); + } + 85% { + transform: rotate(360deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes spin4 { + 0% { + transform: rotate(0deg); + } + 38% { + transform: rotate(0deg); + } + 60% { + transform: rotate(-360deg); + } + 65% { + transform: rotate(-370deg); + } + 75% { + transform: rotate(-360deg); + } + 100% { + transform: rotate(-360deg); + } +} + +.thumb { + border-radius: 4px; + height: 100px; + object-fit: contain; + width: 100px; + border: solid 1px #cccccc; + padding: 2px; + margin: 3px; + cursor: pointer; +} \ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.spec.ts b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.spec.ts new file mode 100644 index 0000000..b844315 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ImageEditComponent } from './image-edit.component'; + +describe('ImageEditComponent', () => { + let component: ImageEditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ImageEditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ImageEditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.ts b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.ts new file mode 100644 index 0000000..7b7bf18 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/components/ques-template/image-edit/image-edit.component.ts @@ -0,0 +1,173 @@ +// import { Component, Inject, OnInit } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { DomSanitizer } from '@angular/platform-browser'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; +import {AfterViewInit, Component, ElementRef, ViewChild,OnInit, Inject} from '@angular/core'; +import {CropperComponent} from 'angular-cropperjs'; +import mergeImages from 'merge-images'; + +declare var $: any; +@Component({ + selector: 'app-image-edit', + templateUrl: './image-edit.component.html', + styleUrls: ['./image-edit.component.scss'] +}) +export class ImageEditComponent implements AfterViewInit { + + imageUrl: any; + imageUrls = []; + cropperRes: string; + showCropper: boolean; + savedImg: boolean; + resizedBase64: any; + cropperConfig: object = { + movable: true, + scalable: true, + zoomable: true, + viewMode: 2, + checkCrossOrigin: true + }; + text = ''; + downloadLink = ''; + cropperResults = []; + mergedRes: any; + + @ViewChild('angularCropper') public angularCropper: CropperComponent; + @ViewChild("canvasEl") canvasEl: ElementRef; + private context: CanvasRenderingContext2D; + role_id: string; + + constructor(@Inject(MAT_DIALOG_DATA) public data,private dialogRef: MatDialogRef ) { + console.log(this.data) + this.role_id = localStorage.getItem('LenderRoleID') + this.imageUrls.push(this.data); + // this.onFileSelected(this.data) + + } + + ngAfterViewInit() { + this.context = (this.canvasEl + .nativeElement as HTMLCanvasElement).getContext("2d"); + this.draw(''); + } + + private draw(src: string) { + this.context.clearRect(0, 0, (this.canvasEl.nativeElement as HTMLCanvasElement).width, (this.canvasEl.nativeElement as HTMLCanvasElement).height); + const img = new Image(); + img.src = src; + img.onload = () => { + const newW = img.width > 700 && img.height > 700 ? img.width / 3 : img.width; + const newH = img.height > 700 && img.width > 700 ? img.height / 3 : img.height; + (this.canvasEl.nativeElement as HTMLCanvasElement).width = newW; + (this.canvasEl.nativeElement as HTMLCanvasElement).height = newH; + this.context.font = "30px Arial"; + this.context.textBaseline = "middle"; + this.context.textAlign = "center"; + this.context.drawImage(img, 0, 0, newW, newH); + this.context.fillText(this.text, newW / 2, newH / 2); + this.downloadLink = this.canvasEl.nativeElement.toDataURL("image/jpg"); + this.cropperResults.push(this.downloadLink); + console.log( this.downloadLink ) + } + } + + onFileSelected(event) { + console.log(event) + const that = this; + if (event.target.files && event.target.files[0]) { + for (let i = 0; i < event.target.files.length; i++) { + const reader = new FileReader(); + that.showCropper = false; + reader.onload = (eventCurr: ProgressEvent) => { + that.imageUrls.push((eventCurr.target).result); + console.log(that.imageUrls) + }; + reader.readAsDataURL(event.target.files[i]); + } + } + } + + selectImg(i: number) { + this.refreshCrop(this.imageUrls[i]); + } + + refreshCrop(img) { + this.imageUrl = img; + this.showCropper = true; + } + + cropendImage(event) { + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + readyImage(event) { + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + rotate(turn) { + turn = turn === 'left' ? -45 : 45; + this.angularCropper.cropper.rotate(turn); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + destroy(event) { + this.angularCropper.cropper.destroy(); + } + + zoomManual() { + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + zoom(status) { + status = status === 'positive' ? 0.1 : -0.1; + this.angularCropper.cropper.zoom(status); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + move(offsetX, offsetY) { + this.angularCropper.cropper.move(offsetX, offsetY); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + scale(offset) { + if (offset === 'x') { + this.angularCropper.cropper.scaleX(-1); + } else { + this.angularCropper.cropper.scaleY(-1); + } + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + clear() { + this.angularCropper.cropper.clear(); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + disable() { + this.angularCropper.cropper.disable(); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + enable() { + this.angularCropper.cropper.enable(); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + reset() { + this.angularCropper.cropper.reset(); + this.cropperRes = this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg'); + } + + saveImg() { + this.savedImg = true; + this.draw(this.cropperRes); + console.log(this.cropperRes) + } + + mergeAll() { + mergeImages(this.cropperResults) + .then(b64 => this.mergedRes = b64); + } + +} diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html index 5d7c29a..a907792 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html @@ -74,7 +74,30 @@
-
+
+ +
+
+ +
+ + + + +
+
+
+

Image is not captured.

diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss index 07ea1f7..4812461 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss @@ -71,4 +71,25 @@ ::ng-deep .mat-option-text.mat-option-text { white-space: normal; - } \ No newline at end of file + } + + .top .thumbnail{ + //height: 400px; + position: relative; + + } + + .top .thumbnail .date { + // margin-right: 13px; + position: absolute; + right: -10px; + top: 4px; + background-color: #e00201 ; + } + .top .thumbnail .date1 { + // margin-right: 13px; + position: absolute; + right: -10px; + top: 50px; + background-color: #e00201 ; + } \ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts index 1d28b89..8e3b81f 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts @@ -26,6 +26,7 @@ import { SectionListComponent } from 'app/sales-pd/section-list/section-list.com import { CameraService } from 'app/sales-pd/providers/camera/camera.service'; import { ApiServiceService } from 'app/lender-credit-pd/services/apiService/api-service.service'; +import { ImageEditComponent } from './image-edit/image-edit.component'; // const originFormControlNameNgOnChanges = FormControlName.prototype.ngOnChanges; // FormControlName.prototype.ngOnChanges = function () { // const result = originFormControlNameNgOnChanges.apply(this, arguments); @@ -699,7 +700,7 @@ this.proceedonChangeProperty(modified) } else { geoCoordinates = null; } - console.log(geoCords); + console.log(geoCords,reader.result); console.log(this.imageData); console.log(this.current_index); this.current_index = parent_index; @@ -1778,8 +1779,8 @@ this.proceedonChangeProperty(modified) // alert('b'); const dialogRef = this.dialog.open(AlertDialogComponent, { width: '500px', - data: {buttons:[{name:"Complete",visible:true,id:'Complete'},{name:'Cancel',visible:'true',id:'cancel'}],title:'Complete PD', - msg:'You are completing this PD, once completed you will not be able to make changes'} + data: {buttons:[{name:"Complete",visible:true,id:'Complete'},{name:'Cancel',visible:'true',id:'cancel'}],title:'Complete Verification', + msg:'You are completing this Verification, once completed you will not be able to make changes'} }); dialogRef.afterClosed().subscribe(data => { @@ -2061,4 +2062,24 @@ this.proceedonChangeProperty(modified) } }); } + imageCrop(pic) { + + // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id} + //pic.pdid = this.pdid; + const imageRef = this.dialog.open(ImageEditComponent, { + // const imageRef = this.dialog.open(CropToolsComponent, { + data: pic, + maxWidth: '100vw', + maxHeight: '100vh', + height: '200%', + width: '100%', + }); + imageRef.afterClosed() + .subscribe(dataresult => { + // if (dataresult == 1) { + // this.documentsAndFilesList = []; + // this.retriveFile(); + // } + }); + } } diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/single-capture-btn/single-capture-btn.component.ts b/ng6-seed/src/app/sales-pd/components/ques-template/single-capture-btn/single-capture-btn.component.ts index 885a043..4cb4d1e 100644 --- a/ng6-seed/src/app/sales-pd/components/ques-template/single-capture-btn/single-capture-btn.component.ts +++ b/ng6-seed/src/app/sales-pd/components/ques-template/single-capture-btn/single-capture-btn.component.ts @@ -1,6 +1,8 @@ import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; import { Ng2ImgMaxService } from 'ng2-img-max'; import { LoaderService } from 'app/shared/loaderService/loader.service'; +import { MatDialog } from '@angular/material'; +import { ImageEditComponent } from '../image-edit/image-edit.component'; @Component({ selector: 'app-single-capture-btn', @@ -16,7 +18,7 @@ export class SingleCaptureBtnComponent implements OnInit { sales_pd_type: string; role_id: string; - constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) { + constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService,private dialog: MatDialog) { this.role_id = localStorage.getItem('user_role') this.sales_pd_type = localStorage.getItem('sales_pd_type') console.log(this.sales_pd_type) @@ -29,11 +31,34 @@ export class SingleCaptureBtnComponent implements OnInit { this.loaderService.showMatSpinnerDialog('Fetching Data...') console.log(event); let imageData= event.target.files[0] + // const dialogRef = this.dialog.open(ImageEditComponent, { + // data: { 'data': event}, + // // position: { right: '0'}, + // disableClose: true, + // // height: '80%', + + // minWidth: '80%', + // maxWidth: '80%', + + + // }); + // dialogRef.afterClosed() + // .subscribe(dataresult => { + // console.log(dataresult) + + // // if(dataresult == 1){ + // // this.getApiData() + // // } + + + + + // }); this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe( result => { - - this.singleDataEmitter.emit(result) + console.log(result); + // this.singleDataEmitter.emit(result) this.loaderService.closeMatSpinnerDialog() }, error => { diff --git a/ng6-seed/src/app/sales-pd/section-list/section-list.component.ts b/ng6-seed/src/app/sales-pd/section-list/section-list.component.ts index ec37d03..854d111 100644 --- a/ng6-seed/src/app/sales-pd/section-list/section-list.component.ts +++ b/ng6-seed/src/app/sales-pd/section-list/section-list.component.ts @@ -349,7 +349,19 @@ export class SectionListComponent implements OnInit { OnSelectDirectForms(section_id) { - console.log('339') + console.log('339',this.raw_data) + + // this.SalesPDService.loadTemplatelocal().subscribe(result=>{ + // let res:any = result.records + // console.log( res.template) + // if (res.hasOwnProperty('template') && res.template) { + // console.log( res) + // let res2 =JSON.parse(res.template); + // console.log( res2) + // let ww = res2.records.template + // console.log( ww) + // this.raw_data = ww + let componen_name:any = FormComponent // if(details.is_business_form == 1) { // componen_name = FormGroupComponent @@ -388,7 +400,8 @@ export class SectionListComponent implements OnInit { } }); - + // } + // }) } getTemplate(){ diff --git a/ng6-seed/src/app/sales-pd/services/sales-pd.service.ts b/ng6-seed/src/app/sales-pd/services/sales-pd.service.ts index b9fa822..c3d7c97 100644 --- a/ng6-seed/src/app/sales-pd/services/sales-pd.service.ts +++ b/ng6-seed/src/app/sales-pd/services/sales-pd.service.ts @@ -706,4 +706,33 @@ generatemail(params :any): Observable { generatesateliteimage(param:any): Observable{ return this._http.post(api_url + 'regenerateSatelliteImg',param ) } + loadTemplatelocal() { + + // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/'+form_id+'.json').map(rr=>{ + // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/16.json').map(rr=>{ + // if( Formname == 'Business Information'){ + // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json').map(rr=>{ + // // return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/'+form_id+'.json').map(rr=>{ + // let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}} + // // this.raw_credit_pd_template= returnValue.records.template + // return returnValue + // }) + + // }else{ + // return this._http.get(this.apiUrl + "formWiseJSONTemplateV2?form_id="+form_id+"&map_id="+mapid+"").map(result=>{ + // console.log(result) + // let apivalue ={dataStatus:true,status:200,records:{template:JSON.stringify(result)}} + // console.log(apivalue) + // return apivalue + // }) + //return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/all/'+form_id+'.json').map(rr=>{ + return this._http.get('assets/data/flyhi.json').map(rr=>{ + let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}} + // this.raw_credit_pd_template= returnValue.records.template + console.log("12345") + return returnValue + }) + // } + + } } diff --git a/ng6-seed/src/assets/data/flyhi.json b/ng6-seed/src/assets/data/flyhi.json index 3e58211..545076c 100644 --- a/ng6-seed/src/assets/data/flyhi.json +++ b/ng6-seed/src/assets/data/flyhi.json @@ -11,1559 +11,1376 @@ "product_id": null, "sales_pd_template_id": "14", "sales_pd_type": null, - "template": - { - "form_name":"FlyHi Discussion Sheet", - "sections":[ - { - "section_id":"1", - "section_name":"General Section", - "onsubmit":null, - "questions":[ - { - "question":"Lender Name", - "question_key":"lender_name", - "place_holder":null, - "field_width":"33", - "type":"3", - "is_disabled": "1", - "api_properties":{ - "api":"getFlyhiLenderList", - "api_method":"GET", - "fields":[ - "entity_id", - "full_name" - ] - }, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] + "template":{ + "form_name": "FlyHi Discussion Sheet", + "sections": [ + { + "section_id": "1", + "section_name": "General Section", + "onsubmit": null, + "questions": [ + { + "question": "Lender Name", + "question_key": "lender_name", + "place_holder": null, + "field_width": "33", + "type": "3", + "is_disabled": "1", + "api_properties": { + "api": "getFlyhiLenderList", + "api_method": "GET", + "fields": [ + "entity_id", + "full_name" + ] }, - { - "question":"Branch", - "question_key":"branch", - "place_holder":null, - "field_width":"33", - "type":"3", - "api_properties":{ - "api":"getFlyhiBranchList", - "api_method":"GET", - "fields":[ - "entity_lender_branch_id", - "branch_name" - ] - }, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Branch", + "question_key": "branch", + "place_holder": null, + "field_width": "33", + "type": "3", + "api_properties": { + "api": "getFlyhiBranchList", + "api_method": "GET", + "fields": [ + "entity_lender_branch_id", + "branch_name" + ] }, - { - "question":"Loan Application ID", - "question_key":"loan_application_id", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan Application ID Required", - "value":null - } - ] + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Loan Application ID", + "question_key": "loan_application_id", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Loan Application ID Required", + "value": null + } + ] + }, + { + "question": "Lender sales Person", + "question_key": "lender_sales_person", + "place_holder": null, + "field_width": "33", + "type": "3", + "api_properties": { + "api": "getFlyhiSalesPersonList", + "api_method": "GET", + "fields": [ + "userid", + "user_name" + ] }, - { - "question":"Lender sales Person", - "question_key":"lender_sales_person", - "place_holder":null, - "field_width":"33", - "type":"3", - "api_properties":{ - "api":"getFlyhiSalesPersonList", - "api_method":"GET", - "fields":[ - "userid", - "user_name" - ] - }, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Lender credit Person", + "question_key": "lender_credit_person", + "place_holder": null, + "field_width": "33", + "type": "3", + "api_properties": { + "api": "getFlyhiCreditPersonList", + "api_method": "GET", + "fields": [ + "userid", + "user_name" + ] }, - { - "question":"Lender credit Person", - "question_key":"lender_credit_person", - "place_holder":null, - "field_width":"33", - "type":"3", - "api_properties":{ - "api":"getFlyhiCreditPersonList", - "api_method":"GET", - "fields":[ - "userid", - "user_name" - ] - }, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Product Name", + "question_key": "product_name", + "place_holder": null, + "field_width": "33", + "type": "3", + "api_properties": { + "api": "getFlyhiProductList", + "api_method": "GET", + "fields": [ + "product_id", + "product_name" + ] }, - { - "question":"Product Name", - "question_key":"product_name", - "place_holder":null, - "field_width":"33", - "type":"3", - "api_properties":{ - "api":"getFlyhiProductList", - "api_method":"GET", - "fields":[ - "product_id", - "product_name" - ] - }, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] - }, - { - "question":"Applicant Name", - "question_key":"applicant_name", - "place_holder":null, - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] - }, - { - "question":"Applicant Mobile No", - "question_key":"applicant_mobile_no", - "place_holder":null, - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Company Name Required", - "value":null - } - ] - }, - { - "question":"Loan Amount", - "question_key":"loan_amount", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - - { - "question":"Verification Type", - "question_key":"verification_type", - "type":"3", - "field_width":"33", - "onchange_properties": [ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"verification_type", - "expression":"(String('verification_type') == String('Residence verification'))", - "value_keys":[ - "verification_type" - ], - "questions":[ - { - "question":"Number of Earning Family Member", - "question_key":"number_of_earning_family_member", - "field_width":"33", - "place_holder":"Enter text", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Number of earning family member Required", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Number of Dependents", - "question_key":"number_of_dependents", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Number of Dependents Required", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Same as Current Residence Address", - "question_key":"Same_as_current_residence_address", - "sub_title":"Premanent Address", - "field_width":"100", - "type":"2", - "answers":[ - { - "answer_id":"Yes", - "answer":"Yes" - }, - { - "answer_id":"No", - "answer":"No" - } - ], - "api_properties":null, - "onchange_properties": [{ - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"Same_as_current_residence_address", - "expression":"(String('Same_as_current_residence_address') == String('No'))", - "value_keys":[ - "Same_as_current_residence_address" - ], - "questions":[ - { - "question":"Pincode", - "question_key":"permanent_pincode", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_pincode", - "parent_question_key":"Same_as_current_residence_address", - "onchange_properties":[ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"permanent_pincode", - "expression":"(permanent_pincode == 1)", - "value_keys":[ - "permanent_pincode" + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Applicant Name", + "question_key": "applicant_name", + "place_holder": null, + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Company Name Required", + "value": null + } + ] + }, + { + "question": "Applicant Mobile No", + "question_key": "applicant_mobile_no", + "place_holder": null, + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations":[ + { + "name":"pattern", + "isactive":"1", + "validator":"[0-9]{10}", + "message":"Mobile number should be 10 digit", + "value":null + },{ + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Mobile Number Required", + "value": null + } + ] + + }, + { + "question": "Loan Amount", + "question_key": "loan_amount", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "numtoword", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Loan amount Required", + "value": null + } + ] + }, + { + "question": "Verification Type", + "question_key": "verification_type", + "type": "3", + "field_width": "33", + "onchange_properties": [ + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "verification_type", + "expression": "(String('verification_type') == String('Residence verification'))", + "value_keys": [ + "verification_type" + ], + "questions": [ + { + "question": "Number of Earning Family Member", + "question_key": "number_of_earning_family_member", + "field_width": "33", + "place_holder": "Enter text", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Number of earning family member Required", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Number of Dependents", + "question_key": "number_of_dependents", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Number of Dependents Required", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Same as Current Residence Address", + "question_key": "Same_as_current_residence_address", + "sub_title": "Premanent Address", + "field_width": "100", + "type": "2", + "answers": [ + { + "answer_id": "Yes", + "answer": "Yes" + }, + { + "answer_id": "No", + "answer": "No" + } + ], + "api_properties": null, + "onchange_properties": [ + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "Same_as_current_residence_address", + "expression": "(String('Same_as_current_residence_address') == String('No'))", + "value_keys": [ + "Same_as_current_residence_address" + ], + "questions": [ + { + "question": "Pincode", + "question_key": "permanent_pincode", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": "local_pincode", + "parent_question_key": "Same_as_current_residence_address", + "onchange_properties": [ + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "permanent_pincode", + "expression": "(permanent_pincode == 1)", + "value_keys": [ + "permanent_pincode" ], - "questions":[ - { - "question_key":"permanent_pincode_others", - "question":"Specify the Pincode", - "place_holder":"Enter the Pincode", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode is Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[0-9]{6}", - "message":"Pincode should be 6 digit", - "value":null - } - ] - } + "questions": [ + { + "question_key": "permanent_pincode_others", + "question": "Specify the Pincode", + "place_holder": "Enter the Pincode", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode is Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[0-9]{6}", + "message": "Pincode should be 6 digit", + "value": null + } + ] + } ] - } - ] - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode Required", - "value":null - } - ] - }, - { - "question":"City", - "question_key":"permanent_city", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_city", - "onchange_properties":null, - "is_repeatable":null, - "parent_question_key":"Same_as_current_residence_address", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"CIty Required", - "value":null - } - ] - }, - { - "question":"State", - "question_key":"permanent_state", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":{ - "api":"getListOfMaster", - "api_method":"POST", - "params":{ - "master_name":"STATE" - }, - "fields":[ - "state_id", - "name" - ] - }, - "onchange_properties":[ - { - "purpose":"api", - "api":"getListOfStatesAndCities", - "api_method":"POST", - "params":"{records:{state_id:'value_of_answer'}}", - "fields":[ - "state_id", - "name" - ], - "local_variable":"local_city" - } - ], - "is_repeatable":null, - "parent_question_key":"Same_as_current_residence_address", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"State Required", - "value":null - } - ] - }, - { - "question":"Permanent Address", - "question_key":"permanent_address", - "place_holder":"Enter door no,street", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "parent_question_key":"Same_as_current_residence_address", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Permanent Address Required", - "value":null - } - ] - } - - ] - } - ] - }], - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] - }, - { - "question":"Years At Current Residence", - "question_key":"years_at_current_residence", - "type":"2", - "field_width":"50", - "api_properties":null, - "answers":[ - { - "answer_id":"< 1 yr", - "answer":"< 1 yr" - }, - { - "answer_id":"1-2 yrs", - "answer":"1-2 yrs" - }, - { - "answer_id":"2 to 5 yrs", - "answer":"2 to 5 yrs" - }, - { - "answer_id":"> 5 yrs", - "answer":"> 5 yrs" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Years at current Residence Field Required", - "value":null - } - ] - }, - { - "question":"Residence Ownership", - "question_key":"residence_ownership", - "type":"2", - "field_width":"50", - "api_properties":null, - "answers":[ - { - "answer_id":"self_owned", - "answer":"Self-Owned" - }, - { - "answer_id":"parental", - "answer":"Parental" - }, - { - "answer_id":"family_owned", - "answer":"Family Owned" - }, - { - "answer_id":"rented", - "answer":"Rented" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Residence Ownership Field Required", - "value":null - } - ] - }, - { - "question":[ - { - "question":"Residence Address Details", - "question_key":"residence_address", - "place_holder":"Enter door no,street", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Address Required", - "value":null - } - ] - }, - { - "question":"State", - "question_key":"residence_state", - "type":"3", - "field_width":"33", - "answers":null, - "api_properties":{ - "api":"getListOfMaster", - "api_method":"POST", - "params":{ - "master_name":"STATE" - }, - "fields":[ - "state_id", - "name" - ] - }, - "onchange_properties":[ - { - "purpose":"api2", - "api":"getListOfStatesAndCities", - "api_method":"POST", - "params":"{records:{state_id:'value_of_answer'}}", - "fields":[ - "state_id", - "name" + } + ] + } ], - "local_variable":"local_city1" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"State Required", - "value":null - } - ] - }, - { - "question":"City", - "question_key":"residence_city", - "type":"3", - "field_width":"33", - "answers":null, - "api_properties":"local_city1", - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"CIty Required", - "value":null - } - ] - }, - { - "question":"Pincode", - "question_key":"residence_pincode", - "type":"3", - "field_width":"33", - "answers":null, - "api_properties":"local_pincode1", - "onchange_properties":[ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"residence_pincode", - "expression":"(residence_pincode == 1)", - "value_keys":[ - "residence_pincode" - ], - "questions":[ - { - "question_key":"residence_pincode_others", - "question":"Specify the Pincode", - "place_holder":"Enter the Pincode", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode is Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[0-9]{6}", - "message":"Pincode should be 6 digit", - "value":null - } - ] - } - ] - } - ] - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode Required", - "value":null - } - ] - } - ], - "is_repeatable":"1", - "group_title":"Residence Details", - "group_key":"residence_details", - "form_name":"Residence Details" - } - ] - } - ] - }, - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"verification_type", - "expression":"(String('verification_type') == String('Office verification'))", - "value_keys":[ - "verification_type" - ], - "questions":[ - { - "question":"Net Monthly Salary/ Net Income", - "question_key":"net_monthly_salary_net_income", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Total Work Experience", - "question_key":"total_work_experience", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Years At Current Employment/Business", - "question_key":"years_at_current_employment_business", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Same as Current Business Address", - "question_key":"Same_as_current_business_address", - "sub_title":"Business Address", - "field_width":"100", - "type":"2", - "answers":[ - { - "answer_id":"Yes", - "answer":"Yes" - }, - { - "answer_id":"No", - "answer":"No" - } - ], - "api_properties":null, - "onchange_properties": [{ - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"Same_as_current_business_address", - "expression":"(String('Same_as_current_business_address') == String('No'))", - "value_keys":[ - "Same_as_current_business_address" - ], - "questions":[ - { - "question":"Pincode", - "question_key":"business_pincode", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_pincode1", - "onchange_properties":[ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"business_pincode", - "expression":"(business_pincode == 1)", - "value_keys":[ - "business_pincode" - ], - "questions":[ - { - "question_key":"business_pincode_others", - "question":"Specify the Pincode", - "place_holder":"Enter the Pincode", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode is Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[0-9]{6}", - "message":"Pincode should be 6 digit", - "value":null - } - ] - } - ] - } - ] - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode Required", - "value":null - } - ] - }, - { - "question":"City", - "question_key":"business_city", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_city1", - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"CIty Required", - "value":null - } - ] - }, - { - "question":"State", - "question_key":"business_state", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":{ - "api":"getListOfMaster", - "api_method":"POST", - "params":{ - "master_name":"STATE" - }, - "fields":[ - "state_id", - "name" + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode Required", + "value": null + } ] - }, - "onchange_properties":[ - { - "purpose":"api2", - "api":"getListOfStatesAndCities", - "api_method":"POST", - "params":"{records:{state_id:'value_of_answer'}}", - "fields":[ - "state_id", - "name" - ], - "local_variable":"local_city1" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"State Required", - "value":null - } - ] - }, - { - "question":"Business Address Details", - "question_key":"business_address", - "field_width":"33", - "place_holder":"Enter door no,street", - "type":"1", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Address Required", - "value":null - } - ] - } - ] - } - ] - }], - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] - }, - { - "question":"Constitution of Employer /Business Applicant", - "question_key":"constitution_of_employer_business_applicant", - "type":"2", - "field_width":"66", - "api_properties":null, - "answers":[ - { - "answer_id":"0", - "answer":"Ltd" - }, - { - "answer_id":"1", - "answer":"Pvt" - }, - { - "answer_id":"2", - "answer":"Ltd" - }, - { - "answer_id":"3", - "answer":"Trust/Society" - }, - { - "answer_id":"4", - "answer":"Partnership/LLP" - }, - { - "answer_id":"5", - "answer":"Proprietorship" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Constitution of Employer /Business applicant Required", - "value":null - } - ] - }, - { - "question":"Employer/Business Name", - "question_key":"employer_business_name", - "field_width":"33", - "place_holder":"Enter text", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Employer/Business Name Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[A-Za-z ]*", - "message":"alphabets only ", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Occupation of The Loan Applicant", - "question_key":"occupation_of_the_loan_applicant", - "field_width":"33", - "type":"2", - "api_properties":null, - "answers":[ - { - "answer_id":"0", - "answer":"Salaried" - }, - { - "answer_id":"1", - "answer":"SENP" - }, - { - "answer_id":"2", - "answer":"SEP" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Occupation of the loan applicant Required", - "value":null - } - ] - }, - { - "question":"Pincode", - "question_key":"officer_pincode", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_pincode", - "onchange_properties":[ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"officer_pincode", - "expression":"(officer_pincode == 1)", - "value_keys":[ - "officer_pincode" - ], - "questions":[ - { - "question_key":"officer_pincode_others", - "question":"Specify the Pincode", - "place_holder":"Enter the Pincode", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode is Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[0-9]{6}", - "message":"Pincode should be 6 digit", - "value":null - } - ] - } - ] - } + }, + { + "question": "City", + "question_key": "permanent_city", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": "local_city", + "onchange_properties": null, + "is_repeatable": null, + "parent_question_key": "Same_as_current_residence_address", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "CIty Required", + "value": null + } + ] + }, + { + "question": "State", + "question_key": "permanent_state", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": { + "api": "getListOfMaster", + "api_method": "POST", + "params": { + "master_name": "STATE" + }, + "fields": [ + "state_id", + "name" + ] + }, + "onchange_properties": [ + { + "purpose": "api", + "api": "getListOfStatesAndCities", + "api_method": "POST", + "params": "{records:{state_id:'value_of_answer'}}", + "fields": [ + "state_id", + "name" + ], + "local_variable": "local_city" + } + ], + "is_repeatable": null, + "parent_question_key": "Same_as_current_residence_address", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "State Required", + "value": null + } + ] + }, + { + "question": "Permanent Address", + "question_key": "permanent_address", + "place_holder": "Enter door no,street", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "parent_question_key": "Same_as_current_residence_address", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Permanent Address Required", + "value": null + } + ] + } + ] + } ] - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Pincode Required", - "value":null - } - ] - }, - { - "question":"City", - "question_key":"officer_city", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":"local_city", - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"CIty Required", - "value":null - } - ] - }, - { - "question":"State", - "question_key":"officer_state", - "field_width":"33", - "type":"3", - "answers":null, - "api_properties":{ - "api":"getListOfMaster", - "api_method":"POST", - "params":{ - "master_name":"STATE" - }, - "fields":[ + } + ], + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Field Required", + "value": null + } + ] + }, + { + "question": "Years At Current Residence", + "question_key": "years_at_current_residence", + "type": "2", + "field_width": "50", + "api_properties": null, + "answers": [ + { + "answer_id": "< 1 yr", + "answer": "< 1 yr" + }, + { + "answer_id": "1-2 yrs", + "answer": "1-2 yrs" + }, + { + "answer_id": "2 to 5 yrs", + "answer": "2 to 5 yrs" + }, + { + "answer_id": "> 5 yrs", + "answer": "> 5 yrs" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Years at current Residence Field Required", + "value": null + } + ] + }, + { + "question": "Residence Ownership", + "question_key": "residence_ownership", + "type": "2", + "field_width": "50", + "api_properties": null, + "answers": [ + { + "answer_id": "self_owned", + "answer": "Self-Owned" + }, + { + "answer_id": "parental", + "answer": "Parental" + }, + { + "answer_id": "family_owned", + "answer": "Family Owned" + }, + { + "answer_id": "rented", + "answer": "Rented" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Residence Ownership Field Required", + "value": null + } + ] + }, + { + "question": [ + { + "question": "Residence Address Details", + "question_key": "residence_address", + "place_holder": "Enter door no,street", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Address Required", + "value": null + } + ] + }, + { + "question": "State", + "question_key": "residence_state", + "type": "3", + "field_width": "33", + "answers": null, + "api_properties": { + "api": "getListOfMaster", + "api_method": "POST", + "params": { + "master_name": "STATE" + }, + "fields": [ + "state_id", + "name" + ] + }, + "onchange_properties": [ + { + "purpose": "api2", + "api": "getListOfStatesAndCities", + "api_method": "POST", + "params": "{records:{state_id:'value_of_answer'}}", + "fields": [ + "state_id", + "name" + ], + "local_variable": "local_city1" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "State Required", + "value": null + } + ] + }, + { + "question": "City", + "question_key": "residence_city", + "type": "3", + "field_width": "33", + "answers": null, + "api_properties": "local_city1", + "onchange_properties": null, + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "CIty Required", + "value": null + } + ] + }, + { + "question": "Pincode", + "question_key": "residence_pincode", + "type": "3", + "field_width": "33", + "answers": null, + "api_properties": "local_pincode1", + "onchange_properties": [ + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "residence_pincode", + "expression": "(residence_pincode == 1)", + "value_keys": [ + "residence_pincode" + ], + "questions": [ + { + "question_key": "residence_pincode_others", + "question": "Specify the Pincode", + "place_holder": "Enter the Pincode", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode is Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[0-9]{6}", + "message": "Pincode should be 6 digit", + "value": null + } + ] + } + ] + } + ] + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode Required", + "value": null + } + ] + } + ], + "is_repeatable": "1", + "group_title": "Residence Details", + "group_key": "residence_details", + "form_name": "Residence Details" + } + ] + } + ] + }, + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "verification_type", + "expression": "(String('verification_type') == String('Office verification'))", + "value_keys": [ + "verification_type" + ], + "questions": [ + { + "question": "Net Monthly Salary/ Net Income", + "question_key": "net_monthly_salary_net_income", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "numtoword", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Net Monthly Salary/ Net Income Required", + "value": null + } + ] + }, + { + "question": "Total Work Experience", + "question_key": "total_work_experience", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Total Work Experience Required", + "value": null + } + ] + }, + { + "question": "Years At Current Employment/Business", + "question_key": "years_at_current_employment_business", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Years At Current Employment/Business Required", + "value": null + } + ] + }, + + { + "question": "Constitution of Employer / Business Applicant", + "question_key": "constitution_of_employer_business_applicant", + "type": "2", + "field_width": "100", + "api_properties": null, + "answers": [ + { + "answer_id": "0", + "answer": "Public Ltd" + }, + { + "answer_id": "1", + "answer": "Private Ltd" + }, + { + "answer_id": "2", + "answer": "Ltd" + }, + { + "answer_id": "3", + "answer": "Trust/Society" + }, + { + "answer_id": "4", + "answer": "Partnership/LLP" + }, + { + "answer_id": "5", + "answer": "Proprietorship" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Constitution of Employer / Business applicant Required", + "value": null + } + ] + }, + { + "question": "Employer/Business Name", + "question_key": "employer_business_name", + "field_width": "33", + "place_holder": "Enter text", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "text", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Employer/Business Name Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[A-Za-z ]*", + "message": "alphabets only ", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Occupation of The Loan Applicant", + "question_key": "occupation_of_the_loan_applicant", + "field_width": "33", + "type": "2", + "api_properties": null, + "answers": [ + { + "answer_id": "0", + "answer": "Salaried" + }, + { + "answer_id": "1", + "answer": "SENP" + }, + { + "answer_id": "2", + "answer": "SEP" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Occupation of the loan applicant Required", + "value": null + } + ] + }, + { + "question": "Pincode", + "question_key": "officer_pincode", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": "local_pincode", + "onchange_properties": [ + { + "purpose": "FORM_CTRL", + "form_controls": [ + { + "insert_index": "officer_pincode", + "expression": "(officer_pincode == 1)", + "value_keys": [ + "officer_pincode" + ], + "questions": [ + { + "question_key": "officer_pincode_others", + "question": "Specify the Pincode", + "place_holder": "Enter the Pincode", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode is Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[0-9]{6}", + "message": "Pincode should be 6 digit", + "value": null + } + ] + } + ] + } + ] + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Pincode Required", + "value": null + } + ] + }, + { + "question": "City", + "question_key": "officer_city", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": "local_city", + "onchange_properties": null, + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "CIty Required", + "value": null + } + ] + }, + { + "question": "State", + "question_key": "officer_state", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties": { + "api": "getListOfMaster", + "api_method": "POST", + "params": { + "master_name": "STATE" + }, + "fields": [ "state_id", "name" - ] - }, - "onchange_properties":[ - { - "purpose":"api", - "api":"getListOfStatesAndCities", - "api_method":"POST", - "params":"{records:{state_id:'value_of_answer'}}", - "fields":[ - "state_id", - "name" + ] + }, + "onchange_properties": [ + { + "purpose": "api", + "api": "getListOfStatesAndCities", + "api_method": "POST", + "params": "{records:{state_id:'value_of_answer'}}", + "fields": [ + "state_id", + "name" ], - "local_variable":"local_city" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"State Required", - "value":null - } - ] - }, - { - "question":"Office Address Details", - "question_key":"officer_address", - "field_width":"33", - "place_holder":"Enter door no,street", - "type":"1", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Address Required", - "value":null - } - ] - } - ] - } - ] - } - ], - "answers":[ - { - "answer_id":"Residence verification", - "answer":"Residence verification" - }, - { - "answer_id":"Office verification", - "answer":"Office verification" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] - }, - { - "question":"Name of Student", - "sub_title":"Additional Question", - "question_key":"name_of_student", - "field_width":"100", - "place_holder":"", - "field_type":"string", - "type":"1", - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "is_subfield":"1", - "parent_question_key":"is_business_address", - "answers":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Name of Student Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[A-Za-z ]*", - "message":"alphabets only ", - "value":null - } + "local_variable": "local_city" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "State Required", + "value": null + } + ] + }, + { + "question": "Workplace Address Details", + "question_key": "officer_address", + "field_width": "33", + "place_holder": "Enter door no,street", + "type": "1", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Address Required", + "value": null + } + ] + } ] - }, - - - { - "question":"Relationship With Applicant", - "question_key":"relationship_with_applicant", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Relationship with Applicant Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[A-Za-z ]*", - "message":"alphabets only ", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Educational Institute Name", - "question_key":"educational_institute_name", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Educational Institute Name Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[A-Za-z ]*", - "message":"alphabets only ", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Educational Institute Address", - "question_key":"educational_institute_address", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Educational Institute Address Required", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Class /Section/ Course Name", - "question_key":"class_section_course_name", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "answers":null, - "api_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Class /Section/ Course Name Required", - "value":null - } - ], - "onchange_properties":null - }, - { - "question":"Educational Institute Fee", - "question_key":"educational_institute_fee", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Duration of The Course", - "question_key":"duration_of_the_course", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"str&num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Loan Amount Applied", - "question_key":"loan_amount_applied", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan amount Required", - "value":null - } - ] - }, - { - "question":"Loan Tenure", - "question_key":"loan_tenor", - "place_holder":"Enter text", - "field_width":"33", - "type":"1", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"string", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Loan Tenure Required", - "value":null - } - ] - } + } + ] + } - ] - }, - { - "section_id": "9", - "section_name": "Photograph's", - "onsubmit": [ - { - "expression": "(function () {let sum_val=null;let ques_key=[];if(control.question_key == submitProperty.key_name && control.answer_value == ''){return false}else{return true}return sum_val}())", - "key_name": "selfie_with_person_met", - "msg": "Please take selfie with person met" - } - ], - "questions": [ - { - "question": "Selfie with person met", - "question_key": "selfie_with_person_met", - "type": "6", - "answers": null, - "api_properties": null, - "onchange_properties": null, - "is_repeatable": null, - "validations": [] + ], + "answers": [ + { + "answer_id": "Residence verification", + "answer": "Residence verification" + }, + { + "answer_id": "Office verification", + "answer": "Workplace verification" + } + ], + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Field Required", + "value": null + } + ] + }, + { + "question": "Name of Student", + "sub_title": "Additional Question", + "question_key": "name_of_student", + "field_width": "100", + "place_holder": "", + "field_type": "string", + "type": "1", + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "is_subfield": "1", + "parent_question_key": "is_business_address", + "answers": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Name of Student Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[A-Za-z ]*", + "message": "alphabets only ", + "value": null + } + ] + }, + { + "question": "Relationship With Applicant", + "question_key": "relationship_with_applicant", + "place_holder": "Enter text", + "field_width": "33", + "type": "3", + "answers": null, + "api_properties":{ + "api":"getListOfMaster", + "api_method":"POST", + "params":{ + "master_name":"RELATIONSHIPS" }, - { - "question":[ - { - "question":"Approach to PD Location", - "question_key":"approach_to_pd_location", - "type":"6", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - - ] - } - ], - "is_repeatable":"1", - "group_title":"Approach to PD Location", - "group_type":"6" - }, - { - "question":[ - { - "question":"Name Board Seen", - "question_key":"name_board_seen", - "type":"6", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - - ] - } - ], - "is_repeatable":"1", - "group_title":"Name Board Seen", - "group_type":"6" - }, - { - "question":[ - { - "question":"Stock Photograph's", - "question_key":"stock_image", - "type":"6", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - - ] - } - ], - "is_repeatable":"1", - "group_title":"Stock Photograph's", - "group_type":"6" - }, - { - "question":[ - { - "question":"Workplace interior photographs", - "question_key":"workplace_interior_image", - "type":"6", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - - ] - } - ], - "is_repeatable":"1", - "group_title":"Workplace interior photographs", - "group_type":"6" - } - ] - } + "fields":[ + "relationship_id", + "name" + ] + }, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Relationship with Applicant Required", + "value": null + } + + ], + "onchange_properties": null + }, + { + "question": "Educational Institute Name", + "question_key": "educational_institute_name", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "string", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Educational Institute Name Required", + "value": null + }, + { + "name": "pattern", + "isactive": "1", + "validator": "[A-Za-z ]*", + "message": "alphabets only ", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Educational Institute Address", + "question_key": "educational_institute_address", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Educational Institute Address Required", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Class /Section/ Course Name", + "question_key": "class_section_course_name", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "answers": null, + "api_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Class /Section/ Course Name Required", + "value": null + } + ], + "onchange_properties": null + }, + { + "question": "Educational Institute Fee", + "question_key": "educational_institute_fee", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "numtoword", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Educational Institute Fee Required", + "value": null + } + ] + }, + { + "question": "Duration Of The Course (Months)", + "question_key": "duration_of_the_course", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "str&num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Duration Of The Course (Months) Required", + "value": null + } + ] + }, + { + "question": "Loan Amount Applied", + "question_key": "loan_amount_applied", + "place_holder": "Enter text", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "numtoword", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Loan amount Required", + "value": null + } + ] + }, + { + "question": "Loan Tenure In Months", + "question_key": "loan_tenor", + "place_holder": "Enter Loan Tenure In Months", + "field_width": "33", + "type": "1", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "field_type": "num", + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Loan Tenure Required", + "value": null + } + ] + } + ] + }, + { + "section_id": "9", + "section_name": "Photograph's", + "onsubmit": [ + { + "expression": "(function () {let sum_val=null;let ques_key=[];if(control.question_key == submitProperty.key_name && control.answer_value == ''){return false}else{return true}return sum_val}())", + "key_name": "selfie_with_person_met", + "msg": "Please take selfie with person met" + } + ], + "questions": [ + { + "question": "Selfie with person met", + "question_key": "selfie_with_person_met", + "type": "6", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [] + }, + { + "question": [ + { + "question": "Approach to PD Location", + "question_key": "approach_to_pd_location", + "type": "6", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [] + } + ], + "is_repeatable": "1", + "group_title": "Approach to PD Location", + "group_type": "6" + }, + { + "question": [ + { + "question": "Name Board Seen", + "question_key": "name_board_seen", + "type": "6", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [] + } + ], + "is_repeatable": "1", + "group_title": "Name Board Seen", + "group_type": "6" + }, + { + "question": [ + { + "question": "Stock Photograph's", + "question_key": "stock_image", + "type": "6", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [] + } + ], + "is_repeatable": "1", + "group_title": "Stock Photograph's", + "group_type": "6" + }, + { + "question": [ + { + "question": "Workplace interior photographs", + "question_key": "workplace_interior_image", + "type": "6", + "answers": null, + "api_properties": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [] + } + ], + "is_repeatable": "1", + "group_title": "Workplace interior photographs", + "group_type": "6" + } + ] + } ] - } + } + } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d5d59e6..48e341a 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,3 @@ { - "name": "sparq-lender", - "lockfileVersion": 2, - "requires": true, - "packages": {} + "lockfileVersion": 1 } diff --git a/package.json b/package.json index b44c264..18a1e41 100644 --- a/package.json +++ b/package.json @@ -1,2 +1,3 @@ -{} - \ No newline at end of file +{ + "dependencies": {} +}