business group form changes
This commit is contained in:
parent
ceec0e219a
commit
d7f6a4890d
@ -16,7 +16,7 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap" class="child_mat_card">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="40" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of companyList.form_status;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectBusinessGroupForms(formButton, companyList)">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="40" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of companyList.form_status | getAnswerableForms;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectBusinessGroupForms(formButton, companyList)">
|
||||
<mat-card-header>
|
||||
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
<div fxFlex="100" align="left" style="padding:15px !important;">
|
||||
|
||||
@ -11,10 +11,13 @@ import {FinancialInfoComponent} from './../../forms/financial-info/financial-inf
|
||||
import {BusinessInfoComponent} from './../../forms/business-info/business-info.component';
|
||||
import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component';
|
||||
import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component';
|
||||
import { GetAnswerableFormsPipe } from './../../../../../pd-pipes/get-answerable-forms.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-business-info-group',
|
||||
templateUrl: './business-info-group.component.html',
|
||||
styleUrls: ['./business-info-group.component.scss']
|
||||
styleUrls: ['./business-info-group.component.scss'],
|
||||
providers :[GetAnswerableFormsPipe]
|
||||
})
|
||||
export class BusinessInfoGroupComponent implements OnInit {
|
||||
customer_segment_abbr: any;
|
||||
|
||||
@ -111,6 +111,7 @@ import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-inc
|
||||
import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||
import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive';
|
||||
import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component';
|
||||
import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
@ -157,7 +158,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent],
|
||||
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
import { GetAnswerableFormsPipe } from './get-answerable-forms.pipe';
|
||||
|
||||
describe('GetAnswerableFormsPipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new GetAnswerableFormsPipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,17 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'getAnswerableForms'
|
||||
})
|
||||
export class GetAnswerableFormsPipe implements PipeTransform {
|
||||
|
||||
transform(value: any, args?: any): any {
|
||||
if(value.length>0){
|
||||
return value.filter(val=>val.isAnswerable===true);
|
||||
}
|
||||
else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user