flyhi feedback changes
This commit is contained in:
parent
3686de3be4
commit
5c6b9d2a79
Binary file not shown.
@ -7,7 +7,7 @@ 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');
|
// let role = localStorage.g('user_role');
|
||||||
// console.log(role)
|
// console.log(role)
|
||||||
var route: string = "sales-pd-list";
|
var route: string = "fly-hi";
|
||||||
const role = JSON.parse(localStorage.getItem("user_role"));
|
const role = JSON.parse(localStorage.getItem("user_role"));
|
||||||
|
|
||||||
if (role == "20") {
|
if (role == "20") {
|
||||||
@ -23,7 +23,7 @@ export const AppRoutes: Routes = [{
|
|||||||
path: '',
|
path: '',
|
||||||
redirectTo: route,
|
redirectTo: route,
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
}, {
|
} , {
|
||||||
path: '',
|
path: '',
|
||||||
component: AdminLayoutComponent,
|
component: AdminLayoutComponent,
|
||||||
canActivateChild:[AuthGuard],
|
canActivateChild:[AuthGuard],
|
||||||
@ -45,6 +45,7 @@ export const AppRoutes: Routes = [{
|
|||||||
// loadChildren:'./quality-check/quality-check.module#QualityCheckModule'
|
// loadChildren:'./quality-check/quality-check.module#QualityCheckModule'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
|
|
||||||
{
|
{
|
||||||
path:'sales-pd-list',
|
path:'sales-pd-list',
|
||||||
loadChildren:'./sales-pd/sales-pd.module#SalesPdModule'
|
loadChildren:'./sales-pd/sales-pd.module#SalesPdModule'
|
||||||
|
|||||||
@ -33,27 +33,27 @@ export class DynamicFormComponent {
|
|||||||
|
|
||||||
|
|
||||||
this.questionService.currentMessageSubscriber.subscribe((data : any)=>{
|
this.questionService.currentMessageSubscriber.subscribe((data : any)=>{
|
||||||
console.log(data)
|
//console.log(data)
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.form_group_name)
|
// console.log(this.form_group_name)
|
||||||
console.log(this.questions_JSON.questions)
|
//.log(this.questions_JSON.questions)
|
||||||
this.form_group_name=this.questionService.assignFormControl_array(this.form_group_name,this.questions_JSON.questions)
|
this.form_group_name=this.questionService.assignFormControl_array(this.form_group_name,this.questions_JSON.questions)
|
||||||
|
|
||||||
this.generateGroupControls();
|
this.generateGroupControls();
|
||||||
console.log( this.questions_JSON.questions)
|
// console.log( this.questions_JSON.questions)
|
||||||
this.questionService.notify(this.questions_JSON)
|
this.questionService.notify(this.questions_JSON)
|
||||||
if(this.questions_JSON.questions){
|
if(this.questions_JSON.questions){
|
||||||
this.questions_JSON.questions.forEach(element => {
|
this.questions_JSON.questions.forEach(element => {
|
||||||
if(element.question instanceof Array){
|
if(element.question instanceof Array){
|
||||||
element.question.forEach(e => {
|
element.question.forEach(e => {
|
||||||
console.log(e.question)
|
// console.log(e.question)
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
console.log(this.questions_JSON.questions)
|
// console.log(this.questions_JSON.questions)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,8 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
local_pincode1: any;
|
local_pincode1: any;
|
||||||
json_answers1:any;
|
json_answers1:any;
|
||||||
isChecked:any=[];
|
isChecked:any=[];
|
||||||
|
city_array:any =[];
|
||||||
|
pincode_array:any=[];
|
||||||
autoCompleteAns:Observable<string[]>
|
autoCompleteAns:Observable<string[]>
|
||||||
public commonFilterCtrl:FormControl = new FormControl();
|
public commonFilterCtrl:FormControl = new FormControl();
|
||||||
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
@ -46,7 +48,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.quesService.currentMessageSubscriber.subscribe((data : any)=>{
|
this.quesService.currentMessageSubscriber.subscribe((data : any)=>{
|
||||||
console.log(data)
|
//console.log(data)
|
||||||
if(data){
|
if(data){
|
||||||
this.check = true
|
this.check = true
|
||||||
}else{
|
}else{
|
||||||
@ -56,7 +58,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// output : {msg : 'do something'}
|
// output : {msg : 'do something'}
|
||||||
})
|
})
|
||||||
localStorage.setItem('use',"0");
|
localStorage.setItem('use',"0");
|
||||||
console.log( this.whole_json)
|
//console.log( this.whole_json)
|
||||||
this.parent_ques = this.currFormArrayObj
|
this.parent_ques = this.currFormArrayObj
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +72,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
checkCat(data,w){
|
checkCat(data,w){
|
||||||
console.log(this.isChecked)
|
// console.log(this.isChecked)
|
||||||
if( this.isChecked.length == 0){
|
if( this.isChecked.length == 0){
|
||||||
this.isChecked = this.json_answers[w.question_key]
|
this.isChecked = this.json_answers[w.question_key]
|
||||||
let ref = this.isChecked.find(x => x == data); // this checks the cat[] array
|
let ref = this.isChecked.find(x => x == data); // this checks the cat[] array
|
||||||
@ -166,16 +168,16 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
]
|
]
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
console.log(this.parent_ques);
|
// console.log(this.parent_ques);
|
||||||
if( this.parent_ques.answers && this.parent_ques.answers instanceof Array){
|
if( this.parent_ques.answers && this.parent_ques.answers instanceof Array){
|
||||||
|
|
||||||
console.log(this.parent_ques.answers.length)
|
// console.log(this.parent_ques.answers.length)
|
||||||
console.log( this.formGroupN.get(this.parent_ques.question_key))
|
// console.log( this.formGroupN.get(this.parent_ques.question_key))
|
||||||
if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 1){
|
if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 1){
|
||||||
console.log(this.parent_ques.answers.answer_id)
|
// console.log(this.parent_ques.answers.answer_id)
|
||||||
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
|
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
|
||||||
}else if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 0){
|
}else if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 0){
|
||||||
console.log(this.parent_ques.answers.answer_id)
|
// console.log(this.parent_ques.answers.answer_id)
|
||||||
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
|
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -191,11 +193,11 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
if(this.parent_ques.question_key == '5'){
|
if(this.parent_ques.question_key == '5'){
|
||||||
|
|
||||||
this.isChecked = this.json_answers[this.parent_ques.question_key]
|
this.isChecked = this.json_answers[this.parent_ques.question_key]
|
||||||
console.log( this.isChecked)
|
.log( this.isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onChangeProperty({value:this.json_answers[this.parent_ques.question_key]},this.parent_ques,'','','','TS')
|
this.onChangeProperty({value:this.json_answers[this.parent_ques.question_key]},this.parent_ques,'','','','TS')
|
||||||
console.log( this.json_answers[this.parent_ques.question_key])
|
// console.log( this.json_answers[this.parent_ques.question_key])
|
||||||
}
|
}
|
||||||
else if(this.json_answers!=null && this.json_answers != undefined && this.json_answers){
|
else if(this.json_answers!=null && this.json_answers != undefined && this.json_answers){
|
||||||
// this.formGroupN.patchValue((this.json_answers[this.group_key] || ''))
|
// this.formGroupN.patchValue((this.json_answers[this.group_key] || ''))
|
||||||
@ -314,9 +316,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onChange_checkbox(event,sec_control){
|
onChange_checkbox(event,sec_control){
|
||||||
console.log(this.isChecked)
|
// console.log(this.isChecked)
|
||||||
// this.isChecked =[];
|
// this.isChecked =[];
|
||||||
console.log( this.formGroupN.get(sec_control.question_key).value)
|
// console.log( this.formGroupN.get(sec_control.question_key).value)
|
||||||
|
|
||||||
const control=this.formGroupN.get(sec_control.question_key) as FormArray
|
const control=this.formGroupN.get(sec_control.question_key) as FormArray
|
||||||
|
|
||||||
@ -333,7 +335,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
onChangeProperty(event,sec_control,question_key,options?,sec_index?,from?){
|
onChangeProperty(event,sec_control,question_key,options?,sec_index?,from?){
|
||||||
// alert('datatamil');
|
// alert('datatamil');
|
||||||
if(!from && from != 'TS' && this.quesService.formanswers != null) {
|
if(!from && from != 'TS' && this.quesService.formanswers != null) {
|
||||||
console.log("Value changes",from);
|
// console.log("Value changes",from);
|
||||||
this.quesService.formanswers = null
|
this.quesService.formanswers = null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,11 +406,11 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// onChangeProperties_value.push(JSON.parse(new_name))
|
// onChangeProperties_value.push(JSON.parse(new_name))
|
||||||
|
|
||||||
onChangeProperties_value.forEach(onChangeProperty=>{
|
onChangeProperties_value.forEach(onChangeProperty=>{
|
||||||
console.log(onChangeProperty)
|
// console.log(onChangeProperty)
|
||||||
if(onChangeProperty.purpose == 'api2'){
|
if(onChangeProperty.purpose == 'api2'){
|
||||||
console.log(event.value,onChangeProperty.params)
|
// console.log(event.value,onChangeProperty.params)
|
||||||
if(onChangeProperty.api == 'getListOfStatesAndCities'){
|
if(onChangeProperty.api == 'getListOfStatesAndCities'){
|
||||||
console.log(event.value,onChangeProperty.params)
|
// console.log(event.value,onChangeProperty.params)
|
||||||
// onChangeProperty.params = JSON.stringify(onChangeProperty.params);
|
// onChangeProperty.params = JSON.stringify(onChangeProperty.params);
|
||||||
// let updatedParams =JSON.stringify(onChangeProperty.params);
|
// let updatedParams =JSON.stringify(onChangeProperty.params);
|
||||||
// updatedParams = updatedParams.replace('value_of_answer',event.value);
|
// updatedParams = updatedParams.replace('value_of_answer',event.value);
|
||||||
@ -416,26 +418,50 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// console.log(JSON.parse(updatedParams),updatedParams,JSON.parse(JSON.stringify(updatedParams)))
|
// console.log(JSON.parse(updatedParams),updatedParams,JSON.parse(JSON.stringify(updatedParams)))
|
||||||
// debugger;
|
// debugger;
|
||||||
let params={records:{state_id:event.value}}
|
let params={records:{state_id:event.value}}
|
||||||
|
// console.log( params)
|
||||||
this.quesService.apiCall(onChangeProperty.api,params,onChangeProperty.api_method).subscribe(res=>{
|
this.quesService.apiCall(onChangeProperty.api,params,onChangeProperty.api_method).subscribe(res=>{
|
||||||
|
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
|
|
||||||
this.local_city1=res['records'].cities
|
this.local_city1=res['records'].cities
|
||||||
this.local_pincode1=res['records'].pincode
|
this.local_pincode1=res['records'].pincode
|
||||||
|
// console.log( local_city1,local_pincode1)
|
||||||
this.whole_json.forEach((val,index)=>{
|
this.whole_json.forEach((val,index)=>{
|
||||||
|
// let i= index-2
|
||||||
|
// console.log( params)
|
||||||
if(val.api_properties == 'local_city1' ){
|
if(val.api_properties == 'local_city1' ){
|
||||||
|
|
||||||
this.local_city1=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city1)
|
this.local_city1=this.quesService.convertArrayNames(['city_id','city_name'], this.local_city1)
|
||||||
console.log( this.local_city1)
|
// console.log( this.local_city1)
|
||||||
val.answers = (this.local_city1)
|
this.city_array.push( this.local_city1)
|
||||||
|
|
||||||
|
if(this.city_array[this.json_index] == undefined){
|
||||||
|
val.answers = this.local_city1
|
||||||
|
}else{
|
||||||
|
val.answers = this.city_array[this.json_index]
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log( this.city_array[0] )
|
||||||
|
// val.answers = this.city_array[this.json_index]
|
||||||
|
//val.answers = local_city1
|
||||||
|
// console.log(this.whole_json,this.json_index, val.answers)
|
||||||
}
|
}
|
||||||
else if(val.api_properties == 'local_pincode1'){
|
else if(val.api_properties == 'local_pincode1'){
|
||||||
this.local_pincode1=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode1)
|
this.local_pincode1=this.quesService.convertArrayNames(['pincode_id','pincode'], this.local_pincode1)
|
||||||
val.answers = (this.local_pincode1)
|
this.pincode_array.push( this.local_pincode1)
|
||||||
|
// val.answers = local_pincode1
|
||||||
|
// setTimeout(() => {
|
||||||
|
// console.log( this.pincode_array[index-1] )
|
||||||
|
// }, 1000);
|
||||||
|
|
||||||
|
if(this.pincode_array[this.json_index] == undefined){
|
||||||
|
val.answers = this.local_pincode1
|
||||||
|
}else{
|
||||||
|
val.answers = this.pincode_array[this.json_index]
|
||||||
|
}
|
||||||
|
// console.log( this.pincode_array,index)
|
||||||
|
// val.answers = local_pincode2
|
||||||
|
// console.log(this.whole_json, val.answers )
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -467,12 +493,12 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
if(val.api_properties == 'local_city' ){
|
if(val.api_properties == 'local_city' ){
|
||||||
|
|
||||||
this.local_city=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city)
|
this.local_city=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city)
|
||||||
console.log( this.local_city)
|
// console.log( this.local_city)
|
||||||
val.answers = (this.local_city)
|
val.answers = (this.local_city)
|
||||||
}
|
}
|
||||||
else if(val.api_properties == 'local_pincode'){
|
else if(val.api_properties == 'local_pincode'){
|
||||||
this.local_pincode=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode)
|
this.local_pincode=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode)
|
||||||
val.answers = (this.local_pincode)
|
val.answers = (this.local_pincode)
|
||||||
}
|
}
|
||||||
// if(val.api_properties == 'local_city1' ){
|
// if(val.api_properties == 'local_city1' ){
|
||||||
|
|
||||||
@ -490,10 +516,10 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else if(onChangeProperty.purpose == 'api2'){
|
}else if(onChangeProperty.purpose == 'api2'){
|
||||||
console.log(event.value,onChangeProperty.params)
|
// console.log(event.value,onChangeProperty.params)
|
||||||
if(onChangeProperty.api == 'getListOfStatesAndCities'){
|
if(onChangeProperty.api == 'getListOfStatesAndCities'){
|
||||||
console.log(event.value,onChangeProperty.params)
|
// console.log(event.value,onChangeProperty.params)
|
||||||
// onChangeProperty.params = JSON.stringify(onChangeProperty.params);
|
// // onChangeProperty.params = JSON.stringify(onChangeProperty.params);
|
||||||
// let updatedParams =JSON.stringify(onChangeProperty.params);
|
// let updatedParams =JSON.stringify(onChangeProperty.params);
|
||||||
// updatedParams = updatedParams.replace('value_of_answer',event.value);
|
// updatedParams = updatedParams.replace('value_of_answer',event.value);
|
||||||
// // updatedParams = JSON.parse(updatedParams)
|
// // updatedParams = JSON.parse(updatedParams)
|
||||||
@ -514,8 +540,8 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
if(val.api_properties == 'local_city1' ){
|
if(val.api_properties == 'local_city1' ){
|
||||||
|
|
||||||
this.local_city1=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city1)
|
this.local_city1=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city1)
|
||||||
console.log( this.local_city1)
|
// console.log( this.local_city1)
|
||||||
val.answers = (this.local_city1)
|
val.answers = (this.local_city1)
|
||||||
}
|
}
|
||||||
else if(val.api_properties == 'local_pincode1'){
|
else if(val.api_properties == 'local_pincode1'){
|
||||||
this.local_pincode1=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode1)
|
this.local_pincode1=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode1)
|
||||||
@ -567,7 +593,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if(onChangeProperty.purpose == 'FORM_CTRL'){
|
if(onChangeProperty.purpose == 'FORM_CTRL'){
|
||||||
console.log(onChangeProperty)
|
// console.log(onChangeProperty)
|
||||||
// if(options == 2){
|
// if(options == 2){
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
@ -789,7 +815,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
const question_temp:any = JSON.parse(JSON.stringify(val.question));
|
const question_temp:any = JSON.parse(JSON.stringify(val.question));
|
||||||
inserted_control_obj.questions[index].question = question_temp
|
inserted_control_obj.questions[index].question = question_temp
|
||||||
console.log(control_names)
|
// console.log(control_names)
|
||||||
childControl.push(this._fb.group(control_names))
|
childControl.push(this._fb.group(control_names))
|
||||||
val.group_questions[0].forEach((group_indi,arr_index)=>{
|
val.group_questions[0].forEach((group_indi,arr_index)=>{
|
||||||
|
|
||||||
@ -812,10 +838,10 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
addOrRemoveControl(val,ques_control,question_index_after,options,paren_ques) {
|
addOrRemoveControl(val,ques_control,question_index_after,options,paren_ques) {
|
||||||
console.log(val);
|
// console.log(val);
|
||||||
console.log(ques_control);
|
// console.log(ques_control);
|
||||||
console.log(question_index_after);
|
// console.log(question_index_after);
|
||||||
console.log(paren_ques);
|
// console.log(paren_ques);
|
||||||
if(options == 1){
|
if(options == 1){
|
||||||
let check_dup=ques_control.filter(control_key=>control_key.question_key == val.question_key)
|
let check_dup=ques_control.filter(control_key=>control_key.question_key == val.question_key)
|
||||||
|
|
||||||
@ -1037,20 +1063,20 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
return updateMsg;
|
return updateMsg;
|
||||||
}
|
}
|
||||||
updateAllComplete(a,b){
|
updateAllComplete(a,b){
|
||||||
console.log(a)
|
// console.log(a)
|
||||||
console.log(b.checked)
|
// console.log(b.checked)
|
||||||
if(b.checked){
|
if(b.checked){
|
||||||
console.log( this.whole_json)
|
//console.log( this.whole_json)
|
||||||
this.formGroupN.get(a).disable()
|
this.formGroupN.get(a).disable()
|
||||||
this.parent_ques.disable =true
|
this.parent_ques.disable =true
|
||||||
|
|
||||||
this.vr = true
|
this.vr = true
|
||||||
}else{
|
}else{
|
||||||
console.log( this.whole_json)
|
// console.log( this.whole_json)
|
||||||
this.formGroupN.get(a).enable()
|
this.formGroupN.get(a).enable()
|
||||||
this.parent_ques.disable = false
|
this.parent_ques.disable = false
|
||||||
this.vr = false
|
this.vr = false
|
||||||
console.log(this.parent_ques.disable)
|
// console.log(this.parent_ques.disable)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,7 @@
|
|||||||
<!--<h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> {{userDep}}({{fullName}})</span>
|
<!--<h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> {{userDep}}({{fullName}})</span>
|
||||||
</h2>-->
|
</h2>-->
|
||||||
<a (click)="menunav('HOME')">
|
<a (click)="menunav('HOME')">
|
||||||
<img [routerLink]="['/dashboard']" src="assets/images/PD_Genie_TM1.jpg" style="height: 35px;"> <strong> | </strong> <span> {{userDep}} </span>
|
<img (click)="route()" src="assets/images/PD_Genie_TM1.jpg" style="height: 35px;"> <strong> | </strong> <span> {{userDep}} </span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -55,10 +55,13 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
alertCount: any;
|
alertCount: any;
|
||||||
userRoleType: any;
|
userRoleType: any;
|
||||||
userDetails: any;
|
userDetails: any;
|
||||||
|
role_id: any;
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
|
this.role_id = localStorage.getItem('user_role_nav')
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
this.users.getroles().subscribe(res=>{
|
this.users.getroles().subscribe(res=>{
|
||||||
|
console.log(res)
|
||||||
this.currentUser = res;
|
this.currentUser = res;
|
||||||
this.userDetails = this.currentUser.records[0]
|
this.userDetails = this.currentUser.records[0]
|
||||||
localStorage.setItem("user_details",JSON.stringify(this.userDetails));
|
localStorage.setItem("user_details",JSON.stringify(this.userDetails));
|
||||||
@ -315,4 +318,15 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
route(){
|
||||||
|
|
||||||
|
console.log(this.role_id, this.currentUser.user_role)
|
||||||
|
// user_role_nav
|
||||||
|
if(this.role_id == '20'){
|
||||||
|
this.router.navigate(['fly-hi/flyhi-list-pd']);
|
||||||
|
}else if(this.role_id == '19'){
|
||||||
|
this.router.navigate(['sales-pd-list/list-pd']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
<div >
|
<div >
|
||||||
<div class="row">
|
<!-- <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'}">
|
<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>
|
||||||
<div fxFlex="25" align="end" style="padding: 10px !important;" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}">
|
<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"
|
<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"
|
||||||
@ -12,7 +12,31 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
|
<mat-toolbar class="toolbar" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}">
|
||||||
|
<mat-toolbar-row>
|
||||||
|
<mat-icon>crop_original</mat-icon>
|
||||||
|
<span class="empty-little-spacer"></span>
|
||||||
|
<!-- <h2 mat-dialog-title >{{doc_data.document_title}}</h2> -->
|
||||||
|
<span class="empty-spacer"></span>
|
||||||
|
<!-- Buttons -->
|
||||||
|
<!-- <button mat-button mat-raised-button mat-icon-button><mat-icon>zoom_in</mat-icon></button>
|
||||||
|
<button mat-button mat-raised-button mat-icon-button><mat-icon>zoom_out</mat-icon></button> -->
|
||||||
|
<button mat-button class="toolbar-icon" (click)="zoom('positive')" class="hover-icon" matTooltip="Zoom In" matTooltipPosition="above"><mat-icon>zoom_in</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon"(click)="zoom('negative')" class="hover-icon" matTooltip="Zoom Out" matTooltipPosition="above"><mat-icon>zoom_out</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="rotate('left')" class="hover-icon" matTooltip="Rotate Left" matTooltipPosition="above"><mat-icon>rotate_left</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon"(click)="rotate('right')" class="hover-icon" matTooltip="Rotate Right" matTooltipPosition="above"><mat-icon>rotate_right</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="move(10, 0)" class="hover-icon" matTooltip="Move Left" matTooltipPosition="above"><mat-icon>arrow_back</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="move(-10, 0)"class="hover-icon" matTooltip="Move Right" matTooltipPosition="above"><mat-icon>arrow_forward</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="scale('x')" class="hover-icon" matTooltip="Move Down" matTooltipPosition="above"><mat-icon>arrow_downward</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="scale('y')" class="hover-icon" matTooltip="Move Up" matTooltipPosition="above"><mat-icon>arrow_upward</mat-icon></button>
|
||||||
|
<button mat-button class="toolbar-icon" (click)="clear()" class="hover-icon" matTooltip="clear" matTooltipPosition="above"><mat-icon>cached</mat-icon></button>
|
||||||
|
<!-- <button mat-button mat-raised-button mat-icon-button class="hover-icon" matTooltip="Click for Image focus " matTooltipPosition="above"><mat-icon>filter_center_focus</mat-icon></button> -->
|
||||||
|
<!-- <button mat-button mat-raised-button mat-icon-button class="hover-icon" matTooltip="Click for Image fit" matTooltipPosition="above">Fit to screen</button>-->
|
||||||
|
<!-- <button mat-button mat-raised-button mat-icon-button class="hover-icon" matTooltip="Click for Image ratio" matTooltipPosition="above">1:1</button> -->
|
||||||
|
<button mat-button class="toolbar-icon" mat-dialog-close class="hover-icon" matTooltip="Close" matTooltipPosition="right"><mat-icon>close</mat-icon></button>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
</mat-toolbar>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div fxFlex="75" align="left" style="padding: 1% !important" >
|
<div fxFlex="75" align="left" style="padding: 1% !important" >
|
||||||
@ -26,21 +50,43 @@
|
|||||||
(cropend)="cropendImage($event)">
|
(cropend)="cropendImage($event)">
|
||||||
</angular-cropper>
|
</angular-cropper>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="docs-buttons" >
|
||||||
|
<div class="btn-group" style=" padding-top: 24px;">
|
||||||
|
<button type="button" mat-raised-button color="warn" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}" *ngIf="imageUrl" (click)="preImg()">
|
||||||
|
<span class="docs-tooltip" data-toggle="tooltip" title="">
|
||||||
|
Preview Image
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div style="display: none;">
|
||||||
|
<canvas #canvasEl width=400 height=400></canvas>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="downloadLink" style=" padding-bottom: 24px;">
|
||||||
|
<img [src]="downloadLink" style="height: 188px"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="25" align="end" style="padding: 10px !important;" >
|
<div fxFlex="25" align="end" style="padding: 10px !important;" >
|
||||||
<div class="col-xs-12 col-sm-3 crop-res">
|
<div class="col-xs-12 col-sm-3 crop-res">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div *ngIf="imageUrls.length > 0">
|
<div *ngIf="imageUrls.length > 0">
|
||||||
<h5>Images:</h5>
|
<h5 *ngIf="showCropper == false">Please Select Image:</h5>
|
||||||
|
<h5 *ngIf="showCropper == true"> Selected Image:</h5>
|
||||||
<div>
|
<div>
|
||||||
<img *ngFor="let imgUrl of imageUrls; let i = index" [src]="imgUrl" class="thumb" (click)="selectImg(i)" />
|
<img *ngFor="let imgUrl of imageUrls; let i = index" [src]="imgUrl" class="thumb" (click)="selectImg(i)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="card-title">Toolbar:</h5>
|
<!-- <h5 class="card-title">Toolbar:</h5> -->
|
||||||
<div class="docs-buttons">
|
<div class="docs-buttons">
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.zoom(0.1)">
|
||||||
<span class="fa fa-search-plus"></span>
|
<span class="fa fa-search-plus"></span>
|
||||||
@ -51,9 +97,9 @@
|
|||||||
<span class="fa fa-search-minus"></span>
|
<span class="fa fa-search-minus"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.move(-10, 0)">
|
||||||
<span class="fa fa-arrow-left"></span>
|
<span class="fa fa-arrow-left"></span>
|
||||||
@ -74,9 +120,9 @@
|
|||||||
<span class="fa fa-arrow-down"></span>
|
<span class="fa fa-arrow-down"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.rotate(-45)">
|
||||||
<span class="fa fa-rotate-left"></span>
|
<span class="fa fa-rotate-left"></span>
|
||||||
@ -87,9 +133,9 @@
|
|||||||
<span class="fa fa-rotate-right"></span>
|
<span class="fa fa-rotate-right"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.scaleX(-1)">
|
||||||
<span class="fa fa-arrows-h"></span>
|
<span class="fa fa-arrows-h"></span>
|
||||||
@ -100,15 +146,15 @@
|
|||||||
<span class="fa fa-arrows-v"></span>
|
<span class="fa fa-arrows-v"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.clear()">
|
||||||
<span class="fa fa-remove"></span>
|
<span class="fa fa-remove"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- <div class="btn-group">
|
<!-- <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">
|
<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">
|
||||||
@ -123,46 +169,40 @@
|
|||||||
</button>
|
</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="btn-group">
|
<!-- <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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.reset()">
|
||||||
<span class="fa fa-refresh"></span>
|
<span class="fa fa-refresh"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</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">
|
<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="docs-tooltip" data-toggle="tooltip" title="" data-original-title="cropper.destroy()">
|
||||||
<span class="fa fa-power-off"></span>
|
<span class="fa fa-power-off"></span>
|
||||||
</span>
|
</span>
|
||||||
</button> -->
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- <h5>Text:</h5>
|
<!-- <h5>Text:</h5>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<input type="text" class="form-control" aria-label="Text input with checkbox" [(ngModel)]="text">
|
<input type="text" class="form-control" aria-label="Text input with checkbox" [(ngModel)]="text">
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div class="btn-group">
|
<div class="btn-group" style=" padding-top: 24px;">
|
||||||
<button type="button" mat-raised-button color="warn"*ngIf="imageUrl" (click)="saveImg()">
|
<button type="button" mat-raised-button color="warn"*ngIf="imageUrl" [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}" (click)="saveImg()">
|
||||||
<span class="docs-tooltip" data-toggle="tooltip" title="">
|
<span class="docs-tooltip" data-toggle="tooltip" title="">
|
||||||
Preview Images
|
Save
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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;">
|
|
||||||
|
<!-- <div style="display: none;">
|
||||||
<canvas #canvasEl width=400 height=400></canvas>
|
<canvas #canvasEl width=400 height=400></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="downloadLink">
|
<div *ngIf="downloadLink" style=" padding-bottom: 24px;">
|
||||||
<img [src]="downloadLink" />
|
<img [src]="downloadLink" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
</div><!-- /.docs-buttons -->
|
</div><!-- /.docs-buttons -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
// @import "~bootstrap/dist/css/bootstrap.min.css";
|
|
||||||
|
|
||||||
.crop-res img {
|
.crop-res img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -168,3 +167,41 @@
|
|||||||
margin: 3px;
|
margin: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
color: #fff !important;
|
||||||
|
// background-color: #e00201 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-icon {
|
||||||
|
padding: 0 14px;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-spacer {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-little-spacer {
|
||||||
|
flex: 0.01 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-container {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.img-container {
|
||||||
|
width: 640px;
|
||||||
|
height: 480px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-preview {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
float: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.cropper-container cropper-bg{
|
||||||
|
width: 779px !important;
|
||||||
|
height: 393px !important;
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.se
|
|||||||
import {AfterViewInit, Component, ElementRef, ViewChild,OnInit, Inject} from '@angular/core';
|
import {AfterViewInit, Component, ElementRef, ViewChild,OnInit, Inject} from '@angular/core';
|
||||||
import {CropperComponent} from 'angular-cropperjs';
|
import {CropperComponent} from 'angular-cropperjs';
|
||||||
import mergeImages from 'merge-images';
|
import mergeImages from 'merge-images';
|
||||||
|
import { SalesPdService } from '../../../services/sales-pd.service';
|
||||||
declare var $: any;
|
declare var $: any;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-image-edit',
|
selector: 'app-image-edit',
|
||||||
@ -18,8 +18,8 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
imageUrl: any;
|
imageUrl: any;
|
||||||
imageUrls = [];
|
imageUrls = [];
|
||||||
cropperRes: string;
|
cropperRes: string;
|
||||||
showCropper: boolean;
|
showCropper: boolean =false
|
||||||
savedImg: boolean;
|
savedImg: boolean =false;
|
||||||
resizedBase64: any;
|
resizedBase64: any;
|
||||||
cropperConfig: object = {
|
cropperConfig: object = {
|
||||||
movable: true,
|
movable: true,
|
||||||
@ -38,11 +38,16 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
private context: CanvasRenderingContext2D;
|
private context: CanvasRenderingContext2D;
|
||||||
role_id: string;
|
role_id: string;
|
||||||
|
|
||||||
constructor(@Inject(MAT_DIALOG_DATA) public data,private dialogRef: MatDialogRef<ImageEditComponent> ) {
|
constructor(private SalesPdService:SalesPdService,@Inject(MAT_DIALOG_DATA) public data,private dialogRef: MatDialogRef<ImageEditComponent> ) {
|
||||||
console.log(this.data)
|
console.log(this.data)
|
||||||
this.role_id = localStorage.getItem('LenderRoleID')
|
this.role_id = localStorage.getItem('LenderRoleID')
|
||||||
this.imageUrls.push(this.data);
|
this.imageUrls.push(this.data.img);
|
||||||
// this.onFileSelected(this.data)
|
// this.onFileSelected(this.data)
|
||||||
|
console.log(this.imageUrls)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.showCropper = true;
|
||||||
|
// this.refreshCrop(this.imageUrls[1]);
|
||||||
|
// }, 3000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +55,7 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
this.context = (this.canvasEl
|
this.context = (this.canvasEl
|
||||||
.nativeElement as HTMLCanvasElement).getContext("2d");
|
.nativeElement as HTMLCanvasElement).getContext("2d");
|
||||||
this.draw('');
|
this.draw('');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private draw(src: string) {
|
private draw(src: string) {
|
||||||
@ -95,6 +101,7 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
refreshCrop(img) {
|
refreshCrop(img) {
|
||||||
this.imageUrl = img;
|
this.imageUrl = img;
|
||||||
this.showCropper = true;
|
this.showCropper = true;
|
||||||
|
console.log(this.imageUrls)
|
||||||
}
|
}
|
||||||
|
|
||||||
cropendImage(event) {
|
cropendImage(event) {
|
||||||
@ -161,8 +168,15 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
|
|
||||||
saveImg() {
|
saveImg() {
|
||||||
this.savedImg = true;
|
this.savedImg = true;
|
||||||
this.draw(this.cropperRes);
|
this.draw(this.cropperRes);
|
||||||
console.log(this.cropperRes)
|
console.log(this.cropperRes)
|
||||||
|
this.save()
|
||||||
|
}
|
||||||
|
preImg() {
|
||||||
|
this.savedImg = true;
|
||||||
|
this.draw(this.cropperRes);
|
||||||
|
console.log(this.cropperRes)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mergeAll() {
|
mergeAll() {
|
||||||
@ -170,4 +184,19 @@ export class ImageEditComponent implements AfterViewInit {
|
|||||||
.then(b64 => this.mergedRes = b64);
|
.then(b64 => this.mergedRes = b64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save(){
|
||||||
|
let params={"fk_sales_pd_id":this.data.sales_pd_id,"img":this.cropperRes,"img_name":this.data.question_key,"location": this.data.location,'img_id':this.data.img_id }
|
||||||
|
|
||||||
|
let form_structure = this.data.json
|
||||||
|
console.log(params,form_structure)
|
||||||
|
this.SalesPdService.saveSalesPDImage(params,form_structure).subscribe(apiresult=>{
|
||||||
|
console.log(apiresult)
|
||||||
|
if(apiresult['status'] == 200){
|
||||||
|
console.log(apiresult)
|
||||||
|
this.dialogRef.close(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,29 +77,39 @@
|
|||||||
<div class="top">
|
<div class="top">
|
||||||
<!-- Thumbnail-->
|
<!-- Thumbnail-->
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<div >
|
<div class="date" style="margin-bottom: -35px; text-align: end;" *ngIf="role_id == '20'">
|
||||||
<!-- <button mat-raised-button mat-icon-button mat-mini-fab
|
<!-- <button mat-raised-button mat-icon-button mat-mini-fab
|
||||||
class="date mr-1 mb-1 hover-icon" type="button"
|
class="date mr-1 mb-1 hover-icon" type="button"
|
||||||
matTooltip="edit" (click)="imageCrop(doc)"
|
matTooltip="edit" (click)="imageCrop(doc)"
|
||||||
matTooltipPosition="right" >
|
matTooltipPosition="right" >
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button> -->
|
</button> -->
|
||||||
<div >
|
<button mat-raised-button mat-icon-button mat-mini-fab [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}" style=" width: 21px;
|
||||||
|
height: 20px;"
|
||||||
|
type="button"
|
||||||
|
matTooltip="Edit" (click)="imageCrop(parent_ques.get('answer_value').value,parent_ques)"
|
||||||
|
matTooltipPosition="right">
|
||||||
|
<mat-icon style="font-size: 14px; line-height: 0px;">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">
|
<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>
|
||||||
</div><br/>
|
</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>
|
||||||
|
<!-- <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> -->
|
||||||
|
</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)"> -->
|
||||||
<!-- <button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><mat-icon style="font-size:22px" name="md-trash"></mat-icon></button> -->
|
<!-- <button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><mat-icon style="font-size:22px" name="md-trash"></mat-icon></button> -->
|
||||||
</div>
|
</div>
|
||||||
@ -358,7 +368,7 @@
|
|||||||
<hr class="hr">
|
<hr class="hr">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
<h5> {{parent_ques.get('group_title').value}}</h5>
|
<h5> {{parent_ques.get('group_title').value}} </h5>
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|
||||||
@ -377,9 +387,26 @@
|
|||||||
group_ques.value.questions[0].answer_value == ''">Image is not captured.</p>
|
group_ques.value.questions[0].answer_value == ''">Image is not captured.</p>
|
||||||
<div fxLayout="column" style="align-self: center;text-align: center;padding: 0" *ngFor="let single_ques of group_ques.controls.questions['controls'];let s_i=index;let s_l=last"
|
<div fxLayout="column" style="align-self: center;text-align: center;padding: 0" *ngFor="let single_ques of group_ques.controls.questions['controls'];let s_i=index;let s_l=last"
|
||||||
[formGroupName]="s_i">
|
[formGroupName]="s_i">
|
||||||
<div style="width: 100%;justify-content: center;text-align: center;align-content: center;margin:2%;" *ngIf="single_ques.get('answer_value').value != ''">
|
<div style="width: 100%;justify-content: center;text-align: center;align-content: center;margin:2%;padding-right: 20px;" *ngIf="single_ques.get('answer_value').value != ''">
|
||||||
<div fxLayout="row" style="width: 100%">
|
<div fxLayout="row" style="width: 100%">
|
||||||
<img [src]="single_ques.get('answer_value').value" imageViewer class="doc-image-bucket" ><br/>
|
<div class="top">
|
||||||
|
<!-- Thumbnail-->
|
||||||
|
<div class="thumbnail">
|
||||||
|
<div class="date" style="margin-bottom: -35px; text-align: end;" *ngIf="role_id == '20'">
|
||||||
|
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button mat-mini-fab [ngStyle.xs]="{'font-size':'16px','font-weight':'bold'}" [ngStyle]="{'background-color':role_id == '20' ? '#0d93a9' :'#f44336'}" style=" width: 21px;
|
||||||
|
height: 20px;"
|
||||||
|
class="date1" type="button"
|
||||||
|
matTooltip="Edit" (click)="imageCrop(single_ques.get('answer_value').value,single_ques,g_i)"
|
||||||
|
matTooltipPosition="right">
|
||||||
|
<mat-icon style="font-size: 14px; line-height: 0px;">edit</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<img [src]="single_ques.get('answer_value').value" imageViewer class="doc-image-bucket" >
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" style="width: 130px;margin-bottom: 5px;text-align: left">
|
<div fxLayout="row" style="width: 130px;margin-bottom: 5px;text-align: left">
|
||||||
<div >
|
<div >
|
||||||
|
|||||||
@ -84,6 +84,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: -10px;
|
right: -10px;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
|
|
||||||
background-color: #e00201 ;
|
background-color: #e00201 ;
|
||||||
}
|
}
|
||||||
.top .thumbnail .date1 {
|
.top .thumbnail .date1 {
|
||||||
|
|||||||
@ -85,7 +85,9 @@ export class QuesTemplateComponent {
|
|||||||
pdstatus: string;
|
pdstatus: string;
|
||||||
local_city1: any;
|
local_city1: any;
|
||||||
local_pincode1: any;
|
local_pincode1: any;
|
||||||
|
role_id: any;
|
||||||
constructor( private cameraService: CameraService,public dialogRef: MatDialogRef<SectionListComponent>,private route: ActivatedRoute,private router: Router,private dialog:MatDialog,private _fb:FormBuilder,private questionService:QuestionServiceService,private SalesPdService:SalesPdService,notifier: NotifierService,private loaderService:LoaderService) {
|
constructor( private cameraService: CameraService,public dialogRef: MatDialogRef<SectionListComponent>,private route: ActivatedRoute,private router: Router,private dialog:MatDialog,private _fb:FormBuilder,private questionService:QuestionServiceService,private SalesPdService:SalesPdService,notifier: NotifierService,private loaderService:LoaderService) {
|
||||||
|
this.role_id = localStorage.getItem('LenderRoleID')
|
||||||
console.log('Hello QuesTemplateComponent Component');
|
console.log('Hello QuesTemplateComponent Component');
|
||||||
this.text = 'Hello World';
|
this.text = 'Hello World';
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
@ -181,7 +183,7 @@ this.pdstatus = status.status
|
|||||||
console.log(this.pdstatus)
|
console.log(this.pdstatus)
|
||||||
// alert('pass');
|
// alert('pass');
|
||||||
console.log(sales_pd_id)
|
console.log(sales_pd_id)
|
||||||
// this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
||||||
// this.checkGroupandPatchValues()
|
// this.checkGroupandPatchValues()
|
||||||
// this.loadingProvider.pdloader("Fetching Data...")
|
// this.loadingProvider.pdloader("Fetching Data...")
|
||||||
let params={sales_pd_id:sales_pd_id,section_id:this.local_ques_JSON.section_id}
|
let params={sales_pd_id:sales_pd_id,section_id:this.local_ques_JSON.section_id}
|
||||||
@ -429,7 +431,8 @@ console.log(this.pdstatus)
|
|||||||
checkGroupandPatchValues(){
|
checkGroupandPatchValues(){
|
||||||
console.log('371')
|
console.log('371')
|
||||||
let modified=this.original_result_data
|
let modified=this.original_result_data
|
||||||
console.log(modified)
|
console.log( this.questions_JSON ,modified)
|
||||||
|
// this.questions_JSON = modified.questions
|
||||||
modified.questions.forEach((parent_ques,p_i)=>{
|
modified.questions.forEach((parent_ques,p_i)=>{
|
||||||
// FOR ADDING THE GROUP QUES TO DISPLAY WITHOUT CONSIDERING INDEX 0
|
// FOR ADDING THE GROUP QUES TO DISPLAY WITHOUT CONSIDERING INDEX 0
|
||||||
if(parent_ques.is_repeatable == '1'){
|
if(parent_ques.is_repeatable == '1'){
|
||||||
@ -747,7 +750,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
this.geoCoordinates = localStorage.getItem('current_coordinates')
|
this.geoCoordinates = localStorage.getItem('current_coordinates')
|
||||||
console.log(this.geoCoordinates)
|
console.log(this.geoCoordinates)
|
||||||
//SENDING SINGLE IMAGE TO API WITH PRIMARY KEY
|
//SENDING SINGLE IMAGE TO API WITH PRIMARY KEY
|
||||||
let params={"fk_sales_pd_id":"","img":watermarked_img,"img_name":parent_control.value.question_key,"location": geoCoordinates}
|
let params={"fk_sales_pd_id":"","img":watermarked_img,"img_name":parent_control.value.question_key,"location": geoCoordinates ,"img_id":null}
|
||||||
let storage_param=this.questions_JSON
|
let storage_param=this.questions_JSON
|
||||||
const form_structure=this.questions_JSON
|
const form_structure=this.questions_JSON
|
||||||
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
||||||
@ -766,7 +769,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
|
|
||||||
this.emittedFormGroup = this.quesAnsForm.getRawValue()
|
this.emittedFormGroup = this.quesAnsForm.getRawValue()
|
||||||
this.imageUploadCheck.emit(this.emittedFormGroup);
|
this.imageUploadCheck.emit(this.emittedFormGroup);
|
||||||
|
console.log(params,form_structure)
|
||||||
|
|
||||||
this.SalesPdService.saveSalesPDImage(params,form_structure).subscribe(apiresult=>{
|
this.SalesPdService.saveSalesPDImage(params,form_structure).subscribe(apiresult=>{
|
||||||
console.log(apiresult)
|
console.log(apiresult)
|
||||||
@ -2062,13 +2065,37 @@ this.proceedonChangeProperty(modified)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
imageCrop(pic) {
|
imageCrop(pic,question,index) {
|
||||||
|
let modified=this.original_result_data
|
||||||
|
console.log(modified,index)
|
||||||
|
console.log(pic,question)
|
||||||
|
let key = question.get('question_key').value
|
||||||
|
let location ;
|
||||||
|
let imgid ;
|
||||||
|
console.log(key,location)
|
||||||
|
modified.questions.forEach(element => {
|
||||||
|
if(element.question_key == key){
|
||||||
|
|
||||||
|
if(element.is_repeatable == null){
|
||||||
|
location = element.image_location
|
||||||
|
imgid = element.image_id
|
||||||
|
}else{
|
||||||
|
console.log( element.questions_group)
|
||||||
|
location = element.questions_group[index].questions[0].image_location
|
||||||
|
imgid = element.questions_group[index].questions[0].image_id
|
||||||
|
// element.questions_group.forEach(e => {
|
||||||
|
//location = e.questions[index].image_location
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(key,location)
|
||||||
// let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
|
// let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
|
||||||
//pic.pdid = this.pdid;
|
//pic.pdid = this.pdid;
|
||||||
const imageRef = this.dialog.open(ImageEditComponent, {
|
const imageRef = this.dialog.open(ImageEditComponent, {
|
||||||
// const imageRef = this.dialog.open(CropToolsComponent, {
|
// const imageRef = this.dialog.open(CropToolsComponent, {
|
||||||
data: pic,
|
data: {'json':this.questions_JSON,img:pic,'sales_pd_id':modified.sales_pd_id,'question_key':key,'location':location,'img_id':imgid},
|
||||||
maxWidth: '100vw',
|
maxWidth: '100vw',
|
||||||
maxHeight: '100vh',
|
maxHeight: '100vh',
|
||||||
height: '200%',
|
height: '200%',
|
||||||
@ -2076,10 +2103,10 @@ this.proceedonChangeProperty(modified)
|
|||||||
});
|
});
|
||||||
imageRef.afterClosed()
|
imageRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// if (dataresult == 1) {
|
if (dataresult == 1) {
|
||||||
// this.documentsAndFilesList = [];
|
this.notifier.notify("success","Image Saved Successfully");
|
||||||
// this.retriveFile();
|
this.getSalesPDSectionFromApi(modified.sales_pd_id)
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ export class SingleCaptureBtnComponent implements OnInit {
|
|||||||
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
||||||
result => {
|
result => {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
// this.singleDataEmitter.emit(result)
|
this.singleDataEmitter.emit(result)
|
||||||
this.loaderService.closeMatSpinnerDialog()
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|||||||
@ -400,8 +400,8 @@ export class SectionListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
getTemplate(){
|
getTemplate(){
|
||||||
|
|||||||
@ -715,4 +715,14 @@ generatesateliteimage(param:any): Observable<any>{
|
|||||||
// return this._http.get<any[]>("http://localhost/AWSEC2/sparqapi/api/uploadSalesPDDataToCETApp/590");
|
// return this._http.get<any[]>("http://localhost/AWSEC2/sparqapi/api/uploadSalesPDDataToCETApp/590");
|
||||||
return this._http.get<any[]>(api_url +"uploadSalesPDDataToCETApp/"+id);
|
return this._http.get<any[]>(api_url +"uploadSalesPDDataToCETApp/"+id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadTemplatelocal(){
|
||||||
|
|
||||||
|
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
|
||||||
|
return returnValue
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,12 +76,14 @@ export class LoginComponent implements OnInit{
|
|||||||
let auth = { 'Username': mailid, 'Password': password };
|
let auth = { 'Username': mailid, 'Password': password };
|
||||||
this.loaderService.showMatSpinnerDialog('');
|
this.loaderService.showMatSpinnerDialog('');
|
||||||
this.aws.dologin(auth).subscribe(res => {
|
this.aws.dologin(auth).subscribe(res => {
|
||||||
// console.log("do login",res)
|
console.log("do login",res)
|
||||||
if (res !== undefined) {
|
if (res !== undefined) {
|
||||||
this.getCommonSettings();
|
this.getCommonSettings();
|
||||||
// local storage for validate user access
|
// local storage for validate user access
|
||||||
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
|
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
|
||||||
console.log(res.idToken.payload ["custom:role_id"]);
|
localStorage.setItem('user_role_nav',res.idToken.payload["custom:role_id"]);
|
||||||
|
let role = localStorage.getItem('user_role');
|
||||||
|
console.log(res.idToken.payload ["custom:role_id"],role);
|
||||||
// alert(localStorage.getItem('user_role'))
|
// alert(localStorage.getItem('user_role'))
|
||||||
if(res.idToken.payload["custom:role_id"]=='30' || res.idToken.payload["custom:role_id"]=='10' || res.idToken.payload["custom:role_id"]=='11' || res.idToken.payload["custom:role_id"]=='13' || res.idToken.payload["custom:role_id"]=='15' || res.idToken.payload["custom:role_id"]=='17' || res.idToken.payload["custom:role_id"]=='19')
|
if(res.idToken.payload["custom:role_id"]=='30' || res.idToken.payload["custom:role_id"]=='10' || res.idToken.payload["custom:role_id"]=='11' || res.idToken.payload["custom:role_id"]=='13' || res.idToken.payload["custom:role_id"]=='15' || res.idToken.payload["custom:role_id"]=='17' || res.idToken.payload["custom:role_id"]=='19')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -858,13 +858,6 @@
|
|||||||
"validator": "Validators.required",
|
"validator": "Validators.required",
|
||||||
"message": "Employer/Business Name Required",
|
"message": "Employer/Business Name Required",
|
||||||
"value": null
|
"value": null
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pattern",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "[A-Za-z ]*",
|
|
||||||
"message": "alphabets only ",
|
|
||||||
"value": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"onchange_properties": null
|
"onchange_properties": null
|
||||||
@ -900,148 +893,157 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"question": "Pincode",
|
"question": [
|
||||||
"question_key": "officer_pincode",
|
{
|
||||||
"field_width": "33",
|
"question": "Workplace Address Details",
|
||||||
"type": "3",
|
"question_key": "officer_address",
|
||||||
"answers": null,
|
"place_holder": "Enter door no,street",
|
||||||
"api_properties": "local_pincode",
|
"field_width": "33",
|
||||||
"onchange_properties": [
|
"type": "1",
|
||||||
{
|
"answers": null,
|
||||||
"purpose": "FORM_CTRL",
|
"api_properties": null,
|
||||||
"form_controls": [
|
"onchange_properties": null,
|
||||||
{
|
"is_repeatable": null,
|
||||||
"insert_index": "officer_pincode",
|
"field_type": "str&num",
|
||||||
"expression": "(officer_pincode == 1)",
|
"validations": [
|
||||||
"value_keys": [
|
{
|
||||||
"officer_pincode"
|
"name": "required",
|
||||||
],
|
"isactive": "1",
|
||||||
"questions": [
|
"validator": "Validators.required",
|
||||||
{
|
"message": "Address Required",
|
||||||
"question_key": "officer_pincode_others",
|
"value": null
|
||||||
"question": "Specify the Pincode",
|
}
|
||||||
"place_holder": "Enter the Pincode",
|
]
|
||||||
"type": "1",
|
},
|
||||||
"api_properties": null,
|
{
|
||||||
"answers": null,
|
"question": "State",
|
||||||
"onchange_properties": null,
|
"question_key": "residence_state",
|
||||||
"is_repeatable": null,
|
"type": "3",
|
||||||
"field_type": "num",
|
"field_width": "33",
|
||||||
"validations": [
|
"answers": null,
|
||||||
{
|
"api_properties": {
|
||||||
"name": "required",
|
"api": "getListOfMaster",
|
||||||
"isactive": "1",
|
"api_method": "POST",
|
||||||
"validator": "Validators.required",
|
"params": {
|
||||||
"message": "Pincode is Required",
|
"master_name": "STATE"
|
||||||
"value": null
|
},
|
||||||
},
|
"fields": [
|
||||||
{
|
"state_id",
|
||||||
"name": "pattern",
|
"name"
|
||||||
"isactive": "1",
|
]
|
||||||
"validator": "[0-9]{6}",
|
},
|
||||||
"message": "Pincode should be 6 digit",
|
"onchange_properties": [
|
||||||
"value": null
|
{
|
||||||
}
|
"purpose": "api2",
|
||||||
]
|
"api": "getListOfStatesAndCities",
|
||||||
}
|
"api_method": "POST",
|
||||||
]
|
"params": "{records:{state_id:'value_of_answer'}}",
|
||||||
}
|
"fields": [
|
||||||
]
|
"state_id",
|
||||||
}
|
"name"
|
||||||
],
|
],
|
||||||
"is_repeatable": null,
|
"local_variable": "local_city1"
|
||||||
"validations": [
|
}
|
||||||
{
|
],
|
||||||
"name": "required",
|
"is_repeatable": null,
|
||||||
"isactive": "1",
|
"validations": [
|
||||||
"validator": "Validators.required",
|
{
|
||||||
"message": "Pincode Required",
|
"name": "required",
|
||||||
"value": null
|
"isactive": "1",
|
||||||
}
|
"validator": "Validators.required",
|
||||||
]
|
"message": "State Required",
|
||||||
},
|
"value": null
|
||||||
{
|
}
|
||||||
"question": "City",
|
]
|
||||||
"question_key": "officer_city",
|
},
|
||||||
"field_width": "33",
|
{
|
||||||
"type": "3",
|
"question": "City",
|
||||||
"answers": null,
|
"question_key": "officer_state",
|
||||||
"api_properties": "local_city",
|
"type": "3",
|
||||||
"onchange_properties": null,
|
"field_width": "33",
|
||||||
"is_repeatable": null,
|
"answers": null,
|
||||||
"validations": [
|
"api_properties": "local_city1",
|
||||||
{
|
"onchange_properties": null,
|
||||||
"name": "required",
|
"is_repeatable": null,
|
||||||
"isactive": "1",
|
"validations": [
|
||||||
"validator": "Validators.required",
|
{
|
||||||
"message": "CIty Required",
|
"name": "required",
|
||||||
"value": null
|
"isactive": "1",
|
||||||
}
|
"validator": "Validators.required",
|
||||||
]
|
"message": "CIty Required",
|
||||||
},
|
"value": null
|
||||||
{
|
}
|
||||||
"question": "State",
|
]
|
||||||
"question_key": "officer_state",
|
},
|
||||||
"field_width": "33",
|
{
|
||||||
"type": "3",
|
"question": "Pincode",
|
||||||
"answers": null,
|
"question_key": "officer_pincode",
|
||||||
"api_properties": {
|
"type": "3",
|
||||||
"api": "getListOfMaster",
|
"field_width": "33",
|
||||||
"api_method": "POST",
|
"answers": null,
|
||||||
"params": {
|
"api_properties": "local_pincode1",
|
||||||
"master_name": "STATE"
|
"onchange_properties": [
|
||||||
},
|
{
|
||||||
"fields": [
|
"purpose": "FORM_CTRL",
|
||||||
"state_id",
|
"form_controls": [
|
||||||
"name"
|
{
|
||||||
]
|
"insert_index": "officer_pincode",
|
||||||
},
|
"expression": "(officer_pincode == 1)",
|
||||||
"onchange_properties": [
|
"value_keys": [
|
||||||
{
|
"officer_pincode"
|
||||||
"purpose": "api",
|
],
|
||||||
"api": "getListOfStatesAndCities",
|
"questions": [
|
||||||
"api_method": "POST",
|
{
|
||||||
"params": "{records:{state_id:'value_of_answer'}}",
|
"question_key": "residence_pincode_others",
|
||||||
"fields": [
|
"question": "Specify the Pincode",
|
||||||
"state_id",
|
"place_holder": "Enter the Pincode",
|
||||||
"name"
|
"type": "1",
|
||||||
],
|
"api_properties": null,
|
||||||
"local_variable": "local_city"
|
"answers": null,
|
||||||
}
|
"onchange_properties": null,
|
||||||
],
|
"is_repeatable": null,
|
||||||
"is_repeatable": null,
|
"field_type": "num",
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"name": "required",
|
"name": "required",
|
||||||
"isactive": "1",
|
"isactive": "1",
|
||||||
"validator": "Validators.required",
|
"validator": "Validators.required",
|
||||||
"message": "State Required",
|
"message": "Pincode is Required",
|
||||||
"value": null
|
"value": null
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
},
|
"name": "pattern",
|
||||||
{
|
"isactive": "1",
|
||||||
"question": "Workplace Address Details",
|
"validator": "[0-9]{6}",
|
||||||
"question_key": "officer_address",
|
"message": "Pincode should be 6 digit",
|
||||||
"field_width": "33",
|
"value": null
|
||||||
"place_holder": "Enter door no,street",
|
}
|
||||||
"type": "1",
|
]
|
||||||
"answers": null,
|
}
|
||||||
"api_properties": null,
|
]
|
||||||
"onchange_properties": null,
|
}
|
||||||
"is_repeatable": null,
|
]
|
||||||
"field_type": "str&num",
|
}
|
||||||
"validations": [
|
],
|
||||||
{
|
"is_repeatable": null,
|
||||||
"name": "required",
|
"validations": [
|
||||||
"isactive": "1",
|
{
|
||||||
"validator": "Validators.required",
|
"name": "required",
|
||||||
"message": "Address Required",
|
"isactive": "1",
|
||||||
"value": null
|
"validator": "Validators.required",
|
||||||
}
|
"message": "Pincode Required",
|
||||||
]
|
"value": null
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"is_repeatable": "1",
|
||||||
|
"group_title": "Workplace verification",
|
||||||
|
"group_key": "Office verification",
|
||||||
|
"form_name": "Office verification"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user