Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
87149200cb
10
ng6-seed/package-lock.json
generated
10
ng6-seed/package-lock.json
generated
@ -950,6 +950,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-2.0.0.tgz",
|
||||||
"integrity": "sha512-/b8LIGamjOKnDI2uG1jRUErTIHeQ3w2WqHn4cbeiUTy+6eNHjkQI32DNhvxl0nVxr2gF5QluECNB4uWjMMyzQg=="
|
"integrity": "sha512-/b8LIGamjOKnDI2uG1jRUErTIHeQ3w2WqHn4cbeiUTy+6eNHjkQI32DNhvxl0nVxr2gF5QluECNB4uWjMMyzQg=="
|
||||||
},
|
},
|
||||||
|
"angular-notifier": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/angular-notifier/-/angular-notifier-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-QrL5cW3GDjONy6Ack+HIgd3tUf93ztkPT6C551/pqOaE69Ad2YDem+JyBLnlLKBnCFUxhKkSVnv/Ak2HsOrBxQ=="
|
||||||
|
},
|
||||||
"angular-resizable-element": {
|
"angular-resizable-element": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/angular-resizable-element/-/angular-resizable-element-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/angular-resizable-element/-/angular-resizable-element-2.0.0.tgz",
|
||||||
@ -7203,6 +7208,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ng2-file-upload/-/ng2-file-upload-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ng2-file-upload/-/ng2-file-upload-1.2.1.tgz",
|
||||||
"integrity": "sha1-VWPF39b0P7++gVwgbjQ0ZKCmoZc="
|
"integrity": "sha1-VWPF39b0P7++gVwgbjQ0ZKCmoZc="
|
||||||
},
|
},
|
||||||
|
"ng2-toastr": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ng2-toastr/-/ng2-toastr-4.1.2.tgz",
|
||||||
|
"integrity": "sha1-G0UvBxOZYcOPhmxuJKBiR++iGxE="
|
||||||
|
},
|
||||||
"ng2-validation": {
|
"ng2-validation": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/ng2-validation/-/ng2-validation-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/ng2-validation/-/ng2-validation-4.2.0.tgz",
|
||||||
|
|||||||
@ -179,7 +179,7 @@
|
|||||||
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<button mat-raised-button mat-button-sm color="accent" (click)="removeItem(d)" type="button">Remove</button>
|
<button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -187,9 +187,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
<hr>
|
||||||
<mat-card-actions>
|
<mat-card-actions style="text-align: right">
|
||||||
<button mat-raised-button color="primary" type="submit" [disabled]="!PDtriggerForm.valid">Submit</button>
|
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
||||||
|
|
||||||
|
<button mat-button color="primary" type="submit" [disabled]="!PDtriggerForm.valid">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { CustomValidators } from 'ng2-validation';
|
import { CustomValidators } from 'ng2-validation';
|
||||||
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
@ -11,6 +11,8 @@ import { AwsService } from '../../AwsService/aws.service';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class AddPdComponent implements OnInit {
|
export class AddPdComponent implements OnInit {
|
||||||
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
|
|
||||||
public PDtriggerForm: FormGroup;
|
public PDtriggerForm: FormGroup;
|
||||||
items: FormArray;
|
items: FormArray;
|
||||||
CityList: any;
|
CityList: any;
|
||||||
@ -276,4 +278,7 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
this._pd.addPdDetails(pd_form).subscribe();
|
this._pd.addPdDetails(pd_form).subscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
loadPdListCompoent() {
|
||||||
|
this.loadParent.emit('1')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html
Normal file
11
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<mat-card class="p-1">
|
||||||
|
|
||||||
|
<mat-card-content>
|
||||||
|
{{ childData }}
|
||||||
|
</mat-card-content>
|
||||||
|
<hr>
|
||||||
|
<mat-card-actions>
|
||||||
|
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
||||||
|
</mat-card-actions>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
25
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.spec.ts
Normal file
25
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditPdComponent } from './edit-pd.component';
|
||||||
|
|
||||||
|
describe('EditPdComponent', () => {
|
||||||
|
let component: EditPdComponent;
|
||||||
|
let fixture: ComponentFixture<EditPdComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditPdComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditPdComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
23
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts
Normal file
23
ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
|
import { ListPdComponent } from '../list-pd/list-pd.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-edit-pd',
|
||||||
|
templateUrl: './edit-pd.component.html',
|
||||||
|
styleUrls: ['./edit-pd.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
})
|
||||||
|
export class EditPdComponent implements OnInit {
|
||||||
|
@Input() childData: string;
|
||||||
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
|
constructor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
loadPdListCompoent() {
|
||||||
|
this.loadParent.emit('2')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
171
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html
Normal file
171
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<div align="right" *ngIf="showParentComponent">
|
||||||
|
<button mat-button (click)="addPdDetails()" color="primary">ADD PD</button>
|
||||||
|
</div>
|
||||||
|
<mat-card *ngIf="showParentComponent">
|
||||||
|
<mat-tab-group>
|
||||||
|
<mat-tab>
|
||||||
|
<ng-template mat-tab-label>All PD Details</ng-template>
|
||||||
|
<mat-card-content>
|
||||||
|
<div class="card-comment-widget">
|
||||||
|
<mat-list>
|
||||||
|
<mat-list-item *ngFor="let details of pdList">
|
||||||
|
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
||||||
|
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
||||||
|
|
||||||
|
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
||||||
|
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
||||||
|
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
||||||
|
|
||||||
|
<div class="comment-time">
|
||||||
|
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary" (click)="editPdDetails(details.pd_id)"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="comment-time">
|
||||||
|
|
||||||
|
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
<mat-list-item *ngFor="let details of pdList">
|
||||||
|
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
||||||
|
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
||||||
|
|
||||||
|
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
||||||
|
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
||||||
|
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
||||||
|
|
||||||
|
<div class="comment-time">
|
||||||
|
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="comment-time">
|
||||||
|
|
||||||
|
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
<mat-list-item *ngFor="let details of pdList">
|
||||||
|
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
||||||
|
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
||||||
|
|
||||||
|
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
||||||
|
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
||||||
|
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
||||||
|
|
||||||
|
<div class="comment-time">
|
||||||
|
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="comment-time">
|
||||||
|
|
||||||
|
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
<mat-list-item *ngFor="let details of pdList">
|
||||||
|
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
||||||
|
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
||||||
|
|
||||||
|
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
||||||
|
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
||||||
|
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
||||||
|
|
||||||
|
<div class="comment-time">
|
||||||
|
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="comment-time">
|
||||||
|
|
||||||
|
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
||||||
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
<mat-card-actions>
|
||||||
|
<button mat-button (click)="addTileCols()" color="primary">ADD COLSPAN (THREE)</button>
|
||||||
|
</mat-card-actions>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab>
|
||||||
|
<ng-template mat-tab-label>Confirmed PD Details</ng-template>
|
||||||
|
<mat-card-content>
|
||||||
|
<mat-grid-list cols="2" [rowHeight]="ratio" gutterSize="4px">
|
||||||
|
<mat-grid-tile *ngFor="let tile of tiles" [style.background]="'lightblue'">
|
||||||
|
{{tile.text}}
|
||||||
|
</mat-grid-tile>
|
||||||
|
</mat-grid-list>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mt-2">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Change ratio" [(ngModel)]="ratio">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab>
|
||||||
|
<ng-template mat-tab-label>In Progress PD Details</ng-template>
|
||||||
|
<mat-card-content>
|
||||||
|
<mat-grid-list cols="2" rowHeight="fit" [gutterSize]="ratioGutter"
|
||||||
|
[style.height]="fitListHeight">
|
||||||
|
<mat-grid-tile *ngFor="let tile of tiles" [style.background]="'#F1EBBA'">
|
||||||
|
{{tile.text}}
|
||||||
|
</mat-grid-tile>
|
||||||
|
</mat-grid-list>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mt-2">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Change list height" [(ngModel)]="fitListHeight">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Change gutter" type="number" [(ngModel)]="ratioGutter">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-tab>
|
||||||
|
<!-- <mat-tab>
|
||||||
|
<ng-template mat-tab-label>Headers</ng-template>
|
||||||
|
<mat-card-content class="pa-0">
|
||||||
|
<mat-grid-list cols="3" rowHeight="200px">
|
||||||
|
<mat-grid-tile *ngFor="let dog of dogs" style="background:gray">
|
||||||
|
<mat-grid-tile-header>
|
||||||
|
<mat-icon mat-grid-avatar>info_outline</mat-icon>
|
||||||
|
{{dog.name}}
|
||||||
|
</mat-grid-tile-header>
|
||||||
|
</mat-grid-tile>
|
||||||
|
</mat-grid-list>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab>
|
||||||
|
<ng-template mat-tab-label>Footers</ng-template>
|
||||||
|
<mat-card-content class="pa-0">
|
||||||
|
<mat-grid-list cols="3" rowHeight="200px">
|
||||||
|
<mat-grid-tile *ngFor="let dog of dogs">
|
||||||
|
<img [alt]="dog.name" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png">
|
||||||
|
<mat-grid-tile-footer>
|
||||||
|
<h3 mat-line>{{dog.name}}</h3>
|
||||||
|
<span mat-line>Human: {{dog.human}}</span>
|
||||||
|
<mat-icon>star_border</mat-icon>
|
||||||
|
</mat-grid-tile-footer>
|
||||||
|
</mat-grid-tile>
|
||||||
|
</mat-grid-list>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-tab> -->
|
||||||
|
</mat-tab-group>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
<app-edit-pd *ngIf="showEditComponent" [childData]="parentEditData" (loadParent)="updateParentComponent($event)"></app-edit-pd>
|
||||||
|
<app-add-pd *ngIf="showAddComponent" (loadParent)="updateParentComponent($event)"></app-add-pd>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
.ic-change:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
25
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.spec.ts
Normal file
25
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ListPdComponent } from './list-pd.component';
|
||||||
|
|
||||||
|
describe('ListPdComponent', () => {
|
||||||
|
let component: ListPdComponent;
|
||||||
|
let fixture: ComponentFixture<ListPdComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ListPdComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ListPdComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
115
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts
Normal file
115
ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
import { Component, OnInit, ViewEncapsulation, EventEmitter, Output } from '@angular/core';
|
||||||
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-list-pd',
|
||||||
|
templateUrl: './list-pd.component.html',
|
||||||
|
styleUrls: ['./list-pd.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
})
|
||||||
|
export class ListPdComponent implements OnInit {
|
||||||
|
parentEditData :string;
|
||||||
|
showParentComponent:boolean;
|
||||||
|
showAddComponent:boolean;
|
||||||
|
showEditComponent:boolean;
|
||||||
|
errorMessage: any;
|
||||||
|
pdList:any[];
|
||||||
|
tiles: any[] = [{
|
||||||
|
text: 'One',
|
||||||
|
cols: 3,
|
||||||
|
rows: 1,
|
||||||
|
color: 'lightblue'
|
||||||
|
}, {
|
||||||
|
text: 'Two',
|
||||||
|
cols: 1,
|
||||||
|
rows: 1,
|
||||||
|
color: 'lightgreen'
|
||||||
|
}, {
|
||||||
|
text: 'Three',
|
||||||
|
cols: 1,
|
||||||
|
rows: 1,
|
||||||
|
color: 'lightpink'
|
||||||
|
}, {
|
||||||
|
text: 'Four',
|
||||||
|
cols: 2,
|
||||||
|
rows: 1,
|
||||||
|
color: '#DDBDF1'
|
||||||
|
}];
|
||||||
|
|
||||||
|
dogs: Object[] = [{
|
||||||
|
name: 'Porter',
|
||||||
|
human: 'Kara'
|
||||||
|
}, {
|
||||||
|
name: 'Mal',
|
||||||
|
human: 'Jeremy'
|
||||||
|
}, {
|
||||||
|
name: 'Koby',
|
||||||
|
human: 'Igor'
|
||||||
|
}, {
|
||||||
|
name: 'Razzle',
|
||||||
|
human: 'Ward'
|
||||||
|
}, {
|
||||||
|
name: 'Molly',
|
||||||
|
human: 'Rob'
|
||||||
|
}, {
|
||||||
|
name: 'Husi',
|
||||||
|
human: 'Matias'
|
||||||
|
}];
|
||||||
|
|
||||||
|
basicRowHeight = 80;
|
||||||
|
fixedCols = 4;
|
||||||
|
fixedRowHeight = 50;
|
||||||
|
ratioGutter = 1;
|
||||||
|
fitListHeight = '400px';
|
||||||
|
ratio = '8:1';
|
||||||
|
|
||||||
|
addTileCols() {
|
||||||
|
this.tiles[2].cols++;
|
||||||
|
}
|
||||||
|
constructor(private _pd: PdTrigerService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.showParentComponent=true
|
||||||
|
this.showAddComponent=false
|
||||||
|
this.showEditComponent=false
|
||||||
|
this._pd.getPdDetails()
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdList = data.records;
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
addPdDetails(){
|
||||||
|
this.showParentComponent=false
|
||||||
|
this.showEditComponent=false
|
||||||
|
this.showAddComponent=!this.showAddComponent
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
editPdDetails(editID:string){
|
||||||
|
this.showParentComponent=false
|
||||||
|
this.showAddComponent=false
|
||||||
|
this.showEditComponent=!this.showEditComponent
|
||||||
|
this.parentEditData=editID
|
||||||
|
}
|
||||||
|
updateParentComponent(event:string) {
|
||||||
|
this.showParentComponent=!this.showParentComponent
|
||||||
|
if(event=='1'){
|
||||||
|
this.showAddComponent=!this.showAddComponent
|
||||||
|
}
|
||||||
|
else if(event=='2'){
|
||||||
|
this.showEditComponent=!this.showEditComponent
|
||||||
|
}
|
||||||
|
this._pd.getPdDetails()
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdList = data.records;
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -38,6 +38,12 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
getPdDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+"listLessPDDetails/get")
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
private handleError<T>(operation = 'operation', result?: T) {
|
private handleError<T>(operation = 'operation', result?: T) {
|
||||||
return (error: any): Observable<T> => {
|
return (error: any): Observable<T> => {
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
import { ListPdComponent } from './list-pd/list-pd.component';
|
||||||
import { AddPdComponent } from './add-pd/add-pd.component';
|
import { AddPdComponent } from './add-pd/add-pd.component';
|
||||||
|
|
||||||
export const PdTrigerRoutes: Routes = [
|
export const PdTrigerRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: AddPdComponent
|
component: ListPdComponent
|
||||||
// children:
|
// children:
|
||||||
// [{
|
// [{
|
||||||
// path: 'pdtriggerlist',
|
// path: 'pdtriggerlist',
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import {
|
|||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule, MatListModule } from '@angular/material';
|
MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule } from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
||||||
@ -22,6 +22,8 @@ import 'hammerjs';
|
|||||||
import { PdTrigerRoutes } from './pd-triger-routing.module';
|
import { PdTrigerRoutes } from './pd-triger-routing.module';
|
||||||
import { AddPdComponent } from './add-pd/add-pd.component';
|
import { AddPdComponent } from './add-pd/add-pd.component';
|
||||||
import { PdTrigerService } from './pd-service/pd-triger.service';
|
import { PdTrigerService } from './pd-service/pd-triger.service';
|
||||||
|
import { ListPdComponent } from './list-pd/list-pd.component';
|
||||||
|
import { EditPdComponent } from './edit-pd/edit-pd.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -39,14 +41,14 @@ import { PdTrigerService } from './pd-service/pd-triger.service';
|
|||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
NgxDatatableModule,
|
NgxDatatableModule,
|
||||||
FormsModule,MatSlideToggleModule,
|
FormsModule,MatSlideToggleModule,
|
||||||
MatSelectModule, MatListModule,
|
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FileUploadModule,
|
FileUploadModule,
|
||||||
TreeModule,
|
TreeModule,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
NgxMatSelectSearchModule
|
NgxMatSelectSearchModule
|
||||||
],
|
],
|
||||||
declarations: [AddPdComponent],
|
declarations: [AddPdComponent, ListPdComponent, EditPdComponent],
|
||||||
providers: [PdTrigerService]
|
providers: [PdTrigerService]
|
||||||
})
|
})
|
||||||
export class PdTrigerModule { }
|
export class PdTrigerModule { }
|
||||||
|
|||||||
@ -1,77 +1,77 @@
|
|||||||
<div style="max-height: 580px;">
|
<div style="max-height: 580px;">
|
||||||
<mat-card style="width: 580px; padding: 6px;">
|
<mat-card style="width: 580px; padding: 6px;">
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||||
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
||||||
<div style="width: 20%;"></div>
|
<div style="width: 20%;"></div>
|
||||||
<div style="width: 30%;text-align:right;">
|
<div style="width: 30%;text-align:right;">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
||||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
<!--<div class="form-group">-->
|
||||||
<!--<div class="form-group">-->
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
||||||
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
||||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
</mat-select>
|
||||||
</mat-select>
|
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
||||||
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
</mat-select>
|
||||||
</mat-select>
|
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div formArrayName="answers" class="example-full-width">
|
||||||
<div formArrayName="answers" class="example-full-width">
|
<div *ngFor="let answ of _addQuesFrom.controls.answers['controls']; let i=index">
|
||||||
<div *ngFor="let answ of _addQuesFrom.controls.answers['controls']; let i=index">
|
<div [formGroupName]="i">
|
||||||
<div [formGroupName]="i">
|
<div fxLayout="row" style="width: 100%">
|
||||||
<div fxLayout="row" style="width: 100%">
|
<div style="width: 80%">
|
||||||
<div style="width: 80%">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<!--<span>Answer {{i + 1}}</span>-->
|
||||||
<!--<span>Answer {{i + 1}}</span>-->
|
<textarea matInput placeholder="Answer" formControlName="answer"></textarea>
|
||||||
<textarea matInput placeholder="Answer" formControlName="answer"></textarea>
|
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
||||||
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div style="width:20%">
|
||||||
<div style="width:20%">
|
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
</span>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage($event); false">Add More</button>
|
||||||
|
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||||
</div>
|
</div>
|
||||||
<button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage($event); false">Add More</button>
|
|
||||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!--Error List Shown Here-->
|
||||||
<!--Error List Shown Here-->
|
<!--<ul>
|
||||||
<!--<ul>
|
<li *ngFor="let err of errorMessage">
|
||||||
<li *ngFor="let err of errorMessage">
|
<mat-error>{{err.err}}</mat-error>
|
||||||
<mat-error>{{err.err}}</mat-error>
|
</li>
|
||||||
</li>
|
</ul>-->
|
||||||
</ul>-->
|
<div class="row" style="text-align:right;">
|
||||||
<div class="row" style="text-align:right;">
|
<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" 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>
|
||||||
<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>
|
||||||
</div>
|
<!--</div>-->
|
||||||
<!--</div>-->
|
</form>
|
||||||
</form>
|
</mat-card>
|
||||||
</mat-card>
|
</div>
|
||||||
</div>
|
|
||||||
@ -1,87 +1,87 @@
|
|||||||
<div style="max-height: 480px;">
|
<div style="max-height: 480px;">
|
||||||
<mat-card style="width: 580px; padding: 6px;">
|
<mat-card style="width: 580px; padding: 6px;">
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||||
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
||||||
<div style="width: 20%;"></div>
|
<div style="width: 20%;"></div>
|
||||||
<div style="width: 30%;text-align:right;">
|
<div style="width: 30%;text-align:right;">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
||||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
<!--<div class="form-group">-->
|
||||||
<!--<div class="form-group">-->
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
||||||
<mat-select placeholder="Select Category" formControlName="fk_question_catagory">
|
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
||||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_categroy_id">{{ ct.categroy_name }}</mat-option>
|
</mat-select>
|
||||||
</mat-select>
|
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_catagory.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
||||||
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
</mat-select>
|
||||||
</mat-select>
|
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div formArrayName="answers" class="example-full-width">
|
||||||
<div formArrayName="answers" class="example-full-width">
|
<div *ngFor="let answ of f_ans.controls; let i=index">
|
||||||
<div *ngFor="let answ of f_ans.controls; let i=index">
|
<div [formGroupName]="i">
|
||||||
<div [formGroupName]="i">
|
<div fxLayout="row" style="width: 100%">
|
||||||
<div fxLayout="row" style="width: 100%">
|
<div style="width: 80%">
|
||||||
<div style="width: 80%">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<!--<span>Answer {{i + 1}} </span>-->
|
||||||
<!--<span>Answer {{i + 1}} </span>-->
|
<textarea matInput placeholder="Answer" formControlName="answer"></textarea>
|
||||||
<textarea matInput placeholder="Answer" formControlName="answer"></textarea>
|
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
||||||
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
|
</mat-form-field>
|
||||||
</mat-form-field>
|
</div>
|
||||||
</div>
|
<div style="width:20%">
|
||||||
<div style="width:20%">
|
<mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null"
|
||||||
<mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null"
|
(ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
||||||
(ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
<button *ngIf="answ.get('question_answer_id').value == null" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
<button *ngIf="answ.get('question_answer_id').value == null" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
</span>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button>
|
||||||
|
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||||
</div>
|
</div>
|
||||||
<button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button>
|
|
||||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value == 1 ? true : f.isactive.value == 0 ? false : null"
|
||||||
<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value == 1 ? true : f.isactive.value == 0 ? false : null"
|
(ngModelChange)="_addQuesFrom.controls['isactive'].setValue($event ? 1 : 0)">Active/InActive</mat-checkbox>
|
||||||
(ngModelChange)="_addQuesFrom.controls['isactive'].setValue($event ? 1 : 0)">Active/InActive</mat-checkbox>
|
</div>
|
||||||
</div>
|
<!--Error List Shown Here-->
|
||||||
<!--Error List Shown Here-->
|
<!--<ul>
|
||||||
<!--<ul>
|
<li *ngFor="let err of errorMessage">
|
||||||
<li *ngFor="let err of errorMessage">
|
<mat-error>{{err.err}}</mat-error>
|
||||||
<mat-error>{{err.err}}</mat-error>
|
</li>
|
||||||
</li>
|
</ul>-->
|
||||||
</ul>-->
|
<div class="row" style="text-align:right;">
|
||||||
<div class="row" 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>
|
<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>
|
||||||
<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>
|
||||||
</div>
|
<!--</div>-->
|
||||||
<!--</div>-->
|
</form>
|
||||||
</form>
|
</mat-card>
|
||||||
</mat-card>
|
</div>
|
||||||
</div>
|
|
||||||
|
<notifier-container></notifier-container>
|
||||||
<notifier-container></notifier-container>
|
|
||||||
@ -1,119 +1,119 @@
|
|||||||
<div>
|
<div>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card class="mat-elevation-z1">
|
<mat-card class="mat-elevation-z1">
|
||||||
<div style="margin: 6px; padding: 4px;">
|
<div style="margin: 6px; padding: 4px;">
|
||||||
<div class="p_title" style="font-size: 16px; font-style: bold;">Questions Master</div>
|
<div class="p_title" style="font-size: 16px; font-style: bold;">Questions Master</div>
|
||||||
<div class="sub_title" style="font-size: 11px;">List of Questions</div>
|
<div class="sub_title" style="font-size: 11px;">List of Questions</div>
|
||||||
</div>
|
|
||||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none">
|
|
||||||
<div fxFlex="80%">
|
|
||||||
<form [formGroup]="filterFormGroupCtrl">
|
|
||||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;">
|
|
||||||
|
|
||||||
<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_categroy_id" (click)="getQuestionsMasters()">
|
|
||||||
{{cat.categroy_name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="20%">
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none">
|
||||||
<button mat-stroked-button color="primary" (click)="addNewQuestion()">Add Questions</button>
|
<div fxFlex="80%">
|
||||||
|
<form [formGroup]="filterFormGroupCtrl">
|
||||||
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;">
|
||||||
|
|
||||||
|
<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_categroy_id" (click)="getQuestionsMasters()">
|
||||||
|
{{cat.categroy_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="20%">
|
||||||
|
<button mat-stroked-button color="primary" (click)="addNewQuestion()">Add Questions</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!--</mat-card-content>-->
|
||||||
<!--</mat-card-content>-->
|
</mat-card>
|
||||||
</mat-card>
|
|
||||||
|
<ng-container *ngIf="productList.length > 0">
|
||||||
<ng-container *ngIf="productList.length > 0">
|
<div style="padding: 0 12px;">
|
||||||
<div style="padding: 0 12px;">
|
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
|
||||||
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
|
<div fxLayout="row" fxLayoutAlign="start start" style="padding: 6px 2px;">
|
||||||
<div fxLayout="row" fxLayoutAlign="start start" style="padding: 6px 2px;">
|
|
||||||
|
<div fxFlex="90%" style="padding: 12px 8px;">
|
||||||
<div fxFlex="90%" style="padding: 12px 8px;">
|
<!--<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start none">
|
||||||
<!--<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="start none">
|
<div class="category-label"> {{ product.categroy_name }}</div>
|
||||||
<div class="category-label"> {{ product.categroy_name }}</div>
|
</div>-->
|
||||||
</div>-->
|
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
|
||||||
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="none none">
|
<div class="ml-xs" fxFlex="20%">
|
||||||
<div class="ml-xs" fxFlex="20%">
|
{{ product.categroy_name }}
|
||||||
{{ product.categroy_name }}
|
</div>
|
||||||
</div>
|
<div class="ml-xs" fxFlex="80%">
|
||||||
<div class="ml-xs" fxFlex="80%">
|
<div class="text-line-limit">{{ product.question }}
|
||||||
<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="Close" 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="Close" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
|
<!--<button mat-icon-button [matMenuTriggerFor]="menu">
|
||||||
<!--<button mat-icon-button [matMenuTriggerFor]="menu">
|
<mat-icon>more_vert</mat-icon>
|
||||||
<mat-icon>more_vert</mat-icon>
|
|
||||||
</button>
|
|
||||||
<mat-menu #menu="matMenu">
|
|
||||||
<button mat-menu-item (click)="editQuestion(product)">
|
|
||||||
<mat-icon>create</mat-icon>
|
|
||||||
<span>Edit</span>
|
|
||||||
</button>
|
</button>
|
||||||
</mat-menu>-->
|
<mat-menu #menu="matMenu">
|
||||||
|
<button mat-menu-item (click)="editQuestion(product)">
|
||||||
|
<mat-icon>create</mat-icon>
|
||||||
|
<span>Edit</span>
|
||||||
|
</button>
|
||||||
|
</mat-menu>-->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!--<mat-card-header>
|
||||||
<!--<mat-card-header>
|
<mat-card-title>
|
||||||
<mat-card-title>
|
<h4>{{ product.question }}</h4>
|
||||||
<h4>{{ product.question }}</h4>
|
</mat-card-title>
|
||||||
</mat-card-title>
|
</mat-card-header>
|
||||||
</mat-card-header>
|
<img mat-card-image [src]="product.img_url" [alt]="product.title" [title]="product.title">
|
||||||
<img mat-card-image [src]="product.img_url" [alt]="product.title" [title]="product.title">
|
<mat-card-content>
|
||||||
<mat-card-content>
|
<p>{{ product.description }}</p>
|
||||||
<p>{{ product.description }}</p>
|
</mat-card-content>
|
||||||
</mat-card-content>
|
<mat-card-actions>
|
||||||
<mat-card-actions>
|
<button mat-raised-button color="accent" (click)="addItemToCard(product)">Add to card</button>
|
||||||
<button mat-raised-button color="accent" (click)="addItemToCard(product)">Add to card</button>
|
</mat-card-actions>-->
|
||||||
</mat-card-actions>-->
|
</mat-card>
|
||||||
</mat-card>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<mat-card *ngIf="noQuesMasterRecrdFound">
|
||||||
|
<div class="no-record-found">No Record Found ... </div>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
<mat-paginator #paginator class="mat-elevation-z1" [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
|
[pageSizeOptions]="[5, 10, 25, 100]" (page)="pageEvent = $event; pageChange($event)">
|
||||||
|
</mat-paginator>
|
||||||
|
<!--<mat-card>
|
||||||
|
<div class="example-container mat-elevation-z8">
|
||||||
|
<mat-table [dataSource]="dataSource" matSort>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="categroy_name">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Category </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"> {{row.categroy_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">
|
|
||||||
<div class="no-record-found">No Record Found ... </div>
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
</div>
|
||||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<!--<div *ngIf="addView">
|
||||||
[pageSizeOptions]="[5, 10, 25, 100]" (page)="pageEvent = $event; pageChange($event)">
|
<app-add></app-add>
|
||||||
</mat-paginator>
|
</div>-->
|
||||||
<!--<mat-card>
|
|
||||||
<div class="example-container mat-elevation-z8">
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="categroy_name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Category </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.categroy_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>
|
|
||||||
</div>
|
|
||||||
<!--<div *ngIf="addView">
|
|
||||||
<app-add></app-add>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
|
||||||
Loading…
Reference in New Issue
Block a user