Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
5cb3b644b8
@ -44,6 +44,7 @@ export class ManageBusinesExpenseComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
pd_expense_id:[''],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
expense_item_id:['',Validators.compose([Validators.required])],
|
||||
expense_value:['',Validators.compose([Validators.required])],
|
||||
fk_frequency_id:['',Validators.compose([Validators.required])],
|
||||
@ -56,6 +57,7 @@ createBusinessItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
pd_expense_id:[values.pd_expense_id],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
expense_item_id:[values.expense_item_id,Validators.compose([Validators.required])],
|
||||
expense_value:[values.expense_value,Validators.compose([Validators.required])],
|
||||
fk_frequency_id:[values.fk_frequency_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -57,6 +57,7 @@ export class ManageDailySalesComponent implements OnInit {
|
||||
createSalesItem():FormGroup {
|
||||
return this._fb.group({
|
||||
fk_pd_id: [this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
sim_id: [''],
|
||||
sales_item: ['', Validators.compose([Validators.required])],
|
||||
child: this._fb.array([]),
|
||||
@ -80,6 +81,7 @@ createDailySalesData(sim_id: string) {
|
||||
createSalesItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
fk_pd_id: [this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
sim_id: [values.sim_id],
|
||||
sales_item: [values.salesItem, Validators.compose([Validators.required])],
|
||||
child: this._fb.array([]),
|
||||
|
||||
@ -40,7 +40,8 @@ export class ManageHouseHoldComponent implements OnInit {
|
||||
createHouseholdItem():FormGroup {
|
||||
return this._fb.group({
|
||||
household_expense_id:[''],
|
||||
fk_pd_id:[this.data.masterData.pdid] ,
|
||||
fk_pd_id:[this.data.masterData.pdid] ,
|
||||
company_id:[this.data.masterData.company_id],
|
||||
expense_item: ['',Validators.compose([Validators.required])],
|
||||
expense_value: ['',Validators.compose([Validators.required])],
|
||||
fk_frequency_id: ['',Validators.compose([Validators.required])],
|
||||
@ -52,7 +53,8 @@ export class ManageHouseHoldComponent implements OnInit {
|
||||
createHouseholdItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
household_expense_id:[values.household_expense_id],
|
||||
fk_pd_id:[this.data.masterData.pdid] ,
|
||||
fk_pd_id:[this.data.masterData.pdid] ,
|
||||
company_id:[this.data.masterData.company_id],
|
||||
expense_item: [values.expense_item,Validators.compose([Validators.required])],
|
||||
expense_value: [values.expense_value,Validators.compose([Validators.required])],
|
||||
fk_frequency_id: [values.fk_frequency_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -44,6 +44,7 @@ export class ManageOtherBusinessIncomeComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
pd_business_income_id:[''],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
business_income_id:['',Validators.compose([Validators.required])],
|
||||
income_value:['',Validators.compose([Validators.required])],
|
||||
fk_frequency_id:['',Validators.compose([Validators.required])],
|
||||
@ -56,6 +57,7 @@ createBusinessIncomeItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
pd_business_income_id:[values.pd_business_income_id],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
business_income_id:[values.business_income_id,Validators.compose([Validators.required])],
|
||||
income_value:[values.income_value,Validators.compose([Validators.required])],
|
||||
fk_frequency_id:[values.fk_frequency_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -43,6 +43,7 @@ export class ManagePurchaseComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
purchase_id:[''],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
purchase_item:['',Validators.compose([Validators.required])],
|
||||
purchase_qty:['',Validators.compose([Validators.required])],
|
||||
fk_uom_id:['',Validators.compose([Validators.required])],
|
||||
@ -57,6 +58,7 @@ createPurchaseItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
purchase_id:[values.purchase_id],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
purchase_item:[values.purchase_item,Validators.compose([Validators.required])],
|
||||
purchase_qty:[values.purchase_qty,Validators.compose([Validators.required])],
|
||||
fk_uom_id:[values.fk_uom_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -42,6 +42,7 @@ export class ManageSalesComponent implements OnInit {
|
||||
createSalesItem():FormGroup {
|
||||
return this._fb.group({
|
||||
sci_id:[],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
sales_item:['',Validators.compose([Validators.required])],
|
||||
sales_qty:['',Validators.compose([Validators.required])],
|
||||
@ -60,6 +61,7 @@ createSalesItemWithData(values: any) {
|
||||
return this._fb.group({
|
||||
sci_id:[values.sci_id],
|
||||
fk_pd_id:[this.data.masterData.pdid],
|
||||
company_id:[this.data.masterData.company_id],
|
||||
sales_item:[values.sales_item,Validators.compose([Validators.required])],
|
||||
sales_qty:[values.sales_qty,Validators.compose([Validators.required])],
|
||||
fk_uom_id:[values.fk_uom_id,Validators.compose([Validators.required])],
|
||||
|
||||
@ -302,17 +302,11 @@
|
||||
<!-- end assessed income tabs control -->
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<!-- <div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="personal_info_form_remark" required></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above"><mat-icon>save</mat-icon></button>
|
||||
</div> -->
|
||||
|
||||
<mat-dialog-actions align="end">
|
||||
<button type="button" mat-flat-button (click)="completeAI()"
|
||||
matTooltip="Complete Assessed Income" matTooltipPosition="above" color="primary">
|
||||
<strong>Complete</strong>
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
@ -8,7 +8,7 @@ import {
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
|
||||
import { ConfirmAiDetailsComponent } from "./confirm-ai-details/confirm-ai-details.component";
|
||||
@Component({
|
||||
selector: 'app-assessed-income',
|
||||
templateUrl: './assessed-income.component.html',
|
||||
@ -25,6 +25,7 @@ export class AssessedIncomeComponent implements OnInit {
|
||||
// @Input() form_id: number;
|
||||
pdid: number;
|
||||
form_id: number;
|
||||
company_id: number;
|
||||
emptyArray: any=[];
|
||||
sumary_details: {[k: string]: any} = {};
|
||||
// sumary_details:any={"sales_revenue":0,"sales_revenue_details":[],"purchase":0,"purchase_details":[],"gross_profit":0,"other_business_income":0,"other_business_income_details":[]
|
||||
@ -47,13 +48,14 @@ public businessExpenseList: any=[];
|
||||
public businessIncomeList: any=[];
|
||||
public grossProfitTypeList: any=[];
|
||||
public salesDeclaredCustomer: any=[];
|
||||
public getCustomValues:any = { UOMList: this.UOMList,frequencyList: this.frequencyList,businessExpenseList: this.businessExpenseList,businessIncomeList:this.businessIncomeList,pdid:'',grossProfitTypeList:this.grossProfitTypeList};
|
||||
public getCustomValues:any = { UOMList: this.UOMList,frequencyList: this.frequencyList,businessExpenseList: this.businessExpenseList,businessIncomeList:this.businessIncomeList,pdid:'',company_id:'',grossProfitTypeList:this.grossProfitTypeList};
|
||||
//public finalData: any;
|
||||
constructor(notifier: NotifierService, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService,
|
||||
private _pd: PdTrigerService, private dialog: MatDialog,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.form_id = 16;
|
||||
this.loadAIDetails();
|
||||
@ -62,6 +64,7 @@ public getCustomValues:any = { UOMList: this.UOMList,frequencyList: this.frequen
|
||||
this.getAIMaster('BUSINESSEXPENSES',3);
|
||||
this.getAIMaster('BUSINESSINCOME',4);
|
||||
this.getCustomValues.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.getCustomValues.company_id = this.pd_all_details.company_id;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -96,6 +99,7 @@ public viewerOptions: any = {
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
params.company_id = this.company_id;
|
||||
this._pd.getAssessedIncomeFormDetails(params).subscribe(value => {
|
||||
if (value.status == 200) {
|
||||
if(value.records.gross_profit_calculation_type){
|
||||
@ -192,4 +196,21 @@ public viewerOptions: any = {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// complete AI detailscomplete AI details
|
||||
completeAI(): void{
|
||||
const dialogRef = this.dialog.open(ConfirmAiDetailsComponent, {
|
||||
data: { pdid: this.pdid, company_id: this.company_id ,calc_type_id:this.grossProfitTypeList.length > 0 ? this.grossProfitTypeList[0].calc_type_id : ''},
|
||||
disableClose: true,
|
||||
minWidth:'30%',
|
||||
maxWidth:'40%',
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.update_status==true){
|
||||
this.loadAIDetails();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ export class BusinessExpenseDetailsComponent implements OnInit {
|
||||
displayedColumns = ['buiness_expense','expense_value','frequency','annual_expenses','action'];
|
||||
public businessItemSource= new MatTableDataSource();
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number,company_id:number};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService,private _pd: PdTrigerService, private dialog: MatDialog) {
|
||||
@ -69,6 +69,7 @@ removeExpenseItem(value: any) : void{
|
||||
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"company_id":this.masterData.company_id,
|
||||
"pd_expense_id":value.pd_expense_id,
|
||||
"isactive":false,
|
||||
}];
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
<h2 mat-dialog-title>{{dialoge_title_content}}</h2>
|
||||
<mat-dialog-content>
|
||||
<div fxFlex="100" align="center">
|
||||
<p>
|
||||
{{dialoge_content}}
|
||||
</p>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button color="primary" (click)="completeAI()" *ngIf="data.calc_type_id"><strong>Yes</strong></button>
|
||||
<button mat-raised-button mat-dialog-close><strong>{{data.calc_type_id ? 'No' :'Ok'}}</strong></button>
|
||||
</mat-dialog-actions>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ConfirmAiDetailsComponent } from './confirm-ai-details.component';
|
||||
|
||||
describe('ConfirmAiDetailsComponent', () => {
|
||||
let component: ConfirmAiDetailsComponent;
|
||||
let fixture: ComponentFixture<ConfirmAiDetailsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ConfirmAiDetailsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConfirmAiDetailsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,45 @@
|
||||
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
|
||||
import { NotifierService } from "angular-notifier";
|
||||
import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { PdTrigerService } from '../../../../../../pd-service/pd-triger.service';
|
||||
@Component({
|
||||
selector: 'app-confirm-ai-details',
|
||||
templateUrl: './confirm-ai-details.component.html',
|
||||
styleUrls: ['./confirm-ai-details.component.scss']
|
||||
})
|
||||
export class ConfirmAiDetailsComponent implements OnInit {
|
||||
conformation: Boolean = false;
|
||||
private notifier: NotifierService;
|
||||
dialoge_title_content: string;
|
||||
dialoge_content: string;
|
||||
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<ConfirmAiDetailsComponent>,@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.notifier = notifier;
|
||||
this.dialoge_title_content = 'Complete Assessed Income ';
|
||||
this.dialoge_content =this.data.calc_type_id ? 'Please confirm you are completing the Assessed Income details?' : 'Please confirm Purchase Detail Available In Sales tab ';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
completeAI(): void {
|
||||
let update_status = {
|
||||
"fk_pd_id":this.data.pdid,
|
||||
"company_id":this.data.company_id,
|
||||
"calc_type_id":this.data.calc_type_id,
|
||||
"is_completed":1
|
||||
};
|
||||
this.pd.saveAssessedDetails('saveAssessedIncomeCalculateMode',update_status).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.dialogRef.close({update_status:true});
|
||||
this.notifier.notify('success', 'Assessed Income Completed Successfully');
|
||||
}
|
||||
else {
|
||||
this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -14,7 +14,7 @@ export class DailySalesDetailsComponent implements OnInit, DoCheck {
|
||||
public salesMonthItemColumns = ['Date','Amount'];
|
||||
public salesMonthWiseExpandedItems: any[]=[];
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any; pdid:number, grossProfitTypeList:any};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any; pdid:number,company_id:number, grossProfitTypeList:any};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
activateMariginCalculation: boolean;
|
||||
private notifier:NotifierService;
|
||||
@ -88,7 +88,9 @@ removeSalesItem(value: any) : void{
|
||||
// let transformData: any = value.expandElements.map(val=>val.value);
|
||||
// transformData = [].concat.apply([], transformData);
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"sim_id":value.sim_id,
|
||||
"company_id":this.masterData.company_id,
|
||||
"isactive":false,
|
||||
"child":[]
|
||||
}];
|
||||
|
||||
@ -9,7 +9,7 @@ import { NotifierService } from 'angular-notifier';
|
||||
styleUrls: ['./gross-profit-calculation.component.scss']
|
||||
})
|
||||
export class GrossProfitCalculationComponent implements OnInit, OnChanges {
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number, company_id:number};
|
||||
@Input() parentData: any;
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
public grossProfitForm: FormGroup;
|
||||
@ -48,6 +48,7 @@ ngOnChanges(changes: SimpleChanges) {
|
||||
{
|
||||
calc_type_id:[changes.parentData.currentValue[0].calc_type_id],
|
||||
fk_pd_id:[this.masterData.pdid],
|
||||
company_id:[this.masterData.company_id],
|
||||
mode:[changes.parentData.currentValue[0].mode,Validators.compose([Validators.required])],
|
||||
margin:[changes.parentData.currentValue[0].margin],
|
||||
})
|
||||
@ -57,6 +58,7 @@ ngOnChanges(changes: SimpleChanges) {
|
||||
{
|
||||
calc_type_id:[''],
|
||||
fk_pd_id:[this.masterData.pdid],
|
||||
company_id:[this.masterData.company_id],
|
||||
mode:['',Validators.compose([Validators.required])],
|
||||
margin:[''],
|
||||
})
|
||||
|
||||
@ -15,7 +15,7 @@ export class HouseHoldDetailsComponent implements OnInit {
|
||||
displayedColumns = ['buiness_particulars','expense_value','frequency','annual_expenses','action'];
|
||||
public houseItemSource= new MatTableDataSource();
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number,company_id:number};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService,private _pd: PdTrigerService, private dialog: MatDialog) {
|
||||
@ -70,6 +70,7 @@ removeHouseItem(value: any) : void{
|
||||
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"company_id":this.masterData.company_id,
|
||||
"household_expense_id":value.household_expense_id,
|
||||
"isactive":false,
|
||||
}];
|
||||
|
||||
@ -14,7 +14,7 @@ export class OtherBusinessIncomeDetailsComponent implements OnInit {
|
||||
displayedColumns = ['buiness_income','income_value','frequency','annual_income','action'];
|
||||
public businessIncomeItemSource= new MatTableDataSource();
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any; pdid:number,company_id:number};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService, private dialog: MatDialog) {
|
||||
@ -68,6 +68,7 @@ removeIncomeItem(value: any) : void{
|
||||
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"company_id":this.masterData.company_id,
|
||||
"pd_business_income_id":value.pd_business_income_id,
|
||||
"isactive":false,
|
||||
}];
|
||||
|
||||
@ -15,7 +15,7 @@ export class PurchaseDetailsComponent implements OnInit, DoCheck {
|
||||
activateMariginCalculation:boolean;
|
||||
private notifier: NotifierService;
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any,businessIncomeList: any, pdid:number, grossProfitTypeList:any};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any,businessIncomeList: any, pdid:number,company_id:number, grossProfitTypeList:any};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
constructor(notifier: NotifierService,private _pd: PdTrigerService, private dialog: MatDialog) {
|
||||
this.activateMariginCalculation=false;
|
||||
@ -69,6 +69,7 @@ removePurchaseItem(value: any) : void{
|
||||
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"company_id":this.masterData.company_id,
|
||||
"purchase_id":value.purchase_id,
|
||||
"isactive":false,
|
||||
}];
|
||||
|
||||
@ -10,7 +10,7 @@ import { NotifierService } from 'angular-notifier';
|
||||
})
|
||||
export class SalesCalculationComponent implements OnInit, OnChanges, DoCheck {
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { pdid:number,grossProfitTypeList:any};
|
||||
@Input() masterData: { pdid:number,company_id:number,grossProfitTypeList:any};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
salesCalculationForm:FormGroup;
|
||||
activateMariginCalculation: boolean;
|
||||
@ -82,6 +82,7 @@ ngOnChanges(changes: SimpleChanges) {
|
||||
sdc_id:[changes.parentData.currentValue[changes.parentData.currentValue.length-1].sdc_id],
|
||||
sales_declared_by_customer:[changes.parentData.currentValue[changes.parentData.currentValue.length-1].sales_declared_by_customer, Validators.compose([Validators.required])],
|
||||
fk_pd_id:[this.masterData.pdid],
|
||||
company_id:[this.masterData.company_id],
|
||||
margin_per:[this.activateMariginCalculation===false ? '' : changes.parentData.currentValue[changes.parentData.currentValue.length-1].margin_per,this.activateMariginCalculation===true ? Validators.required: Validators.nullValidator],
|
||||
margin_value:[this.activateMariginCalculation==false ? '' : changes.parentData.currentValue[changes.parentData.currentValue.length-1].margin_value],
|
||||
});
|
||||
@ -91,6 +92,7 @@ ngOnChanges(changes: SimpleChanges) {
|
||||
sdc_id:[''],
|
||||
sales_declared_by_customer:['', Validators.required],
|
||||
fk_pd_id:[this.masterData.pdid],
|
||||
company_id:[this.masterData.company_id],
|
||||
margin_per:['',this.activateMariginCalculation===true ? Validators.required: Validators.nullValidator],
|
||||
margin_value:[''],
|
||||
});
|
||||
|
||||
@ -13,7 +13,7 @@ export class SalesDetailsComponent implements OnInit, DoCheck {
|
||||
displayedColumns = ['product_services','sale_quantity','UOM','rate_per_unit_sale','frequency','annual_sales','action'];
|
||||
public salesItemSource= new MatTableDataSource();
|
||||
@Input() parentData: any;
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any,businessIncomeList: any, pdid:number, grossProfitTypeList:any};
|
||||
@Input() masterData: { UOMList: any; frequencyList: any;businessExpenseList:any,businessIncomeList: any, pdid:number,company_id:number, grossProfitTypeList:any};
|
||||
@Output() loadAssessedForms = new EventEmitter<string>();
|
||||
activateMariginCalculation: boolean;
|
||||
private notifier :NotifierService
|
||||
@ -73,6 +73,7 @@ removeSalesItem(value: any) : void{
|
||||
|
||||
let deleteRecords: any =[{
|
||||
"fk_pd_id":this.masterData.pdid,
|
||||
"company_id":this.masterData.company_id,
|
||||
"sci_id":value.sci_id,
|
||||
"isactive":false,
|
||||
}];
|
||||
|
||||
@ -12,6 +12,7 @@ import {BusinessInfoComponent} from './../../forms/business-info/business-info.c
|
||||
import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component';
|
||||
import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component';
|
||||
import { GetAnswerableFormsPipe } from './../../../../../pd-pipes/get-answerable-forms.pipe';
|
||||
import {AssessedIncomeComponent} from './../assessed-income/assessed-income.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-business-info-group',
|
||||
@ -174,6 +175,21 @@ export class BusinessInfoGroupComponent implements OnInit {
|
||||
});
|
||||
|
||||
}
|
||||
else if(details.form_id==16){
|
||||
const dialogRef = this.dialog.open(AssessedIncomeComponent, {
|
||||
data: this.pd_all_details,
|
||||
// position: { right: '0'},
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
this.getCompanyListForBusiness();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -395,22 +395,6 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
else
|
||||
if(this.selectedFormsCategory.form_id==16){
|
||||
const dialogRef = this.dialog.open(AssessedIncomeComponent, {
|
||||
data: this.pdFullDetails,
|
||||
// position: { right: '0'},
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||
this.loadTemplates(this.startPD,2);
|
||||
});
|
||||
}else
|
||||
if(this.selectedFormsCategory.form_id==17){
|
||||
const dialogRef = this.dialog.open(RentalInfoComponent, {
|
||||
data: this.pdFullDetails,
|
||||
|
||||
@ -112,6 +112,7 @@ import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dial
|
||||
import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive';
|
||||
import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component';
|
||||
import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe';
|
||||
import { ConfirmAiDetailsComponent } from './list-pd/start-pd/forms/assessed-income/confirm-ai-details/confirm-ai-details.component';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
@ -158,7 +159,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe],
|
||||
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
@ -191,13 +192,13 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule,
|
||||
OwlNativeDateTimeModule,
|
||||
],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent],
|
||||
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
||||
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
|
||||
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent],
|
||||
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent],
|
||||
|
||||
})
|
||||
export class ManagePdModule {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user