flyhi feedback changes
This commit is contained in:
parent
237054366a
commit
dd09b06cc3
54
ng6-seed/package-lock.json
generated
54
ng6-seed/package-lock.json
generated
@ -901,6 +901,15 @@
|
|||||||
"tslib": "^1.9.0"
|
"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": {
|
"@ngtools/webpack": {
|
||||||
"version": "7.2.4",
|
"version": "7.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.2.4.tgz",
|
||||||
@ -1584,6 +1593,14 @@
|
|||||||
"positioning": "^1.3.1"
|
"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": {
|
"angular-draggable-droppable": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-2.0.0.tgz",
|
"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"
|
"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": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
@ -3254,6 +3276,11 @@
|
|||||||
"sha.js": "^2.4.8"
|
"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": {
|
"cross-spawn": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
|
||||||
@ -7069,9 +7096,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.5.1",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||||
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
|
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||||
},
|
},
|
||||||
"js-base64": {
|
"js-base64": {
|
||||||
"version": "2.6.4",
|
"version": "2.6.4",
|
||||||
@ -7965,6 +7992,11 @@
|
|||||||
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
|
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
|
||||||
"dev": true
|
"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": {
|
"methods": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
"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": {
|
"ngx-viewer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ngx-viewer/-/ngx-viewer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ngx-viewer/-/ngx-viewer-1.0.1.tgz",
|
||||||
|
|||||||
@ -39,11 +39,13 @@
|
|||||||
"@types/file-saver": "^2.0.0",
|
"@types/file-saver": "^2.0.0",
|
||||||
"amazon-cognito-identity-js": "^2.0.30",
|
"amazon-cognito-identity-js": "^2.0.30",
|
||||||
"angular-calendar": "0.23.3",
|
"angular-calendar": "0.23.3",
|
||||||
|
"angular-cropperjs": "^1.0.2",
|
||||||
"angular-notifier": "^4.1.1",
|
"angular-notifier": "^4.1.1",
|
||||||
"angular-sortablejs": "^2.7.0",
|
"angular-sortablejs": "^2.7.0",
|
||||||
"angular-split": "^3.0.2",
|
"angular-split": "^3.0.2",
|
||||||
"angular-tree-component": "6.1.0",
|
"angular-tree-component": "6.1.0",
|
||||||
"blueimp-canvas-to-blob": "^3.28.0",
|
"blueimp-canvas-to-blob": "^3.28.0",
|
||||||
|
"bootstrap": "^4.1.3",
|
||||||
"chart.js": "2.6.0",
|
"chart.js": "2.6.0",
|
||||||
"core-js": "^2.6.5",
|
"core-js": "^2.6.5",
|
||||||
"d3": "^4.9.1",
|
"d3": "^4.9.1",
|
||||||
@ -52,10 +54,11 @@
|
|||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
"intl": "^1.2.4",
|
"intl": "^1.2.4",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.6.0",
|
||||||
"karma-jasmine": "^1.1.1",
|
"karma-jasmine": "^1.1.1",
|
||||||
"leaflet": "^1.4.0",
|
"leaflet": "^1.4.0",
|
||||||
"mat-video": "^2.8.1",
|
"mat-video": "^2.8.1",
|
||||||
|
"merge-images": "^2.0.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"ng-pick-datetime": "^6.0.16",
|
"ng-pick-datetime": "^6.0.16",
|
||||||
"ng2-charts": "1.6.0",
|
"ng2-charts": "1.6.0",
|
||||||
@ -70,6 +73,7 @@
|
|||||||
"ngx-mat-daterange-picker": "^1.1.4",
|
"ngx-mat-daterange-picker": "^1.1.4",
|
||||||
"ngx-mat-select-search": "^1.8.0",
|
"ngx-mat-select-search": "^1.8.0",
|
||||||
"ngx-perfect-scrollbar": "5.0.0-7",
|
"ngx-perfect-scrollbar": "5.0.0-7",
|
||||||
|
"ngx-photo-editor": "^0.4.3",
|
||||||
"ngx-viewer": "^1.0.1",
|
"ngx-viewer": "^1.0.1",
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^4.14.1",
|
||||||
"perfect-scrollbar": "^1.3.0",
|
"perfect-scrollbar": "^1.3.0",
|
||||||
@ -92,7 +96,7 @@
|
|||||||
"@angular/compiler-cli": "^6.1.10",
|
"@angular/compiler-cli": "^6.1.10",
|
||||||
"@types/aws-sdk": "^2.7.0",
|
"@types/aws-sdk": "^2.7.0",
|
||||||
"@types/jasmine": "2.5.52",
|
"@types/jasmine": "2.5.52",
|
||||||
"@types/jquery": "3.2.0",
|
"@types/jquery": "^3.2.0",
|
||||||
"@types/node": "^8.10.46",
|
"@types/node": "^8.10.46",
|
||||||
"aws-sdk": "^2.443.0",
|
"aws-sdk": "^2.443.0",
|
||||||
"codelyzer": "~4.1.0",
|
"codelyzer": "~4.1.0",
|
||||||
|
|||||||
BIN
ng6-seed/salespd_pwa___testing___22-08-2022.zip
Normal file
BIN
ng6-seed/salespd_pwa___testing___22-08-2022.zip
Normal file
Binary file not shown.
@ -5,9 +5,23 @@ import { AuthLayoutComponent } from './layouts/auth/auth-layout.component';
|
|||||||
import { CognitoService} from './AwsService/cognito.service';
|
import { CognitoService} from './AwsService/cognito.service';
|
||||||
import { AuthGuard } from './_guard/auth.guard';
|
import { AuthGuard } from './_guard/auth.guard';
|
||||||
// import { SalesPdComponent } from './sales-pd/sales-pd.component';
|
// 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 = [{
|
export const AppRoutes: Routes = [{
|
||||||
|
|
||||||
path: '',
|
path: '',
|
||||||
redirectTo: 'sales-pd-list',
|
redirectTo: route,
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
}, {
|
}, {
|
||||||
path: '',
|
path: '',
|
||||||
|
|||||||
@ -55,6 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="14" fxFlex.sm="14" fxFlex.md="14" fxFlex.lg="14" fxFlex.xl="14" class="cell fontTitle" style="justify-content:flex-end" [ngStyle]="{'color':roleID == 20 ? '#0d93a9' :'#f44336'}">
|
<div fxFlex.xs="14" fxFlex.sm="14" fxFlex.md="14" fxFlex.lg="14" fxFlex.xl="14" class="cell fontTitle" style="justify-content:flex-end" [ngStyle]="{'color':roleID == 20 ? '#0d93a9' :'#f44336'}">
|
||||||
<small mat-line>{{details.sales_pd_sno}}</small><br/>
|
<small mat-line>{{details.sales_pd_sno}}</small><br/>
|
||||||
|
<small class="fontsize" style="color: black;" mat-line >{{details.sales_pd_type_master}}</small><br/>
|
||||||
<!-- <small style="color: black;text-align:center;font-weight: normal;font-size: 15px;">{{details.sales_pd_type == '1' ? 'Physical PD' : 'Telephonic PD'}}</small> -->
|
<!-- <small style="color: black;text-align:center;font-weight: normal;font-size: 15px;">{{details.sales_pd_type == '1' ? 'Physical PD' : 'Telephonic PD'}}</small> -->
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="13" fxFlex.lg="13" fxFlex.xl="13" class="cell" style="justify-content:flex-end">
|
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="13" fxFlex.lg="13" fxFlex.xl="13" class="cell" style="justify-content:flex-end">
|
||||||
|
|||||||
@ -66,6 +66,7 @@ export class FlyHiListComponent implements OnInit {
|
|||||||
this.roleID = localStorage.getItem('user_role')
|
this.roleID = localStorage.getItem('user_role')
|
||||||
|
|
||||||
this.flyHiData = res['records'];
|
this.flyHiData = res['records'];
|
||||||
|
console.log(this.flyHiData)
|
||||||
this.dataLengthTab4 = res['records'].length;
|
this.dataLengthTab4 = res['records'].length;
|
||||||
this.dataSourceTab4.data = this.flyHiData;
|
this.dataSourceTab4.data = this.flyHiData;
|
||||||
this.recordStatus=false
|
this.recordStatus=false
|
||||||
|
|||||||
@ -54,7 +54,7 @@ export class FormComponent implements OnInit {
|
|||||||
private awsService:AwsService,private loaderService:LoaderService) {
|
private awsService:AwsService,private loaderService:LoaderService) {
|
||||||
this.role_id = localStorage.getItem('LenderRoleID')
|
this.role_id = localStorage.getItem('LenderRoleID')
|
||||||
console.log(jsonData)
|
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.questions_JSON = this.jsonData.Json['sections'][0];
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
}
|
}
|
||||||
@ -228,6 +228,8 @@ export class FormComponent implements OnInit {
|
|||||||
loadTemplate() {
|
loadTemplate() {
|
||||||
this.commonFormGroup = new FormGroup({})
|
this.commonFormGroup = new FormGroup({})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.questions_JSON = this.jsonData.Json['sections'][0];
|
this.questions_JSON = this.jsonData.Json['sections'][0];
|
||||||
console.log(this.questions_JSON)
|
console.log(this.questions_JSON)
|
||||||
|
|
||||||
|
|||||||
@ -107,19 +107,19 @@ loadCreditPDTemplate2(form_id,mapid,Formname,template_id):Observable<any> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTemplate(form_id,mapid,Formname) {
|
loadTemplatelocal() {
|
||||||
console.log( Formname)
|
|
||||||
// return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/'+form_id+'.json').map(rr=>{
|
// 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=>{
|
// return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/16.json').map(rr=>{
|
||||||
if( Formname == 'Business Information'){
|
// 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/1.json').map(rr=>{
|
||||||
// return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/'+form_id+'.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)}}
|
// let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}}
|
||||||
// this.raw_credit_pd_template= returnValue.records.template
|
// // this.raw_credit_pd_template= returnValue.records.template
|
||||||
return returnValue
|
// return returnValue
|
||||||
})
|
// })
|
||||||
|
|
||||||
}else{
|
// }else{
|
||||||
// return this._http.get<any[]>(this.apiUrl + "formWiseJSONTemplateV2?form_id="+form_id+"&map_id="+mapid+"").map(result=>{
|
// return this._http.get<any[]>(this.apiUrl + "formWiseJSONTemplateV2?form_id="+form_id+"&map_id="+mapid+"").map(result=>{
|
||||||
// console.log(result)
|
// console.log(result)
|
||||||
// let apivalue ={dataStatus:true,status:200,records:{template:JSON.stringify(result)}}
|
// let apivalue ={dataStatus:true,status:200,records:{template:JSON.stringify(result)}}
|
||||||
@ -127,13 +127,13 @@ loadTemplate(form_id,mapid,Formname) {
|
|||||||
// return apivalue
|
// 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/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)}}
|
let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}}
|
||||||
// this.raw_credit_pd_template= returnValue.records.template
|
// this.raw_credit_pd_template= returnValue.records.template
|
||||||
console.log("12345")
|
console.log("12345")
|
||||||
return returnValue
|
return returnValue
|
||||||
})
|
})
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -906,4 +906,15 @@ loadTemplate(form_id) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBase64ImageFromURL(url): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'convertBase64', { "img_url":url })
|
||||||
|
.pipe(catchError(this.handleError('role', [])))
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePDPhoto(values): Observable<any> {
|
||||||
|
values.fk_updatedby = this._aws.getlocale();
|
||||||
|
return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values })
|
||||||
|
.pipe(catchError(this.handleError('role', [])))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,13 +12,17 @@ import { SingleCaptureBtnComponent } from './ques-template/single-capture-btn/si
|
|||||||
import { QuestionServiceService } from '../services/question-service.service';
|
import { QuestionServiceService } from '../services/question-service.service';
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
import { MaterialModule } from '../material_modules/material.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';
|
//import { SharedModule } from '../../../Shared/shared.module';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [QuesTemplateComponent, CaptureBtnComponent, SingleCaptureBtnComponent],
|
declarations: [QuesTemplateComponent, CaptureBtnComponent, SingleCaptureBtnComponent, ImageEditComponent],
|
||||||
imports: [MatButtonToggleModule,
|
imports: [MatButtonToggleModule,
|
||||||
MatAutocompleteModule,
|
MatAutocompleteModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
@ -53,8 +57,11 @@ import { MaterialModule } from '../material_modules/material.module';
|
|||||||
MatStepperModule,
|
MatStepperModule,
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
NgxMatSelectSearchModule,
|
NgxMatSelectSearchModule,
|
||||||
|
AngularCropperjsModule,
|
||||||
|
|
||||||
ReactiveFormsModule],
|
ReactiveFormsModule],
|
||||||
exports: [QuesTemplateComponent],
|
exports: [QuesTemplateComponent,CaptureBtnComponent, SingleCaptureBtnComponent,ImageEditComponent],
|
||||||
|
entryComponents: [ImageEditComponent],
|
||||||
providers:[QuestionServiceService]
|
providers:[QuestionServiceService]
|
||||||
})
|
})
|
||||||
export class ComponentsModule {}
|
export class ComponentsModule {}
|
||||||
|
|||||||
@ -0,0 +1,216 @@
|
|||||||
|
|
||||||
|
<div >
|
||||||
|
<div class="row">
|
||||||
|
<div fxFlex="75" align="left" style="padding: 1% !important" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}">
|
||||||
|
<!-- <span>{{main_applicant}} {{lender_applicant_id ? '('+lender_applicant_id+')' : ''}}, {{customer_segment_abbr}} - {{subproduct_abbr}} </span><br> -->
|
||||||
|
<span style="color: white;">Photograph's Editing Tools</span>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="25" align="end" style="padding: 10px !important;" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}">
|
||||||
|
<button style="background-color: white;" [ngStyle]="{'color':role_id == '20' ? '#0d93a9' :'#f44336'}" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||||
|
matTooltipPosition="right" mat-dialog-close>
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div fxFlex="75" align="left" style="padding: 1% !important" >
|
||||||
|
<!-- <span>{{main_applicant}} {{lender_applicant_id ? '('+lender_applicant_id+')' : ''}}, {{customer_segment_abbr}} - {{subproduct_abbr}} </span><br> -->
|
||||||
|
<div *ngIf="showCropper && imageUrl">
|
||||||
|
<angular-cropper #angularCropper
|
||||||
|
[cropperOptions]="cropperConfig"
|
||||||
|
[imageUrl]="imageUrl"
|
||||||
|
(zoom)="zoomManual()"
|
||||||
|
(ready)="readyImage($event)"
|
||||||
|
(cropend)="cropendImage($event)">
|
||||||
|
</angular-cropper>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="25" align="end" style="padding: 10px !important;" >
|
||||||
|
<div class="col-xs-12 col-sm-3 crop-res">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div *ngIf="imageUrls.length > 0">
|
||||||
|
<h5>Images:</h5>
|
||||||
|
<div>
|
||||||
|
<img *ngFor="let imgUrl of imageUrls; let i = index" [src]="imgUrl" class="thumb" (click)="selectImg(i)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h5 class="card-title">Toolbar:</h5>
|
||||||
|
<div class="docs-buttons">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="zoom('positive')" type="button" mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon"data-method="zoom" data-option="0.1" title="Zoom In">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.zoom(0.1)">
|
||||||
|
<span class="fa fa-search-plus"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="zoom('negative')" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon"data-method="zoom" data-option="-0.1" title="Zoom Out">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.zoom(-0.1)">
|
||||||
|
<span class="fa fa-search-minus"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="move(-10, 0)" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="move" data-option="-10" data-second-option="0" title="Move Left">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.move(-10, 0)">
|
||||||
|
<span class="fa fa-arrow-left"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="move(10, 0)" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="move" data-option="10" data-second-option="0" title="Move Right">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.move(10, 0)">
|
||||||
|
<span class="fa fa-arrow-right"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="move(0, -10)" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon"data-method="move" data-option="0" data-second-option="-10" title="Move Up">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.move(0, -10)">
|
||||||
|
<span class="fa fa-arrow-up"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="move(0, 10)" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="move" data-option="0" data-second-option="10" title="Move Down">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.move(0, 10)">
|
||||||
|
<span class="fa fa-arrow-down"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="rotate('left')" type="button" mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="rotate" data-option="-45" title="Rotate Left">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.rotate(-45)">
|
||||||
|
<span class="fa fa-rotate-left"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="rotate('right')" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="rotate" data-option="45" title="Rotate Right">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.rotate(45)">
|
||||||
|
<span class="fa fa-rotate-right"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="scale('x')" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon"data-method="scaleX" data-option="-1" title="Flip Horizontal">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.scaleX(-1)">
|
||||||
|
<span class="fa fa-arrows-h"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="scale('y')" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="scaleY" data-option="-1" title="Flip Vertical">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.scaleY(-1)">
|
||||||
|
<span class="fa fa-arrows-v"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="clear()" type="button" mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="clear" title="Clear">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.clear()">
|
||||||
|
<span class="fa fa-remove"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="btn-group">
|
||||||
|
<button (click)="disable()" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="disable" title="Disable">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.disable()">
|
||||||
|
<span class="fa fa-lock"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button (click)="enable()" type="button" mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="enable" title="Enable">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.enable()">
|
||||||
|
<span class="fa fa-unlock"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button (click)="reset()" type="button" mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="reset" title="Reset">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.reset()">
|
||||||
|
<span class="fa fa-refresh"></span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<!-- <button (click)="destroy($event)" type="button"mat-mini-fab color="warn" aria-label="Example icon button with a filter list icon" data-method="destroy" title="Destroy">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.destroy()">
|
||||||
|
<span class="fa fa-power-off"></span>
|
||||||
|
</span>
|
||||||
|
</button> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <h5>Text:</h5>
|
||||||
|
<div class="btn-group">
|
||||||
|
<input type="text" class="form-control" aria-label="Text input with checkbox" [(ngModel)]="text">
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" mat-raised-button color="warn"*ngIf="imageUrl" (click)="saveImg()">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="">
|
||||||
|
Preview Images
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-success" *ngIf="imageUrl" (click)="mergeAll()">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="">
|
||||||
|
Merge
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div style="display: none;">
|
||||||
|
<canvas #canvasEl width=400 height=400></canvas>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="downloadLink">
|
||||||
|
<img [src]="downloadLink" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- /.docs-buttons -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-sm-9" style=" padding-top: 25px;">
|
||||||
|
<!-- <h2>Pls choose an image file</h2>
|
||||||
|
<div class="btn-group">
|
||||||
|
<label class="btn btn-primary btn-upload" for="inputImage" title="Upload image file">
|
||||||
|
<input type="file" multiple name="photo" (change)="onFileSelected($event)" class="sr-only" id="inputImage" accept="image/*">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="Import image with Blob URLs">
|
||||||
|
<span class="fa fa-upload"></span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div *ngIf="!showCropper && imageUrl" class="container-preloader">
|
||||||
|
<div class="dash uno"></div>
|
||||||
|
<div class="dash dos"></div>
|
||||||
|
<div class="dash tres"></div>
|
||||||
|
<div class="dash cuatro"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-sm-9">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 crop-res">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" *ngIf="imageUrl" id="actions">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div *ngIf="mergedRes" class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<img [src]="mergedRes" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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<ImageEditComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ImageEditComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ImageEditComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -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<ImageEditComponent> ) {
|
||||||
|
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((<FileReader>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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -74,7 +74,30 @@
|
|||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxLayout ="column" style="padding:none;align-self:center;text-align:center">
|
<div fxLayout ="column" style="padding:none;align-self:center;text-align:center">
|
||||||
<div >
|
<div >
|
||||||
<img *ngIf="parent_ques.get('answer_value').value != ''" [src]="parent_ques.get('answer_value').value" imageViewer class="doc-image-bucket"><br/>
|
<div class="top">
|
||||||
|
<!-- Thumbnail-->
|
||||||
|
<div class="thumbnail">
|
||||||
|
<div >
|
||||||
|
<!-- <button mat-raised-button mat-icon-button mat-mini-fab
|
||||||
|
class="date mr-1 mb-1 hover-icon" type="button"
|
||||||
|
matTooltip="edit" (click)="imageCrop(doc)"
|
||||||
|
matTooltipPosition="right" >
|
||||||
|
<mat-icon>edit</mat-icon>
|
||||||
|
</button> -->
|
||||||
|
<div >
|
||||||
|
|
||||||
|
|
||||||
|
<img *ngIf="parent_ques.get('answer_value').value != ''" [src]="parent_ques.get('answer_value').value" imageViewer class="doc-image-bucket">
|
||||||
|
<!-- <button mat-raised-button mat-icon-button mat-mini-fab
|
||||||
|
class="date1 mr-1 mb-1 hover-icon" type="button"
|
||||||
|
matTooltip="edit" (click)="imageCrop(parent_ques.get('answer_value').value)"
|
||||||
|
matTooltipPosition="right">
|
||||||
|
<mat-icon>edit</mat-icon>
|
||||||
|
</button> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><br/>
|
||||||
<p *ngIf="parent_ques.get('answer_value').value == ''">Image is not captured.</p>
|
<p *ngIf="parent_ques.get('answer_value').value == ''">Image is not captured.</p>
|
||||||
<label ><strong>{{parent_ques.get('question').value}}</strong></label>
|
<label ><strong>{{parent_ques.get('question').value}}</strong></label>
|
||||||
<!-- <input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)"> -->
|
<!-- <input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)"> -->
|
||||||
|
|||||||
@ -71,4 +71,25 @@
|
|||||||
|
|
||||||
::ng-deep .mat-option-text.mat-option-text {
|
::ng-deep .mat-option-text.mat-option-text {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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 ;
|
||||||
|
}
|
||||||
@ -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 { CameraService } from 'app/sales-pd/providers/camera/camera.service';
|
||||||
import { ApiServiceService } from 'app/lender-credit-pd/services/apiService/api-service.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;
|
// const originFormControlNameNgOnChanges = FormControlName.prototype.ngOnChanges;
|
||||||
// FormControlName.prototype.ngOnChanges = function () {
|
// FormControlName.prototype.ngOnChanges = function () {
|
||||||
// const result = originFormControlNameNgOnChanges.apply(this, arguments);
|
// const result = originFormControlNameNgOnChanges.apply(this, arguments);
|
||||||
@ -699,7 +700,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
} else {
|
} else {
|
||||||
geoCoordinates = null;
|
geoCoordinates = null;
|
||||||
}
|
}
|
||||||
console.log(geoCords);
|
console.log(geoCords,reader.result);
|
||||||
console.log(this.imageData);
|
console.log(this.imageData);
|
||||||
console.log(this.current_index);
|
console.log(this.current_index);
|
||||||
this.current_index = parent_index;
|
this.current_index = parent_index;
|
||||||
@ -1778,8 +1779,8 @@ this.proceedonChangeProperty(modified)
|
|||||||
// alert('b');
|
// alert('b');
|
||||||
const dialogRef = this.dialog.open(AlertDialogComponent, {
|
const dialogRef = this.dialog.open(AlertDialogComponent, {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
data: {buttons:[{name:"Complete",visible:true,id:'Complete'},{name:'Cancel',visible:'true',id:'cancel'}],title:'Complete PD',
|
data: {buttons:[{name:"Complete",visible:true,id:'Complete'},{name:'Cancel',visible:'true',id:'cancel'}],title:'Complete Verification',
|
||||||
msg:'You are completing this PD, once completed you will not be able to make changes'}
|
msg:'You are completing this Verification, once completed you will not be able to make changes'}
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(data => {
|
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();
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||||
import { Ng2ImgMaxService } from 'ng2-img-max';
|
import { Ng2ImgMaxService } from 'ng2-img-max';
|
||||||
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
import { MatDialog } from '@angular/material';
|
||||||
|
import { ImageEditComponent } from '../image-edit/image-edit.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-single-capture-btn',
|
selector: 'app-single-capture-btn',
|
||||||
@ -16,7 +18,7 @@ export class SingleCaptureBtnComponent implements OnInit {
|
|||||||
sales_pd_type: string;
|
sales_pd_type: string;
|
||||||
role_id: 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.role_id = localStorage.getItem('user_role')
|
||||||
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
||||||
console.log(this.sales_pd_type)
|
console.log(this.sales_pd_type)
|
||||||
@ -29,11 +31,34 @@ export class SingleCaptureBtnComponent implements OnInit {
|
|||||||
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
||||||
console.log(event);
|
console.log(event);
|
||||||
let imageData= event.target.files[0]
|
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(
|
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
||||||
result => {
|
result => {
|
||||||
|
console.log(result);
|
||||||
this.singleDataEmitter.emit(result)
|
// this.singleDataEmitter.emit(result)
|
||||||
this.loaderService.closeMatSpinnerDialog()
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|||||||
@ -349,7 +349,19 @@ export class SectionListComponent implements OnInit {
|
|||||||
|
|
||||||
OnSelectDirectForms(section_id) {
|
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
|
let componen_name:any = FormComponent
|
||||||
// if(details.is_business_form == 1) {
|
// if(details.is_business_form == 1) {
|
||||||
// componen_name = FormGroupComponent
|
// componen_name = FormGroupComponent
|
||||||
@ -388,7 +400,8 @@ export class SectionListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
getTemplate(){
|
getTemplate(){
|
||||||
|
|||||||
@ -706,4 +706,33 @@ generatemail(params :any): Observable<any> {
|
|||||||
generatesateliteimage(param:any): Observable<any>{
|
generatesateliteimage(param:any): Observable<any>{
|
||||||
return this._http.post<any>(api_url + 'regenerateSatelliteImg',param )
|
return this._http.post<any>(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<any[]>(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
|
||||||
|
})
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
5
package-lock.json
generated
5
package-lock.json
generated
@ -1,6 +1,3 @@
|
|||||||
{
|
{
|
||||||
"name": "sparq-lender",
|
"lockfileVersion": 1
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
{}
|
{
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user