icon changes
This commit is contained in:
commit
66f486a477
@ -39,11 +39,11 @@
|
||||
</mat-card-title>
|
||||
<mat-card-content style="padding: 2% 0% 0% 7%;">
|
||||
|
||||
<span class="hover-icon"><i *ngIf="details.city_name" class="fa-1x fa fa-map-marker"> </i>{{details.city_name}}/{{details.state_name}}-{{details.pincode}}</span> <br>
|
||||
<span *ngIf="details.product_abbr">{{details.product_abbr}}/{{details.subproduct_abbr}}</span><br>
|
||||
<span> {{details.customer_segment_abbr}}<span *ngIf="details.loan_amount" style="padding-left: 48%;"><i class="fa-1x fa fa-rupee"> </i>{{details.loan_amount}}</span></span><br>
|
||||
<span>{{details.pd_date_of_initiation}}</span><br>
|
||||
<span>{{details.pd_status}} - {{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}</span>
|
||||
<span style="font-size: 13px;" class="hover-icon"><i *ngIf="details.city_name" class="fa-1x fa fa-map-marker"> </i>{{details.city_name}}/{{details.state_name}}-{{details.pincode}}</span> <br>
|
||||
<span style="font-size: 13px;" *ngIf="details.product_abbr">{{details.product_abbr}}/{{details.subproduct_abbr}}</span><br>
|
||||
<span style="font-size: 13px;"> {{details.customer_segment_abbr}}<span *ngIf="details.loan_amount" style="padding-left: 48%;"><i class="fa-1x fa fa-rupee"> </i>{{details.loan_amount}}</span></span><br>
|
||||
<span style="font-size: 13px;">{{details.pd_date_of_initiation}}</span><br>
|
||||
<span style="font-size: 13px;">{{details.pd_status}} - {{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}</span>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</mat-sidenav>
|
||||
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
|
||||
<button (click)="mailnav.toggle()" mat-icon-button>
|
||||
<mat-icon>short_text</mat-icon>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<span class="mr-1 ml-1">Category</span>
|
||||
</mat-toolbar>
|
||||
@ -171,7 +171,7 @@
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="text-xs-left">
|
||||
|
||||
<mat-list [formArrayName]="'items'">
|
||||
<mat-list [formArrayName]="'items'" style="padding-top:10%">
|
||||
<mat-list-item *ngFor="let control of textBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
||||
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
@ -229,9 +229,9 @@
|
||||
<!-- this section for questions type options button actions -->
|
||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" (click)="saveNextPreviousText(textBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPreviousText(textBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" matTooltipPosition="below" (click)="skipNextPrevious(previous)"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" (click)="saveNextPreviousText(textBoxForm.controls,next)" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
@ -325,9 +325,9 @@
|
||||
<!-- this section for questions type options button actions -->
|
||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltip="Save&Previous" (click)="saveNextPrevious(checkBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" (click)="saveNextPrevious(checkBoxForm.controls,previous)" matTooltip="Save&Previous" (click)="saveNextPrevious(checkBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" (click)="saveNextPrevious(checkBoxForm.controls,next)" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ loadTemplates(startID:string){
|
||||
|
||||
// load question based answer list
|
||||
getAnswers(serachList:any){
|
||||
|
||||
this.answerList=[];
|
||||
this._pd.getAnswersForPD(serachList).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
@ -262,7 +262,7 @@ optionsMapItems(items) {
|
||||
fk_pd_id:new FormControl(this.startPD),
|
||||
pd_detail_answer_id: new FormControl(item.pd_detail_answer_id),
|
||||
pd_answer_id: new FormControl(item.question_answer_id),
|
||||
pd_answer: new FormControl(item.answer),
|
||||
pd_answer: new FormControl(item.pd_answer),
|
||||
pd_answer_weightage:new FormControl(item.template_answer_weightage),
|
||||
text: new FormControl(item.pd_detail_answer_id==null ? false: true)
|
||||
})));
|
||||
@ -275,7 +275,7 @@ optionsMapItems(items) {
|
||||
})));
|
||||
|
||||
this.textBoxForm = new FormGroup({
|
||||
pd_detail_id: new FormControl(ansItem.pd_detail_id),
|
||||
pd_detail_id: new FormControl(this.ansPDList.pd_detail_id),
|
||||
fk_pd_id: new FormControl(this.startPD),
|
||||
fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id),
|
||||
fk_question_id: new FormControl(this.selectedCategory.fk_question_id),
|
||||
@ -340,7 +340,7 @@ optionsMapItems(items) {
|
||||
}
|
||||
fetchAns.push(obj1)
|
||||
});
|
||||
let pd_details:any={
|
||||
let pd_details:any=[{
|
||||
"pd_detail_id":details.pd_detail_id.value,
|
||||
"fk_pd_id":details.fk_pd_id.value,
|
||||
"fk_category_id":details.fk_category_id.value,
|
||||
@ -350,7 +350,7 @@ optionsMapItems(items) {
|
||||
"question_remark":details.pd_answer_remark.value,
|
||||
"answers":fetchAns,
|
||||
"images":[]
|
||||
};
|
||||
}];
|
||||
this._pd.savePDQuestions(pd_details).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
if(type==1){
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<span *ngIf="master.pd_allocated_to" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer"
|
||||
matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{master.scheduled_on}}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{ (master.updatedon)? (master.updatedon | slice:0:10):(master.updatedon) }}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<mat-card-content>
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.QC_COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC OK':currentPDStatus }}</span></button>
|
||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':currentPDStatus }}</span></button>
|
||||
|
||||
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
||||
<mat-expansion-panel-header>
|
||||
@ -24,7 +24,7 @@
|
||||
</mat-sidenav>
|
||||
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
|
||||
<button (click)="mailnav.toggle()" mat-icon-button>
|
||||
<mat-icon>short_text</mat-icon>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<span class="mr-1 ml-1">Category</span>
|
||||
</mat-toolbar>
|
||||
@ -166,10 +166,10 @@
|
||||
<form [formGroup]="textBoxForm" *ngIf="answerList.length>0 ; else noanswers;">
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{textBoxForm.controls.pd_question.value}}</span>
|
||||
<div fxLayout="row" >
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="60" class="text-xs-left">
|
||||
|
||||
<mat-list [formArrayName]="'items'">
|
||||
<mat-list [formArrayName]="'items'" style="padding-top:10%">
|
||||
<mat-list-item *ngFor="let control of textBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
||||
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
|
||||
@ -8,7 +8,8 @@ import { QcService } from './../../qc-service/qc.service';
|
||||
@Component({
|
||||
selector: 'app-qc-start',
|
||||
templateUrl: './qc-start.component.html',
|
||||
styleUrls: ['./qc-start.component.scss']
|
||||
styleUrls: ['./qc-start.component.scss'],
|
||||
|
||||
})
|
||||
export class QcStartComponent implements OnInit, OnDestroy {
|
||||
private notifier: NotifierService;
|
||||
@ -262,7 +263,7 @@ optionsMapItems(items) {
|
||||
fk_pd_id:new FormControl(this.startPD),
|
||||
pd_detail_answer_id: new FormControl(item.pd_detail_answer_id),
|
||||
pd_answer_id: new FormControl(item.question_answer_id),
|
||||
pd_answer: new FormControl(item.answer),
|
||||
pd_answer: new FormControl(item.pd_answer),
|
||||
pd_answer_weightage:new FormControl(item.template_answer_weightage),
|
||||
text: new FormControl(item.pd_detail_answer_id==null ? false: true)
|
||||
})));
|
||||
@ -275,7 +276,7 @@ optionsMapItems(items) {
|
||||
})));
|
||||
|
||||
this.textBoxForm = new FormGroup({
|
||||
pd_detail_id: new FormControl(ansItem.pd_detail_id),
|
||||
pd_detail_id: new FormControl(this.ansPDList.pd_detail_id),
|
||||
fk_pd_id: new FormControl(this.startPD),
|
||||
fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id),
|
||||
fk_question_id: new FormControl(this.selectedCategory.fk_question_id),
|
||||
@ -340,7 +341,7 @@ optionsMapItems(items) {
|
||||
}
|
||||
fetchAns.push(obj1)
|
||||
});
|
||||
let pd_details:any={
|
||||
let pd_details:any=[{
|
||||
"pd_detail_id":details.pd_detail_id.value,
|
||||
"fk_pd_id":details.fk_pd_id.value,
|
||||
"fk_category_id":details.fk_category_id.value,
|
||||
@ -350,7 +351,7 @@ optionsMapItems(items) {
|
||||
"question_remark":details.pd_answer_remark.value,
|
||||
"answers":fetchAns,
|
||||
"images":[]
|
||||
};
|
||||
}];
|
||||
this._qc.savePDQuestions(pd_details).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
if(type==1){
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<br>
|
||||
<span *ngIf="master.pd_allocated_to" style="color:red;text-align:left">{{master.pd_allocated_to | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{master.scheduled_on}}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{ (master.updatedon)? (master.updatedon | slice:0:10):(master.updatedon) }}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -24,7 +24,7 @@
|
||||
<div class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<!--pd master -->
|
||||
<mat-card *ngFor="let master of pdMasterData" class="minheight">
|
||||
<div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<div *ngIf="currentPDStatus==pdStatusCheck.DRAFT">
|
||||
<!-- <button *ngIf="master.pd_type_name" mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="pdAllocationTo(master)"><mat-icon>directions_run</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name" mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
-->
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
Pan: {{data.pan}}, Gst: {{data.gstno}}
|
||||
</div>
|
||||
<div>
|
||||
Contact Person Info, Contact Person Info, Contact Person Info
|
||||
<div *ngFor="let conts of data.contacts; let last = last">{{conts.contact_person}} - {{conts.contact_email}} - {{conts.contact_mobile_no}} <span *ngIf="!last">,</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="20%">
|
||||
|
||||
@ -213,7 +213,7 @@ export class DialogAddEditBillingInfo implements OnInit {
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(billingInfoFormValues).forEach((key) => (billingInfoFormValues[key] == null) && delete billingInfoFormValues[key]);
|
||||
alert(billingInfoFormValues);
|
||||
// alert(billingInfoFormValues);
|
||||
this.entityService.updateEntityIdBillingInfoDetails(billingInfoFormValues).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1" color="primary" matTooltip="Add More Region Information" matTooltipPosition="above" (click)="addRegionFormData(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="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="reset();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>
|
||||
</form>
|
||||
|
||||
@ -1 +1,59 @@
|
||||
<h1>Tat info</h1>
|
||||
<mat-card>
|
||||
<form [formGroup]="tatForm" (submit)="onSubmit()">
|
||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
|
||||
<div fxFlex="23.5%">
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedPD($event)" placeholder="PD Type" formControlName="toppings1" multiple>
|
||||
<mat-option *ngFor="let pd of m_pdType" [value]="pd.id">{{pd.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.toppings1.hasError('required')" class="mat-text-warn">PD Type Required.!</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-chip-list fxLayout="row wrap" fxLayout.xs="column">
|
||||
<mat-chip *ngFor="let pdName of selectedItem" >{{pdName.name}}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
<div fxFlex="23.5%">
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedProduct($event)" placeholder="Product" formControlName="toppings2" multiple>
|
||||
<mat-option *ngFor="let prdct of m_product" [value]="prdct.id">{{prdct.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.toppings2.hasError('required')" class="mat-text-warn">Product Required.!</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-chip-list fxLayout="row wrap" fxLayout.xs="column">
|
||||
<mat-chip *ngFor="let prdcName of selectedProductItem" >{{prdcName.name}}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
<div fxFlex="23.5%">
|
||||
<mat-form-field>
|
||||
<mat-select (selectionChange)="selectedCity($event)" placeholder="City" formControlName="toppings3" multiple>
|
||||
<mat-option *ngFor="let city of m_city" [value]="city.id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.toppings3.hasError('required')" class="mat-text-warn">City Required.!</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-chip-list fxLayout="row wrap" fxLayout.xs="column">
|
||||
<mat-chip *ngFor="let cityName of selectedCityItem" >{{cityName.name}}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
<div fxFlex="23.5%">
|
||||
<mat-form-field>
|
||||
<input placeholder="TAT Value 1" matInput formControlName="toppings4">
|
||||
</mat-form-field>
|
||||
<mat-error *ngIf="submitted && f.toppings4.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error>
|
||||
<mat-form-field>
|
||||
<input placeholder="TAT Value 2" matInput formControlName="toppings5">
|
||||
</mat-form-field>
|
||||
<!--<mat-error *ngIf="submitted && ques['controls'].question_weightage.hasError('required')" class="mat-text-warn">Ques. WT is Required.!</mat-error>-->
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="end">
|
||||
<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>
|
||||
<!--<div *ngIf="valArray.length > 0">
|
||||
<h5><b>Note : </b> This following Combincation already exist for this Entity with different Tat Values.</h5>
|
||||
<ul>
|
||||
<li *ngFor="let val of valArray">{{ val }}</li>
|
||||
</ul>
|
||||
</div>-->
|
||||
</mat-card>
|
||||
@ -20,16 +20,25 @@ export class EntityEditTatComponent implements OnInit {
|
||||
public noRocordsFound: boolean;
|
||||
public entityVendorCityRecord: any;
|
||||
public errorMessage;
|
||||
submitted: Boolean;
|
||||
|
||||
@Input() public entityId: number;
|
||||
public m_city: any = [];
|
||||
tatForm: FormGroup;
|
||||
|
||||
@Input() public entityId: number;
|
||||
public selectedArr: any = [];
|
||||
public selectedProductArr: any = [];
|
||||
public selectedCityArr: any = [];
|
||||
|
||||
// toppings1 = new FormControl();
|
||||
// toppings2 = new FormControl();
|
||||
// toppings3 = new FormControl();
|
||||
// toppings4 = new FormControl();
|
||||
|
||||
toppings1 = new FormControl();
|
||||
|
||||
toppingList1: any[] = [{'id': 1,'name':'Extra cheese'}, {'id': 2, 'name':'Mushroom'}, { 'id': 3, 'name':'Onion'}];
|
||||
toppingList1: any[] = [{ 'id': 1, 'name': 'Extra cheese' }, { 'id': 2, 'name': 'Mushroom' }, { 'id': 3, 'name': 'Onion' }];
|
||||
|
||||
m_pdType = [{ 'id': 1, 'name': 'PD Type 1' }, { 'id': 2, 'name': 'PD Type 2' }];
|
||||
m_product = [{ 'id': 1, 'name': 'Product 1' }, { 'id': 2, 'name': 'Product 2' }, { 'id': 3, 'name': 'Product 3' }];
|
||||
m_city = [{ 'id': 1, 'name': 'City 1' }, { 'id': 2, 'name': 'City 2' }, { 'id': 3, 'name': 'City 3' }];
|
||||
/**
|
||||
* Notifier service
|
||||
*/
|
||||
@ -39,24 +48,43 @@ export class EntityEditTatComponent implements OnInit {
|
||||
private entityService: EntityService,
|
||||
private mastersService: MastersService,
|
||||
private _formBuilder: FormBuilder) {
|
||||
this.notifier = notifier;
|
||||
}
|
||||
this.notifier = notifier;
|
||||
this.tatForm = this._formBuilder.group({
|
||||
toppings1: ['', Validators.compose([Validators.required])],
|
||||
toppings2: ['', Validators.compose([Validators.required])],
|
||||
toppings3: ['', Validators.compose([Validators.required])],
|
||||
toppings4: ['', Validators.compose([Validators.required])],
|
||||
toppings5: ['', Validators.compose([Validators.required])]
|
||||
})
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getEntityIdCityDetails();
|
||||
this.getCityMasters();
|
||||
this.toppings1.setValue([3]);
|
||||
|
||||
}
|
||||
|
||||
selectedItem: any;
|
||||
get f() { return this.tatForm.controls };
|
||||
|
||||
selected(e){
|
||||
selectedItem: any;
|
||||
|
||||
selectedPD(e) {
|
||||
this.selectedArr = [...e.value];
|
||||
this.selectedItem = this.m_city.filter(val => this.selectedArr.indexOf(val.city_id) > -1)
|
||||
this.selectedItem = this.m_pdType.filter(val => this.selectedArr.indexOf(val.id) > -1)
|
||||
}
|
||||
|
||||
getEntityIdCityDetails(){
|
||||
this.entityService.getEntityIdCityInfoDetails(this.entityId).subscribe(
|
||||
selectedProductItem: any;
|
||||
selectedProduct(e) {
|
||||
this.selectedProductArr = [...e.value];
|
||||
this.selectedProductItem = this.m_product.filter(val => this.selectedProductArr.indexOf(val.id) > -1)
|
||||
}
|
||||
|
||||
selectedCityItem: any;
|
||||
selectedCity(e) {
|
||||
this.selectedCityArr = [...e.value];
|
||||
this.selectedCityItem = this.m_city.filter(val => this.selectedCityArr.indexOf(val.id) > -1)
|
||||
}
|
||||
|
||||
getEntityIdCityDetails() {
|
||||
this.entityService.getEntityIdCityInfoDetails(this.entityId).subscribe(
|
||||
data => {
|
||||
if (data) {
|
||||
if (data.records) {
|
||||
@ -84,4 +112,101 @@ export class EntityEditTatComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
resultApi = ['123', '211'];
|
||||
|
||||
check() {
|
||||
let arr1 = this.tatForm.controls['toppings1'].value;
|
||||
let arr2 = this.tatForm.controls['toppings2'].value;
|
||||
let arr3 = this.tatForm.controls['toppings3'].value;
|
||||
alert(arr1);
|
||||
let array1 = [...arr1];
|
||||
let array2 = [...arr2];
|
||||
let array3 = [...arr3];
|
||||
let result1 = array1.reduce((a1, v1, i1) =>
|
||||
a1.concat(array2.map(w => v1 + "" + w)), []).reduce((a2, v2, i3) =>
|
||||
a2.concat(array3.map(u => v2 + "" + u)), []);
|
||||
|
||||
let exist = this.resultApi.filter(a => result1.indexOf(a) > -1);
|
||||
alert(result1);
|
||||
alert(exist);
|
||||
}
|
||||
|
||||
// {
|
||||
// alert("a.id = "+a.id+" id ="+id);
|
||||
// if(a.id == id)
|
||||
// {
|
||||
// return a
|
||||
// }
|
||||
// else{
|
||||
// return -1
|
||||
// }}
|
||||
|
||||
getIdPdName(id) {
|
||||
let pdF = this.m_pdType.filter(a => a.id == id);
|
||||
return pdF[0].name;
|
||||
}
|
||||
|
||||
getIdProductName(id) {
|
||||
let pdF = this.m_product.filter(a => a.id == id);
|
||||
return pdF[0].name;
|
||||
}
|
||||
|
||||
getIdCityName(id) {
|
||||
let pdF = this.m_city.filter(a => a.id == id);
|
||||
return pdF[0].name;
|
||||
}
|
||||
|
||||
public existValArray:any = [];
|
||||
|
||||
onSubmit() {
|
||||
this.submitted = true;
|
||||
if (this.tatForm.invalid) {
|
||||
return
|
||||
} else {
|
||||
let arr1 = this.tatForm.controls['toppings1'].value;
|
||||
let arr2 = this.tatForm.controls['toppings2'].value;
|
||||
let arr3 = this.tatForm.controls['toppings3'].value
|
||||
|
||||
let array1 = [...arr1];
|
||||
let array2 = [...arr2];
|
||||
let array3 = [...arr3];
|
||||
let result1 = array1.reduce((a1, v1, i1) =>
|
||||
a1.concat(array2.map(w => v1 + "" + w)), []).reduce((a2, v2, i3) =>
|
||||
a2.concat(array3.map(u => v2 + "" + u)), []);
|
||||
|
||||
let exist = this.resultApi.filter(a => result1.indexOf(a) > -1);
|
||||
if(exist){
|
||||
|
||||
alert(result1);
|
||||
alert(exist);
|
||||
|
||||
this.existValArray = [];
|
||||
|
||||
exist.forEach(a=>{
|
||||
let pdName = this.getIdPdName(a[0]);
|
||||
let productName = this.getIdProductName(a[1]);
|
||||
let cityName = this.getIdCityName(a[2]);
|
||||
this.existValArray.push(`${pdName}, ${productName}, ${cityName}`);
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// var array1=["A","B","C","D"];
|
||||
// var array2=["1","2","3"];
|
||||
// var array3=["#","$","@"];
|
||||
// var result1 = array1.reduce( (a1, v1, i1) =>
|
||||
// a1.concat(array2.map(w => v1+w)),[]).reduce((a2, v2, i3)=>
|
||||
// a2.concat(array3.map(u=> v2+u)),[])
|
||||
// console.log(result1);
|
||||
// var valueApi = ["B1$","C2#"];
|
||||
// var exist = result1.filter(a => valueApi.indexOf(a) > -1);
|
||||
// console.log("exit :" + exist);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<!--
|
||||
{{ selectedCityName | json }}-->
|
||||
|
||||
<mat-chip-list>
|
||||
<mat-chip-list *ngIf="selectedCityName">
|
||||
<mat-chip *ngFor="let cit of selectedCityName" >{{cit.name}}</mat-chip>
|
||||
</mat-chip-list>
|
||||
|
||||
|
||||
@ -84,9 +84,10 @@ export class EntityEditVendorCityInfoComponent implements OnInit {
|
||||
selectedCityName:any;
|
||||
|
||||
getNameofCityId(arg) {
|
||||
|
||||
let arrs = [...arg];
|
||||
this.selectedCityName = this.m_city.filter(val => arrs.indexOf(val.city_id) > -1)
|
||||
}
|
||||
}
|
||||
|
||||
getCityMasters() {
|
||||
this.mastersService.getAllMasterData('CITY').subscribe(
|
||||
|
||||
@ -233,7 +233,13 @@
|
||||
<app-entity-edit-vendor-city-info [entityId]="entity_id">
|
||||
</app-entity-edit-vendor-city-info>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
<!--<mat-tab label="TAT Information">
|
||||
<ng-template matTabContent>
|
||||
<app-entity-edit-tat [entityId]="entity_id">
|
||||
</app-entity-edit-tat>
|
||||
</ng-template>
|
||||
</mat-tab>-->
|
||||
<!--<mat-tab label="Category">
|
||||
<ng-template matTabContent>
|
||||
<app-template-edit-category [questionId]="question_id">
|
||||
|
||||
@ -74,9 +74,9 @@ export class EntityListComponent implements OnInit {
|
||||
if (data) {
|
||||
if (data.records) {
|
||||
this.enityList = data.records;
|
||||
this.questionListData = data.records;
|
||||
// this.questionListData = data.records;
|
||||
this.dataLength = data.records.length;
|
||||
this.dataSource.data = this.questionListData;
|
||||
this.dataSource.data = this.enityList;
|
||||
} else {
|
||||
this.enityList = [];
|
||||
this.dataLength = null;
|
||||
|
||||
@ -39,8 +39,10 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
||||
(ngModelChange)="f.get('isactive').value = $event ? 1 : 0">Active/InActive</mat-checkbox>
|
||||
|
||||
<!--<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
||||
(ngModelChange)="f.isactive.value = $event ? 1 : 0">Active/InActive</mat-checkbox>
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
|
||||
@ -45,11 +45,12 @@
|
||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
<div *ngIf="productList.length > 0">
|
||||
|
||||
|
||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||
</mat-paginator>
|
||||
</div>
|
||||
|
||||
|
||||
<!---- <ng-container *ngIf="productList.length > 0">
|
||||
<div style="padding: 0 12px;">
|
||||
|
||||
@ -67,9 +67,9 @@ export class ListComponent implements OnInit {
|
||||
if (data) {
|
||||
if (data.records) {
|
||||
this.productList = data.records;
|
||||
this.questionListData = data.records;
|
||||
// this.questionListData = data.records;
|
||||
this.dataLength = data.records.length;
|
||||
this.dataSource.data = this.questionListData;
|
||||
this.dataSource.data = this.productList;
|
||||
} else {
|
||||
this.productList = [];
|
||||
this.dataLength = null;
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="lender_details">
|
||||
<mat-cell fxFlex="65%" *matCellDef="let template;">
|
||||
<div *ngIf="template.lender_details.length > 0">
|
||||
<span *ngFor="let lender of template.lender_details ; let last = last"> {{lender.full_name}} - {{lender.product_name}} - {{lender.customer_segment_name}} <i *ngIf="!last">,<br></i></span>
|
||||
<div *ngIf="template.lender_details.length > 0" class="text-line-limit">
|
||||
<span *ngFor="let lender of template.lender_details ; let last = last" > {{lender.full_name}} - {{lender.product_name}} - {{lender.customer_segment_name}} <i *ngIf="!last">,<br></i></span>
|
||||
</div>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -71,9 +71,9 @@ export class TemplateListComponent implements OnInit, OnDestroy {
|
||||
if (data) {
|
||||
if (data.records) {
|
||||
this.templateList = data.records;
|
||||
this.templateListData = data.records;
|
||||
// this.templateListData = data.records;
|
||||
this.dataLength = data.records.length;
|
||||
this.dataSource.data = this.templateListData;
|
||||
this.dataSource.data = this.templateList;
|
||||
} else {
|
||||
this.templateList = [];
|
||||
this.dataLength = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user