This commit is contained in:
dineshkumarkannan 2018-11-16 16:15:48 +05:30
commit 606715f979
26 changed files with 445 additions and 327 deletions

View File

@ -93,7 +93,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <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-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
</mat-form-field> </mat-form-field>
@ -280,7 +280,7 @@
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></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="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" 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> <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> </mat-card-actions>

View File

@ -309,7 +309,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"pd_status": status, "pd_status": status,
//"fk_pd_allocation_type":this.allocationTypeModel , //"fk_pd_allocation_type":this.allocationTypeModel ,
"fk_createdby" : this._aws.getlocale(), "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=[{ let pd_applicant_details : any=[{
"applicant_name":formValue.applicant_name, "applicant_name":formValue.applicant_name,

View File

@ -62,19 +62,9 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
<div fxLayout="row" fxLayoutWrap="wrap"> <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>
<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 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="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> (click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>

View File

@ -86,7 +86,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <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-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
</mat-form-field> </mat-form-field>

View File

@ -112,7 +112,7 @@
<div fxFlex="33"> <div fxFlex="33">
<mat-form-field> <mat-form-field>
<mat-select placeholder="Frequency" formControlName="frequency_mode"> <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-select>
</mat-form-field> </mat-form-field>
</div> </div>
@ -242,12 +242,12 @@
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width"> <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> </mat-form-field>
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width"> <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> </mat-form-field>
</div> </div>
</div> </div>

View File

@ -282,7 +282,7 @@
<div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'"> <div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'">
<div *ngFor="let members of businessForm.controls.documents['controls']; let i=index" <div *ngFor="let members of businessForm.controls.documents['controls']; let i=index"
[formGroupName]="i"> [formGroupName]="i">
<mat-form-field style="width:100%"> <mat-form-field style="width:86%">
<input matInput placeholder="Specify Document Details" <input matInput placeholder="Specify Document Details"
formControlName="document"> formControlName="document">
</mat-form-field> </mat-form-field>

View File

@ -8,7 +8,7 @@
width: 100%; width: 100%;
} }
.matcard > * { .matcard > * {
width: 45%; width: 98%;
} }
.card mat-form-field { .card mat-form-field {
margin: 0 2%; margin: 0 2%;

View File

@ -30,10 +30,10 @@
<input matInput placeholder="Lender" formControlName="lender"> <input matInput placeholder="Lender" formControlName="lender">
</mat-form-field> </mat-form-field>
<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>
<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> </mat-form-field>
<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()" <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"> *ngIf="i==0">

View File

@ -16,7 +16,7 @@
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<mat-form-field> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-select placeholder="Was the employer met?" <mat-select placeholder="Was the employer met?"
formControlName="was_met"> formControlName="was_met">
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
@ -31,7 +31,7 @@
<input matInput placeholder="Designation of person met" formControlName="designation_person_met"> <input matInput placeholder="Designation of person met" formControlName="designation_person_met">
</mat-form-field> </mat-form-field>
</div> </div>
<mat-form-field> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-select placeholder="Salary amount confirmed ?" <mat-select placeholder="Salary amount confirmed ?"
formControlName="confirm_salary"> formControlName="confirm_salary">
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
@ -41,14 +41,14 @@
<mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'"> <mat-form-field *ngIf="employmentForm.controls['confirm_salary'].value == 'yes'">
<input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount"> <input matInput placeholder="What is the salary amount confirmed?" formControlName="confirm_salary_amount">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-select placeholder="Attendance register seen ?" <mat-select placeholder="Attendance register seen ?"
formControlName="attendance_seen"> formControlName="attendance_seen">
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option> <mat-option value="no">No</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-select placeholder="Salary register seen ?" <mat-select placeholder="Salary register seen ?"
formControlName="sal_reg_seen"> formControlName="sal_reg_seen">
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
@ -67,8 +67,8 @@
<mat-form-field> <mat-form-field>
<input matInput placeholder="Net Monthly Salary" <input matInput placeholder="Net Monthly Salary"
formControlName="net_monthly_salary"> formControlName="net_monthly_salary">
<input matInput placeholder="Net Take Home" <!-- <input matInput placeholder="Net Take Home"
formControlName="net_take_home"> formControlName="net_take_home"> -->
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Bonus or Incentive" <input matInput placeholder="Bonus or Incentive"

View File

@ -31,21 +31,24 @@ import {ActivatedRoute, Router} from '@angular/router';
export class EmploymentInfoComponent implements OnInit { export class EmploymentInfoComponent implements OnInit {
@Input() pdid: number; @Input() pdid: number;
@Input() form_id: number; @Input() form_id: number;
@Input() pd_all_details:any;
public employmentForm: FormGroup; public employmentForm: FormGroup;
private notifier: NotifierService; private notifier: NotifierService;
public pd_cus_segment:string;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private router: Router,
private _pd: PdTrigerService) { private _pd: PdTrigerService) {
this.notifier = notifier; this.notifier = notifier;
} }
ngOnInit() { ngOnInit() {
this.pd_cus_segment=this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
this.initemploymentForm(); this.initemploymentForm();
let params: any = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
params.pd_form_id = this.form_id; params.pd_form_id = this.form_id;
this._pd.retriveForm(params).subscribe(value => { this._pd.retriveForm(params).subscribe(value => {
console.log('value', value);
if (value.status == 200) { if (value.status == 200) {
this.employmentForm.controls['employer_name'].setValue(value.records.employer_name); this.employmentForm.controls['employer_name'].setValue(value.records.employer_name);
this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year); this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year);
@ -76,13 +79,13 @@ export class EmploymentInfoComponent implements OnInit {
employer_name: ['', Validators.compose([Validators.required])], employer_name: ['', Validators.compose([Validators.required])],
how_long_year: ['', Validators.compose([Validators.required])], how_long_year: ['', Validators.compose([Validators.required])],
how_long_month: ['', Validators.compose([Validators.required])], how_long_month: ['', Validators.compose([Validators.required])],
was_met: ['', Validators.compose([Validators.required])], was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
name_person_met: [''], name_person_met: [''],
designation_person_met: [''], designation_person_met: [''],
confirm_salary: ['', Validators.compose([Validators.required])], confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
confirm_salary_amount: [''], confirm_salary_amount: [''],
attendance_seen: ['', Validators.compose([Validators.required])], attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
sal_reg_seen: ['', 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])], gross_monthly_salary: ['', Validators.compose([Validators.required])],
net_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])],
bonus_incentive: ['', Validators.compose([Validators.required])], bonus_incentive: ['', Validators.compose([Validators.required])],

View File

@ -14,12 +14,12 @@
<input matInput placeholder="Enter the relationship" formControlName="personOther"> <input matInput placeholder="Enter the relationship" formControlName="personOther">
</mat-form-field> </mat-form-field>
<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-form-field>
<mat-card> <mat-card>
<mat-card-header> <mat-card-header>
<p>Earning Members <p>Earning Members
<p> </p>
</mat-card-header> </mat-card-header>
<div formArrayName="earningMembers"> <div formArrayName="earningMembers">
<div *ngFor="let item of familyForm.controls.earningMembers['controls']; let i=index" <div *ngFor="let item of familyForm.controls.earningMembers['controls']; let i=index"
@ -50,12 +50,12 @@
<input matInput placeholder="Name of Employer / Business" <input matInput placeholder="Name of Employer / Business"
formControlName="employer_name"> formControlName="employer_name">
</mat-form-field> </mat-form-field>
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0" <button type="button" mat-raised-button mat-icon-button *ngIf="i==0" color="primary"
(click)="addearningMembers()"> matTooltip="Add More Earning Members" matTooltipPosition="above" (click)="addearningMembers()">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
<button type="button" mat-raised-button 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> <mat-icon>delete</mat-icon>
</button> </button>
</mat-card-content> </mat-card-content>
@ -65,7 +65,7 @@
<mat-card> <mat-card>
<mat-card-header> <mat-card-header>
<p>Non Earning Members <p>Non Earning Members
<p> </p>
</mat-card-header> </mat-card-header>
<div formArrayName="nonEarningMembers"> <div formArrayName="nonEarningMembers">
<div *ngFor="let members of familyForm.controls.nonEarningMembers['controls']; let i=index" <div *ngFor="let members of familyForm.controls.nonEarningMembers['controls']; let i=index"
@ -92,12 +92,12 @@
<input matInput placeholder="Retired From" <input matInput placeholder="Retired From"
formControlName="retired"> formControlName="retired">
</mat-form-field> </mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addMembers()" <button type="button" mat-raised-button mat-icon-button (click)="addMembers()" color="primary"
*ngIf="i==0"> matTooltip="Add More Non Earning Members" matTooltipPosition="above" *ngIf="i==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)" <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> <mat-icon>delete</mat-icon>
</button> </button>
</mat-card-content> </mat-card-content>
@ -106,7 +106,7 @@
</mat-card> </mat-card>
<mat-card> <mat-card>
<mat-card-header> <mat-card-header>
<p>Residence <p> <p>Residence </p>
</mat-card-header> </mat-card-header>
<mat-card-content class="matcard"> <mat-card-content class="matcard">
<mat-form-field> <mat-form-field>

View File

@ -80,8 +80,8 @@
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option> <mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<button type="button" matTooltip="Add More Income Details" class="mr-1 mb-1 hover-icon" matTooltipPosition="above" mat-raised-button mat-icon-button color="" (click)="addIncomeDetails()" <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()"
*ngIf="i==0"> color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
</button> </button>
<button type="button" matTooltip="Delete" class="mr-1 mb-1 hover-icon" 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)"

View File

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

View File

@ -422,7 +422,7 @@
<app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock> <app-stock [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-stock>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="12"> <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>
<ng-container *ngSwitchCase="13"> <ng-container *ngSwitchCase="13">
<app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info> <app-business-info [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-business-info>

View File

@ -77,7 +77,7 @@
<i class="fa-1x fa fa-user-o"></i> <i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon"> &nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i> <i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant</span> &nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant <br></span>
<ng-template #codetails>&nbsp;&nbsp;&nbsp;<span>{{applicant.relation_name}}</span></ng-template> <ng-template #codetails>&nbsp;&nbsp;&nbsp;<span>{{applicant.relation_name}}</span></ng-template>
</p> </p>
</mat-list-item> </mat-list-item>

View File

@ -165,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
OwlNativeDateTimeModule, OwlNativeDateTimeModule,
], ],
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], // 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], providers: [PdTrigerService, GetGeometricLocationService],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent]
}) })

View File

@ -150,7 +150,7 @@ export class PdTrigerService {
editPdMasterDetails(editData: any, status: string): Observable<any> { editPdMasterDetails(editData: any, status: string): Observable<any> {
editData.pd_status = status; editData.pd_status = status;
editData.fk_updatedby = this._aws.getlocale(); editData.fk_updatedby = this._aws.getlocale();
editData.updatedon = currentdate; // editData.updatedon = currentdate;
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData}) return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
.pipe( .pipe(
@ -180,7 +180,7 @@ export class PdTrigerService {
// update pd officer // update pd officer
updatePdOfficer(updateData: any): Observable<any> { updatePdOfficer(updateData: any): Observable<any> {
updateData.fk_updatedby = this._aws.getlocale(); updateData.fk_updatedby = this._aws.getlocale();
updateData.updatedon = currentdate; // updateData.updatedon = currentdate;
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData}) return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
.pipe( .pipe(
catchError(this.handleError('operation', [])) catchError(this.handleError('operation', []))
@ -190,7 +190,7 @@ export class PdTrigerService {
// update pd schedule // update pd schedule
updateSchedule(updateData: any): Observable<any> { updateSchedule(updateData: any): Observable<any> {
updateData.fk_scheduled_by = this._aws.getlocale(); updateData.fk_scheduled_by = this._aws.getlocale();
updateData.createdon = currentdate; // updateData.createdon = currentdate;
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData}) return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
.pipe( .pipe(
catchError(this.handleError('operation', [])) catchError(this.handleError('operation', []))
@ -262,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
// save pd answers // save pd answers
savePDQuestions(saveData: any): Observable<any> { savePDQuestions(saveData: any): Observable<any> {
saveData.createdby = this._aws.getlocale(); saveData.createdby = this._aws.getlocale();
saveData.fk_createdon = currentdate; //saveData.fk_createdon = currentdate;
// saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].fk_updatedby = this._aws.getlocale();
// saveData[0].updatedon = currentdate; // saveData[0].updatedon = currentdate;

View File

@ -24,6 +24,13 @@
</mat-list> </mat-list>
</mat-expansion-panel> </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-sidenav>
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm> <mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
@ -37,7 +44,7 @@
<mat-card-content> <mat-card-content>
<div fxLayout="row" > <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>--> (click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
<div fxFlex="33" class="text-xs-left"> <div fxFlex="33" class="text-xs-left">
<h4 class="mt-0">{{mainApplicantName}}</h4> <h4 class="mt-0">{{mainApplicantName}}</h4>
@ -52,10 +59,12 @@
</div> </div>
</mat-card-content> </mat-card-content>
<hr> <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> --> <!-- <h6 class="mt-0">About</h6> -->
<p>No Records Found..</p> <p>No Records Found..</p>
</mat-card-content> </mat-card-content>
</div>
<!-- check type of questions --> <!-- check type of questions -->
<ng-container [ngSwitch]="selectedCategory.fk_question_answertype"> <ng-container [ngSwitch]="selectedCategory.fk_question_answertype">
@ -362,7 +371,66 @@
</ng-container> </ng-container>
<!-- end check box questions section --> <!-- 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> </figure>
</div> </div>
</mat-sidenav-container> </mat-sidenav-container>

View File

@ -1,118 +1,136 @@
@import "./../../../../assets/styles/scss/components/messages"; @import "./../../../../assets/styles/scss/components/messages";
:host { :host {
margin-left: -5px; margin-left: -5px;
margin-right: -5px; margin-right: -5px;
margin-top: -5px; margin-top: -5px;
display: block; display: block;
} }
:host /deep/ { :host /deep/ {
mat-sidenav { mat-sidenav {
width: 250px; width: 250px;
} }
.mat-sidenav-content { .mat-sidenav-content {
padding: 0; padding: 0;
} }
@media (min-width: 959px) { @media (min-width: 959px) {
.mat-sidenav-side { .mat-sidenav-side {
background-color: transparent; background-color: transparent;
box-shadow: none!important; box-shadow: none!important;
} }
} }
} }
.mat-expansion-panel-header-description { .mat-expansion-panel-header-description {
color: rgba(0, 0, 0, 87); color: rgba(0, 0, 0, 87);
} }
.mat-card-content { .mat-card-content {
background-color: white; background-color: white;
} }
.mat-card-actions { .mat-card-actions {
background-color: white; background-color: white;
} }
.text-ellipsis { .text-ellipsis {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.custm-list-item { .custm-list-item {
cursor: pointer; cursor: pointer;
} }
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; $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); $product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main { .p-list-main {
background: white; background: white;
margin: auto; margin: auto;
position: relative; position: relative;
overflow: hidden !important; overflow: hidden !important;
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
box-shadow: $base-card-box-shadow; box-shadow: $base-card-box-shadow;
transform: scale(0.95); transform: scale(0.95);
transition: box-shadow 0.5s, transform 0.5s; transition: box-shadow 0.5s, transform 0.5s;
&:hover { &:hover {
transform: scale(1); transform: scale(1);
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
} }
.p-list { .p-list {
position: relative; position: relative;
.top { .top {
height: 100%; height: 100%;
width: 100%; width: 100%;
// background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center;
-webkit-background-size: 100%; -webkit-background-size: 100%;
-moz-background-size: 100%; -moz-background-size: 100%;
-o-background-size: 100%; -o-background-size: 100%;
background-size: 100%; background-size: 100%;
} }
.bottom { .bottom {
width: 200%; width: 200%;
height: 15%; height: 15%;
transition: transform 0.5s; transition: transform 0.5s;
h1 { h1 {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
p { p {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.left { .left {
height: 100%; height: 100%;
width: 50%; width: 50%;
background: #f4f4f4; background: #f4f4f4;
position: relative; position: relative;
float: left; float: left;
.details { .details {
padding: 5px; padding: 5px;
float: left; float: left;
// width: calc(70% - 40px); // width: calc(70% - 40px);
} }
} }
.right { .right {
width: 50%; width: 50%;
background: #A6CDDE; background: #A6CDDE;
color: white; color: white;
float: right; float: right;
height: 200%; height: 200%;
overflow: hidden; overflow: hidden;
.details { .details {
padding: 20px; padding: 20px;
float: right; float: right;
width: calc(70% - 40px); width: calc(70% - 40px);
} }
} }
} }
} }
} }
mat-icon{ mat-icon{
color: #ff3636; 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; getQuestionsLength:number;
answerList:any=[]; answerList:any=[];
ansPDList:any=[]; ansPDList:any=[];
// forms details
pdFullDetails:any=[];
categoryFormButtons: any;
formsCategoryEnable: boolean = false;
selectedFormsCategory: any;
// create values for status check // create values for status check
pdStatusCheck :any={ pdStatusCheck :any={
"DRAFT" :'DRAFT', "DRAFT" :'DRAFT',
@ -83,9 +89,10 @@ loadTemplates(startID:string){
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
this.mainApplicantName = filterApplicantName[0].applicant_name; this.mainApplicantName = filterApplicantName[0].applicant_name;
this.currentPDStatus = data.records.pdmaster_details.pd_status; this.currentPDStatus = data.records.pdmaster_details.pd_status;
this.actualQuestions = data.records.counts.overall_question_count; this.actualQuestions = data.records.counts.overall_question_count;
this.answeredQuestions = data.records.counts.overall_answered_count; this.answeredQuestions = data.records.counts.overall_answered_count;
this.categoryFormButtons = data.records.template_forms;
this.pdFullDetails = data.records
} }
else{ else{
this.pdMasterList=""; this.pdMasterList="";
@ -106,6 +113,7 @@ loadTemplates(startID:string){
} }
OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){ OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){
this.formsCategoryEnable = false;
this.selectedCategory=selectedQuestions; this.selectedCategory=selectedQuestions;
this.selectedCategoryIndex=categoryIndex; this.selectedCategoryIndex=categoryIndex;
this.selectedQuestionIndex=questionsIndex; 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 // load pd view component
loadPdViewCompoent(){ loadPdViewCompoent(){
this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route }); this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route });

View File

@ -69,7 +69,7 @@
<i class="fa-1x fa fa-user-o"></i> <i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon"> &nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i> <i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant</span> &nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant<br></span>
<ng-template #codetails>&nbsp;&nbsp;&nbsp;<span>{{applicant.relation_name}}</span></ng-template> <ng-template #codetails>&nbsp;&nbsp;&nbsp;<span>{{applicant.relation_name}}</span></ng-template>
</p> </p>

View File

@ -7,6 +7,7 @@ import { QcService } from './../../qc-service/qc.service';
import { QcListComponent } from './../qc-list.component'; import { QcListComponent } from './../qc-list.component';
import { PdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.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 { 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 { 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 { 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'; 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 // pd allocation to
pdAllocationTo(pdData:any) { pdAllocationTo(pdData:any) {
if(pdData.fk_pd_type != 2){ if(pdData.fk_pd_type == 1){
const dialogRef = this.dialog.open(PdAllocationComponent, { const dialogRef = this.dialog.open(PdAllocationComponent, {
data: pdData, data: pdData,
disableClose: true disableClose: true
@ -131,6 +132,18 @@ export class QcViewComponent implements OnInit, OnDestroy {
this.viewPdDetails(this.viewID) 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)
});
}
} }

View File

@ -52,7 +52,7 @@ export class QcService {
editPdMasterDetails(editData:any,status:string):Observable<any>{ editPdMasterDetails(editData:any,status:string):Observable<any>{
editData.pd_status = status; editData.pd_status = status;
editData.fk_updatedby = this._aws.getlocale(); editData.fk_updatedby = this._aws.getlocale();
editData.updatedon = currentdate; // editData.updatedon = currentdate;
return this._http.post<any>(this.apiUrl+"updatePDMaster",{records:editData}) return this._http.post<any>(this.apiUrl+"updatePDMaster",{records:editData})
.pipe( .pipe(
@ -86,7 +86,7 @@ export class QcService {
// save pd answers // save pd answers
savePDQuestions(saveData: any): Observable<any> { savePDQuestions(saveData: any): Observable<any> {
saveData.createdby = this._aws.getlocale(); saveData.createdby = this._aws.getlocale();
saveData.fk_createdon = currentdate; // saveData.fk_createdon = currentdate;
// saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].fk_updatedby = this._aws.getlocale();
// saveData[0].updatedon = currentdate; // saveData[0].updatedon = currentdate;

View File

@ -1,10 +1,15 @@
<div *ngIf="listView"> <div *ngIf="listView">
<mat-card> <mat-card>
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" style="padding-top:1%"> <mat-card-content>
<div fxFlex="80%"> <div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" style="padding-top:1%">
<mat-card-title><span style="font-size:24px"> Entity Master</span></mat-card-title> <div fxFlex="80%">
<mat-card-title><span style="font-size:24px"> Entity Master</span></mat-card-title>
</div>
</div> </div>
<div fxFlex="20%"> <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> <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>
</div> </div>
@ -52,6 +57,8 @@
</mat-card> </mat-card>
</mat-card> </mat-card>
</mat-card-content>
</mat-card>
</div> </div>
<div> <div>

View File

@ -1,123 +1,126 @@
<mat-card>
<mat-card> <mat-card-content>
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1"> <div class="ml-xs mr-xs" style="width: 30%;">
<div class="ml-xs mr-xs" style="width: 30%;"> <mat-card-title><span> Questions Master</span></mat-card-title>
<mat-card-title><span> Questions Master</span></mat-card-title>
</div>
</div>
<div fxLayout="row" fxLayout.xs="column">
<div fxFlexOffset="2%" fxFlex="40%">
<form [formGroup]="filterFormGroupCtrl">
<mat-select placeholder="Category" formControlName="category">
<!--<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>-->
<mat-option *ngFor="let cat of categories" [value]="cat.question_category_id" (click)="getQuestionsMasters()">
{{cat.category_name}}
</mat-option>
</mat-select>
</form>
</div> </div>
<div fxFlexOffset="24%" fxFlex="30%" style="text-align:right"> </div>
<button mat-fab class="mr-1" color="primary" (click)="addNewQuestion()" matTooltip="Add Questions" matTooltipPosition="above"><mat-icon>add</mat-icon></button> <mat-card>
</div> <mat-card-content>
</div> <div fxLayout="row" fxLayout.xs="column" class="p-1">
<!--</mat-card-content>-->
<mat-card-content>
<ng-container *ngIf="productList.length > 0">
<mat-table [dataSource]="dataSource">
<ng-container matColumnDef="category_name"> <div fxFlexOffset="2%" fxFlex="40%">
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;" > <form [formGroup]="filterFormGroupCtrl">
<span *ngIf="product.category_name" mat-line>{{ product.category_name }}</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="question">
<mat-cell fxFlex="70%" class="cell" *matCellDef="let product;" >
<span *ngIf="product.question" mat-line>{{ product.question }}</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-cell fxFlex="10%" class="cell" *matCellDef="let product;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>
</ng-container>
<mat-paginator #paginator [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize" <mat-select placeholder="Category" formControlName="category">
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons> <!--<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>-->
</mat-paginator> <mat-option *ngFor="let cat of categories" [value]="cat.question_category_id" (click)="getQuestionsMasters()">
{{cat.category_name}}
</mat-option>
<!---- <ng-container *ngIf="productList.length > 0"> </mat-select>
<div style="padding: 0 12px;"> </form>
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
<div fxLayout="row" fxLayoutAlign="start start" style="padding: 6px 2px;">
<div fxFlex="90%" style="padding: 12px 8px;">
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
<div class="ml-xs" fxFlex="20%">
{{ product.category_name }}
</div> </div>
<div class="ml-xs" fxFlex="80%"> <div fxFlexOffset="24%" fxFlex="30%" style="text-align:right">
<div class="text-line-limit">{{ product.question }} <button mat-fab class="mr-1" color="primary" (click)="addNewQuestion()" matTooltip="Add Questions" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
</div>
</div>
<ng-container *ngIf="productList.length > 0">
<mat-table [dataSource]="dataSource">
<ng-container matColumnDef="category_name">
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;" >
<span *ngIf="product.category_name" mat-line>{{ product.category_name }}</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="question">
<mat-cell fxFlex="70%" class="cell" *matCellDef="let product;" >
<span *ngIf="product.question" mat-line>{{ product.question }}</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-cell fxFlex="10%" class="cell" *matCellDef="let product;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>
</ng-container>
<mat-paginator #paginator [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
</mat-paginator>
<!---- <ng-container *ngIf="productList.length > 0">
<div style="padding: 0 12px;">
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
<div fxLayout="row" fxLayoutAlign="start start" style="padding: 6px 2px;">
<div fxFlex="90%" style="padding: 12px 8px;">
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
<div class="ml-xs" fxFlex="20%">
{{ product.category_name }}
</div>
<div class="ml-xs" fxFlex="80%">
<div class="text-line-limit">{{ product.question }}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <div fxFlex="10%">
<div fxFlex="10%"> <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
</div>
</div> </div>
</div>
</mat-card>
</div>
</ng-container>-->
<mat-card *ngIf="noQuesMasterRecrdFound">
<mat-card-content>
<div class="no-record-found">No Record Found ... </div>
</mat-card-content>
</mat-card> </mat-card>
<!--<mat-card>
<div class="example-container mat-elevation-z8">
<mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="category_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> Category </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.category_name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="question">
<mat-header-cell *matHeaderCellDef mat-sort-header> Question </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.question}} </mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(row)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]"></mat-paginator>
</div> </div>
</ng-container>--> </mat-card>-->
<mat-card *ngIf="noQuesMasterRecrdFound">
<mat-card-content> </mat-card-content>
<div class="no-record-found">No Record Found ... </div> </mat-card>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
<!--<mat-card>
<div class="example-container mat-elevation-z8">
<mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="category_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> Category </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.category_name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="question">
<mat-header-cell *matHeaderCellDef mat-sort-header> Question </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.question}} </mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(row)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 100]"></mat-paginator>
</div>
</mat-card>-->
</mat-card-content>
</mat-card>
<!--<div *ngIf="addView"> <!--<div *ngIf="addView">
<app-add></app-add> <app-add></app-add>

View File

@ -1,28 +1,31 @@
<div *ngIf="listView"> <div *ngIf="listView">
<!--========================== Template List View--> <mat-card>
<div> <mat-card-content>
<mat-card> <div class="mb-1" fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start center">
<div fxFlex="100%">
<div class="p-1" fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none"> <mat-card-title><span style="font-size:24px"> Template Master</span></mat-card-title>
<div fxFlex="80%"> <!--<form [formGroup]="filterFormGroupCtrl">
<mat-card-title><span style="font-size:24px"> Template Master</span></mat-card-title> <div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;">
<!--<form [formGroup]="filterFormGroupCtrl"> <mat-select placeholder="Category" formControlName="category">
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;"> <mat-option *ngFor="let cat of categories" [value]="cat.question_categroy_id" (click)="getQuestionsMasters()">
<mat-select placeholder="Category" formControlName="category"> {{cat.categroy_name}}
<mat-option *ngFor="let cat of categories" [value]="cat.question_categroy_id" (click)="getQuestionsMasters()"> </mat-option>
{{cat.categroy_name}} </mat-select>
</mat-option> </div>
</mat-select> </form>-->
</div> </div>
</form>-->
</div>
<div fxFlex="14%" style="text-align:right;">
<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> </div>
<mat-card-content> <!--========================== Template List View-->
<ng-container >
<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>
<ng-container>
<mat-table [dataSource]="dataSource" *ngIf="templateList.length > 0" > <mat-table [dataSource]="dataSource" *ngIf="templateList.length > 0" >
<ng-container matColumnDef="template_name"> <ng-container matColumnDef="template_name">
@ -58,15 +61,11 @@
</mat-card> </mat-card>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> <!--=================================== END-->
</mat-card-content>
<!--=================================== END--> </mat-card>
</div>
</div> <div>
<div>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div> </div>
<notifier-container></notifier-container>
<notifier-container></notifier-container>