forms changes in qc

This commit is contained in:
gandhimathi 2018-11-16 12:45:06 +05:30
parent 2e837324b9
commit f54bd33b3a
7 changed files with 238 additions and 122 deletions

View File

@ -280,7 +280,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>

View File

@ -135,6 +135,7 @@ loadFormWithIDData(data) {
});
//console.log(this._personalForm);
this.loadDataStatus = true;
}
loadFormData(){
@ -190,6 +191,7 @@ loadFormWithIDData(data) {
});
//console.log(this._personalForm);
this.loadDataStatus = true;
}
//get pd main applicant array values

View File

@ -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]
})

View File

@ -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>

View File

@ -4,8 +4,8 @@
margin-right: -5px;
margin-top: -5px;
display: block;
}
:host /deep/ {
}
:host /deep/ {
mat-sidenav {
width: 250px;
}
@ -20,32 +20,32 @@
}
}
}
}
.mat-expansion-panel-header-description {
.mat-expansion-panel-header-description {
color: rgba(0, 0, 0, 87);
}
.mat-card-content {
}
.mat-card-content {
background-color: white;
}
.mat-card-actions {
}
.mat-card-actions {
background-color: white;
}
}
.text-ellipsis {
.text-ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.custm-list-item {
.custm-list-item {
cursor: pointer;
}
}
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main {
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main {
background: white;
margin: auto;
position: relative;
@ -112,7 +112,25 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
}
}
}
mat-icon{
}
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;
}

View File

@ -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 });

View File

@ -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)
});
}
}