From f54bd33b3acc3b106e90e87db034b01602313630 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 12:45:06 +0530 Subject: [PATCH] forms changes in qc --- .../list-pd/add-pd/add-pd.component.html | 2 +- .../personal-info/personal-info.component.ts | 2 + .../manage-pd/manage-pd.module.ts | 2 +- .../qc-list/qc-start/qc-start.component.html | 74 +++++- .../qc-list/qc-start/qc-start.component.scss | 248 ++++++++++-------- .../qc-list/qc-start/qc-start.component.ts | 17 +- .../qc-list/qc-view/qc-view.component.ts | 15 +- 7 files changed, 238 insertions(+), 122 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index b993c2532..4b05fa227 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -280,7 +280,7 @@ (click)="onReset()">settings_backup_restore - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index ec43db4e9..4faf03284 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -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 diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 4ccb8e100..24c4e74dd 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -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] }) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index db51c2644..a931c74f1 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -24,6 +24,13 @@ + + + {{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }} + + + + @@ -37,7 +44,7 @@
-

{{mainApplicantName}}

@@ -52,10 +59,12 @@

- +
+

No Records Found..

+
@@ -362,7 +371,66 @@ - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss index fc7ac8814..9db46e8db 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss @@ -1,118 +1,136 @@ @import "./../../../../assets/styles/scss/components/messages"; :host { - margin-left: -5px; - margin-right: -5px; - margin-top: -5px; - display: block; -} -:host /deep/ { - mat-sidenav { - width: 250px; - } - .mat-sidenav-content { - padding: 0; - - } - @media (min-width: 959px) { - .mat-sidenav-side { - background-color: transparent; - box-shadow: none!important; - } - - } -} - -.mat-expansion-panel-header-description { - color: rgba(0, 0, 0, 87); -} -.mat-card-content { - background-color: white; -} -.mat-card-actions { - background-color: white; -} - -.text-ellipsis { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.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 { - background: white; - margin: auto; - position: relative; - overflow: hidden !important; - border-radius: 10px 10px 10px 10px; - box-shadow: $base-card-box-shadow; - transform: scale(0.95); - transition: box-shadow 0.5s, transform 0.5s; - &:hover { - transform: scale(1); - box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); - } - .p-list { - position: relative; - .top { - height: 100%; - width: 100%; - // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; - -webkit-background-size: 100%; - -moz-background-size: 100%; - -o-background-size: 100%; - background-size: 100%; - } - .bottom { - width: 200%; - height: 15%; - transition: transform 0.5s; - h1 { - margin: 0; - padding: 0; - } - p { - margin: 0; - padding: 0; - } - .left { - height: 100%; - width: 50%; - background: #f4f4f4; - position: relative; - float: left; - .details { - padding: 5px; - float: left; - // width: calc(70% - 40px); - } + margin-left: -5px; + margin-right: -5px; + margin-top: -5px; + display: block; + } + :host /deep/ { + mat-sidenav { + width: 250px; + } + .mat-sidenav-content { + padding: 0; + + } + @media (min-width: 959px) { + .mat-sidenav-side { + background-color: transparent; + box-shadow: none!important; + } + + } + } + + .mat-expansion-panel-header-description { + color: rgba(0, 0, 0, 87); + } + .mat-card-content { + background-color: white; + } + .mat-card-actions { + background-color: white; + } + + .text-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .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 { + background: white; + margin: auto; + position: relative; + overflow: hidden !important; + border-radius: 10px 10px 10px 10px; + box-shadow: $base-card-box-shadow; + transform: scale(0.95); + transition: box-shadow 0.5s, transform 0.5s; + &:hover { + transform: scale(1); + box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); + } + .p-list { + position: relative; + .top { + height: 100%; + width: 100%; + // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + } + .bottom { + width: 200%; + height: 15%; + transition: transform 0.5s; + h1 { + margin: 0; + padding: 0; + } + p { + margin: 0; + padding: 0; + } + .left { + height: 100%; + width: 50%; + background: #f4f4f4; + position: relative; + float: left; + .details { + padding: 5px; + float: left; + // width: calc(70% - 40px); + } + + } + .right { + width: 50%; + background: #A6CDDE; + color: white; + float: right; + height: 200%; + overflow: hidden; + .details { + padding: 20px; + float: right; + width: calc(70% - 40px); + } + - } - .right { - width: 50%; - background: #A6CDDE; - color: white; - float: right; - height: 200%; - overflow: hidden; - .details { - padding: 20px; - float: right; - width: calc(70% - 40px); - } - - - } - } - } - -} -mat-icon{ - color: #ff3636; -} + } + } + } + + } + 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; + } diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts index 3111050c5..296a97fe3 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts @@ -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 }); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index ef3bad0c4..67819b0e6 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -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) + }); + } }