Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
629bb2b72c
@ -20,15 +20,12 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||||
<div fxFlex.gt-sm="75" fxFlex="100">
|
{{dashboardTitle}}
|
||||||
{{dashboardTitle}}
|
|
||||||
</div>
|
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
|
||||||
<ngx-mat-drp (selectedDateRangeChanged)="updateRange($event)" (change)="onChange($event,'One')" [options]="options" #dateRangePicker></ngx-mat-drp>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||||
|
<ngx-mat-drp (selectedDateRangeChanged)="updateRange($event)" (change)="onChange($event,'One')" [options]="options" #dateRangePicker></ngx-mat-drp>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||||
<!-- <mat-form-field >
|
<!-- <mat-form-field >
|
||||||
|
|||||||
@ -126,15 +126,20 @@ export class DashboardComponent {
|
|||||||
const toMin = new Date(today.getFullYear(), today.getMonth()-1, 1);
|
const toMin = new Date(today.getFullYear(), today.getMonth()-1, 1);
|
||||||
const toMax = new Date(today.getFullYear(), today.getMonth()+2, 0);
|
const toMax = new Date(today.getFullYear(), today.getMonth()+2, 0);
|
||||||
|
|
||||||
const resetRange = {fromDate: today, toDate: today};
|
const thismonth = new Date(today.getFullYear(), today.getMonth(), 0);
|
||||||
this.dateRangePicker.resetDates(resetRange); // will trigger selectedDateRangeChanged
|
console.log(fromMin);
|
||||||
|
console.log(fromMax);
|
||||||
|
console.log(toMin);
|
||||||
|
console.log(toMax);
|
||||||
|
//const resetRange = {fromDate: today, toDate: today};
|
||||||
|
//this.dateRangePicker.resetDates(resetRange); // will trigger selectedDateRangeChanged
|
||||||
|
|
||||||
|
|
||||||
this.setupPresets();
|
this.setupPresets();
|
||||||
this.options = {
|
this.options = {
|
||||||
presets: this.presets,
|
presets: this.presets,
|
||||||
format: 'mediumDate',
|
format: 'mediumDate',
|
||||||
range: {fromDate:today, toDate: today},
|
range: {fromDate:toMin, toDate: fromMax},
|
||||||
applyLabel: "Submit",
|
applyLabel: "Submit",
|
||||||
calendarOverlayConfig: {
|
calendarOverlayConfig: {
|
||||||
shouldCloseOnBackdropClick: false,
|
shouldCloseOnBackdropClick: false,
|
||||||
@ -142,7 +147,7 @@ export class DashboardComponent {
|
|||||||
},
|
},
|
||||||
placeholder: "Date",
|
placeholder: "Date",
|
||||||
cancelLabel: "Cancel",
|
cancelLabel: "Cancel",
|
||||||
excludeWeekends:true,
|
excludeWeekends:false,
|
||||||
fromMinMax: {fromDate:fromMin, toDate:fromMax},
|
fromMinMax: {fromDate:fromMin, toDate:fromMax},
|
||||||
toMinMax: {fromDate:toMin, toDate:toMax}
|
toMinMax: {fromDate:toMin, toDate:toMax}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -53,7 +53,12 @@ export class DashboardService {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr): Observable<any> {
|
getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr): Observable<any> {
|
||||||
|
console.log(')))))');
|
||||||
|
console.log(fromdate);
|
||||||
|
console.log(todate);
|
||||||
|
console.log(cityarr);
|
||||||
|
console.log(lenderarr);
|
||||||
|
console.log('(((');
|
||||||
return this._http.post(this.apiUrl+'getDashBoardMaster', {
|
return this._http.post(this.apiUrl+'getDashBoardMaster', {
|
||||||
"fromdate":fromdate,
|
"fromdate":fromdate,
|
||||||
"todate": todate,
|
"todate": todate,
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select (selectionChange)="selectedFreqPurchase($event)" placeholder="Select Frequency of Purchase" formControlName="frequency_of_purchase">
|
<mat-select (selectionChange)="selectedFreqPurchase($event)" placeholder="Select Frequency of Purchase" formControlName="frequency_of_purchase">
|
||||||
<mat-option *ngFor="let feq of m_freqOfPurchase" [value]="feq.id">{{ feq.name }}</mat-option>
|
<mat-option *ngFor="let feq of m_freqOfPurchase" [value]="feq.frequency_id">{{ feq.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.currentLoanForm.controls['loan_details'].setValue(result);
|
this.currentLoanForm.controls['loan_details'].setValue(result);
|
||||||
} else {
|
} else {
|
||||||
control.push(this.createLoanDetail());
|
// control.push(this.createLoanDetail());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<p>Other Income Details</p>
|
<p>Other Income Details</p>
|
||||||
<form [formGroup]="otherIncomeForm" class="address">
|
<form [formGroup]="otherIncomeForm" class="address">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Other Income"
|
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Other Income"
|
||||||
formControlName="other_income">
|
formControlName="other_income">
|
||||||
<mat-option value="Yes">Yes</mat-option>
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
<mat-option value="No">No</mat-option>
|
<mat-option value="No">No</mat-option>
|
||||||
|
|||||||
@ -50,18 +50,22 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
console.log('value', value);
|
console.log('value', value);
|
||||||
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
||||||
if (value.status == 200) {
|
if (value.status == 200) {
|
||||||
|
|
||||||
|
this.otherIncomeForm.controls['other_income'].setValue(value.records.other_income);
|
||||||
|
this.otherIncomeForm.controls['otherincome_remarks'].setValue(value.records.otherincome_remarks);
|
||||||
|
if (value.records.other_income == 'Yes') {
|
||||||
|
|
||||||
var result = Object.keys(value.records.income_details).map(function(key) {
|
var result = Object.keys(value.records.income_details).map(function(key) {
|
||||||
return value.records.income_details[key];
|
return value.records.income_details[key];
|
||||||
});
|
});
|
||||||
this.otherIncomeForm.controls['other_income'].setValue(value.records.other_income);
|
|
||||||
this.otherIncomeForm.controls['otherincome_remarks'].setValue(value.records.otherincome_remarks);
|
|
||||||
if (result.length > 0) {
|
if (result.length > 0) {
|
||||||
result.forEach(val => {
|
result.forEach(val => {
|
||||||
control.push(this.createDetail());
|
control.push(this.createDetail());
|
||||||
});
|
});
|
||||||
this.otherIncomeForm.controls['income_details'].setValue(result);
|
this.otherIncomeForm.controls['income_details'].setValue(result);
|
||||||
} else {
|
} else {
|
||||||
control.push(this.createDetail());
|
// control.push(this.createDetail());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
control.push(this.createDetail());
|
control.push(this.createDetail());
|
||||||
@ -75,6 +79,16 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
income_details: this.fb.array([])
|
income_details: this.fb.array([])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectedLoanChanges(e): void {
|
||||||
|
if (e.value == 'Yes') {
|
||||||
|
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
||||||
|
control.push(this.createDetail());
|
||||||
|
} else if (e.value == 'No') {
|
||||||
|
const arr = <FormArray>this.otherIncomeForm.controls.income_details;
|
||||||
|
arr.removeAt(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
createDetail() {
|
createDetail() {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
source: ['', Validators.compose([Validators.required])],
|
source: ['', Validators.compose([Validators.required])],
|
||||||
@ -111,7 +125,11 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
records.fk_createdby = this.pdid;
|
records.fk_createdby = this.pdid;
|
||||||
records.other_income = this.otherIncomeForm.controls['other_income'].value;
|
records.other_income = this.otherIncomeForm.controls['other_income'].value;
|
||||||
records.otherincome_remarks = this.otherIncomeForm.controls['otherincome_remarks'].value;
|
records.otherincome_remarks = this.otherIncomeForm.controls['otherincome_remarks'].value;
|
||||||
records.income_details = this.otherIncomeForm.controls['income_details'].value;
|
|
||||||
|
if (this.otherIncomeForm.controls['other_income'].value == 'Yes') {
|
||||||
|
records.income_details = this.otherIncomeForm.controls['income_details'].value;
|
||||||
|
}
|
||||||
|
|
||||||
console.log('data', records);
|
console.log('data', records);
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.INPROGRESS || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
|
<button _ngcontent-c21="" [disabled]="actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
|
||||||
|
|
||||||
<!--{{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
<!--{{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
||||||
<div *ngIf="categoryList != ''">
|
<div *ngIf="categoryList != ''">
|
||||||
|
|||||||
@ -99,7 +99,8 @@
|
|||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<mat-list *ngFor="let documents of pdDocumentsData">
|
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<p><span><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span></p>
|
<!--<p><span><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span></p> -->
|
||||||
|
<a href="{{documents.doc_url}}" target="_blank"><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}}</a>
|
||||||
<!---- <span class="mb-2 text-center hover-icon"> {{documents.pd_document_name}} </span> -->
|
<!---- <span class="mb-2 text-center hover-icon"> {{documents.pd_document_name}} </span> -->
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user