merge : kms
This commit is contained in:
parent
1061d03edd
commit
04f5f882b2
@ -108,7 +108,7 @@ export class DashboardComponent {
|
||||
|
||||
|
||||
ngOnInit(){
|
||||
|
||||
// console.clear();
|
||||
this.getDoughnutChartData();
|
||||
|
||||
|
||||
@ -203,7 +203,7 @@ getDoughnutChartData(){
|
||||
|
||||
this._dashboardService.getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr).subscribe(data => {
|
||||
this.flag = 1;
|
||||
console.log(' ***** Doughnut Chart Data *****',data);
|
||||
// console.log(' ***** Doughnut Chart Data *****',data);
|
||||
|
||||
let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft');
|
||||
let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||
@ -215,7 +215,7 @@ getDoughnutChartData(){
|
||||
|
||||
if(data.records.current_month.length != 0){
|
||||
//console.log('If Condition monthLY');
|
||||
console.log('Monthly Status',data.records.current_month);
|
||||
// console.log('Monthly Status',data.records.current_month);
|
||||
|
||||
let MonthlyFullPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'FULL' );
|
||||
let MonthlySmartPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'SMART' );
|
||||
@ -496,9 +496,9 @@ getDoughnutChartData(){
|
||||
this.total2 = this.tempDataSmartPD.reduce((a, b) => a + b, 0);
|
||||
this.total3 = this.tempDataTelePD.reduce((a, b) => a + b, 0);
|
||||
|
||||
console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
// console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
// console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
// console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
|
||||
})
|
||||
}
|
||||
@ -552,7 +552,7 @@ onChange(e: any,flag: any) {
|
||||
|
||||
this._dashboardService.getPDDetailForDoughnut(fromdate,todate,this.selectedCity,this.selectedLender).subscribe(data => {
|
||||
|
||||
console.log(' *****Updated Date Doughnut Chart Data *****',data);
|
||||
// console.log(' *****Updated Date Doughnut Chart Data *****',data);
|
||||
|
||||
if(data.records.current_month.length != 0){
|
||||
this.total1 = 0;
|
||||
@ -578,7 +578,7 @@ onChange(e: any,flag: any) {
|
||||
|
||||
if(data.records.current_month.length != 0){
|
||||
//console.log('If Condition monthLY');
|
||||
console.log('Monthly Status',data.records.current_month);
|
||||
// console.log('Monthly Status',data.records.current_month);
|
||||
|
||||
let MonthlyFullPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'FULL' );
|
||||
let MonthlySmartPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'SMART' );
|
||||
@ -866,9 +866,9 @@ onChange(e: any,flag: any) {
|
||||
this.SmartCanvas.chart.update();
|
||||
this.TeleCanvas.chart.update();
|
||||
|
||||
console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
// console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
// console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
// console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
|
||||
})
|
||||
|
||||
|
||||
@ -53,9 +53,9 @@ export class DashboardService {
|
||||
|
||||
getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr): Observable<any> {
|
||||
|
||||
console.log(' From : ' + fromdate + ' To : ' + todate + ' Lender Array : ' + lenderarr + ' City Array : ' + cityarr);
|
||||
// console.log(' From : ' + fromdate + ' To : ' + todate + ' Lender Array : ' + lenderarr + ' City Array : ' + cityarr);
|
||||
|
||||
return this._http.post(this.apiUrl+'getDashBoardMaster', {
|
||||
return this._http.post(this.apiUrl+'getDashBoardMaster', {
|
||||
"fromdate":fromdate != '' && fromdate != null && fromdate != undefined ? fromdate : '',
|
||||
"todate": todate != '' && todate != null && todate != undefined ? todate : '',
|
||||
"cityarr":cityarr,"lenderarr": lenderarr})
|
||||
|
||||
@ -87,21 +87,22 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||
/** 3) Getting PD Details For Alert Message */
|
||||
this._dashboardService.getAlertDetail().subscribe(data => {
|
||||
|
||||
console.log(' *****Layout Alert Message *****');
|
||||
console.log('Layout Alert Message Whole Data',data);
|
||||
// console.log(' *****Layout Alert Message *****');
|
||||
// console.log('Layout Alert Message Whole Data',data);
|
||||
|
||||
this.alertCount = data.records.length;
|
||||
this.alertMsgTriggerType = data.records.filter(trigger=>trigger.pd_status == "TRIGGERED" );
|
||||
this.alertMsgAllocateType = data.records.filter(allocate=>allocate.pd_status == "ALLOCATED" );
|
||||
console.log('Layout Alert Message',this.alertMsgTriggerType);
|
||||
console.log('Layout Alert Message',this.alertMsgAllocateType);
|
||||
console.log('Layout Alert Count',this.alertCount);
|
||||
// console.log('Layout Alert Message',this.alertMsgTriggerType);
|
||||
// console.log('Layout Alert Message',this.alertMsgAllocateType);
|
||||
// console.log('Layout Alert Count',this.alertCount);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
// console.clear();
|
||||
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');
|
||||
|
||||
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac() && !this.compactSidebar && this.layoutDir != 'rtl') {
|
||||
@ -185,7 +186,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||
|
||||
changeMenuLayout(value)
|
||||
{
|
||||
console.log(value)
|
||||
// console.log(value)
|
||||
if(value)
|
||||
{
|
||||
this.menuLayout = 'top-menu';
|
||||
|
||||
@ -48,14 +48,14 @@
|
||||
<!-- <mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Lender Contact Person Required</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Mobile Number" formControlName="" type="text" maxlength="10">
|
||||
<input matInput autocomplete="off" placeholder="Lender's Mobile Number" formControlName="" type="text" maxlength="10">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 32%">
|
||||
<!--<mat-form-field style="width: 32%">
|
||||
<input matInput autocomplete="off" placeholder="Lender Contact Number" formControlName="lender_contact_mobile" type="text" (keypress)="keyPress($event)" maxlength="10" required>
|
||||
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('pattern') || pdMain.lender_contact_mobile.hasError('maxlength') || pdMain.lender_contact_mobile.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-form-field>-->
|
||||
|
||||
<mat-form-field style="width: 8%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="stdcode" type="text" (keypress)="keyPress($event)">
|
||||
|
||||
@ -97,8 +97,8 @@ export class AddressComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.clear();
|
||||
console.log('this.address',this.pdAddress);
|
||||
// console.clear();
|
||||
// console.log('this.address',this.pdAddress);
|
||||
this.getMasterDetails('PDLOCATIONAPPROACH',1);
|
||||
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
||||
//this.getMasterDetails('CUSTOMERBEHAVIOUR',3);review doc s.no 3.e
|
||||
@ -113,7 +113,7 @@ export class AddressComponent implements OnInit {
|
||||
params.pd_form_id = '5';
|
||||
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
//const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||
const control = <FormArray>this.addressForm.controls['additional_address_units'];
|
||||
//const additionalPremisesControl = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
|
||||
@ -90,17 +90,26 @@
|
||||
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<p>{{i+1}} , Banking Details
|
||||
<p>Banking Details #{{i+1}}
|
||||
</p>
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
<mat-select placeholder="Account Name" formControlName="applicant_name" [compareWith]="compareObjects">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
</mat-option>
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field *ngIf="itemrow.get('applicant_name').value == 0"> -->
|
||||
<mat-form-field *ngIf="this.OtherFlag[i]">
|
||||
<!-- <mat-select placeholder="Account Name" formControlName="applicant_name" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
</mat-select> --
|
||||
|
||||
!-- <mat-form-field *ngIf="itemrow.get('applicant_name').value == 0"> --
|
||||
!-- <mat-form-field *ngIf="this.OtherFlag[i]"> -->
|
||||
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -43,6 +43,9 @@ export class BankingDetailsComponent implements OnInit {
|
||||
amtInwords : any = [];
|
||||
emiAmtInwords : any = [];
|
||||
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService,
|
||||
@ -79,6 +82,30 @@ export class BankingDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.step = 0;
|
||||
this.initBankingForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
this.getM_AccountType();
|
||||
this.getM_BTLenderList();
|
||||
|
||||
@ -89,11 +116,12 @@ export class BankingDetailsComponent implements OnInit {
|
||||
// // console.log(this.pd_cus_segment);
|
||||
// this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
|
||||
// this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '7';
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
if (data.status == 200) {
|
||||
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
|
||||
@ -105,7 +133,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
} else {
|
||||
result.forEach((datas,index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit);
|
||||
this.selectedBorrower(datas.applicant_name,index);
|
||||
// this.selectedBorrower(datas.applicant_name,index);
|
||||
this.selectedAccTypeChanges(+datas.account_type,index)
|
||||
|
||||
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
|
||||
@ -180,7 +208,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
deleteBankdetails(index: number) {
|
||||
console.log('index value -', index);
|
||||
// console.log('index value -', index);
|
||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
@ -196,9 +224,9 @@ export class BankingDetailsComponent implements OnInit {
|
||||
records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
|
||||
// records.fk_createdby = '252';
|
||||
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||
console.log('data', records);
|
||||
// console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -216,13 +244,33 @@ export class BankingDetailsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
selectedBorrower(e,i){
|
||||
if(e == 0){
|
||||
this.OtherFlag[i] = true;
|
||||
// selectedBorrower(e,i){
|
||||
// if(e == 0){
|
||||
// this.OtherFlag[i] = true;
|
||||
// }
|
||||
// else{
|
||||
// this.OtherFlag[i] = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
else{
|
||||
this.OtherFlag[i] = false;
|
||||
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
selectedAccTypeChanges(event: any,i){
|
||||
|
||||
@ -1118,7 +1118,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.countryDataList.push(val);
|
||||
console.log(this.countryDataList);
|
||||
// console.log(this.countryDataList);
|
||||
}
|
||||
})
|
||||
});
|
||||
@ -1232,7 +1232,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
submitDetails() {
|
||||
|
||||
// let family: any = [];
|
||||
console.log(this.businessForm.value);
|
||||
// console.log(this.businessForm.value);
|
||||
|
||||
if (!this.businessForm.valid) {
|
||||
//console.log(' Requried validation error');
|
||||
|
||||
@ -42,16 +42,17 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('loan_amount').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
|
||||
<mat-select placeholder="Frequency" (selectionChange)="selectedfrequency($event.value,i)"
|
||||
formControlName="frequency" >
|
||||
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('frequency').value == 8">
|
||||
<mat-form-field *ngIf="details.get('frequency').value == 7">
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('frequency').value != ''" style="width:35%">
|
||||
<input matInput autocomplete="off" [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)">
|
||||
<!-- <input matInput autocomplete="off" placeholder="details.get('loan_type').value + Instalment Amount " formControlName="emi" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)"> -->
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('emi').value != ''">{{"₹"}} {{emiAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -64,14 +65,21 @@
|
||||
<input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<!-- <mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
<!-- <mat-option value= 0 >Others</mat-option> -->
|
||||
<!-- <mat-option value= 0 >Others</mat-option> ->
|
||||
</mat-select> -->
|
||||
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" [compareWith]="compareObjects">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
</mat-option>
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- {{details.get('loan_taken_by').value}} -->
|
||||
<!-- <mat-form-field *ngIf="details.get('loan_taken_by').value == 0"> -->
|
||||
<mat-form-field *ngIf="this.OtherFlag[i]">
|
||||
<mat-form-field *ngIf="checkOthers(details.get('loan_taken_by').value)===true" style="width:45%">
|
||||
<input matInput autocomplete="off" placeholder="Specify Borrower" formControlName="others_loan_taken">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -87,10 +95,12 @@
|
||||
</mat-form-field> -->
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:35%">
|
||||
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" >
|
||||
<input matInput autocomplete="off" placeholder="Original Tenure in Months" formControlName="original_tenure" (change)="checkTenure(details)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%">
|
||||
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure" >
|
||||
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure">
|
||||
<mat-error>Invalid Balance Tenure.</mat-error>
|
||||
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" color="primary" (click)="addLoanDetails()"
|
||||
|
||||
@ -22,19 +22,24 @@
|
||||
color: #fff !important;
|
||||
background-color: #e00201 !important;
|
||||
}
|
||||
.my-mat-hint {
|
||||
line-height: 1.2em;
|
||||
transform: translateY(10px);
|
||||
font-size: 75%;
|
||||
}
|
||||
.mat-card-content {
|
||||
background-color: white;
|
||||
}
|
||||
.mat-card-actions {
|
||||
}
|
||||
.mat-card-actions {
|
||||
background-color: white;
|
||||
}
|
||||
::ng-deep .cdk-global-overlay-wrapper{
|
||||
}
|
||||
::ng-deep .cdk-global-overlay-wrapper{
|
||||
justify-content: center !important;
|
||||
}
|
||||
mat-form-field {
|
||||
mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
}
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.p-list-main {
|
||||
background: white;
|
||||
|
||||
@ -48,6 +48,9 @@ export class CurrentLoanComponent implements OnInit {
|
||||
amtInwords : any = [];
|
||||
emiAmtInwords : any = [];
|
||||
|
||||
existCompanyList: any =[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService,
|
||||
@ -83,12 +86,36 @@ export class CurrentLoanComponent implements OnInit {
|
||||
this.getMasterDetails('FREQUENCY',2);
|
||||
this.getMasterDetails('EXISTINGLOANTYPES',3);
|
||||
this.initCurrentloanForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
console.log('value', value);
|
||||
// console.log('value', value);
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (value.status == 200) {
|
||||
|
||||
@ -118,6 +145,33 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
checkTenure(details){
|
||||
let originalTenure = details.value.original_tenure;
|
||||
// alert(originalTenure);
|
||||
details.controls.current_balance_tenure.setValidators([Validators.required, Validators.max(+originalTenure)]);
|
||||
details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
// details.controls.current_balance_tenure.setValidators([Validators.max(+originalTenure)]);
|
||||
// details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
// let BalanceTenure = details.value.current_balance_tenure;
|
||||
// if( originalTenure < BalanceTenure){
|
||||
// alert('Greater');
|
||||
// details.controls.current_balance_tenure.setValue('');
|
||||
// alert('validation setted For');
|
||||
// details.controls.current_balance_tenure.setValidators([Validators.min(+originalTenure)]);
|
||||
// details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
// validateNumber(input: AbstractControl) {
|
||||
// const wordControl = input.get("word");
|
||||
// if(wordControl.value != null && wordControl.value.length > 4) {
|
||||
// wordControl.setValidators([Validators.required, Validators.minLength(8)]);
|
||||
// wordControl.updateValueAndValidity();
|
||||
// }
|
||||
// }
|
||||
|
||||
public initCurrentloanForm(): void {
|
||||
this.currentLoanForm = this.fb.group({
|
||||
existing_loan: [''],
|
||||
@ -127,7 +181,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectedLoanChanges(e): void {
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
if (e.value == 'Yes') {
|
||||
// console.log('if()');
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
@ -138,26 +192,25 @@ export class CurrentLoanComponent implements OnInit {
|
||||
arr.removeAt(0);
|
||||
}
|
||||
}
|
||||
selectedBorrower(e,i){
|
||||
if(e == 0){
|
||||
this.OtherFlag[i] = true;
|
||||
}
|
||||
else{
|
||||
this.OtherFlag[i] = false;
|
||||
}
|
||||
}
|
||||
// selectedBorrower(e,i){
|
||||
// if(e == 0){
|
||||
// this.OtherFlag[i] = true;
|
||||
// }
|
||||
// else{
|
||||
// this.OtherFlag[i] = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
selectedfrequency(e,i){
|
||||
|
||||
switch(+e){
|
||||
case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||
case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
|
||||
case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||
case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
|
||||
case 5: this.placeholderName[i] = 'EMI Amount'; break;
|
||||
case 1: this.placeholderName[i] = 'Monthly Instalment Amount'; break;
|
||||
case 2: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||
case 3: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||
case 4: this.placeholderName[i] = 'Fortnightly Instalment Amount'; break;
|
||||
case 5: this.placeholderName[i] = 'Daily Instalment Amount'; break;
|
||||
case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
|
||||
case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||
default : this.placeholderName[i] = ''; break;
|
||||
default: this.placeholderName[i] = 'Instalment Amount'; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,6 +230,26 @@ export class CurrentLoanComponent implements OnInit {
|
||||
current_balance_tenure: [''],
|
||||
});
|
||||
}
|
||||
|
||||
// compare objects for merge two master table details
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
|
||||
|
||||
// check others
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
addLoanDetails() {
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
control.push(this.createLoanDetail());
|
||||
@ -187,7 +260,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
submitCurrentloan() {
|
||||
if (!this.currentLoanForm.valid) {
|
||||
console.log("data invalid")
|
||||
// console.log("data invalid")
|
||||
return;
|
||||
}
|
||||
let records: any = {};
|
||||
@ -199,9 +272,9 @@ export class CurrentLoanComponent implements OnInit {
|
||||
if (records.existing_loan == 'Yes') {
|
||||
records.loan_details = this.currentLoanForm.controls['loan_details'].value;
|
||||
}
|
||||
console.log('data', records);
|
||||
// console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -41,8 +41,7 @@
|
||||
|
||||
<div *ngIf="total_financial_year != ''" formArrayName="date_per_financial">
|
||||
<!-- <div formArrayName="date_per_financial"> -->
|
||||
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index" [formGroupName]="i">
|
||||
|
||||
<mat-card-content class="matcard">
|
||||
<mat-label class="highlight"> <i>Financial Year : {{details.get('financial_year').value}} </i> </mat-label>
|
||||
@ -95,6 +94,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" (keyup)="inWords($event,i,3)">
|
||||
@ -139,11 +139,12 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field *ngIf="i != 0 && customerCommentsFlag" style="width:65%">
|
||||
<mat-form-field *ngIf="total_financial_year != '' && customerCommentsFlag" style="width:100%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="financial_reason" > -->
|
||||
<input matInput autocomplete="off" placeholder="Customer Comments on Financials" formControlName="financial_reason" >
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap">
|
||||
|
||||
@ -90,6 +90,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
const financial_date = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
const estimated_val = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
if (value.status == 200) {
|
||||
let retriveData = value.records;
|
||||
this.isReadOnly = true;
|
||||
@ -145,6 +146,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
financial_remarks: [''],
|
||||
staring_financial_year : ['',Validators.compose([Validators.minLength(4),Validators.maxLength(4)])],
|
||||
total_financial_year : [''],
|
||||
financial_reason: [''],
|
||||
same_as_financial_statements:[''],
|
||||
date_per_financial: this.fb.array([]),
|
||||
estimated_value: this.fb.array([])
|
||||
@ -171,7 +173,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
financial_margin_of_loss: [''],
|
||||
financial_variation: [''],
|
||||
financial_annualsales_variation : [''],
|
||||
financial_reason: [''],
|
||||
|
||||
});
|
||||
}
|
||||
createValue(date) {
|
||||
|
||||
@ -62,15 +62,16 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap" formArrayName="companies">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" *ngFor="let com of _generalForm.controls.companies['controls']; let c = index;" [formGroupName]="c">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" *ngFor="let com of _generalForm.controls.companies['controls']; let c = index; let last = last;" [formGroupName]="c">
|
||||
<mat-form-field style="width: 60%" *ngIf="com.value.is_active==true">
|
||||
<input matInput placeholder="Company/Firm" formControlName="company_name" type="text">
|
||||
</mat-form-field>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Company/Firm" matTooltipPosition="above" color="primary" (click)="addMoreCompanies()" *ngIf="c==0"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeCompanies(c)" *ngIf="c>0 && com.value.is_active==true"
|
||||
matTooltip="Remove Company/Firm" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More Company/Firm" matTooltipPosition="above" color="primary" (click)="addMoreCompanies()" *ngIf="last"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
@ -312,7 +312,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// remove companies
|
||||
removeCompanies(indexValues) {
|
||||
this.count = this.count-1;
|
||||
console.log('removed Count',this.count);
|
||||
// console.log('removed Count',this.count);
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control.controls[indexValues].controls.is_active.setValue(false);
|
||||
control.controls[indexValues].controls.company_name.clearValidators();
|
||||
@ -444,7 +444,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// submit form details
|
||||
submitGeneralForm(formData:any) {
|
||||
if (this._generalForm.invalid) {
|
||||
console.log('if',this._generalForm.value);
|
||||
// console.log('if',this._generalForm.value);
|
||||
this.validateAllFormFields(this._generalForm);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ public viewerOptions: any = {
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
console.log('value', value);
|
||||
// console.log('value', value);
|
||||
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
||||
if (value.status == 200) {
|
||||
|
||||
@ -140,7 +140,7 @@ public viewerOptions: any = {
|
||||
getFrequency() {
|
||||
let master_name = 'FREQUENCY';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.frequencyData.push(val);
|
||||
@ -151,7 +151,7 @@ public viewerOptions: any = {
|
||||
getSourceOtherIncome() {
|
||||
let master_name = 'SOURCEOFOTHERINCOME';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.sourceData.push(val);
|
||||
@ -182,9 +182,9 @@ public viewerOptions: any = {
|
||||
records.income_details = this.otherIncomeForm.controls['income_details'].value;
|
||||
}
|
||||
|
||||
console.log('data', records);
|
||||
// console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
// console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -142,7 +142,7 @@ export class StockComponent implements OnInit {
|
||||
let arr = record.filter(data => data.type_of_activity_id == 1);
|
||||
if(arr.length > 0) {
|
||||
this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
|
||||
console.log('136',value);
|
||||
// console.log('136',value);
|
||||
if(value.status == 200){
|
||||
this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
|
||||
let manufacturing_temparr = [];
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<br>
|
||||
<small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
|
||||
<small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small>
|
||||
<small *ngIf="master.centralofficer && master.fk_pd_type==3" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.centralofficer | titlecase}}<br></small>
|
||||
<small *ngIf="master.centralofficer && master.fk_pd_type==3" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.centralofficer | titlecase}}</small> <br>
|
||||
|
||||
<small *ngIf="master.pd_status==pdStatusCheck.SCHEDULED">{{master.scheduled_on}}</small>
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ export class ProductListComponent implements OnInit {
|
||||
//To open dialog for edit the data
|
||||
editProductMaster(arr: any[]) {
|
||||
//alert(arr);
|
||||
console.log(arr);
|
||||
// console.log(arr);
|
||||
this.isPopupOpened = true;
|
||||
//const contact = this._ProductService.getAllProductMaster().find(c => c.ID === id);
|
||||
// let contact = this._ProductService.getProd().map(res=>res.filter(data =>data.product_id == id))[0];
|
||||
|
||||
@ -67,7 +67,7 @@ export class UomDialogComponent implements OnInit {
|
||||
if(isNaN(this.data.uom_id)) {
|
||||
|
||||
Object.keys(UOMFormValues).forEach((key) => ( UOMFormValues[key] == null) && delete UOMFormValues[key]);
|
||||
console.log(UOMFormValues);
|
||||
// console.log(UOMFormValues);
|
||||
this._mastersService.addMasterDetails(UOMFormValues,'UOM').subscribe(
|
||||
|
||||
dataresult=>{
|
||||
|
||||
@ -59,7 +59,7 @@ export class PdTeamListComponent implements OnInit {
|
||||
/** To edit data */
|
||||
toEditPdTeam(pdteam_id){
|
||||
//this.router.navigate(['/setting/pdteam/editpdteam',pdteam_id]);
|
||||
console.log(btoa(pdteam_id));
|
||||
// console.log(btoa(pdteam_id));
|
||||
this.router.navigate(['/setting/pdteam/editpdteam',btoa(pdteam_id)]);
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ onNoClick(): void {
|
||||
this.viewpage = true;
|
||||
this.pdTeamManageData = this.pdTeamManageData.records;
|
||||
|
||||
console.log(this.pdTeamManageData);
|
||||
// console.log(this.pdTeamManageData);
|
||||
|
||||
}else
|
||||
{
|
||||
@ -65,10 +65,10 @@ onNoClick(): void {
|
||||
|
||||
let [bagName, el, target, source] = args;
|
||||
//console.log(el);
|
||||
console.log(this.bag1.nativeElement);
|
||||
console.log(this.bag1.nativeElement === target);
|
||||
// console.log(this.bag1.nativeElement);
|
||||
// console.log(this.bag1.nativeElement === target);
|
||||
if(this.bag1.nativeElement){ // needed since dropModel triggers for all bags, not only on the dropped bag
|
||||
console.log(this.bag1.nativeElement);
|
||||
// console.log(this.bag1.nativeElement);
|
||||
|
||||
let transferData:any = {
|
||||
userid: el.dataset.id,
|
||||
@ -76,7 +76,7 @@ onNoClick(): void {
|
||||
newTeamName: target.dataset.id,
|
||||
oldIndex: el.dataset.index
|
||||
}
|
||||
console.log(el);
|
||||
// console.log(el);
|
||||
for(let i = 0; i < that.pdTeamManageData.length; i++){
|
||||
let users = that.pdTeamManageData[i].USERPROFILE;
|
||||
for(let us of users){
|
||||
@ -85,7 +85,7 @@ onNoClick(): void {
|
||||
//console.log(transferData);
|
||||
this.pdTeamNewList.push(transferData);
|
||||
//console.log(that.transferData);
|
||||
console.log(this.pdTeamNewList);
|
||||
// console.log(this.pdTeamNewList);
|
||||
this.btnsave = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ export class RegisterComponent implements OnInit {
|
||||
//console.log(this.types);
|
||||
this.regForm.controls['type'].setValue(this.types[0]);
|
||||
this.users.roles().subscribe(res=>{
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
this.roleload = false;
|
||||
//console.log(roleload);
|
||||
this.role = res;
|
||||
@ -156,7 +156,7 @@ export class RegisterComponent implements OnInit {
|
||||
var reader = new FileReader();
|
||||
//if($event.target.files[0] < 0 ){
|
||||
this.files = $event.target.files[0];
|
||||
console.log(this.files);
|
||||
// console.log(this.files);
|
||||
|
||||
reader.onload = ($event: ProgressEvent) => {
|
||||
// console.log((<FileReader>$event.target).result);
|
||||
@ -170,7 +170,7 @@ export class RegisterComponent implements OnInit {
|
||||
|
||||
|
||||
register(userData) {
|
||||
console.log(userData);
|
||||
// console.log(userData);
|
||||
let data:any;
|
||||
|
||||
// console.log(this.files);
|
||||
@ -199,7 +199,7 @@ this.loader = true;
|
||||
if (data.status == 200) {
|
||||
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => {
|
||||
this.loader =false;
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
Swal('User Created');
|
||||
this.router.navigate(['setting/users/userlist']);
|
||||
});
|
||||
@ -227,7 +227,7 @@ this.loader = true;
|
||||
}
|
||||
|
||||
toggleAllSelection(e,enitiyid) {
|
||||
console.log(enitiyid);
|
||||
// console.log(enitiyid);
|
||||
// if(e.value){
|
||||
|
||||
// if(e.value.role_name == pdoff && enitiyid.entity_type_id == 1){
|
||||
@ -255,8 +255,8 @@ this.loader = true;
|
||||
|
||||
}
|
||||
getcity(e){
|
||||
console.log(e);
|
||||
console.log(this.Cities);
|
||||
// console.log(e);
|
||||
// console.log(this.Cities);
|
||||
|
||||
|
||||
this.City = this.Cities.filter(city=>city.fk_state_id == e.value.state_id);
|
||||
@ -296,7 +296,7 @@ this.loader = true;
|
||||
|
||||
let role = this.role.filter(role=>role.role_type == this.usersData.fk_entity_type_id && role.role_id == this.usersData.user_role)[0];
|
||||
this.regForm.controls['role'].setValue(role);
|
||||
console.log(role);
|
||||
// console.log(role);
|
||||
this.toggleAllSelection(role,this.types[0]);
|
||||
// this.regForm.controls['role'].setValue(role);
|
||||
|
||||
@ -313,7 +313,7 @@ this.loader = true;
|
||||
if (this.State.status == 200) {
|
||||
this.State = this.State.records.filter(ent=>ent.isactive ==1);
|
||||
let states = this.State.filter(state => state.state_id == this.usersData.fk_state)[0];
|
||||
console.log(states);
|
||||
// console.log(states);
|
||||
this.regForm.controls['state'].setValue(states);
|
||||
this.users.City().subscribe(res => {
|
||||
this.Cities = res;
|
||||
@ -388,7 +388,7 @@ this.loader = true;
|
||||
|
||||
|
||||
checktype(e){
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
this.roleAccess= false;
|
||||
let userRole:any;
|
||||
if(e !== undefined){
|
||||
@ -396,7 +396,7 @@ this.loader = true;
|
||||
//console.log(roleload);
|
||||
|
||||
this.roles = this.role.filter(role=>role.role_type == e.entity_type_id);
|
||||
console.log(this.roles);
|
||||
// console.log(this.roles);
|
||||
// let role = this.roles.filter(role=>role.role_id == this.usersData.user_role_id);
|
||||
// console.log(role);
|
||||
// this.regForm.controls['role'].setValue(role);
|
||||
|
||||
@ -65,11 +65,11 @@ export class UserListComponent implements OnInit {
|
||||
let data:any;
|
||||
this.users.getuserdata().subscribe(res => {
|
||||
this.loader = false;
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
data = res;
|
||||
if (data.status == 200) {
|
||||
this.userdata = data.records;
|
||||
console.log(data.records.length);
|
||||
// console.log(data.records.length);
|
||||
this.dataLength = data.records.length;
|
||||
this.dataSource.data = this.userdata;
|
||||
if(data.records.length >= 1){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user