Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
ca4b5dfcba
@ -14,7 +14,6 @@ import { environment } from 'environments/environment';
|
||||
/** Consant Value For Created Date And Updated Date */
|
||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
|
||||
<mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
|
||||
{{SPL.subproduct_name}}
|
||||
</mat-option>
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<textarea matInput placeholder="Address 1" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea>
|
||||
<textarea matInput placeholder="Address at which PD is to be done" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea>
|
||||
<!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -221,11 +221,11 @@
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
|
||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<mat-card class="p-2" style="opacity: 0.5;">
|
||||
<mat-card class="p-2">
|
||||
<h5>Co-Applicant</h5>
|
||||
<!-- <button _ngcontent-c29="" class="mr-1 mb-2 mat-fab1 mat-accent" mat-fab="" (click)="addCoApplicant(createWithLongContent)"><span class="mat-button-wrapper"><mat-icon _ngcontent-c29="" class="mat-icon material-icons" role="img" aria-hidden="true">add</mat-icon></span><div class="mat-button-ripple mat-ripple mat-button-ripple-round" matripple=""></div><div class="mat-button-focus-overlay"></div></button> -->
|
||||
<!--<button mat-fab class="mr-1 mb-1" color="primary" (click)="addCoApplicant()"><mat-icon>add</mat-icon></button>-->
|
||||
<button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;border:2px;border-radius: 50%;" (click)="addCoApplicant()"><mat-icon>group_add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add Co-Applicant" matTooltipPosition="above" style="opacity: 0.8;border:2px;border-radius: 50%;" (click)="addCoApplicant()"><mat-icon>group_add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||
<!-- <button mat-raised-button mat-button-sm color="primary" (click)="addCoApplicant()" type="button">Add More Co-Applicant</button> -->
|
||||
|
||||
</mat-card>
|
||||
@ -240,26 +240,23 @@
|
||||
<mat-list>
|
||||
<mat-list-item>
|
||||
<!-- <button mat-raised-button mat-button-sm color="primary" type="button">Add Document</button> -->
|
||||
<button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;" (click)="addMoreDocs()" class="mat-button-wrapper"><mat-icon>attach_file</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||
<button mat-fab matTooltip="Add Document" matTooltipPosition="above" class="mr-1 mb-1" color="primary" (click)="addMoreDocs()" class="mat-button-wrapper"><mat-icon>attach_file</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||
|
||||
</mat-list-item>
|
||||
</mat-list-item><br>
|
||||
</mat-list>
|
||||
<mat-list *ngFor="let docList of documents.controls; let d = index;" [formGroupName]="d">
|
||||
<!-- <h3 mat-subheader>Upload Documents</h3> -->
|
||||
<mat-list-item>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="Document Name" formControlName="doc_name" type="text">
|
||||
</mat-form-field>
|
||||
|
||||
</mat-list-item>
|
||||
<mat-list-item>
|
||||
|
||||
<div style="width:50%">
|
||||
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
||||
</mat-list-item>
|
||||
<mat-list-item>
|
||||
<!-- <button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button> -->
|
||||
<div style="width:20%">
|
||||
|
||||
<span (click)="removeItem(d)">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
@ -280,7 +277,7 @@
|
||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
|
||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Click To Draft" matTooltipPosition="above" type="button" (click)="addCoApplicant()"><mat-icon>drafts</mat-icon></button> -->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="submitPdDetails(_PDtriggerForm.value,draftStatus)" matTooltip="PD Draft" matTooltipPosition="above"><mat-icon>description</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="submitPdDetails(_PDtriggerForm.value,draftStatus)" matTooltip="PD Draft" matTooltipPosition="above" type="button"><mat-icon>description</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="PD Process" matTooltipPosition="above" [disabled]="!enablePDButton || !_PDtriggerForm.valid "><mat-icon>save</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
|
||||
@ -309,7 +309,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"pd_status": status,
|
||||
//"fk_pd_allocation_type":this.allocationTypeModel ,
|
||||
"fk_createdby" : this._aws.getlocale(),
|
||||
"createdon": new Date().toJSON().slice(0,19).replace('T',' ')
|
||||
// "createdon": new Date().toJSON().slice(0,19).replace('T',' ')
|
||||
};
|
||||
let pd_applicant_details : any=[{
|
||||
"applicant_name":formValue.applicant_name,
|
||||
|
||||
@ -62,19 +62,9 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
|
||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1" matTooltip="Add More Co-Applicant" matTooltipPosition="above" color="primary" type="button" (click)="addCoApplicant(emptyData)"><mat-icon>add</mat-icon></button>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="text-align: right">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1" matTooltip="Add More Co-Applicant" matTooltipPosition="above" color="primary" type="button" (click)="addCoApplicant(emptyData)"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<textarea matInput placeholder="Address 1" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea>
|
||||
<textarea matInput placeholder="Address at which PD is to be done" formControlName="addressline1" oninput="this.value = this.value.toUpperCase()"></textarea>
|
||||
<!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -9,27 +9,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Address Type" formControlName="address_type">
|
||||
<mat-option value="Office">Office</mat-option>
|
||||
<mat-option value="Clinic">Clinic</mat-option>
|
||||
<mat-option value="Factory">Factory</mat-option>
|
||||
<mat-option value="Warehouse">Warehouse</mat-option>
|
||||
<mat-option value="Shop">Shop</mat-option>
|
||||
<mat-option value="ResidencecumOffice">Residence cum Office</mat-option>
|
||||
<mat-option value="Residence">Residence</mat-option>
|
||||
<mat-option value="Other">Other (PD officer to fill)</mat-option>
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
<mat-select placeholder="Locality" formControlName="locality">
|
||||
<mat-option value="CommercialOffice">Commercial (Office type) Area
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
</mat-option>
|
||||
<mat-option value="CommercialShop">Commercial (shop type) Area</mat-option>
|
||||
<mat-option value="Industrial">Industrial Area</mat-option>
|
||||
<mat-option value="Residential">Residential Area</mat-option>
|
||||
<mat-option value="Mix">Mix use (Comment mandatory)</mat-option>
|
||||
<mat-option value="Rural">Rural (Village) area</mat-option>
|
||||
<mat-option value="Others">Others (Please specify)</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'">
|
||||
@ -37,14 +28,14 @@
|
||||
formControlName="locality_others">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Approach to PD location" formControlName="pd_location">
|
||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location">
|
||||
<mat-option value="{{data.pd_location_approach_id}}"
|
||||
*ngFor="let data of locationdata">{{data.description}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Comment on locality" formControlName="comment_locality">
|
||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality">
|
||||
<mat-option value="{{data.comments_on_locality_id}}"
|
||||
*ngFor="let data of commentData">{{data.rating}}
|
||||
</mat-option>
|
||||
@ -66,14 +57,15 @@
|
||||
<div *ngFor="let item of addressForm.controls.neighbourhood['controls']; let i=index">
|
||||
<mat-card-content class="matcard" [formGroup]="item">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Neighbour name"
|
||||
<input matInput placeholder="Neighbour Name"
|
||||
formControlName="name">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Do you know"
|
||||
formControlName="do_you_know">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="{{m_neighbourStatus}}"
|
||||
*ngFor="let m_neighbourStatus of neighbourStatusData">{{m_neighbourStatus}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -83,17 +75,18 @@
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Is the applicant owner"
|
||||
formControlName="is_owner">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="dont_know">Dont Know</mat-option>
|
||||
|
||||
<mat-option value="{{m_applicantOwner}}"
|
||||
*ngFor="let m_applicantOwner of applicantOwnerData">{{m_applicantOwner}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button type="button" matTooltip="Add More Neighbour Details" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i==0"
|
||||
<button type="button" matTooltip="Add More Neighbour Details" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i==0"
|
||||
(click)="addNeighbour($event)"
|
||||
style="float: right;">
|
||||
color="primary" style="float: right;">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" matTooltip="Delete" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i>0"
|
||||
<button type="button" matTooltip="Delete" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i>0"
|
||||
(click)="removeNeighbour(i)"
|
||||
style="float: right;">
|
||||
<mat-icon>delete</mat-icon>
|
||||
@ -113,7 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1" matTooltip="Save" matTooltipPosition="above" type="submit" (click)="onSubmit()"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" (click)="onSubmit()"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@ -34,6 +34,11 @@ export class AddressComponent implements OnInit {
|
||||
locationdata: any = [];
|
||||
commentData: any = [];
|
||||
customerData: any = [];
|
||||
addressData:any = [];
|
||||
localityData:any = [];
|
||||
neighbourStatusData:any=["Yes","No"];
|
||||
applicantOwnerData:any=["Yes","No","Dont Know"];
|
||||
|
||||
public currentLoanForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
public addressForm: FormGroup;
|
||||
@ -53,9 +58,11 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
}
|
||||
ngOnInit() {
|
||||
this.getLocation();
|
||||
this.getComment();
|
||||
this.getCustomer();
|
||||
this.getMasterDetails('PDLOCATIONAPPROACH',1);
|
||||
this.getMasterDetails('COMMENTSONLOCALITY',2);
|
||||
this.getMasterDetails('CUSTOMERBEHAVIOUR',3);
|
||||
this.getMasterDetails('LOCALITY',4);
|
||||
this.getMasterDetails('ADDRESSTYPE',5);
|
||||
this.initAddressForm();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
@ -85,7 +92,6 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
this.addressForm.controls.neighbourhood.setValue(result);
|
||||
}
|
||||
console.log('result', result);
|
||||
} else {
|
||||
control.push(this.createNeighbour());
|
||||
}
|
||||
@ -118,36 +124,24 @@ export class AddressComponent implements OnInit {
|
||||
is_owner: ['', Validators.compose([Validators.required])],
|
||||
});
|
||||
}
|
||||
getLocation() {
|
||||
let master_name = 'PDLOCATIONAPPROACH';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
getMasterDetails(table:string,type:number){
|
||||
this._pd.getAllMasterDatas(table).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
if (type==1 && val.isactive == 1) {
|
||||
this.locationdata.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
getComment() {
|
||||
let master_name = 'COMMENTSONLOCALITY';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
else if(type==2 && val.isactive == 1){
|
||||
this.commentData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
getCustomer() {
|
||||
let master_name = 'CUSTOMERBEHAVIOUR';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
else if(type==3 && val.isactive == 1){
|
||||
this.customerData.push(val);
|
||||
}
|
||||
else if(type==4 && val.isactive == 1){
|
||||
this.localityData.push(val);
|
||||
}
|
||||
else if(type==5 && val.isactive == 1){
|
||||
this.addressData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@ -11,14 +11,11 @@
|
||||
<mat-card-content>
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select (selectionChange)="selectedAssetsType($event, i)" placeholder="Assets Type" formControlName="assets_mode">
|
||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--Desction Dynamic details: START-->
|
||||
<div formArrayName="details" class="example-full-width">
|
||||
@ -28,8 +25,8 @@
|
||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Property" formControlName="property_type">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select placeholder="Property" formControlName="property_type">
|
||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -45,7 +42,7 @@
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_four_weeler">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,15 +56,15 @@
|
||||
<div [formGroupName]="s">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model">
|
||||
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model_two_weeler">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--jwell details
|
||||
<div *ngIf="sup.get('assets_mode').value == 4">
|
||||
<!--jwell details -->
|
||||
<!--<div *ngIf="sup.get('assets_mode').value == 4">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
@ -115,7 +112,7 @@
|
||||
<div fxFlex="33">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Frequency" formControlName="frequency_mode">
|
||||
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.id">{{ freqn.name }}</mat-option>
|
||||
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.frequency_id">{{ freqn.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -196,33 +193,41 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Year and month of purchase" formControlName="year_of_purchase">
|
||||
<label>Year and Month of Purchase?</label>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Year" formControlName="purchase_year">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Month" formControlName="purchase_month">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="33">
|
||||
<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false" (ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">Is there a loan?</mat-checkbox>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<mat-select placeholder="Is there a loan?" formControlName="emi">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="EMI Paid" formControlName="emi_paid">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Elapsed Tenure in months" formControlName="elapsed_tenure">
|
||||
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Balance Tenure in months" formControlName="balance_tenure">
|
||||
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -230,21 +235,15 @@
|
||||
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||
<div fxFlex="20">
|
||||
<span *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--<div fxLayout="row">
|
||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||
@ -255,6 +254,9 @@
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Asset Details" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
|
||||
@ -33,123 +33,131 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
public _assetsQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
public m_assets_type = [];
|
||||
// public m_assets_type = [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': "Property"
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': "Four Wheeler"
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': "Two Wheeler"
|
||||
// },
|
||||
// {
|
||||
// 'id': "4",
|
||||
// 'name': "Jewellery"
|
||||
// },
|
||||
// {
|
||||
// 'id': "5",
|
||||
// 'name': "Consumer Durable"
|
||||
// },
|
||||
// {
|
||||
// 'id': "6",
|
||||
// 'name': "Insurance"
|
||||
// },
|
||||
// {
|
||||
// 'id': "7",
|
||||
// 'name': "Investments"
|
||||
// },
|
||||
// {
|
||||
// 'id': "8",
|
||||
// 'name': "Others"
|
||||
// }
|
||||
// ]
|
||||
|
||||
public m_assets_type = [
|
||||
{
|
||||
'id': "1",
|
||||
'name': "Property"
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': "Four Wheeler"
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': "Two Wheeler"
|
||||
},
|
||||
{
|
||||
'id': "4",
|
||||
'name': "Jewellery"
|
||||
},
|
||||
{
|
||||
'id': "5",
|
||||
'name': "Consumer Durable"
|
||||
},
|
||||
{
|
||||
'id': "6",
|
||||
'name': "Insurance"
|
||||
},
|
||||
{
|
||||
'id': "7",
|
||||
'name': "Investments"
|
||||
},
|
||||
{
|
||||
'id': "8",
|
||||
'name': "Others"
|
||||
}
|
||||
]
|
||||
public m_propertyType = [];
|
||||
|
||||
public m_propertyType = [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Residential'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Commercial'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Industrial'
|
||||
},
|
||||
{
|
||||
'id': "4",
|
||||
'name': 'Land'
|
||||
}
|
||||
];
|
||||
// public m_propertyType = [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Residential'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Commercial'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Industrial'
|
||||
// },
|
||||
// {
|
||||
// 'id': "4",
|
||||
// 'name': 'Land'
|
||||
// }
|
||||
// ];
|
||||
|
||||
public m_insuranceType = [{
|
||||
'id': "1",
|
||||
'name': 'Life'
|
||||
}, {
|
||||
'id': "2",
|
||||
'name': 'Health'
|
||||
}]
|
||||
public m_insuranceType = [];
|
||||
|
||||
public m_investmentType = [{
|
||||
'id': "1",
|
||||
'name': 'FD'
|
||||
}, {
|
||||
'id': "2",
|
||||
'name': 'RD'
|
||||
}, {
|
||||
'id': "3",
|
||||
'name': 'Mutual Funds'
|
||||
}, {
|
||||
'id': "4",
|
||||
'name': 'PPF'
|
||||
}, {
|
||||
'id': "5",
|
||||
'name': 'Shares'
|
||||
}, {
|
||||
'id': "6",
|
||||
'name': 'Others'
|
||||
}]
|
||||
// public m_insuranceType = [{
|
||||
// 'id': "1",
|
||||
// 'name': 'Life'
|
||||
// }, {
|
||||
// 'id': "2",
|
||||
// 'name': 'Health'
|
||||
// }]
|
||||
|
||||
public m_freqOfPurchase = [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Daily'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Weekly'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Monthly'
|
||||
},
|
||||
{
|
||||
'id': "4",
|
||||
'name': 'Every 3 months'
|
||||
},
|
||||
{
|
||||
'id': "5",
|
||||
'name': 'Half yearly'
|
||||
},
|
||||
{
|
||||
'id': "6",
|
||||
'name': 'Yearly'
|
||||
},
|
||||
{
|
||||
'id': "7",
|
||||
'name': 'As and when required'
|
||||
},
|
||||
{
|
||||
'id': "8",
|
||||
'name': 'Others'
|
||||
}
|
||||
]
|
||||
public m_investmentType = [];
|
||||
|
||||
// public m_investmentType = [{
|
||||
// 'id': "1",
|
||||
// 'name': 'FD'
|
||||
// }, {
|
||||
// 'id': "2",
|
||||
// 'name': 'RD'
|
||||
// }, {
|
||||
// 'id': "3",
|
||||
// 'name': 'Mutual Funds'
|
||||
// }, {
|
||||
// 'id': "4",
|
||||
// 'name': 'PPF'
|
||||
// }, {
|
||||
// 'id': "5",
|
||||
// 'name': 'Shares'
|
||||
// }, {
|
||||
// 'id': "6",
|
||||
// 'name': 'Others'
|
||||
// }]
|
||||
|
||||
public m_freqOfPurchase = [];
|
||||
|
||||
// public m_freqOfPurchase = [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Daily'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Weekly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Monthly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "4",
|
||||
// 'name': 'Every 3 months'
|
||||
// },
|
||||
// {
|
||||
// 'id': "5",
|
||||
// 'name': 'Half yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "6",
|
||||
// 'name': 'Yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "7",
|
||||
// 'name': 'As and when required'
|
||||
// },
|
||||
// {
|
||||
// 'id': "8",
|
||||
// 'name': 'Others'
|
||||
// }
|
||||
// ]
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(
|
||||
@ -162,7 +170,78 @@ export class AssetsInfoComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.getPdSupplierFormDetails();
|
||||
|
||||
this.getM_Assets_Type();
|
||||
this.getM_PropertyType();
|
||||
this.getM_InvestmentType();
|
||||
this.getM_FreqOfPurchase();
|
||||
this.getM_InsuranceType();
|
||||
}
|
||||
|
||||
// ======================
|
||||
|
||||
getM_Assets_Type() {
|
||||
this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe(
|
||||
data => {
|
||||
this.m_assets_type = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_PropertyType() {
|
||||
this.pdTrigerService.getAllMasterDatas('PROPERTIES').subscribe(
|
||||
data => {
|
||||
this.m_propertyType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_InvestmentType() {
|
||||
this.pdTrigerService.getAllMasterDatas('INVESTMENTTYPE').subscribe(
|
||||
data => {
|
||||
this.m_investmentType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_FreqOfPurchase() {
|
||||
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
||||
data => {
|
||||
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_InsuranceType() {
|
||||
this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
||||
data => {
|
||||
this.m_insuranceType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// =============================
|
||||
|
||||
apiLoadFinish: boolean = false;
|
||||
getPdSupplierFormDetails() {
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '4').subscribe(
|
||||
@ -218,9 +297,10 @@ export class AssetsInfoComponent implements OnInit {
|
||||
return this._formBuilder.group({
|
||||
assets_mode: ['', Validators.compose([Validators.required])],
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: ['', Validators.compose([Validators.required])],
|
||||
name_of_the_owner: ['', Validators.compose([Validators.required])],
|
||||
year_of_purchase: ['', Validators.compose([Validators.required])],
|
||||
approximate_market_value: ['', Validators.compose([])],
|
||||
name_of_the_owner: ['', Validators.compose([])],
|
||||
purchase_year: ['', Validators.compose([])],
|
||||
purchase_month: ['', Validators.compose([])],
|
||||
emi: [''],
|
||||
emi_paid: [''],
|
||||
elapsed_tenure: [''],
|
||||
@ -243,12 +323,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
}
|
||||
case '2': {
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.load_Two_Four_Weeler());
|
||||
control.push(this.load_Four_Weeler());
|
||||
break;
|
||||
}
|
||||
case '3': {
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.load_Two_Four_Weeler());
|
||||
control.push(this.load_Two_Weeler());
|
||||
break;
|
||||
}
|
||||
case '4': {
|
||||
@ -291,7 +371,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
|
||||
loadJwellDescription() {
|
||||
return this._formBuilder.group({
|
||||
jwell_description: ['', Validators.compose([Validators.required])]
|
||||
jwell_description: ['', Validators.compose([])]
|
||||
});
|
||||
}
|
||||
|
||||
@ -325,9 +405,15 @@ export class AssetsInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
load_Two_Four_Weeler() {
|
||||
load_Four_Weeler() {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model: ['', Validators.compose([Validators.required])]
|
||||
manufacturer_model_four_weeler: ['', Validators.compose([Validators.required])]
|
||||
});
|
||||
}
|
||||
|
||||
load_Two_Weeler() {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])]
|
||||
});
|
||||
}
|
||||
|
||||
@ -375,20 +461,28 @@ export class AssetsInfoComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
load_Two_Four_WeelerWithData(data) {
|
||||
load_Four_WeelerWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model: [data.manufacturer_model, Validators.compose([Validators.required])]
|
||||
manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])]
|
||||
});
|
||||
}
|
||||
|
||||
load_Two_WeelerWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
initDetailsWithdata(data) {
|
||||
return this._formBuilder.group({
|
||||
assets_mode: [data.assets_mode, Validators.compose([Validators.required])],
|
||||
details: this._formBuilder.array([]),
|
||||
approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])],
|
||||
name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])],
|
||||
year_of_purchase: [data.year_of_purchase, Validators.compose([Validators.required])],
|
||||
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
|
||||
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
|
||||
purchase_year: [data.purchase_year, Validators.compose([])],
|
||||
purchase_month: [data.purchase_month, Validators.compose([])],
|
||||
emi: [data.emi || 0],
|
||||
emi_paid: [data.emi_paid || ''],
|
||||
elapsed_tenure: [data.elapsed_tenure || ''],
|
||||
@ -406,7 +500,8 @@ export class AssetsInfoComponent implements OnInit {
|
||||
assets_mode: val.assets_mode,
|
||||
approximate_market_value: val.approximate_market_value,
|
||||
name_of_the_owner: val.name_of_the_owner,
|
||||
year_of_purchase: val.year_of_purchase,
|
||||
purchase_year: val.purchase_year,
|
||||
purchase_month: val.purchase_month,
|
||||
emi: val.emi,
|
||||
emi_paid: val.emi_paid,
|
||||
elapsed_tenure: val.elapsed_tenure,
|
||||
@ -437,12 +532,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
}
|
||||
case '2': {
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.load_Two_Four_WeelerWithData(data));
|
||||
control.push(this.load_Four_WeelerWithData(data));
|
||||
break;
|
||||
}
|
||||
case '3': {
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.load_Two_Four_WeelerWithData(data));
|
||||
control.push(this.load_Two_WeelerWithData(data));
|
||||
break;
|
||||
}
|
||||
case '4': {
|
||||
|
||||
@ -92,14 +92,17 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Account Type"
|
||||
<mat-select placeholder="Account Type" formControlName="account_type">
|
||||
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||
</mat-select>
|
||||
<!--<mat-select placeholder="Account Type"
|
||||
formControlName="account_type">
|
||||
<mat-option value="Savings">Savings</mat-option>
|
||||
<mat-option value="Current">Current</mat-option>
|
||||
<mat-option value="OD">OD</mat-option>
|
||||
<mat-option value="CC">CC</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@ -129,8 +132,8 @@
|
||||
<mat-icon >delete</mat-icon>
|
||||
</button>
|
||||
</mat-expansion-panel>
|
||||
<div *ngIf="bankingForm.controls.itemRows['controls'].length == (i+1)">
|
||||
<button class="mr-1 mb-1" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" (click)="addBankdetails(i, $event)">
|
||||
<div style="text-align: right;" class="pt-1" *ngIf="bankingForm.controls.itemRows['controls'].length == (i+1)">
|
||||
<button class="mr-1 mb-1 hover-icon" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" (click)="addBankdetails(i, $event)">
|
||||
<mat-icon >add</mat-icon>
|
||||
</button></div>
|
||||
</mat-accordion>
|
||||
@ -147,7 +150,7 @@
|
||||
<!-- <button class="mr-1 mb-1" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" (click)="addBankdetails(i)">
|
||||
<mat-icon >add</mat-icon>
|
||||
</button> -->
|
||||
<button class="mr-1 mb-1" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
|
||||
<button class="mr-1 mb-1 hover-icon" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -32,6 +32,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
public bankingForm: FormGroup;
|
||||
step: number;
|
||||
private notifier: NotifierService;
|
||||
m_accountType= [];
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -43,6 +44,7 @@ export class BankingDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.step = 0;
|
||||
this.initBankingForm();
|
||||
this.getM_AccountType();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '7';
|
||||
@ -68,6 +70,20 @@ export class BankingDetailsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// ======================
|
||||
|
||||
getM_AccountType() {
|
||||
this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe(
|
||||
data => {
|
||||
this.m_accountType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public initBankingForm(): void {
|
||||
this.bankingForm = this.fb.group({
|
||||
banking_form_remark: [''],
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<input matInput placeholder="Name of Business / Profession" formControlName="profession_name">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="How many years in Business" formControlName="business_years">
|
||||
<input matInput placeholder="How many years in business" formControlName="business_years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Industry"
|
||||
@ -25,7 +25,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Designation
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="designation">
|
||||
<div *ngFor="let members of businessForm.controls.designation['controls']; let i=index"
|
||||
@ -37,13 +37,13 @@
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Designation" formControlName="sec_designation">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addDesignation()"
|
||||
*ngIf="i==0">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addDesignation()"
|
||||
matTooltip="Add More Designation" matTooltipPosition="above" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteDesignation(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deleteDesignation(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -65,12 +65,12 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="businessForm.controls['main_person'].value == 'Others'">
|
||||
<input matInput placeholder="Specify other persion"
|
||||
<input matInput placeholder="Specify other person"
|
||||
formControlName="other_main_person">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select multiple placeholder="Other family members invovled"
|
||||
formControlName="other_main_person"formControlName="family_members_involved" (selectionChange)="relationChanged($event)">
|
||||
formControlName="family_members_involved" (selectionChange)="relationChanged($event)">
|
||||
<mat-option value="{{member.relationship_id}}" *ngFor="let member of relationData">{{member.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -85,7 +85,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Partners / Directors / Shareholders
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="partners">
|
||||
<div *ngFor="let members of businessForm.controls.partners['controls']; let i=index"
|
||||
@ -104,16 +104,16 @@
|
||||
formControlName="current_business_experiance">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Total Business experience"
|
||||
<input matInput placeholder="Total Business Experience"
|
||||
formControlName="total_business_experiance">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addPartnerDetails()"
|
||||
*ngIf="i==0">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addPartnerDetails()"
|
||||
matTooltip="Add More Partners / Directors / Shareholders" matTooltipPosition="above" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deletePartnerDetails(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deletePartnerDetails(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -122,7 +122,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Employees As per applicant
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -142,7 +142,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>As per PD Officer
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -162,15 +162,15 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Investments
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Amount invested by applicant"
|
||||
<input matInput placeholder="Amount Invested by Applicant"
|
||||
formControlName="invested_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Monthly Working capital needed"
|
||||
<input matInput placeholder="Monthly Working Capital Needed"
|
||||
formControlName="working_capital">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
@ -178,9 +178,9 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Location
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-card-content class="matcards">
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
placeholder="Is the location of the business / profession suited to the nature of business / service provided? "
|
||||
@ -195,11 +195,11 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Business Setup
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-card-content class="matcards">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="What is the Ownership of the setup ?"
|
||||
<mat-select placeholder="What is the ownership of the setup ?"
|
||||
formControlName="ownership_setup">
|
||||
<mat-option value="self_owned">self owned</mat-option>
|
||||
<mat-option value="rented">Rented</mat-option>
|
||||
@ -208,11 +208,11 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="businessForm.controls['ownership_setup'].value == 'others'">
|
||||
<input matInput placeholder="please specify"
|
||||
<input matInput placeholder="Please Specify"
|
||||
formControlName="ownership_others">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="businessForm.controls['ownership_setup'].value == 'rented'">
|
||||
<input matInput placeholder="provide rent paid?"
|
||||
<input matInput placeholder="Provide Rent Paid?"
|
||||
formControlName="rent_paid">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
@ -220,7 +220,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Is the below documents seen and photo captured ?
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -231,14 +231,14 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="GST Regn cert"
|
||||
<mat-select placeholder="GST Regn Cert"
|
||||
formControlName="gst_Regn_cert">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Export / import cert"
|
||||
<mat-select placeholder="Export / Import cert"
|
||||
formControlName="export_import_cert">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -252,7 +252,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Cert of practice"
|
||||
<mat-select placeholder="Cert of Practice"
|
||||
formControlName="practice_cert">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -273,7 +273,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="do you want to add other documents?"
|
||||
<mat-select placeholder="Do you want to add other documents?"
|
||||
formControlName="other_documents">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -282,17 +282,17 @@
|
||||
<div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'">
|
||||
<div *ngFor="let members of businessForm.controls.documents['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:86%">
|
||||
<input matInput placeholder="Specify Document Details"
|
||||
formControlName="document">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addDocuments()"
|
||||
*ngIf="i==0">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addDocuments()"
|
||||
matTooltip="Add More Document Details" matTooltipPosition="above" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteDocuments(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="deleteDocuments(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -306,6 +306,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -8,13 +8,19 @@
|
||||
width: 100%;
|
||||
}
|
||||
.matcard > * {
|
||||
width: 80%;
|
||||
width: 98%;
|
||||
}
|
||||
.card mat-form-field {
|
||||
margin: 0 2%;
|
||||
width: 40%;
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
width: 40%;
|
||||
}
|
||||
.matcards mat-form-field {
|
||||
margin: 0 2%;
|
||||
width: 98%;
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
|
||||
@ -75,13 +75,19 @@ export class BusinessInfoComponent implements OnInit {
|
||||
return data.records.family_members_involved[key];
|
||||
});
|
||||
let enduse: any = [];
|
||||
let existRelative: any =[];
|
||||
selectedMembers.forEach(val => {
|
||||
enduse.push(val.member);
|
||||
existRelative.push(val);
|
||||
});
|
||||
this.relativeNames = existRelative;
|
||||
if (DesgnArray.length == 0) {
|
||||
Desgn.push(this.createDesignation());
|
||||
} else {
|
||||
DesgnArray.forEach(datas => {
|
||||
Desgn.push(this.createDesignation());
|
||||
});
|
||||
|
||||
}
|
||||
if (PartnrArray.length == 0) {
|
||||
Partnr.push(this.createPartners());
|
||||
@ -90,7 +96,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
Partnr.push(this.createPartners());
|
||||
});
|
||||
}
|
||||
if (data.other_documents == 'yes') {
|
||||
if (data.records.other_documents == 'yes') {
|
||||
DocArray = Object.keys(data.records.documents).map(function (key) {
|
||||
return data.records.documents[key];
|
||||
});
|
||||
@ -114,7 +120,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
businessVal.designation = DesgnArray;
|
||||
businessVal.partners = PartnrArray;
|
||||
businessVal.documents = DocArray;
|
||||
console.log('businessVal', businessVal);
|
||||
|
||||
this.businessForm.setValue(businessVal);
|
||||
} else {
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<!--<pre> {{ m_group | json}}</pre>-->
|
||||
<mat-card style="padding: 12px;">
|
||||
<form *ngIf="apiLoadFinish" [formGroup]="_supplierQuesFrom" (submit)="onSubmit()" novalidate>
|
||||
<form *ngIf="apiLoadFinish" [formGroup]="_clientQuesFrom" (submit)="onSubmit()" novalidate>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div formArrayName="supplier_details" fxFill>
|
||||
<div *ngFor="let sup of _supplierQuesFrom.controls.supplier_details['controls']; let i=index">
|
||||
<div formArrayName="client_details" fxFill>
|
||||
<div *ngFor="let sup of _clientQuesFrom.controls.client_details['controls']; let i=index">
|
||||
<div [formGroupName]="i">
|
||||
<div fxLayout="row wrap" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field class="ml-xs example-full-width">
|
||||
<input matInput placeholder="Supplier Name" formControlName="supplier_name">
|
||||
<input matInput placeholder="Client Name" formControlName="client_name">
|
||||
<!--<mat-error *ngIf="submitted && f.supplier_name.hasError('required')" class="mat-text-warn">You must Include Supplier Name.</mat-error>-->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -62,7 +62,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="20">
|
||||
<span *ngIf="_supplierQuesFrom.controls.supplier_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<span *ngIf="_clientQuesFrom.controls.client_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -31,69 +31,103 @@ export class ClientInfoComponent implements OnInit {
|
||||
|
||||
@Input() pdid: number;
|
||||
|
||||
public _supplierQuesFrom: FormGroup;
|
||||
public _clientQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
public m_paymentModeType= [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Immediate Or Advanced Payment'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Credit'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Combination of Both'
|
||||
},
|
||||
];
|
||||
|
||||
public m_freqOfPurchase= [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Daily'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Weekly'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Monthly'
|
||||
},
|
||||
{
|
||||
'id': "4",
|
||||
'name': 'Every 3 months'
|
||||
},
|
||||
{
|
||||
'id': "5",
|
||||
'name': 'Half yearly'
|
||||
},
|
||||
{
|
||||
'id': "6",
|
||||
'name': 'Yearly'
|
||||
},
|
||||
{
|
||||
'id': "7",
|
||||
'name': 'As and when required'
|
||||
},
|
||||
{
|
||||
'id': "8",
|
||||
'name': 'Others'
|
||||
}
|
||||
]
|
||||
public m_paymentModeType= [];
|
||||
// public m_paymentModeType= [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Immediate Or Advanced Payment'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Credit'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Combination of Both'
|
||||
// },
|
||||
// ];
|
||||
public m_freqOfPurchase= [];
|
||||
// public m_freqOfPurchase= [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Daily'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Weekly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Monthly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "4",
|
||||
// 'name': 'Every 3 months'
|
||||
// },
|
||||
// {
|
||||
// 'id': "5",
|
||||
// 'name': 'Half yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "6",
|
||||
// 'name': 'Yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "7",
|
||||
// 'name': 'As and when required'
|
||||
// },
|
||||
// {
|
||||
// 'id': "8",
|
||||
// 'name': 'Others'
|
||||
// }
|
||||
// ]
|
||||
|
||||
constructor(
|
||||
private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: PdTrigerService) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.getPdSupplierFormDetails();
|
||||
this.getM_FreqOfPurchase();
|
||||
this.getM_PaymentModeType();
|
||||
this.getClientFormDetails();
|
||||
}
|
||||
|
||||
|
||||
// ==================
|
||||
|
||||
getM_FreqOfPurchase() {
|
||||
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
||||
data => {
|
||||
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_PaymentModeType() {
|
||||
this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe(
|
||||
data => {
|
||||
this.m_paymentModeType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// ==================
|
||||
|
||||
apiLoadFinish: boolean = false;
|
||||
getPdSupplierFormDetails() {
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe(
|
||||
getClientFormDetails() {
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe(
|
||||
data => {
|
||||
if (data) {
|
||||
if(data.dataStatus){
|
||||
@ -112,21 +146,19 @@ apiLoadFinish: boolean = false;
|
||||
formLoadData(val) {
|
||||
if(val !== null) {
|
||||
let value = val;
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
this._clientQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['1'],
|
||||
main_raw_materials: [value.main_raw_materials, Validators.compose([Validators.required])],
|
||||
supplier_details: this._formBuilder.array([
|
||||
formid: ['2'],
|
||||
client_details: this._formBuilder.array([
|
||||
// this.initDetails(),
|
||||
])
|
||||
});
|
||||
this.addSupplierDetailsWithData(value.supplier_details);
|
||||
this.addClientDetailsWithData(value.client_details);
|
||||
} else {
|
||||
this._supplierQuesFrom = this._formBuilder.group({
|
||||
this._clientQuesFrom = this._formBuilder.group({
|
||||
pdid: [this.pdid],
|
||||
formid: ['1'],
|
||||
main_raw_materials: [null, Validators.compose([Validators.required])],
|
||||
supplier_details: this._formBuilder.array([
|
||||
formid: ['2'],
|
||||
client_details: this._formBuilder.array([
|
||||
this.initDetails(),
|
||||
])
|
||||
});
|
||||
@ -134,12 +166,12 @@ apiLoadFinish: boolean = false;
|
||||
}
|
||||
|
||||
// convenience getter for easy access to form fields
|
||||
get f() { return this._supplierQuesFrom.controls; }
|
||||
get f() { return this._clientQuesFrom.controls; }
|
||||
|
||||
// Dynamic Form field creation Functionality : START ===>
|
||||
initDetails() {
|
||||
return this._formBuilder.group({
|
||||
supplier_name: ['', Validators.compose([Validators.required])],
|
||||
client_name: ['', Validators.compose([Validators.required])],
|
||||
contact_person: ['', Validators.compose([Validators.required])],
|
||||
mobile_number: ['', Validators.compose([Validators.required])],
|
||||
payment_mode: ['', Validators.compose([Validators.required])],
|
||||
@ -152,7 +184,7 @@ apiLoadFinish: boolean = false;
|
||||
|
||||
initDetailsWithdata(data) {
|
||||
return this._formBuilder.group({
|
||||
supplier_name: [data.supplier_name, Validators.compose([Validators.required])],
|
||||
client_name: [data.client_name, Validators.compose([Validators.required])],
|
||||
contact_person: [data.contact_person, Validators.compose([Validators.required])],
|
||||
mobile_number: [data.mobile_number, Validators.compose([Validators.required])],
|
||||
payment_mode: [data.payment_mode, Validators.compose([Validators.required])],
|
||||
@ -163,7 +195,7 @@ apiLoadFinish: boolean = false;
|
||||
});
|
||||
}
|
||||
|
||||
addSupplierDetailsWithData(supp_data) {
|
||||
addClientDetailsWithData(supp_data) {
|
||||
|
||||
var result = Object.keys(supp_data).map(function(key) {
|
||||
return supp_data[key];
|
||||
@ -171,7 +203,7 @@ var result = Object.keys(supp_data).map(function(key) {
|
||||
if (result.length > 0) {
|
||||
for (let val of result) {
|
||||
let vals = {
|
||||
supplier_name: val.supplier_name,
|
||||
client_name: val.client_name,
|
||||
contact_person: val.contact_person,
|
||||
mobile_number: val.mobile_number,
|
||||
payment_mode: val.payment_mode,
|
||||
@ -180,18 +212,18 @@ var result = Object.keys(supp_data).map(function(key) {
|
||||
frequency_of_purchase: val.frequency_of_purchase,
|
||||
freq_purchase_others_text_value: val.freq_purchase_others_text_value
|
||||
};
|
||||
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
|
||||
const control = <FormArray>this._clientQuesFrom.controls['client_details'];
|
||||
control.push(this.initDetailsWithdata(vals));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addSupplierDetails(e) {
|
||||
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
|
||||
const control = <FormArray>this._clientQuesFrom.controls['client_details'];
|
||||
control.push(this.initDetails());
|
||||
}
|
||||
removeLanguage(i: number) {
|
||||
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
|
||||
const control = <FormArray>this._clientQuesFrom.controls['client_details'];
|
||||
control.removeAt(i);
|
||||
}
|
||||
|
||||
@ -209,14 +241,14 @@ var result = Object.keys(supp_data).map(function(key) {
|
||||
onSubmit() {
|
||||
this.submitted = true;
|
||||
// stop here if form is invalid
|
||||
if (this._supplierQuesFrom.invalid) {
|
||||
if (this._clientQuesFrom.invalid) {
|
||||
return;
|
||||
} else {
|
||||
var answerFormValues = this._supplierQuesFrom.value;
|
||||
var answerFormValues = this._clientQuesFrom.value;
|
||||
|
||||
// To Remove The "Null" With Key also
|
||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||
alert(JSON.stringify(answerFormValues));
|
||||
|
||||
// Add BRANCH data with help Service File
|
||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
||||
dataresult => {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<p>Current Loan Details</p>
|
||||
<form [formGroup]="currentLoanForm" class="address">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Do you have any other existing loan"
|
||||
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Do you have any other existing loan"
|
||||
formControlName="existing_loan">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
@ -30,16 +30,16 @@
|
||||
<input matInput placeholder="Lender" formControlName="lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Original Tenure" formControlName="original_tenure">
|
||||
<input matInput placeholder="Original Tenure in Months" formControlName="original_tenure">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
|
||||
<input matInput placeholder="Current Balance Tenure in Months" formControlName="current_balance_tenure">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" (click)="addLoanDetails()"
|
||||
<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()"
|
||||
*ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)"
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentloan()"><mat-icon>save</mat-icon>
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentloan()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -49,11 +49,14 @@ export class CurrentLoanComponent implements OnInit {
|
||||
console.log('value', value);
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (value.status == 200) {
|
||||
|
||||
this.currentLoanForm.controls['existing_loan'].setValue(value.records.existing_loan);
|
||||
this.currentLoanForm.controls['currentloan_remarks'].setValue(value.records.currentloan_remarks);
|
||||
|
||||
if (value.records.existing_loan == 'Yes') {
|
||||
var result = Object.keys(value.records.loan_details).map(function (key) {
|
||||
return value.records.loan_details[key];
|
||||
});
|
||||
this.currentLoanForm.controls['existing_loan'].setValue(value.records.existing_loan);
|
||||
this.currentLoanForm.controls['currentloan_remarks'].setValue(value.records.currentloan_remarks);
|
||||
if (result.length > 0) {
|
||||
result.forEach(val => {
|
||||
control.push(this.createLoanDetail());
|
||||
@ -62,6 +65,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
} else {
|
||||
control.push(this.createLoanDetail());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
control.push(this.createLoanDetail());
|
||||
}
|
||||
@ -74,6 +78,16 @@ export class CurrentLoanComponent implements OnInit {
|
||||
loan_details: this.fb.array([]),
|
||||
});
|
||||
}
|
||||
|
||||
selectedLoanChanges(e): void {
|
||||
if (e.value == 'Yes') {
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
control.push(this.createLoanDetail());
|
||||
} else if (e.value == 'No') {
|
||||
const arr = <FormArray>this.currentLoanForm.controls.loan_details;
|
||||
arr.removeAt(0);
|
||||
}
|
||||
}
|
||||
createLoanDetail() {
|
||||
return this.fb.group({
|
||||
loan_amount: ['', Validators.compose([Validators.required])],
|
||||
@ -94,6 +108,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
submitCurrentloan() {
|
||||
if (!this.currentLoanForm.valid) {
|
||||
console.log("data invalid")
|
||||
return;
|
||||
}
|
||||
let records: any = {};
|
||||
@ -102,7 +117,9 @@ export class CurrentLoanComponent implements OnInit {
|
||||
records.fk_createdby = this.pdid;
|
||||
records.existing_loan = this.currentLoanForm.controls['existing_loan'].value;
|
||||
records.currentloan_remarks = this.currentLoanForm.controls['currentloan_remarks'].value;
|
||||
if (records.existing_loan == 'Yes') {
|
||||
records.loan_details = this.currentLoanForm.controls['loan_details'].value;
|
||||
}
|
||||
console.log('data', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
|
||||
@ -1,22 +1,37 @@
|
||||
<mat-card style="padding: 12px;">
|
||||
<p>Employement Information</p>
|
||||
<form [formGroup]="employmentForm" class="address">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Name of employer" formControlName="employer_name">
|
||||
<input matInput placeholder="Name of Employer" formControlName="employer_name">
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<label>Since how long working with this employer?</label>
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Year" formControlName="how_long_year">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Since how long working with this employer?" formControlName="how_long">
|
||||
<input matInput type="number" placeholder="Month" formControlName="how_long_month">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||
<mat-select placeholder="Was the employer met?"
|
||||
formControlName="was_met">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<input matInput placeholder="Name and Designation of person met" formControlName="name_designation">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="employmentForm.controls['was_met'].value == 'yes'">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Name of person met" formControlName="name_person_met">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Designation of person met" formControlName="designation_person_met">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||
<mat-select placeholder="Salary amount confirmed ?"
|
||||
formControlName="confirm_salary">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
@ -26,14 +41,14 @@
|
||||
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
|
||||
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Attendance Register seen ?"
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||
<mat-select placeholder="Attendance register seen ?"
|
||||
formControlName="attendance_seen">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
|
||||
<mat-select placeholder="Salary register seen ?"
|
||||
formControlName="sal_reg_seen">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
@ -46,19 +61,21 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Gross" formControlName="gross">
|
||||
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Net Take home"
|
||||
formControlName="net_take_home">
|
||||
<input matInput placeholder="Net Monthly Salary"
|
||||
formControlName="net_monthly_salary">
|
||||
<!-- <input matInput placeholder="Net Take Home"
|
||||
formControlName="net_take_home"> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Bonus or incentive"
|
||||
<input matInput placeholder="Bonus or Incentive"
|
||||
formControlName="bonus_incentive">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Any delays"
|
||||
<input matInput placeholder="Any Delays"
|
||||
formControlName="any_delays">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
@ -71,6 +88,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -31,27 +31,34 @@ import {ActivatedRoute, Router} from '@angular/router';
|
||||
export class EmploymentInfoComponent implements OnInit {
|
||||
@Input() pdid: number;
|
||||
@Input() form_id: number;
|
||||
@Input() pd_all_details:any;
|
||||
|
||||
public employmentForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
|
||||
public pd_cus_segment:string;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService) {
|
||||
this.notifier = notifier;
|
||||
|
||||
}
|
||||
ngOnInit() {
|
||||
this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
|
||||
this.initemploymentForm();
|
||||
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);
|
||||
if (value.status == 200) {
|
||||
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
|
||||
this.employmentForm.controls['how_long'].setValue(value.records.how_long);
|
||||
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
|
||||
this.employmentForm.controls['how_long_month'].setValue(value.records.how_long_month);
|
||||
this.employmentForm.controls['was_met'].setValue(value.records.was_met);
|
||||
if (value.records.name_designation) {
|
||||
this.employmentForm.controls['name_designation'].setValue(value.records.name_designation);
|
||||
if (value.records.name_person_met) {
|
||||
this.employmentForm.controls['name_person_met'].setValue(value.records.name_person_met);
|
||||
}
|
||||
if (value.records.designation_person_met) {
|
||||
this.employmentForm.controls['designation_person_met'].setValue(value.records.designation_person_met);
|
||||
}
|
||||
this.employmentForm.controls['confirm_salary'].setValue(value.records.confirm_salary);
|
||||
if (value.records.confirm_salary_amount) {
|
||||
@ -59,8 +66,8 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
}
|
||||
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
|
||||
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen);
|
||||
this.employmentForm.controls['gross'].setValue(value.records.gross);
|
||||
this.employmentForm.controls['net_take_home'].setValue(value.records.net_take_home);
|
||||
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
|
||||
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary);
|
||||
this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive);
|
||||
this.employmentForm.controls['any_delays'].setValue(value.records.any_delays);
|
||||
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
|
||||
@ -70,15 +77,17 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
public initemploymentForm(): void {
|
||||
this.employmentForm = this.fb.group({
|
||||
employer_name: ['', Validators.compose([Validators.required])],
|
||||
how_long: ['', Validators.compose([Validators.required])],
|
||||
was_met: ['', Validators.compose([Validators.required])],
|
||||
name_designation: [''],
|
||||
confirm_salary: ['', Validators.compose([Validators.required])],
|
||||
how_long_year: ['', Validators.compose([Validators.required])],
|
||||
how_long_month: ['', Validators.compose([Validators.required])],
|
||||
was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
name_person_met: [''],
|
||||
designation_person_met: [''],
|
||||
confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
confirm_salary_amount: [''],
|
||||
attendance_seen: ['', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: ['', Validators.compose([Validators.required])],
|
||||
gross: ['', Validators.compose([Validators.required])],
|
||||
net_take_home: ['', Validators.compose([Validators.required])],
|
||||
attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
|
||||
gross_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
net_monthly_salary: ['', Validators.compose([Validators.required])],
|
||||
bonus_incentive: ['', Validators.compose([Validators.required])],
|
||||
any_delays: ['', Validators.compose([Validators.required])],
|
||||
employment_remarks: ['', Validators.compose([Validators.required])],
|
||||
@ -93,10 +102,12 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
records.formid = this.form_id;
|
||||
records.fk_createdby = this.pdid;
|
||||
records.employer_name = this.employmentForm.controls['employer_name'].value;
|
||||
records.how_long = this.employmentForm.controls['how_long'].value;
|
||||
records.how_long_year = this.employmentForm.controls['how_long_year'].value;
|
||||
records.how_long_month = this.employmentForm.controls['how_long_month'].value;
|
||||
records.was_met = this.employmentForm.controls['was_met'].value;
|
||||
if (this.employmentForm.controls['was_met'].value == 'yes') {
|
||||
records.name_designation = this.employmentForm.controls['name_designation'].value;
|
||||
records.name_person_met = this.employmentForm.controls['name_person_met'].value;
|
||||
records.designation_person_met = this.employmentForm.controls['designation_person_met'].value;
|
||||
}
|
||||
records.confirm_salary = this.employmentForm.controls['confirm_salary'].value;
|
||||
if (this.employmentForm.controls['confirm_salary'].value == 'yes') {
|
||||
@ -104,8 +115,8 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
}
|
||||
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
|
||||
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
|
||||
records.gross = this.employmentForm.controls['gross'].value;
|
||||
records.net_take_home = this.employmentForm.controls['net_take_home'].value;
|
||||
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
|
||||
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
|
||||
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;
|
||||
records.any_delays = this.employmentForm.controls['any_delays'].value;
|
||||
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
||||
|
||||
@ -5,21 +5,21 @@
|
||||
<form class="address" [formGroup]="familyForm">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Person Met" formControlName="person">
|
||||
<mat-option *ngFor="let state of filteredStates" [value]="state">
|
||||
{{state}}
|
||||
<mat-option *ngFor="let personMet of personMetData" [value]="personMet.person_met_id">
|
||||
{{personMet.person_met_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="person.value =='Other'">
|
||||
<mat-form-field *ngIf="person.value ==8">
|
||||
<input matInput placeholder="Enter the relationship" formControlName="personOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="No. Of family members" formControlName="members">
|
||||
<input matInput placeholder="No. Of Family Members" formControlName="members">
|
||||
</mat-form-field>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Earning Members
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="earningMembers">
|
||||
<div *ngFor="let item of familyForm.controls.earningMembers['controls']; let i=index"
|
||||
@ -35,9 +35,10 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Segment" formControlName="segment">
|
||||
<mat-option value="Salaried">Salaried</mat-option>
|
||||
<mat-option value="SENP">SENP</mat-option>
|
||||
<mat-option value="SEP">SEP</mat-option>
|
||||
<mat-option value="{{cusSeg.customer_segment_id}}"
|
||||
*ngFor="let cusSeg of customerSegData">
|
||||
{{cusSeg.name}}
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -49,12 +50,12 @@
|
||||
<input matInput placeholder="Name of Employer / Business"
|
||||
formControlName="employer_name">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0"
|
||||
(click)="addearningMembers()">
|
||||
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0" color="primary"
|
||||
matTooltip="Add More Earning Members" matTooltipPosition="above" (click)="addearningMembers()">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button
|
||||
(click)="deleteEarningMembers(i)" *ngIf="i>0">
|
||||
matTooltip="Delete" matTooltipPosition="above" (click)="deleteEarningMembers(i)" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
@ -64,7 +65,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Non Earning Members
|
||||
<p>
|
||||
</p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="nonEarningMembers">
|
||||
<div *ngFor="let members of familyForm.controls.nonEarningMembers['controls']; let i=index"
|
||||
@ -87,16 +88,16 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field *ngIf="members['controls'].occupation.value==3">
|
||||
<input matInput placeholder="Retired From"
|
||||
formControlName="retired">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addMembers()"
|
||||
*ngIf="i==0">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addMembers()" color="primary"
|
||||
matTooltip="Add More Non Earning Members" matTooltipPosition="above" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)"
|
||||
*ngIf="i>0">
|
||||
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
@ -105,7 +106,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Residence <p>
|
||||
<p>Residence </p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -117,16 +118,16 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Ownership" formControlName="ownership">
|
||||
<mat-option value="Self">Self Owned</mat-option>
|
||||
<mat-option value="Family">Family Owned</mat-option>
|
||||
<mat-option value="Rented">Rented</mat-option>
|
||||
<mat-option value="Others">Others</mat-option>
|
||||
<mat-option value="{{ownerShip.id}}"
|
||||
*ngFor="let ownerShip of ownerShipData">
|
||||
{{ownerShip.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="ownership.value =='Others'">
|
||||
<mat-form-field *ngIf="ownership.value ==4">
|
||||
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="ownership.value =='Rented'">
|
||||
<mat-form-field *ngIf="ownership.value ==3">
|
||||
<input matInput placeholder="Rent Amount"
|
||||
formControlName="rent">
|
||||
</mat-form-field>
|
||||
|
||||
@ -43,32 +43,28 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
public ownership: AbstractControl;
|
||||
public ownershipOther: AbstractControl;
|
||||
public rent: AbstractControl;
|
||||
filteredStates: any = [
|
||||
'Main Applicant',
|
||||
'Co-Applicant ',
|
||||
'Accountant',
|
||||
'Manager',
|
||||
'Relative of the applicant',
|
||||
'Friend of the Applicant',
|
||||
'DSA',
|
||||
'Other'
|
||||
];
|
||||
|
||||
relationData: any = [];
|
||||
occupationData: any = [];
|
||||
personMetData: any = [];
|
||||
ownerShipData: any = [];
|
||||
customerSegData: any = [];
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService) {
|
||||
this.notifier = notifier;
|
||||
}
|
||||
ngOnInit() {
|
||||
this.getRelation();
|
||||
this.getOccupation();
|
||||
this.getMasterDetails('RELATIONSHIPS',1);
|
||||
this.getMasterDetails('OCCUPATIONMEMBERS',2);
|
||||
this.getMasterDetails('PERSONSMET',3);
|
||||
this.getMasterDetails('RESIDENCEOWNERSHIP',4);
|
||||
this.getMasterDetails('CUSTOMERSEGMENT',5)
|
||||
this.initFamilyForm();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = '6';
|
||||
this._pd.retriveForm(params).subscribe(data => {
|
||||
console.log('data', data);
|
||||
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||
const value = <FormArray>this.familyForm.controls['earningMembers'];
|
||||
if (data.status == 200) {
|
||||
@ -149,7 +145,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
return this.fb.group({
|
||||
relationship: ['', Validators.compose([Validators.required])],
|
||||
occupation: ['', Validators.compose([Validators.required])],
|
||||
retired: ['', Validators.compose([Validators.required])],
|
||||
retired: [''],
|
||||
});
|
||||
}
|
||||
|
||||
@ -169,59 +165,67 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
|
||||
|
||||
getRelation() {
|
||||
let master_name = 'RELATIONSHIPS';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.relationData.push(val);
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
this._pd.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
if(type==1){
|
||||
this.relationData=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==2){
|
||||
this.occupationData=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==3){
|
||||
this.personMetData=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==4){
|
||||
this.ownerShipData=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==5){
|
||||
this.customerSegData=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
getOccupation() {
|
||||
let master_name = 'OCCUPATIONMEMBERS';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
console.log('data', data);
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.occupationData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
submitFamily() {
|
||||
if (!this.familyForm.valid) {
|
||||
return;
|
||||
}
|
||||
console.log('data', this.familyForm.value);
|
||||
let records: any = {};
|
||||
records.no_of_years = this.years.value;
|
||||
if (this.ownership.value == 'Others') {
|
||||
if (this.ownership.value == 4) {
|
||||
records.ownership_others = this.ownershipOther.value;
|
||||
}
|
||||
records.ownership = this.ownership.value;
|
||||
records.residence = this.residence.value;
|
||||
if (this.ownership.value == 'Rented') {
|
||||
if (this.ownership.value == 3) {
|
||||
records.what_rent = this.rent.value;
|
||||
}
|
||||
if (this.person.value == 'Other') {
|
||||
if (this.person.value == 8) {
|
||||
records.person_met_other = this.personOther.value;
|
||||
}
|
||||
records.person_met = this.person.value;
|
||||
records.family_members = this.members.value;
|
||||
records.earning_members = this.familyForm.controls['earningMembers'].value;
|
||||
records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value;
|
||||
// filter retired conditions
|
||||
let non_earning_members_filter = this.familyForm.controls['nonEarningMembers'].value.map(function(obj) {
|
||||
if(obj.occupation==3){
|
||||
return obj;
|
||||
}
|
||||
else{
|
||||
obj.retired='';
|
||||
return obj;
|
||||
}
|
||||
});
|
||||
records.non_earning_members = non_earning_members_filter;
|
||||
records.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value;
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '6';
|
||||
// records.fk_createdby = '251';
|
||||
console.log('params', records);
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<mat-card style="padding: 12px;">
|
||||
<p>Financial Information</p>
|
||||
<form [formGroup]="financialForm" class="address">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Data as per Financial statements<p>
|
||||
<p>Data as Per Financial Statements<p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="date_per_financial">
|
||||
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index"
|
||||
@ -12,10 +13,10 @@
|
||||
<input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)">
|
||||
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)">
|
||||
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Margin" formControlName="financial_margin">
|
||||
@ -24,16 +25,16 @@
|
||||
<input matInput [ngClass]="{'highlight': details.controls['financial_variation'].value >= 40 || details.controls['financial_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="financial_variation">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Reason for major difference" formControlName="financial_reason">
|
||||
<input matInput placeholder="Reason For Major Difference" formControlName="financial_reason">
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addDate()"
|
||||
*ngIf="i==0">
|
||||
matTooltip="Add More Financial Statements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteDate(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -51,10 +52,10 @@
|
||||
<input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)">
|
||||
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Net Profit / Loss" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)">
|
||||
<input matInput placeholder="Net Profit / Loss" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput disabled placeholder="Margin" formControlName="estimate_margin">
|
||||
@ -63,15 +64,15 @@
|
||||
<input matInput [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Reason for major difference" formControlName="estimate_reason">
|
||||
<input matInput placeholder="Reason For Major Difference" formControlName="estimate_reason">
|
||||
</mat-form-field>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||
*ngIf="i==0">
|
||||
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -85,6 +86,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -9,6 +9,7 @@
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
width:26%
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
|
||||
@ -46,7 +46,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
console.log('value', value);
|
||||
const financial_date = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
const estimated_val = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
if (value.status == 200) {
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
<mat-card style="padding: 12px;">
|
||||
<p>Loan Details</p>
|
||||
<form [formGroup]="loanDetailsForm" class="address">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Loan Amount applied" formControlName="loan_amount">
|
||||
<input matInput placeholder="Loan Amount Applied" formControlName="loan_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select multiple placeholder="What is the end use"
|
||||
<mat-select multiple (selectionChange)="endUserChange($event)" placeholder="What is the end use" formControlName="end_use">
|
||||
<mat-option *ngFor="let enduse of m_endUseofLoad" [value]="enduse.id">{{ enduse.name }}</mat-option>
|
||||
</mat-select>
|
||||
<!--<mat-select multiple placeholder="What is the end use"
|
||||
formControlName="end_use" (selectionChange)="endUserChange($event)">
|
||||
<mat-option value="purchase_of_property"> Puchase of property</mat-option>
|
||||
<mat-option value="construction">Construction</mat-option>
|
||||
@ -14,51 +18,56 @@
|
||||
<mat-option value="purchase_of_business_asset">Purchase of business asset</mat-option>
|
||||
<mat-option value="to_close_an_existing_debt">to close an existing debt</mat-option>
|
||||
<mat-option value="other">Other purpose</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="isOtherPurpose">
|
||||
<input matInput placeholder="Specify end use" formControlName="end_use_other">
|
||||
<input matInput placeholder="Specify End Use" formControlName="end_use_other">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Is there a Balance Transfer"
|
||||
<mat-select placeholder="Is there a balance transfer"
|
||||
formControlName="is_transfer">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Is there a Top/Up"
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<input matInput placeholder="Balance Transfer Amount" formControlName="balance_transfer_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<mat-select placeholder="Is there a Top Up"
|
||||
formControlName="is_topup">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<input matInput placeholder="Balance Transfer Amount" formControlName="balance_transfer_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes'">
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_topup'].value == 'yes'">
|
||||
<input matInput placeholder="Top Up Amt" formControlName="topup_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' || loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<input matInput placeholder="Lender from where Balance Transfer done" formControlName="lender">
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes'">
|
||||
<input matInput placeholder="Lender from where balance transfer done" formControlName="lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Amount of own contribution" formControlName="own_contribution">
|
||||
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Source"
|
||||
<mat-select placeholder="Source" formControlName="source">
|
||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<!--<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||
<mat-option value="own_money">Own money</mat-option>
|
||||
<mat-option value="other">Loan from another lender</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'">
|
||||
<input matInput placeholder="Specify lender name and type" formControlName="lender_name_type">
|
||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="EMI comfort level" formControlName="emi_level">
|
||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level">
|
||||
</mat-form-field>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
@ -67,7 +76,11 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Type of property" formControlName="property_type">
|
||||
<mat-select placeholder="Type of Property" formControlName="property_type">
|
||||
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.id">{{ typeprop.name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<!--<mat-select placeholder="Type of property" formControlName="property_type">
|
||||
<mat-option value="bungalow">Bungalow</mat-option>
|
||||
<mat-option value="flat">Flat</mat-option>
|
||||
<mat-option value="row_house">Row House</mat-option>
|
||||
@ -82,32 +95,37 @@
|
||||
<mat-option value="factory">Factory</mat-option>
|
||||
<mat-option value="vacant_land">Vacant Land</mat-option>
|
||||
<mat-option value="others">Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value =='others'">
|
||||
<input matInput placeholder="Please specify type of property" formControlName="ownershipOther">
|
||||
<input matInput placeholder="Specify Type of Property" formControlName="ownershipOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select multiple placeholder="Name of owner"
|
||||
<mat-select multiple placeholder="Name of Owner"
|
||||
formControlName="owner_name" (selectionChange)="ownerNameChange($event)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Status of construction"
|
||||
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status">
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<!--<mat-select placeholder="Status of construction"
|
||||
formControlName="construction_status">
|
||||
<mat-option value="other_purpose">Under-construction</mat-option>
|
||||
<mat-option value="other_purpose">Complete</mat-option>
|
||||
<mat-option value="other_purpose">Vacant Land</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>-->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="EMV as per customer"
|
||||
<input matInput placeholder="EMV as Per Customer"
|
||||
formControlName="emv_per_customer">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value as per agreement"
|
||||
<input matInput placeholder="Value as Per Agreement"
|
||||
formControlName="value_per_agreement">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
@ -120,6 +138,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button type="submit" class="button" (click)="submitLoanDetails()">Submit</button>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitLoanDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -39,6 +39,10 @@ export class LoanDetailsComponent implements OnInit {
|
||||
isSource: boolean = false;
|
||||
endUserList: any = [];
|
||||
ownerNames: any = [];
|
||||
m_endUseofLoad = [];
|
||||
m_sourceofamount = [];
|
||||
m_mortageTypeProperty = [];
|
||||
m_statusofCunstruction = [];
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private _pd: PdTrigerService) {
|
||||
@ -48,6 +52,10 @@ export class LoanDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.applicants = this.applicant_details.pdapplicants_detials;
|
||||
this.initloanDetailsForm();
|
||||
this.getM_EndUseofLoad();
|
||||
this.getM_sourceofamount();
|
||||
this.getM_MortageTypeProperty();
|
||||
this.getM_StatusofCunstruction();
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
@ -102,6 +110,60 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// =============
|
||||
|
||||
getM_EndUseofLoad() {
|
||||
this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe(
|
||||
data => {
|
||||
this.m_endUseofLoad = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_sourceofamount() {
|
||||
this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe(
|
||||
data => {
|
||||
this.m_sourceofamount = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_MortageTypeProperty() {
|
||||
this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
|
||||
data => {
|
||||
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_StatusofCunstruction() {
|
||||
this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe(
|
||||
data => {
|
||||
this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ==================
|
||||
public initloanDetailsForm(): void {
|
||||
this.loanDetailsForm = this.fb.group({
|
||||
loan_amount: ['', Validators.compose([Validators.required])],
|
||||
|
||||
@ -80,11 +80,11 @@
|
||||
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button type="button" matTooltip="Add More Income Details" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="addIncomeDetails()"
|
||||
*ngIf="i==0">
|
||||
<button type="button" matTooltip="Add More Income Details" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="addIncomeDetails()"
|
||||
color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" matTooltip="Delete" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
|
||||
<button type="button" matTooltip="Delete" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentDetails()"><mat-icon>save</mat-icon>
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
<form *ngIf="loadDataStatus" [formGroup]="_personalForm" (submit)="submitPersonalForm(_personalForm.value)">
|
||||
<mat-card style="padding: 12px;">
|
||||
<p>Personal Details</p>
|
||||
<form *ngIf="loadDataStatus" [formGroup]="_personalForm" (submit)="submitPersonalForm(_personalForm.value)" novalidate>
|
||||
|
||||
<mat-card-content>
|
||||
<!-- start main applicant details -->
|
||||
@ -15,10 +17,13 @@
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name" formControlName="name_ans" type="text" required>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
<input matInput placeholder="Age" formControlName="age_ans" type="text" required>
|
||||
<mat-error *ngIf="mainDetails['controls'].age_ans.hasError('pattern') || mainDetails['controls'].age_ans.hasError('maxlength') || mainDetails['controls'].age_ans.hasError('minlength')">Enter Valid Age. </mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
@ -27,16 +32,16 @@
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
||||
<mat-option *ngFor="let education of qualifications" [value]="education" >
|
||||
{{education}}
|
||||
<mat-option *ngFor="let education of qualifications" [value]="education.qualification_id" >
|
||||
{{education.qualification_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning" >
|
||||
{{earning}}
|
||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning.earning_member_status_id" >
|
||||
{{earning.earning_member_status}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -68,6 +73,8 @@
|
||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||
|
||||
<input matInput placeholder="Age" formControlName="age_ans" type="text" required>
|
||||
<mat-error *ngIf="coDetails['controls'].age_ans.hasError('pattern') || coDetails['controls'].age_ans.hasError('maxlength') || coDetails['controls'].age_ans.hasError('minlength')">Enter Valid Age. </mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||
@ -78,8 +85,8 @@
|
||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||
|
||||
<mat-select placeholder="Educational Qualification" formControlName="qualification_ans" required>
|
||||
<mat-option *ngFor="let education of qualifications" [value]="education" >
|
||||
{{education}}
|
||||
<mat-option *ngFor="let education of qualifications" [value]="education.qualification_id" >
|
||||
{{education.qualification_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
@ -87,8 +94,8 @@
|
||||
<mat-form-field style="width: 100%">
|
||||
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
|
||||
<mat-select placeholder="Earning Status" formControlName="earning_ans" required>
|
||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning" >
|
||||
{{earning}}
|
||||
<mat-option *ngFor="let earning of earningStatus" [value]="earning.earning_member_status_id" >
|
||||
{{earning.earning_member_status}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -117,7 +124,7 @@
|
||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="personal_info_form_remark"></textarea>
|
||||
<textarea matInput placeholder="Remarks" formControlName="personal_info_form_remark" required></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -126,8 +133,9 @@
|
||||
|
||||
<mat-card-actions>
|
||||
<div fxFlexOffset="90" fxFlex="10" style="text-align:left;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above" [disabled]="!_personalForm.valid "><mat-icon>save</mat-icon></button>
|
||||
<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-card-actions>
|
||||
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -11,9 +11,12 @@ import { Key } from 'protractor';
|
||||
})
|
||||
export class PersonalInfoComponent implements OnInit {
|
||||
|
||||
qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"];
|
||||
earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"];
|
||||
//qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"];
|
||||
//earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"];
|
||||
earningStatus:any=[];
|
||||
qualifications:any=[];
|
||||
relationShipList:any=[];
|
||||
|
||||
@Input() pdid : string;
|
||||
@Input() pd_all_details:any;
|
||||
form_id:number;
|
||||
@ -38,9 +41,10 @@ export class PersonalInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.loadPDDetails(this.pdid,this.form_id);
|
||||
this.getRelationMaster();
|
||||
this.getMasterDetails('RELATIONSHIPS',1);
|
||||
this.getMasterDetails('EARNINGMEMBERSSTATUS',2);
|
||||
this.getMasterDetails('EDUQUALIFICATION',3);
|
||||
this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
// console.log(this.mainApplicantDetails)
|
||||
this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0);
|
||||
@ -74,7 +78,7 @@ loadFormWithIDData(data) {
|
||||
|
||||
let mainApplicantGroup = new FormArray(main_result.map((item,key) => new FormGroup({
|
||||
name_ans:new FormControl(item.name_ans, Validators.required),
|
||||
age_ans:new FormControl(item.age_ans, Validators.required),
|
||||
age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])),
|
||||
entity_ans:new FormControl(item.entity_ans, Validators.required),
|
||||
qualification_ans:new FormControl(item.qualification_ans, Validators.required),
|
||||
earning_ans:new FormControl(item.earning_ans, Validators.required),
|
||||
@ -88,7 +92,7 @@ loadFormWithIDData(data) {
|
||||
|
||||
coApplicantGroup = new FormArray(co_result.map((item,key) => new FormGroup({
|
||||
name_ans:new FormControl(item.name_ans, Validators.required),
|
||||
age_ans:new FormControl(item.age_ans, Validators.required),
|
||||
age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])),
|
||||
entity_ans:new FormControl(item.entity_ans, Validators.required),
|
||||
qualification_ans:new FormControl(item.qualification_ans, Validators.required),
|
||||
earning_ans:new FormControl(item.earning_ans, Validators.required),
|
||||
@ -103,10 +107,10 @@ loadFormWithIDData(data) {
|
||||
name_id:new FormControl(0),
|
||||
age_ques:new FormControl(this.coApplicantQuestions[1]),
|
||||
age_id:new FormControl(1),
|
||||
age_ans:new FormControl(null, Validators.required),
|
||||
age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])),
|
||||
entity_ques: new FormControl(this.coApplicantQuestions[2]),
|
||||
entity_id: new FormControl(2),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required),
|
||||
qualification_ques: new FormControl(this.coApplicantQuestions[3]),
|
||||
qualification_id: new FormControl(3),
|
||||
qualification_ans:new FormControl(null, Validators.required),
|
||||
@ -131,6 +135,7 @@ loadFormWithIDData(data) {
|
||||
});
|
||||
//console.log(this._personalForm);
|
||||
this.loadDataStatus = true;
|
||||
|
||||
}
|
||||
|
||||
loadFormData(){
|
||||
@ -142,10 +147,10 @@ loadFormWithIDData(data) {
|
||||
name_id:new FormControl(0),
|
||||
age_ques:new FormControl(this.mainApplicantQuestions[1]),
|
||||
age_id:new FormControl(1),
|
||||
age_ans:new FormControl(null, Validators.required),
|
||||
age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])),
|
||||
entity_ques: new FormControl(this.mainApplicantQuestions[2]),
|
||||
entity_id: new FormControl(2),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required),
|
||||
qualification_ques: new FormControl(this.mainApplicantQuestions[3]),
|
||||
qualification_id: new FormControl(3),
|
||||
qualification_ans:new FormControl(null, Validators.required),
|
||||
@ -161,10 +166,10 @@ loadFormWithIDData(data) {
|
||||
name_id:new FormControl(0),
|
||||
age_ques:new FormControl(this.coApplicantQuestions[1]),
|
||||
age_id:new FormControl(1),
|
||||
age_ans:new FormControl(null, Validators.required),
|
||||
age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])),
|
||||
entity_ques: new FormControl(this.coApplicantQuestions[2]),
|
||||
entity_id: new FormControl(2),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required),
|
||||
entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required),
|
||||
qualification_ques: new FormControl(this.coApplicantQuestions[3]),
|
||||
qualification_id: new FormControl(3),
|
||||
qualification_ans:new FormControl(null, Validators.required),
|
||||
@ -186,6 +191,7 @@ loadFormWithIDData(data) {
|
||||
});
|
||||
//console.log(this._personalForm);
|
||||
this.loadDataStatus = true;
|
||||
|
||||
}
|
||||
|
||||
//get pd main applicant array values
|
||||
@ -194,21 +200,35 @@ this.loadDataStatus = true;
|
||||
// get pd co applicant array values
|
||||
get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;}
|
||||
|
||||
// get relation master details
|
||||
getRelationMaster(){
|
||||
let relation ="RELATIONSHIPS";
|
||||
this._pd.getAllMasterDatas(relation).subscribe(
|
||||
// get all master details
|
||||
getMasterDetails(table:string,type:number){
|
||||
this._pd.getAllMasterDatas(table).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.relationShipList=data.records;
|
||||
if(type==1){
|
||||
this.relationShipList=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==2){
|
||||
this.earningStatus=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
else if(type==3){
|
||||
this.qualifications=data.records.filter(item => item.isactive == 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
|
||||
// submit forms details
|
||||
submitPersonalForm(formData:any) {
|
||||
if(this._personalForm.valid){
|
||||
if (this._personalForm.invalid) {
|
||||
this.validateAllFormFields(this._personalForm);
|
||||
|
||||
// this.notifier.notify('warning', 'All Fields Are Required.!');
|
||||
|
||||
return;
|
||||
}
|
||||
else{
|
||||
let main_applicantDetails:any=[];
|
||||
let co_applicantDetails:any=[];
|
||||
|
||||
@ -257,5 +277,20 @@ submitPersonalForm(formData:any) {
|
||||
}
|
||||
}
|
||||
|
||||
// validate all form group and form array fields
|
||||
validateAllFormFields(formGroup: any) {
|
||||
Object.keys(formGroup.controls).forEach(field => {
|
||||
const control = formGroup.get(field);
|
||||
|
||||
if (control instanceof FormControl) {
|
||||
control.markAsTouched({ onlySelf: true });
|
||||
} else if (control instanceof FormGroup) {
|
||||
this.validateAllFormFields(control);
|
||||
} else if (control instanceof FormArray) {
|
||||
this.validateAllFormFields(control);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<mat-card style="padding: 12px;">
|
||||
<p>Stock Details</p>
|
||||
<form [formGroup]="stockForm" class="address">
|
||||
|
||||
<mat-card>
|
||||
@ -18,20 +19,20 @@
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value" formControlName="raw_value">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value of Rawmaterials as per Financial Statements" formControlName="rawmaterial_value">
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Value of raw materials as per financial Statements" formControlName="rawmaterial_value">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Is the Stock of Raw Materials Sufficient ?" formControlName="is_sufficiant_raw">
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Is the stock of raw materials sufficient ?" formControlName="is_sufficiant_raw">
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
||||
*ngIf="i==0">
|
||||
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -54,20 +55,20 @@
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value" formControlName="goods_value">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Value of Finished Goods as per Financial Statements" formControlName="finished_goods_value">
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Value of finished goods as per financial statements" formControlName="finished_goods_value">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Is the Stock of Finished Goods Sufficient ?" formControlName="is_sufficiant_goods">
|
||||
<mat-form-field style="width:76%">
|
||||
<input matInput placeholder="Is the stock of finished goods sufficient ?" formControlName="is_sufficiant_goods">
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||
*ngIf="i==0">
|
||||
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(i)"
|
||||
*ngIf="i>0">
|
||||
<mat-icon>close</mat-icon>
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
@ -81,6 +82,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||
<div style="text-align: right;">
|
||||
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -5,7 +5,7 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div class="example-full-width">
|
||||
<mat-form-field fxFill>
|
||||
<textarea matInput placeholder="What are the main Raw materials?(MEG Only)" formControlName="main_raw_materials"></textarea>
|
||||
<textarea matInput placeholder="What are the main raw materials?(MEG Only)" formControlName="main_raw_materials"></textarea>
|
||||
<mat-error *ngIf="submitted && f.main_raw_materials.hasError('required')" class="mat-text-warn">You must Include Raw Material Details.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -40,7 +40,7 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="14px" fxLayoutAlign="start none">
|
||||
<div fxFlex="30">
|
||||
<mat-form-field style="width:260px !important;">
|
||||
<mat-select (selectionChange)="selectedPM($event)" placeholder="Select Payment Mode" formControlName="payment_mode">
|
||||
<mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Mode" formControlName="payment_mode">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -61,8 +61,8 @@
|
||||
<div fxLayout="row" fxLayoutGap="14px" fxLayoutAlign="start none">
|
||||
<div fxFlex="30">
|
||||
<mat-form-field style="width:260px !important;">
|
||||
<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-select (selectionChange)="selectedFreqPurchase($event)" placeholder="Frequency of Purchase" formControlName="frequency_of_purchase">
|
||||
<mat-option *ngFor="let feq of m_freqOfPurchase" [value]="feq.frequency_id">{{ feq.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
<div fxFlex="30" style="text-align:center;">
|
||||
<span *ngIf="_supplierQuesFrom.controls.supplier_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -84,12 +84,12 @@
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Supplier Details" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Supplier Details" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||
<!----<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>-->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -33,64 +33,102 @@ export class SupplierInfoComponent implements OnInit {
|
||||
|
||||
public _supplierQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
public m_paymentModeType= [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Immediate Or Advanced Payment'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Credit'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Combination of Both'
|
||||
},
|
||||
];
|
||||
|
||||
public m_freqOfPurchase= [
|
||||
{
|
||||
'id': "1",
|
||||
'name': 'Daily'
|
||||
},
|
||||
{
|
||||
'id': "2",
|
||||
'name': 'Weekly'
|
||||
},
|
||||
{
|
||||
'id': "3",
|
||||
'name': 'Monthly'
|
||||
},
|
||||
{
|
||||
'id': "4",
|
||||
'name': 'Every 3 months'
|
||||
},
|
||||
{
|
||||
'id': "5",
|
||||
'name': 'Half yearly'
|
||||
},
|
||||
{
|
||||
'id': "6",
|
||||
'name': 'Yearly'
|
||||
},
|
||||
{
|
||||
'id': "7",
|
||||
'name': 'As and when required'
|
||||
},
|
||||
{
|
||||
'id': "8",
|
||||
'name': 'Others'
|
||||
}
|
||||
]
|
||||
public m_paymentModeType= [];
|
||||
|
||||
// public m_paymentModeType= [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Immediate Or Advanced Payment'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Credit'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Combination of Both'
|
||||
// },
|
||||
// ];
|
||||
public m_freqOfPurchase= [];
|
||||
// public m_freqOfPurchase= [
|
||||
// {
|
||||
// 'id': "1",
|
||||
// 'name': 'Daily'
|
||||
// },
|
||||
// {
|
||||
// 'id': "2",
|
||||
// 'name': 'Weekly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "3",
|
||||
// 'name': 'Monthly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "4",
|
||||
// 'name': 'Every 3 months'
|
||||
// },
|
||||
// {
|
||||
// 'id': "5",
|
||||
// 'name': 'Half yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "6",
|
||||
// 'name': 'Yearly'
|
||||
// },
|
||||
// {
|
||||
// 'id': "7",
|
||||
// 'name': 'As and when required'
|
||||
// },
|
||||
// {
|
||||
// 'id': "8",
|
||||
// 'name': 'Others'
|
||||
// }
|
||||
// ]
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: PdTrigerService) { }
|
||||
private pdTrigerService: PdTrigerService) {
|
||||
this.notifier = notifier;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.getM_FreqOfPurchase();
|
||||
this.getM_PaymentModeType();
|
||||
this.getPdSupplierFormDetails();
|
||||
}
|
||||
|
||||
// ==================
|
||||
|
||||
getM_FreqOfPurchase() {
|
||||
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
||||
data => {
|
||||
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
getM_PaymentModeType() {
|
||||
this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe(
|
||||
data => {
|
||||
this.m_paymentModeType = data.records.filter(data => data.isactive == 1);
|
||||
},
|
||||
error => {
|
||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
// this.m_assets_type = "No Category Records Found.";
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// ==================
|
||||
|
||||
apiLoadFinish: boolean = false;
|
||||
getPdSupplierFormDetails() {
|
||||
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe(
|
||||
@ -217,22 +255,22 @@ apiLoadFinish: boolean = false;
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||
alert(JSON.stringify(answerFormValues));
|
||||
// alert(JSON.stringify(answerFormValues));
|
||||
//Add BRANCH data with help Service File
|
||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
// console.log(dataresult);
|
||||
// this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||
this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||
// this.dialogRef.close();
|
||||
// alert("sample alert for Saving");
|
||||
}
|
||||
else {
|
||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
// this.errorMessage = "Some Thing Wents Wrong Try Again !";
|
||||
}
|
||||
}, error => {
|
||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
// this.errorMessage = "Something Wents Wrong Try Again !";
|
||||
// this.dialogRef.close();
|
||||
});
|
||||
|
||||
@ -422,7 +422,7 @@
|
||||
<app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="12">
|
||||
<app-employment-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-employment-info>
|
||||
<app-employment-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id" [pd_all_details]="pdFullDetails"></app-employment-info>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="13">
|
||||
<app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info>
|
||||
|
||||
@ -46,69 +46,69 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
// category static form buttons
|
||||
categoryFormButtons: any = [
|
||||
{
|
||||
"form_id": 1,
|
||||
"form_name": "Supplier Details"
|
||||
},
|
||||
{
|
||||
"form_id": 2,
|
||||
"form_name": "Client Details",
|
||||
},
|
||||
{
|
||||
"form_id": 3,
|
||||
"form_name": "Personal Details",
|
||||
},
|
||||
{
|
||||
"form_id":4,
|
||||
"form_name":"Asset Details",
|
||||
},
|
||||
{
|
||||
"form_id": 5,
|
||||
"form_name": "Address"
|
||||
},
|
||||
{
|
||||
"form_id": 6,
|
||||
"form_name": "Family",
|
||||
},
|
||||
{
|
||||
"form_id": 7,
|
||||
"form_name": "Banking",
|
||||
},
|
||||
{
|
||||
"form_id": 8,
|
||||
"form_name": "Current Loan",
|
||||
},
|
||||
{
|
||||
"form_id": 9,
|
||||
"form_name": "Other Income",
|
||||
},
|
||||
{
|
||||
"form_id": 10,
|
||||
"form_name": "Loan Details",
|
||||
},
|
||||
{
|
||||
"form_id": 11,
|
||||
"form_name": "Stock",
|
||||
},
|
||||
{
|
||||
"form_id": 12,
|
||||
"form_name": "Employmet Info",
|
||||
},
|
||||
{
|
||||
"form_id": 13,
|
||||
"form_name": "Business Info",
|
||||
},
|
||||
{
|
||||
"form_id": 14,
|
||||
"form_name": "Financial Info",
|
||||
},
|
||||
];
|
||||
// categoryFormButtons: any = [
|
||||
// {
|
||||
// "form_id": 1,
|
||||
// "form_name": "Supplier Details"
|
||||
// },
|
||||
// {
|
||||
// "form_id": 2,
|
||||
// "form_name": "Client Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 3,
|
||||
// "form_name": "Personal Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id":4,
|
||||
// "form_name":"Asset Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 5,
|
||||
// "form_name": "Address"
|
||||
// },
|
||||
// {
|
||||
// "form_id": 6,
|
||||
// "form_name": "Family",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 7,
|
||||
// "form_name": "Banking",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 8,
|
||||
// "form_name": "Current Loan",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 9,
|
||||
// "form_name": "Other Income",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 10,
|
||||
// "form_name": "Loan Details",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 11,
|
||||
// "form_name": "Stock",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 12,
|
||||
// "form_name": "Employmet Info",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 13,
|
||||
// "form_name": "Business Info",
|
||||
// },
|
||||
// {
|
||||
// "form_id": 14,
|
||||
// "form_name": "Financial Info",
|
||||
// },
|
||||
// ];
|
||||
|
||||
pdFullDetails:any=[];
|
||||
|
||||
// category static form buttons
|
||||
// categoryFormButtons: any;
|
||||
categoryFormButtons: any;
|
||||
// = [
|
||||
// {
|
||||
// "form_id": 1,
|
||||
@ -293,6 +293,7 @@ pdFullDetails:any=[];
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList=data.records.pdmaster_details;
|
||||
this.categoryList=data.records.question_answers;
|
||||
this.categoryFormButtons = data.records.template_forms;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status;
|
||||
|
||||
@ -72,13 +72,13 @@
|
||||
|
||||
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
|
||||
<mat-list *ngFor="let applicant of pdApplicantData">
|
||||
<mat-list-item>
|
||||
<mat-list-item style="height:68px !important;">
|
||||
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-user-o"></i>
|
||||
{{applicant.applicant_name}} </span> <span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-phone"></i>
|
||||
{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant </span>
|
||||
<ng-template #codetails> <span>{{applicant.relation_name}}</span></ng-template>
|
||||
<ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template>
|
||||
</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
@ -165,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
OwlNativeDateTimeModule,
|
||||
],
|
||||
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent],
|
||||
providers: [PdTrigerService, GetGeometricLocationService],
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent]
|
||||
})
|
||||
|
||||
@ -150,7 +150,7 @@ export class PdTrigerService {
|
||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
editData.updatedon = currentdate;
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
||||
|
||||
.pipe(
|
||||
@ -180,7 +180,7 @@ export class PdTrigerService {
|
||||
// update pd officer
|
||||
updatePdOfficer(updateData: any): Observable<any> {
|
||||
updateData.fk_updatedby = this._aws.getlocale();
|
||||
updateData.updatedon = currentdate;
|
||||
// updateData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -190,7 +190,7 @@ export class PdTrigerService {
|
||||
// update pd schedule
|
||||
updateSchedule(updateData: any): Observable<any> {
|
||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||
updateData.createdon = currentdate;
|
||||
// updateData.createdon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -262,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
saveData.fk_createdon = currentdate;
|
||||
//saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
|
||||
@ -24,6 +24,13 @@
|
||||
|
||||
</mat-list>
|
||||
</mat-expansion-panel>
|
||||
<mat-list *ngFor="let formButton of categoryFormButtons">
|
||||
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
|
||||
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
|
||||
</mat-list-item>
|
||||
|
||||
|
||||
</mat-list>
|
||||
|
||||
</mat-sidenav>
|
||||
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
|
||||
@ -37,7 +44,7 @@
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row" >
|
||||
<!---- <button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
<!--<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
|
||||
<div fxFlex="33" class="text-xs-left">
|
||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||
@ -52,10 +59,12 @@
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<hr>
|
||||
<mat-card-content style="min-height: 240px;" *ngIf="selectedCategory.length==0">
|
||||
<div *ngIf="!formsCategoryEnable">
|
||||
<mat-card-content style="min-height: 500px;" *ngIf="selectedCategory.length==0">
|
||||
<!-- <h6 class="mt-0">About</h6> -->
|
||||
<p>No Records Found..</p>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
<!-- check type of questions -->
|
||||
<ng-container [ngSwitch]="selectedCategory.fk_question_answertype">
|
||||
@ -362,7 +371,66 @@
|
||||
|
||||
</ng-container>
|
||||
<!-- end check box questions section -->
|
||||
<!-- start forms based questions -->
|
||||
<div *ngIf="formsCategoryEnable">
|
||||
<ng-container [ngSwitch]="selectedFormsCategory.form_id">
|
||||
<!-- start supplier type questions section -->
|
||||
<ng-container *ngSwitchCase="1">
|
||||
<app-supplier-info [pdid]="startPD"></app-supplier-info>
|
||||
</ng-container>
|
||||
<!-- end supplier type questions -->
|
||||
|
||||
<!-- start client type questions -->
|
||||
<ng-container *ngSwitchCase="2">
|
||||
<app-client-info [pdid]="startPD"></app-client-info>
|
||||
</ng-container>
|
||||
<!-- end client type questions -->
|
||||
|
||||
<!-- start personal type questions -->
|
||||
<ng-container *ngSwitchCase="3">
|
||||
<app-personal-info [pdid]="startPD" [pd_all_details]="pdFullDetails"></app-personal-info>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="4">
|
||||
<app-assets-info [pdid]="startPD"></app-assets-info>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="5">
|
||||
<app-address [pdid]="startPD"></app-address>
|
||||
<!-- end personal type questions -->
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="6">
|
||||
<app-family-details [pdid]="startPD"></app-family-details>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="7">
|
||||
<!--<p>Banking details</p>-->
|
||||
<app-banking-details [pdid]="startPD" ></app-banking-details>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="8">
|
||||
<app-current-loan [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-current-loan>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="9">
|
||||
<app-other-income [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-other-income>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="10">
|
||||
<app-loan-details [pdid]="startPD" [form_id]="selectedFormsCategory.form_id" [applicant_details]="pdFullDetails"></app-loan-details>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="11">
|
||||
<app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="12">
|
||||
<app-employment-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id" [pd_all_details]="pdFullDetails"></app-employment-info>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="13">
|
||||
<app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="14">
|
||||
<app-financial-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-financial-info>
|
||||
</ng-container>
|
||||
|
||||
<!-- end personal type questions
|
||||
-->
|
||||
</ng-container>
|
||||
</div>
|
||||
<!-- end form based questions -->
|
||||
</figure>
|
||||
</div>
|
||||
</mat-sidenav-container>
|
||||
|
||||
@ -116,3 +116,21 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
mat-icon{
|
||||
color: #ff3636;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
padding: 0 2%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.address > * {
|
||||
width: 100%;
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
width: 10px;
|
||||
background: #62B013;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@ -30,6 +30,12 @@ selectedQuestionIndex:number;
|
||||
getQuestionsLength:number;
|
||||
answerList:any=[];
|
||||
ansPDList:any=[];
|
||||
|
||||
// forms details
|
||||
pdFullDetails:any=[];
|
||||
categoryFormButtons: any;
|
||||
formsCategoryEnable: boolean = false;
|
||||
selectedFormsCategory: any;
|
||||
// create values for status check
|
||||
pdStatusCheck :any={
|
||||
"DRAFT" :'DRAFT',
|
||||
@ -83,9 +89,10 @@ loadTemplates(startID:string){
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status;
|
||||
|
||||
this.actualQuestions = data.records.counts.overall_question_count;
|
||||
this.answeredQuestions = data.records.counts.overall_answered_count;
|
||||
this.categoryFormButtons = data.records.template_forms;
|
||||
this.pdFullDetails = data.records
|
||||
}
|
||||
else{
|
||||
this.pdMasterList="";
|
||||
@ -106,6 +113,7 @@ loadTemplates(startID:string){
|
||||
}
|
||||
|
||||
OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){
|
||||
this.formsCategoryEnable = false;
|
||||
this.selectedCategory=selectedQuestions;
|
||||
this.selectedCategoryIndex=categoryIndex;
|
||||
this.selectedQuestionIndex=questionsIndex;
|
||||
@ -427,6 +435,13 @@ optionsMapItems(items) {
|
||||
});
|
||||
}
|
||||
|
||||
// direct form based questions
|
||||
OnSelectDirectForms(details: any) {
|
||||
this.formsCategoryEnable = true;
|
||||
this.selectedFormsCategory = details;
|
||||
|
||||
}
|
||||
|
||||
// load pd view component
|
||||
loadPdViewCompoent(){
|
||||
this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route });
|
||||
|
||||
@ -61,33 +61,22 @@
|
||||
<mat-card-header>
|
||||
<mat-card-title>Applicants</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
|
||||
<mat-list *ngFor="let applicant of pdApplicantData">
|
||||
<mat-list-item>
|
||||
<mat-list-item style="height:68px !important;">
|
||||
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-user-o"></i>
|
||||
{{applicant.applicant_name}} </span> <span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-phone"></i>
|
||||
{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant</span>
|
||||
<ng-template #codetails> <span>{{applicant.relation_name}}</span></ng-template>
|
||||
<ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template>
|
||||
</p>
|
||||
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
<ng-template #noApplicant><mat-card-content><p>No Applicant</p></mat-card-content></ng-template>
|
||||
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="m-gap p-gap">
|
||||
<!-- pd documents card -->
|
||||
<mat-expansion-panel *ngIf="pdDocumentsData.length>0; else nodocument">
|
||||
|
||||
@ -7,6 +7,7 @@ import { QcService } from './../../qc-service/qc.service';
|
||||
import { QcListComponent } from './../qc-list.component';
|
||||
import { PdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component';
|
||||
import { SmartPdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component';
|
||||
import { TelePdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component';
|
||||
import { SchedulePdComponent } from './../../../personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component';
|
||||
import { EditPdApplicantComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component';
|
||||
import { EditPdMasterComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component';
|
||||
@ -108,7 +109,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
// pd allocation to
|
||||
pdAllocationTo(pdData:any) {
|
||||
if(pdData.fk_pd_type != 2){
|
||||
if(pdData.fk_pd_type == 1){
|
||||
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||
data: pdData,
|
||||
disableClose: true
|
||||
@ -131,6 +132,18 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
this.viewPdDetails(this.viewID)
|
||||
});
|
||||
}
|
||||
else if(pdData.fk_pd_type == 3){
|
||||
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
||||
data: pdData,
|
||||
disableClose: true,
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||
|
||||
this.viewPdDetails(this.viewID)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ export class QcService {
|
||||
editPdMasterDetails(editData:any,status:string):Observable<any>{
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
editData.updatedon = currentdate;
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"updatePDMaster",{records:editData})
|
||||
|
||||
.pipe(
|
||||
@ -86,7 +86,7 @@ export class QcService {
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
saveData.fk_createdon = currentdate;
|
||||
// saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
|
||||
@ -1,10 +1,15 @@
|
||||
<div *ngIf="listView">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" style="padding-top:1%">
|
||||
<div fxFlex="80%">
|
||||
<mat-card-title><span style="font-size:24px"> Entity Master</span></mat-card-title>
|
||||
</div>
|
||||
<div fxFlex="20%">
|
||||
</div>
|
||||
<mat-card>
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" style="padding-top:1%">
|
||||
|
||||
<div fxFlexOffset="90%" fxFlex="10%">
|
||||
<button mat-fab class="mr-1 mb-1" color="primary"matTooltip="Add New Entity" matTooltipPosition="above" (click)="addNewEntity()"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
@ -52,6 +57,8 @@
|
||||
</mat-card>
|
||||
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
@Component({
|
||||
template: `<h2>Entity Master Details List</h2>
|
||||
`
|
||||
})
|
||||
export class EntityComponent {
|
||||
}
|
||||
// import { Component } from '@angular/core';
|
||||
// @Component({
|
||||
// template: `<h2>Entity Master Details List</h2>
|
||||
// `
|
||||
// })
|
||||
// export class EntityComponent {
|
||||
// }
|
||||
@ -22,7 +22,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { EntityRouting } from './entity.routing';
|
||||
|
||||
import { EntityComponent } from './entity.component';
|
||||
// import { EntityComponent } from './entity.component';
|
||||
import { EntityListComponent } from './entity-list/entity.list.component';
|
||||
import { EntityAddComponent } from './entity-add/entity.add.component';
|
||||
import { EntityEditComponent } from './entity-edit/entity.edit.component';
|
||||
@ -38,7 +38,7 @@ import { EntityEditBillingInfoComponent } from './entity-edit/entity-edit-billin
|
||||
|
||||
import { DialogAddEditBillingInfo } from './entity-edit/entity-edit-billing-info/entity-edit-billing-info.component';
|
||||
import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
// import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
*/
|
||||
@ -96,7 +96,7 @@ const customNotifierOptions: NotifierOptions = {
|
||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
||||
MatCheckboxModule,
|
||||
MatTooltipModule,
|
||||
// MatTooltipModule,
|
||||
MatTabsModule,
|
||||
MatChipsModule,
|
||||
MatExpansionModule,
|
||||
@ -105,7 +105,7 @@ const customNotifierOptions: NotifierOptions = {
|
||||
ReactiveFormsModule
|
||||
],
|
||||
declarations: [
|
||||
EntityComponent,
|
||||
// EntityComponent,
|
||||
EntityListComponent,
|
||||
EntityEditComponent,
|
||||
EntityAddComponent,
|
||||
@ -118,7 +118,7 @@ const customNotifierOptions: NotifierOptions = {
|
||||
EntityEditVendorCityInfoComponent
|
||||
],
|
||||
entryComponents: [
|
||||
// EntityEditComponent
|
||||
EntityEditComponent,
|
||||
DialogAddEditBillingInfo,
|
||||
DialogEntityAddTatComponent,
|
||||
EntityAddComponent
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
// Entity Component
|
||||
import { EntityComponent } from './entity.component';
|
||||
// import { EntityComponent } from './entity.component';
|
||||
import { EntityListComponent } from './entity-list/entity.list.component';
|
||||
import { EntityAddComponent } from './entity-add/entity.add.component';
|
||||
import { EntityEditComponent } from './entity-edit/entity.edit.component';
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { IndustryMasterDialogComponent } from './industry-master-dialog.component';
|
||||
import { IndustryClassificationDialogComponent } from './industry_classification-dialog.component';
|
||||
|
||||
describe('IndustryMasterDialogComponent ', () => {
|
||||
let component: IndustryMasterDialogComponent ;
|
||||
let fixture: ComponentFixture<IndustryMasterDialogComponent >;
|
||||
let component: IndustryClassificationDialogComponent ;
|
||||
let fixture: ComponentFixture<IndustryClassificationDialogComponent >;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ IndustryMasterDialogComponent ]
|
||||
declarations: [ IndustryClassificationDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IndustryMasterDialogComponent );
|
||||
fixture = TestBed.createComponent(IndustryClassificationDialogComponent );
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component';
|
||||
import { PdNotificationListComponent } from './pd-notification-list.component';
|
||||
|
||||
describe('PdAllocationTypeListComponent', () => {
|
||||
let component: PdAllocationTypeListComponent;
|
||||
let fixture: ComponentFixture<PdAllocationTypeListComponent>;
|
||||
let component: PdNotificationListComponent;
|
||||
let fixture: ComponentFixture<PdNotificationListComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PdAllocationTypeListComponent ]
|
||||
declarations: [ PdNotificationListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PdAllocationTypeListComponent);
|
||||
fixture = TestBed.createComponent(PdNotificationListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@ -6,9 +6,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<mat-card-content>
|
||||
<!-- <div *ngIf="loader">
|
||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||
</div> <br> -->
|
||||
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
@ -20,15 +17,13 @@
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 80%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 20%; text-align: right;">
|
||||
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" matTooltip="Add PD Team" matTooltipPosition="above" [routerLink]="['/setting/pdteam/addpdteam']" ><mat-icon>add</mat-icon></button>
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team" matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" matTooltip="Add PD Team" matTooltipPosition="above"
|
||||
[routerLink]="['/setting/pdteam/addpdteam']"><mat-icon>add</mat-icon></button>
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team"
|
||||
matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
>>>>>>> 3ad6314e0e602cb2c232acb142715009dca646f9
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort>
|
||||
@ -50,13 +45,10 @@
|
||||
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactivePdTeam(row.pdteam_id,row.isactive)">
|
||||
<mat-cell *matCellDef="let row">
|
||||
<!--{{row.isactive}}-->
|
||||
<mat-slide-toggle class="example-margin" [color]="color" [checked]="row.isactive==1?true:false" [matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above" (click)="isactivePdTeam(row.pdteam_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -77,14 +69,10 @@
|
||||
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<notifier-container></notifier-container>
|
||||
<div *ngIf="!listView">
|
||||
<!--<div *ngIf="!listView">
|
||||
<app-pd-team-edit [childMessage]="parentMessage"></app-pd-team-edit>
|
||||
</div>
|
||||
</div>-->
|
||||
<notifier-container></notifier-container>
|
||||
@ -94,14 +94,14 @@ const customNotifierOptions: NotifierOptions = {
|
||||
MatProgressBarModule,
|
||||
MatDialogModule,
|
||||
MatSortModule,
|
||||
MatToolbarModule,
|
||||
MatSelectModule,
|
||||
FlexLayoutModule,
|
||||
NgxMatSelectSearchModule,
|
||||
NgxDatatableModule,
|
||||
MatSortModule,
|
||||
MatSlideToggleModule,
|
||||
MatTooltipModule,MatListModule,DragulaModule,
|
||||
MatTooltipModule,
|
||||
MatListModule,DragulaModule,
|
||||
NotifierModule.withConfig(customNotifierOptions),
|
||||
],
|
||||
declarations: [
|
||||
|
||||
@ -21,7 +21,9 @@ export interface Master {
|
||||
constant_name:string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
||||
export class MastersService {
|
||||
|
||||
|
||||
@ -14,7 +14,9 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||
/** Environment */
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
||||
export class PdTeamService {
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ import { UserListComponent } from './users/user-list/user-list.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SettingsRoutes } from './settings.routing';
|
||||
import { RegisterComponent } from '../session/register/register.component';
|
||||
import { UserService } from './service/user.service';
|
||||
// import { UserService } from './service/user.service';
|
||||
|
||||
import { MastersModule } from './masters/masters.module';
|
||||
import { PdTeamModule } from './pd-team/pd-team.module';
|
||||
@ -50,7 +50,7 @@ import { EntityModule } from './entity/entity.module';
|
||||
],
|
||||
|
||||
providers:[
|
||||
UserService
|
||||
// UserService
|
||||
],
|
||||
|
||||
// declarations: [AddEntityComponent, EditEntityComponent, EntityListComponent]
|
||||
|
||||
@ -12,26 +12,29 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="50" class="align-self-center pt-1" >
|
||||
<div style="width:100%;display: inline-flex;">
|
||||
<div style="width:65%" class="align-self-center pt-1" >
|
||||
<div fxLayout="row">
|
||||
<div class="pl-1 pr-1 profile-i" fxFlex.xs="85" fxFlex.sm="85" fxFlex.md="85" fxFlex.lg="85" fxFlex.xl="85">
|
||||
<div class="pl-1 pr-1 profile-i">
|
||||
<p> {{userDetails.user_first_name}} {{userDetails.user_last_name}}</p>
|
||||
<p>{{userDetails.role_name}}</p>
|
||||
<p> {{userDetails.email}}</p>
|
||||
<p> {{userDetails.mobile_no}}</p>
|
||||
<p> {{userDetails.city_name}} ,{{userDetails.state_name}} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="50" class="align-self-center pt-1">
|
||||
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="changePassword()">
|
||||
<span class="button-text">Change Password</span>
|
||||
<div style="width:35%" class="align-self-center pt-1">
|
||||
<div fxLayout="row">
|
||||
<p> {{userDetails.email}}</p>
|
||||
<p> {{userDetails.mobile_no}}</p>
|
||||
|
||||
<button mat-raised-button mat-icon-button type="button" matTooltip="Change Password" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="changePassword()">
|
||||
<mat-icon>https</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="editprofile()">
|
||||
<span class="button-text">Edit Profile</span>
|
||||
<button mat-raised-button mat-icon-button type="button" matTooltip="Edit Profile" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="editprofile()">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ import { RegisterComponent } from './register/register.component';
|
||||
import { UserListComponent} from './user-list/user-list.component';
|
||||
import { UserProfileComponent, ChangePasswordDialog } from './user-profile/user-profile.component';
|
||||
|
||||
import { UserService } from './../service/user.service';
|
||||
import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component';
|
||||
// import { HttpClientModule } from '@angular/common/http';
|
||||
@NgModule({
|
||||
@ -41,7 +42,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone
|
||||
// HttpClientModule,
|
||||
],
|
||||
declarations: [UserListComponent, RegisterComponent,UserProfileComponent],
|
||||
|
||||
providers: [ UserService ]
|
||||
|
||||
})
|
||||
export class UsersModule { }
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
<!--<pre> {{ m_group | json}}</pre>-->
|
||||
|
||||
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="80"> <span mat-dialog-title>{{pageTitle}}</span> </div>
|
||||
<div fxFlex="20"><button mat-raised-button mat-icon-button mat-dialog-close class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"><mat-icon>close</mat-icon></button></div>
|
||||
</div>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<mat-card style="width: 580px; padding: 6px;">
|
||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()" novalidate>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="50">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||
<div fxFlex="100">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Category" formControlName="fk_question_category">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
@ -39,15 +43,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div formArrayName="answers" fxFill>
|
||||
<div *ngFor="let answ of _addQuesFrom.controls.answers['controls']; let i=index">
|
||||
@ -65,19 +67,20 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>-->
|
||||
<div fxFlex="20">
|
||||
<div fxFlex="20" style="text-align:right;">
|
||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
@ -85,5 +88,5 @@
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
|
||||
</mat-dialog-actions>
|
||||
@ -1,12 +1,15 @@
|
||||
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="80"> <span mat-dialog-title>{{pageTitle}}</span> </div>
|
||||
<div fxFlex="20"><button mat-raised-button mat-icon-button mat-dialog-close class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"><mat-icon>close</mat-icon></button></div>
|
||||
</div>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<mat-card style="width: 580px; padding: 6px;">
|
||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
||||
<!--<div class="form-group">-->
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxFlex="50">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||
<div fxFlex="100" >
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Category" formControlName="fk_question_category">
|
||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||
@ -38,15 +41,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Answer Type" formControlName="fk_question_answertype">
|
||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<!--<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
||||
(ngModelChange)="f.isactive.value = $event ? 1 : 0">Active/InActive</mat-checkbox>
|
||||
@ -64,25 +65,23 @@
|
||||
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="30">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
|
||||
<!----<div fxFlex="30">
|
||||
<mat-form-field style="margin-top: 7%;">
|
||||
<mat-select placeholder="Group" formControlName="fk_question_group_id">
|
||||
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="20">
|
||||
</div>-->
|
||||
<div fxFlex="20" style="text-align:right;">
|
||||
<mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null"
|
||||
(ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||
<button *ngIf="answ.get('question_answer_id').value == null" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
<button *ngIf="answ.get('question_answer_id').value == null" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||
</div>
|
||||
@ -94,6 +93,9 @@
|
||||
</li>
|
||||
</ul>-->
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
@ -103,6 +105,6 @@
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
|
||||
</mat-dialog-actions>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
|
||||
<mat-card>
|
||||
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
|
||||
<div class="ml-xs mr-xs" style="width: 30%;">
|
||||
<mat-card-title><span> Questions Master</span></mat-card-title>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayout.xs="column">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayout.xs="column" class="p-1">
|
||||
|
||||
<div fxFlexOffset="2%" fxFlex="40%">
|
||||
<form [formGroup]="filterFormGroupCtrl">
|
||||
@ -23,8 +24,6 @@
|
||||
<button mat-fab class="mr-1" color="primary" (click)="addNewQuestion()" matTooltip="Add Questions" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<!--</mat-card-content>-->
|
||||
<mat-card-content>
|
||||
<ng-container *ngIf="productList.length > 0">
|
||||
<mat-table [dataSource]="dataSource">
|
||||
|
||||
@ -118,6 +117,10 @@
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
|
||||
<!--<div *ngIf="addView">
|
||||
<app-add></app-add>
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
<div *ngIf="listView">
|
||||
<!--========================== Template List View-->
|
||||
<div>
|
||||
<mat-card>
|
||||
|
||||
<div class="p-1" fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none">
|
||||
<div fxFlex="80%">
|
||||
<mat-card-content>
|
||||
<div class="mb-1" fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start center">
|
||||
<div fxFlex="100%">
|
||||
<mat-card-title><span style="font-size:24px"> Template Master</span></mat-card-title>
|
||||
<!--<form [formGroup]="filterFormGroupCtrl">
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;">
|
||||
@ -16,12 +14,17 @@
|
||||
</div>
|
||||
</form>-->
|
||||
</div>
|
||||
<div fxFlex="14%" style="text-align:right;">
|
||||
</div>
|
||||
<!--========================== Template List View-->
|
||||
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayout.xs="column" class="p-1">
|
||||
<div fxFlexOffset="90%" fxFlex="10%" >
|
||||
<button mat-fab class="mr-1" color="primary" (click)="addNewTemplate()" matTooltip="Add Template" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
<!--<button mat-stroked-button color="primary" (click)="addNewQuestion()">Add Questions</button>-->
|
||||
</div>
|
||||
</div>
|
||||
<mat-card-content>
|
||||
<ng-container>
|
||||
<mat-table [dataSource]="dataSource" *ngIf="templateList.length > 0" >
|
||||
|
||||
@ -58,15 +61,11 @@
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
<!--=================================== END-->
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
Loading…
Reference in New Issue
Block a user