pd team master new menu creation : ps
This commit is contained in:
parent
afbf9fbb9b
commit
2ab01dcbed
@ -0,0 +1,13 @@
|
||||
import { CompanyDetailsModule } from './company-details.module';
|
||||
|
||||
describe('CompanyDetailsModule', () => {
|
||||
let companyDetailsModule: CompanyDetailsModule;
|
||||
|
||||
beforeEach(() => {
|
||||
companyDetailsModule = new CompanyDetailsModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(companyDetailsModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: []
|
||||
})
|
||||
export class CompanyDetailsModule { }
|
||||
12
ng6-seed/src/app/settings/company-details/company-details.routing.ts
Executable file
12
ng6-seed/src/app/settings/company-details/company-details.routing.ts
Executable file
@ -0,0 +1,12 @@
|
||||
import { Routes } from '@angular/router';
|
||||
//import { MastersComponent } from './masters.component';
|
||||
|
||||
|
||||
export const CompanyDetailsRoutes: Routes = [
|
||||
{
|
||||
|
||||
//path: '',
|
||||
//component: PdTeamListComponent
|
||||
//component: IndustryMasterListComponent
|
||||
|
||||
}];
|
||||
@ -1,79 +1,80 @@
|
||||
<mat-card-content>
|
||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<!-- <div class="filter-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}}</mat-cell>
|
||||
</ng-container>
|
||||
<mat-table [dataSource]="dataSource" *ngIf="!noRecordFound" matSort>
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="city_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="city_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.city_name}} </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 [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCity(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
||||
</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 [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCity(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle></ng-template>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
</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, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<br>-->
|
||||
<mat-card-content>
|
||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<!-- <div class="filter-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
@ -77,11 +77,12 @@
|
||||
</div> -->
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
|
||||
<!-- <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button> -->
|
||||
@ -91,7 +92,7 @@
|
||||
|
||||
|
||||
|
||||
<mat-table [dataSource]="dataSource" matSort>
|
||||
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
@ -160,11 +161,11 @@
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -63,18 +63,19 @@
|
||||
|
||||
<br>-->
|
||||
|
||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<!-- <div class="filter-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
|
||||
|
||||
@ -85,7 +86,7 @@
|
||||
|
||||
|
||||
|
||||
<mat-table [dataSource]="dataSource" matSort >
|
||||
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
@ -139,9 +140,8 @@
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||
<mat-cell *matCellDef="let row;"> {{row.serialno}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="pdnotification_id">
|
||||
|
||||
@ -128,12 +128,12 @@ export class PdNotificationListComponent implements OnInit {
|
||||
});
|
||||
//console.log(this.notificationData);
|
||||
this.dataLength = data.records.length;
|
||||
// if(data.records.length >= 1){
|
||||
// this.notificationData = this.notificationData.map((val, i)=>{
|
||||
// val['serialno'] = i + 1;
|
||||
// return val;
|
||||
// })
|
||||
// }
|
||||
if(data.records.length >= 1){
|
||||
this.notificationData = this.notificationData.map((val, i)=>{
|
||||
val['serialno'] = i + 1;
|
||||
return val;
|
||||
})
|
||||
}
|
||||
this.dataSource.data = this.notificationData;
|
||||
}else{
|
||||
this.noRecordFound = true;
|
||||
@ -193,7 +193,7 @@ SaveData(dataSource){
|
||||
dataresult => {
|
||||
if(dataresult.dataStatus == true){
|
||||
//alert('Updated Successfully !');
|
||||
this.getPdNotification();
|
||||
//this.getPdNotification();
|
||||
this.notifier.notify('success', 'Record Updated Successfully.!');
|
||||
|
||||
}else{
|
||||
|
||||
@ -1,149 +0,0 @@
|
||||
|
||||
<!-- <div style="text-align: right;">
|
||||
<!- <button mat-stroked-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button> ->
|
||||
|
||||
</div> -->
|
||||
<mat-card-content>
|
||||
<!-- <div *ngIf="loader">
|
||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||
</div> <br> -->
|
||||
|
||||
<!-- <div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"> -->
|
||||
<!-- <div class="example-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
<!-- <mat-table [dataSource]="dataSource" matSort > -->
|
||||
|
||||
<!-- <ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- <ng-container matColumnDef="team_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- <ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle></ng-template>
|
||||
</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)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
|
||||
</mat-cell>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- <mat-header-row *matHeaderRo wDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table> -->
|
||||
|
||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
<!-- <button mat-raised-button color="primary" (click)="ExportTOExcel()">Export as Excel</button> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||
<!-- <div class="filter-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<mat-table [dataSource]="dataSource" matSort >
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="team_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
||||
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
|
||||
</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 [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(row)"><mat-icon>edit</mat-icon></button> -->
|
||||
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
|
||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteMemberOccupation(row.occupation_non_earning_member_id)"><mat-icon>delete_outline</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, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -1,156 +0,0 @@
|
||||
import { Component,
|
||||
OnInit,
|
||||
ViewChild } from '@angular/core';
|
||||
|
||||
import { MatDialog,
|
||||
MatDialogRef,
|
||||
MatDialogConfig,
|
||||
MatPaginator,
|
||||
MatSort,
|
||||
MatTableDataSource } from '@angular/material';
|
||||
/** Service */
|
||||
import { MastersService } from '../../../../service/masters/masters.service';
|
||||
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
/** Dialog Component */
|
||||
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-pd-team-list',
|
||||
templateUrl: './pd-team-list.component.html',
|
||||
styleUrls: ['./pd-team-list.component.scss']
|
||||
})
|
||||
export class PdTeamListComponent implements OnInit {
|
||||
|
||||
//Variable Declaration part
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
PdTeamList: any = [];
|
||||
color = 'primary';
|
||||
userData = null;
|
||||
noRecordFound: boolean = false;
|
||||
private notifier: NotifierService;
|
||||
|
||||
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
displayedColumns = ['serialno','team_name','actions', 'isactive'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
constructor(private dialog: MatDialog, notifier: NotifierService,
|
||||
private _MasterService: MastersService,
|
||||
private _PdTeamService: PdTeamService) {
|
||||
this.getPdTeam();
|
||||
this.notifier = notifier;
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
//To open dialog for add the data
|
||||
addPdTeam() {
|
||||
this.isPopupOpened = true;
|
||||
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
|
||||
data: {}
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
this.getPdTeam();
|
||||
this.isPopupOpened = false;
|
||||
});
|
||||
}
|
||||
|
||||
//To open dialog for edit the data
|
||||
editPdTeam(arr: any[]) {
|
||||
// let a:any;
|
||||
// if(arr.length !=0){
|
||||
// a = arr;
|
||||
// }else{
|
||||
// a ='';
|
||||
// }
|
||||
// console.log(a);
|
||||
this.isPopupOpened = true;
|
||||
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
|
||||
|
||||
data: arr
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
this.getPdTeam();
|
||||
this.isPopupOpened = false;
|
||||
});
|
||||
}
|
||||
|
||||
//To get data for listing
|
||||
getPdTeam() {
|
||||
|
||||
//this.loader = true;
|
||||
this._PdTeamService.getAllPdTeamList().subscribe(
|
||||
//this._MasterService.getAllMasterData('PDTEAM').subscribe(
|
||||
data => {
|
||||
if(data.dataStatus == true){
|
||||
//this.loader = false;
|
||||
this.noRecordFound = false;
|
||||
this.userData = data.records;
|
||||
this.dataLength = data.records.length;
|
||||
if(data.records.length >= 1){
|
||||
this.userData = this.userData.map((val, i)=>{
|
||||
val['serialno'] = i + 1;
|
||||
return val;
|
||||
})
|
||||
}
|
||||
this.dataSource.data = this.userData;
|
||||
}else{
|
||||
this.noRecordFound = true;
|
||||
this.dataLength = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//To inactive the data
|
||||
deletePdTeam(id: number) {
|
||||
var PrimaryKeyWithValue ={'pdteam_id':id};
|
||||
this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'PDTEAM')
|
||||
.subscribe( data => { });
|
||||
this.getPdTeam();
|
||||
|
||||
}
|
||||
|
||||
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
||||
isactivePdTeam(id: number,isactive : number) {
|
||||
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'pdteam_id':id,'isactive': '1'}
|
||||
: { 'pdteam_id':id,'isactive': '0'}
|
||||
|
||||
this._MasterService.editMasterDetails(ActiveDatas,'PDTEAM')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getPdTeam();
|
||||
}
|
||||
else{
|
||||
//alert("SomeThing Wents Wrong Try Again !");
|
||||
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
/** For Display Tables Filtering */
|
||||
applyFilter(filterValue: string) {
|
||||
filterValue = filterValue.trim(); // Remove whitespace
|
||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||
this.dataSource.filter = filterValue;
|
||||
}
|
||||
|
||||
}
|
||||
/** End of ListComponent */
|
||||
@ -1,94 +1,18 @@
|
||||
<!-- <div style="text-align: right;">
|
||||
<!- <button mat-stroked-button [color]="color" (click)="addUOM()" > + Add UOM</button> ->
|
||||
<button mat-fab class="mr-1 mb-1" [color]="color" (click)="addUOM()" matTooltip="Add UOM" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div> -->
|
||||
<mat-card-content>
|
||||
|
||||
<!-- <div *ngIf="loader">
|
||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||
</div>
|
||||
<br> -->
|
||||
|
||||
<!-- <div datatable>
|
||||
<table style="border-collapse: collapse">
|
||||
<thead>
|
||||
<th style="text-align: center;">#</th>
|
||||
<th style="text-align: center;">UOM</th>
|
||||
<th style="text-align: center;">IsActive</th>
|
||||
<th style="text-align: center;">Action</th>
|
||||
</thead>
|
||||
|
||||
<tr *ngIf="UOMList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
|
||||
<tr *ngFor="let UL of UOMList; let i=index">
|
||||
<td style="text-align: center;">{{i+1}}</td>
|
||||
<td style="text-align: center;">{{UL.name}}</td>
|
||||
<td style="text-align: center;">{{UL.isactive}}</td>
|
||||
<td style="text-align: center;">
|
||||
<a (click)="editUOM(UL)"><mat-icon>edit</mat-icon></a>
|
||||
<a (click)="deleteUOM(UL.uom_id)"><mat-icon>delete_outline</mat-icon></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<!--displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];->
|
||||
|
||||
<div>
|
||||
<!-- <mat-table [dataSource]="dataSource"> ->
|
||||
<mat-table [dataSource]="dataSource" matSort>
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.name}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="uom_id">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.uom_id}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="createdon">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> createdon </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.createdon}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fk_createdby">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> createdby </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.fk_createdby}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="updatedon">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> updated on </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.updatedon}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fk_updatedby">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> updatedby </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.fk_updatedby}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> isactive </mat-header-cell>
|
||||
<mat-cell *matCellDef="let user"> {{user.isactive}} </mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef></mat-header-cell>
|
||||
<mat-cell *matCellDef="let user">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editUOM(user)"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteUOM(user.uom_id)"><mat-icon>delete_outline</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>
|
||||
</div>-->
|
||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||
<mat-card-content>
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<!-- <div class="filter-header">
|
||||
<mat-form-field>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addUOM()" matTooltip="Add UOM" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
@ -97,7 +21,7 @@
|
||||
|
||||
|
||||
|
||||
<mat-table [dataSource]="dataSource" matSort >
|
||||
<mat-table [dataSource]="dataSource" *ngIf="!noRecordFound" matSort >
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
@ -146,9 +70,9 @@
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -93,7 +93,7 @@
|
||||
<!-- <app-pd-office-lender-list></app-pd-office-lender-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='master-26'">-->
|
||||
<app-pd-team-list></app-pd-team-list>
|
||||
<!-- <app-pd-team-list></app-pd-team-list> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ import { PdLocationApproachListComponent } from './component/pd-location-approac
|
||||
import { PdTypeListComponent } from './component/pd-type/pd-type-list/pd-type-list.component';
|
||||
import { LenderHierarchyListComponent } from './component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component';
|
||||
import { QuestionCategoryListComponent } from './component/question-category/question-category-list/question-category-list.component';
|
||||
import { PdTeamDialogComponent } from './component/pd-team/pd-team-dialog/pd-team-dialog.component';
|
||||
//import { PdTeamDialogComponent } from './component/pd-team/pd-team-dialog/pd-team-dialog.component';
|
||||
|
||||
|
||||
/** Master Child Component - For Dialogboxes*/
|
||||
@ -82,7 +82,7 @@ import { CityDialogComponent } from './component/city/city-dialog/city-dialog.co
|
||||
import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component';
|
||||
import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component';
|
||||
import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list.component';
|
||||
import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
||||
//import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
||||
|
||||
|
||||
/** Master Routes */
|
||||
@ -208,8 +208,6 @@ const customNotifierOptions: NotifierOptions = {
|
||||
CompanyDialogComponent,
|
||||
CityDialogComponent,
|
||||
RegionsDialogComponent,
|
||||
PdTeamDialogComponent,
|
||||
PdTeamListComponent,
|
||||
QuestionCategoryDialogComponent,
|
||||
QuestionCategoryListComponent
|
||||
],
|
||||
@ -238,7 +236,6 @@ const customNotifierOptions: NotifierOptions = {
|
||||
CompanyDialogComponent,
|
||||
CityDialogComponent,
|
||||
RegionsDialogComponent,
|
||||
PdTeamDialogComponent,
|
||||
QuestionCategoryDialogComponent
|
||||
],
|
||||
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
<div style="max-height: 580px;">
|
||||
<form [formGroup]="_pdTeamForm" (submit)="onSubmit()">
|
||||
<mat-card style="padding: 6px;">
|
||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||
<h2 mat-dialog-title style="width: 50%;">PD TEAM</h2>
|
||||
<div style="width: 20%;"></div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6>Team Details</h6><hr><br>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<input matInput type="text" placeholder="Team Name" required formControlName="team_name">
|
||||
<mat-error *ngIf="submitted && f.team_name.hasError('required')" class="mat-text-warn">You must Include Team Name.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<mat-select placeholder="Lender" required formControlName="fk_lender">
|
||||
<mat-option *ngFor="let ld of lenderdatas" [value]="ld.entity_id" >{{ ld.short_name }} {{ ld.full_name }} </mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_lender.hasError('required')" class="mat-text-warn">You must Select Lender Name.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<h6>Cities Coverd</h6><hr><br>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<mat-select placeholder="City" required formControlName="fk_city" multiple>
|
||||
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id" (onSelectionChange)="toggleAllSelection($event)" >{{ cd.name }} </mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- //
|
||||
<ul *ngIf="!empty(PDTeamMapping)" *ngFor="let data of myData">
|
||||
<li>{{data.id}}</li>
|
||||
</ul>-->
|
||||
|
||||
</div>
|
||||
|
||||
<h6>Products</h6><hr><br>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<mat-select placeholder="Product" required formControlName="fk_product" multiple>
|
||||
<mat-option *ngFor="let pd of productdatas " [value]="pd.product_id" >{{ pd.name }} </mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<h6>Customers Segment</h6><hr><br>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
|
||||
<mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple>
|
||||
<mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd.customer_segment_id">{{csd.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<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="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-card>
|
||||
</form>
|
||||
</div>
|
||||
<notifier-container></notifier-container>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PdTeamAddComponent } from './pd-team-add.component';
|
||||
|
||||
describe('PdTeamAddComponent', () => {
|
||||
let component: PdTeamAddComponent;
|
||||
let fixture: ComponentFixture<PdTeamAddComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PdTeamAddComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PdTeamAddComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,147 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { FormBuilder,
|
||||
FormGroup,
|
||||
Validators,
|
||||
FormControl } from '@angular/forms';
|
||||
import { MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA } from '@angular/material';
|
||||
/** Service */
|
||||
import { MastersService } from '../../service/masters/masters.service';
|
||||
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pd-team-add',
|
||||
templateUrl: './pd-team-add.component.html',
|
||||
styleUrls: ['./pd-team-add.component.scss']
|
||||
})
|
||||
export class PdTeamAddComponent implements OnInit {
|
||||
|
||||
public _pdTeamForm: FormGroup;
|
||||
public submitted = false;
|
||||
|
||||
citydatas: any[];
|
||||
lenderdatas: any[];
|
||||
productdatas: any[];
|
||||
customerSegmentdatas: any[];
|
||||
|
||||
pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
|
||||
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
|
||||
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
|
||||
|
||||
color = 'primary';
|
||||
errorMessage:string;
|
||||
|
||||
constructor(private _formBuilder: FormBuilder,
|
||||
private _notifier: NotifierService,
|
||||
private _pdTeamService: PdTeamService,
|
||||
private _router: Router,
|
||||
private _masterService: MastersService)
|
||||
{
|
||||
this._notifier = _notifier;
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.PdTeamFormDatas();
|
||||
|
||||
/** To Display The City Data For City DropDown */
|
||||
this._masterService.getAllMasterData('CITY').subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.citydatas = dataresult.records;
|
||||
this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
|
||||
}
|
||||
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
/** To Display The Entities Data For Entities DropDown */
|
||||
this._masterService.getAllMasterData('ENTITY').subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.lenderdatas = dataresult.records;
|
||||
this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
/** To Display The Entities Data For Entities DropDown */
|
||||
this._masterService.getAllMasterData('PRODUCTS').subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.productdatas = dataresult.records;
|
||||
this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
/** To Display The Entities Data For Entities DropDown */
|
||||
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
this.customerSegmentdatas = dataresult.records;
|
||||
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
|
||||
/** Pd Team Form Datas */
|
||||
PdTeamFormDatas(){
|
||||
this._pdTeamForm = this._formBuilder.group({
|
||||
pdteam_id: [null, Validators.compose([Validators.required])],
|
||||
team_name: [null, Validators.compose([Validators.required])],
|
||||
fk_lender: [null, Validators.compose([Validators.required])],
|
||||
fk_city: [null, Validators.compose([Validators.required])],
|
||||
fk_customer_segment: [null, Validators.compose([Validators.required])],
|
||||
fk_product:[null, Validators.compose([Validators.required])],
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/** convenience getter for easy access to form fields */
|
||||
get f() { return this._pdTeamForm.controls; }
|
||||
|
||||
/** For Popup Close Button */
|
||||
onNoClick(): void {
|
||||
this._router.navigate(['/setting/pdteam/pdteamlist']);
|
||||
}
|
||||
|
||||
/** To Save/Edited Popup Data */
|
||||
onSubmit() {
|
||||
this.submitted = true;
|
||||
alert("onsubmit function");
|
||||
console.log(this._pdTeamForm.value);
|
||||
|
||||
var pdTeamFormValues = this._pdTeamForm.value;
|
||||
|
||||
Object.keys(pdTeamFormValues).forEach(
|
||||
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
|
||||
|
||||
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
|
||||
dataresult=>{
|
||||
|
||||
if(dataresult.dataStatus == true){
|
||||
alert('Saved');
|
||||
}
|
||||
else{
|
||||
alert('Not Saved');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/** To Reset Popup Data For Add*/
|
||||
|
||||
onResetForAdd(){
|
||||
alert("reset function");
|
||||
}
|
||||
toggleAllSelection($event){
|
||||
console.log($event);
|
||||
let srcarray = $event['source']
|
||||
console.log(srcarray._mostRecentViewValue);
|
||||
}
|
||||
}
|
||||
/** End Of Pd Dialog Component */
|
||||
@ -36,14 +36,13 @@
|
||||
<mat-error *ngIf="!_pdTeamForm.controls['fk_city_id'].valid && _pdTeamForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pick Up the City Name.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div datatable class="row-border hover ml-xs mr-xs">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>S.no</th>
|
||||
<th style="text-align: center;">S.no</th>
|
||||
<th style="text-align: left;">Lender Name</th>
|
||||
<th style="text-align: left;">City Name</th>
|
||||
<th>Action</th>
|
||||
<th style="text-align: right;">Action</th>
|
||||
</thead>
|
||||
<tr *ngFor="let PD of PDTeamMapping; let i=index">
|
||||
|
||||
@ -53,26 +52,22 @@
|
||||
<td style="text-align: right;">
|
||||
<button mat-icon-button class="hover-icon" matTooltip="RemoveData" matTooltipPosition="above" type="button" (click)="deletePdTeamMap(PD,i)"><mat-icon>delete</mat-icon></button>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr *ngFor="let PM of tempArray; let i=index">
|
||||
<tr *ngFor="let PM of tempArray; let i=index">
|
||||
|
||||
<td style="text-align: center;" >{{i+PDTeamMaplen+1}}</td>
|
||||
|
||||
<td style="text-align: left;">{{PM.lenderid.full_name}}</td>
|
||||
<td style="text-align: left;">{{PM.cityid.name}}</td>
|
||||
<td style="text-align: right;">
|
||||
<button mat-icon-button matTooltip="RemoveData" matTooltipPosition="above" (click)="removevalue(i)"><mat-icon>delete</mat-icon></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<hr><br>
|
||||
|
||||
<div class="row" style="text-align:right;">
|
||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" [color]='color' matTooltip="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||
@ -87,4 +82,5 @@
|
||||
|
||||
</mat-dialog-content>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
@ -9,8 +9,8 @@ import { MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA } from '@angular/material';
|
||||
/** Service */
|
||||
import { MastersService } from '../../../../service/masters/masters.service';
|
||||
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
||||
import { MastersService } from '../../service/masters/masters.service';
|
||||
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
@Component({
|
||||
@ -115,10 +115,13 @@ isactivePDTeamChild(id: number,isactive : number) {
|
||||
this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
alert("Successfully InActive !");
|
||||
//alert("Successfully InActive !");
|
||||
this.notifier.notify('success', 'Record Successfully InActive.!');
|
||||
}
|
||||
else{
|
||||
alert("SomeThing Wents Wrong Try Again !");
|
||||
|
||||
//alert("SomeThing Wents Wrong Try Again !");
|
||||
this.notifier.notify('warning', 'Sorry Try Again !');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -171,7 +174,8 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
||||
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||
{
|
||||
check++;
|
||||
alert('Already Exists');
|
||||
//alert('');
|
||||
this.notifier.notify('info', 'Already Exists.!');
|
||||
}
|
||||
});
|
||||
|
||||
@ -183,7 +187,9 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
||||
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||
{
|
||||
check++;
|
||||
alert('Already Exists on Other Team "'+item.team_name+'"');
|
||||
//this.notifier.notify('success', 'Already Exists.!');
|
||||
//alert('Already Exists on Other Team "'+item.team_name+'"');
|
||||
this.notifier.notify( 'info', 'Already Exists on Other Team'+item.team_name );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -198,7 +204,9 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
||||
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||
{
|
||||
check++;
|
||||
alert('Already Exists');
|
||||
//alert('Already Exists');
|
||||
this.notifier.notify( 'info', 'Already Exists');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -256,6 +264,7 @@ if(isNaN(this.data.pdteam_id)) {
|
||||
//console.log(pdTeamFormValues);
|
||||
//To Remove The "Null" With Key
|
||||
Object.keys(pdTeamFormValues).forEach(
|
||||
//getAllPdTeam();
|
||||
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] &&
|
||||
delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
|
||||
|
||||
@ -272,10 +281,11 @@ if (dataresult.dataStatus == true){
|
||||
this.dialogRef.close();
|
||||
//Need To Dispaly saving Datas
|
||||
// alert("Data Saved Successfully");
|
||||
this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||
this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||
}
|
||||
else{
|
||||
alert("SomeThing Wents Wrong Try Again !");
|
||||
//alert("");
|
||||
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||
}
|
||||
|
||||
});
|
||||
@ -0,0 +1,3 @@
|
||||
<p>
|
||||
pd-team-edit works!
|
||||
</p>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PdTeamEditComponent } from './pd-team-edit.component';
|
||||
|
||||
describe('PdTeamEditComponent', () => {
|
||||
let component: PdTeamEditComponent;
|
||||
let fixture: ComponentFixture<PdTeamEditComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PdTeamEditComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PdTeamEditComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pd-team-edit',
|
||||
templateUrl: './pd-team-edit.component.html',
|
||||
styleUrls: ['./pd-team-edit.component.scss']
|
||||
})
|
||||
export class PdTeamEditComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
<mat-card>
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
|
||||
<div class="ml-xs mr-xs" style="width: 30%;">
|
||||
<mat-card-title><span> PD Team Masters</span></mat-card-title>
|
||||
</div>
|
||||
</div>
|
||||
<mat-card-content>
|
||||
<!-- <div *ngIf="loader">
|
||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||
</div> <br> -->
|
||||
|
||||
<div class="filter-container mat-elevation-z8">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||
|
||||
<ng-container matColumnDef="serialno">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="team_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="lender_name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.lender_name}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||
onclick="return confirm('Are you sure?')">
|
||||
</mat-slide-toggle></ng-template>
|
||||
|
||||
</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 [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(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 *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||
|
||||
</mat-card-content>
|
||||
<notifier-container></notifier-container>
|
||||
@ -1,35 +1,7 @@
|
||||
|
||||
// .example-container {
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// min-width: 300px;
|
||||
// }
|
||||
|
||||
// .example-header {
|
||||
// min-height: 64px;
|
||||
// padding: 8px 24px 0;
|
||||
// }
|
||||
|
||||
// .mat-form-field {
|
||||
// font-size: 14px;
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
// .mat-table {
|
||||
// overflow: auto;
|
||||
// max-height: 500px;
|
||||
// }
|
||||
|
||||
// .nocontent {
|
||||
// color: red;
|
||||
// font-size: 16px;
|
||||
// text-align: center;
|
||||
// }
|
||||
|
||||
// .example-margin {
|
||||
// margin: 10px;
|
||||
// }
|
||||
|
||||
/** Card title */
|
||||
.mat-card-title{
|
||||
font-size: 25px !important;
|
||||
}
|
||||
|
||||
/** Table SerialNo CSS */
|
||||
.example-margin {
|
||||
@ -0,0 +1,104 @@
|
||||
import { Component,
|
||||
OnInit,
|
||||
ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MatSort,
|
||||
MatPaginator,
|
||||
MatTableDataSource } from '@angular/material';
|
||||
/** Service */
|
||||
import { MastersService } from '../../service/masters/masters.service';
|
||||
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
|
||||
/** Dialog Component */
|
||||
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||
/** Add Component */
|
||||
//import { } from '../pd-team-add/pd-team-add.component;
|
||||
/** Edit Component */
|
||||
//import { } from '../pd-team-add/pd-team-add.component;
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-pd-team-list',
|
||||
templateUrl: './pd-team-list.component.html',
|
||||
styleUrls: ['./pd-team-list.component.scss']
|
||||
})
|
||||
export class PdTeamListComponent implements OnInit {
|
||||
|
||||
//Variable Declaration part
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
PdTeamList: any = [];
|
||||
color = 'primary';
|
||||
userData = null;
|
||||
noRecordFound: boolean = false;
|
||||
private notifier: NotifierService;
|
||||
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
displayedColumns = ['serialno','team_name','lender_name','actions','isactive'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private router: Router,
|
||||
private _MasterService: MastersService,
|
||||
private _PdTeamService: PdTeamService) {
|
||||
this.getPdTeam();
|
||||
this.notifier = notifier;
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
/** To add data */
|
||||
addPdTeam() {
|
||||
this.router.navigate(['/setting/pdteam/addpdteam']);
|
||||
}
|
||||
|
||||
/** To edit data */
|
||||
editPdTeam() {
|
||||
this.router.navigate(['/setting/pdteam/editpdteam']);
|
||||
}
|
||||
|
||||
/** To get data for listing */
|
||||
getPdTeam() {
|
||||
|
||||
this._PdTeamService.getAllPdTeam().subscribe(
|
||||
data => {
|
||||
//console.log('data',data);
|
||||
if(data.dataStatus == true){
|
||||
|
||||
this.noRecordFound = false;
|
||||
this.userData = data.records;
|
||||
this.dataLength = data.records.length;
|
||||
if(data.records.length >= 1){
|
||||
this.userData = this.userData.map((val, i)=>{
|
||||
val['serialno'] = i + 1;
|
||||
return val;
|
||||
})
|
||||
}
|
||||
this.dataSource.data = this.userData;
|
||||
}else{
|
||||
this.noRecordFound = true;
|
||||
this.dataLength = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
/** For Display Tables Filtering */
|
||||
applyFilter(filterValue: string) {
|
||||
filterValue = filterValue.trim(); // Remove whitespace
|
||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||
this.dataSource.filter = filterValue;
|
||||
}
|
||||
|
||||
}
|
||||
/** End of ListComponent */
|
||||
13
ng6-seed/src/app/settings/pd-team/pd-team.module.spec.ts
Normal file
13
ng6-seed/src/app/settings/pd-team/pd-team.module.spec.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { PdTeamModule } from './pd-team.module';
|
||||
|
||||
describe('PdTeamModule', () => {
|
||||
let pdTeamModule: PdTeamModule;
|
||||
|
||||
beforeEach(() => {
|
||||
pdTeamModule = new PdTeamModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(pdTeamModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
111
ng6-seed/src/app/settings/pd-team/pd-team.module.ts
Normal file
111
ng6-seed/src/app/settings/pd-team/pd-team.module.ts
Normal file
@ -0,0 +1,111 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatButtonModule,
|
||||
MatSelectModule,
|
||||
MatDialogModule,
|
||||
MatProgressBarModule,MatToolbarModule,MatCheckboxModule,
|
||||
MatTableModule,MatPaginatorModule,MatSortModule} from '@angular/material';
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
||||
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
|
||||
import { PdTeamDialogComponent } from './pd-team-dialog/pd-team-dialog.component';
|
||||
import { PdTeamListComponent } from './pd-team-list/pd-team-list.component';
|
||||
|
||||
/** Route */
|
||||
import { PdTeamRoutes } from './pd-team.routing';
|
||||
|
||||
/** Service */
|
||||
import { PdTeamService } from '../service/masters/pd-team.service';
|
||||
import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component';
|
||||
import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
*/
|
||||
const customNotifierOptions: NotifierOptions = {
|
||||
position: {
|
||||
horizontal: {
|
||||
position: 'right',
|
||||
distance: 12
|
||||
},
|
||||
vertical: {
|
||||
position: 'top',
|
||||
distance: 32,
|
||||
gap: 10
|
||||
}
|
||||
},
|
||||
theme: 'material',
|
||||
behaviour: {
|
||||
autoHide: 5000,
|
||||
onClick: 'hide',
|
||||
onMouseover: 'pauseAutoHide',
|
||||
showDismissButton: true,
|
||||
stacking: 4
|
||||
},
|
||||
animations: {
|
||||
enabled: true,
|
||||
show: {
|
||||
preset: 'slide',
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
hide: {
|
||||
preset: 'fade',
|
||||
speed: 300,
|
||||
easing: 'ease',
|
||||
offset: 50
|
||||
},
|
||||
shift: {
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
overlap: 150
|
||||
}
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule, ReactiveFormsModule,
|
||||
RouterModule.forChild(PdTeamRoutes),
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatButtonModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatProgressBarModule,
|
||||
MatDialogModule,
|
||||
MatSortModule,
|
||||
MatToolbarModule,
|
||||
MatSelectModule,
|
||||
FlexLayoutModule,
|
||||
NgxMatSelectSearchModule,
|
||||
NgxDatatableModule,
|
||||
MatSortModule,
|
||||
MatSlideToggleModule,
|
||||
MatTooltipModule,
|
||||
NotifierModule.withConfig(customNotifierOptions),
|
||||
],
|
||||
declarations: [PdTeamDialogComponent,
|
||||
PdTeamListComponent,
|
||||
PdTeamAddComponent,
|
||||
PdTeamEditComponent],
|
||||
|
||||
providers: [PdTeamService ],
|
||||
entryComponents: [PdTeamDialogComponent]
|
||||
})
|
||||
export class PdTeamModule { }
|
||||
21
ng6-seed/src/app/settings/pd-team/pd-team.routing.ts
Executable file
21
ng6-seed/src/app/settings/pd-team/pd-team.routing.ts
Executable file
@ -0,0 +1,21 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { PdTeamAddComponent } from '../pd-team/pd-team-add/pd-team-add.component';
|
||||
import { PdTeamEditComponent } from '../pd-team/pd-team-edit/pd-team-edit.component';
|
||||
import { PdTeamListComponent } from '../pd-team/pd-team-list/pd-team-list.component';
|
||||
|
||||
|
||||
export const PdTeamRoutes: Routes = [{
|
||||
|
||||
path: '',
|
||||
children: [{
|
||||
path: 'pdteamlist',
|
||||
component: PdTeamListComponent
|
||||
},{
|
||||
path: 'addpdteam',
|
||||
component: PdTeamAddComponent
|
||||
},{
|
||||
path:'editpdteam',
|
||||
component:PdTeamEditComponent
|
||||
}]
|
||||
}];
|
||||
|
||||
@ -299,6 +299,7 @@ editPDAllocationType(Records: any,MasterName:string): Observable<any> {
|
||||
item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
||||
item.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
||||
delete item.pd_status_name; // to delete the pd_status_name
|
||||
delete item.serialno;
|
||||
});
|
||||
|
||||
//console.log('Service Data',Records);
|
||||
|
||||
@ -23,8 +23,8 @@ export interface Master {
|
||||
export class PdTeamService {
|
||||
|
||||
|
||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
//private apiUrl = "http://localhost/sparqapi/api/";
|
||||
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = "http://localhost/sparqapi/api/";
|
||||
|
||||
|
||||
constructor(private _http: HttpClient,
|
||||
@ -37,7 +37,7 @@ private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
* 1st argument is "Records": any - Set of Data To Adding to database
|
||||
*/
|
||||
addPdTeamDetail(Records: any): Observable<any> {
|
||||
|
||||
console.log('From Service Data',Records);
|
||||
Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record
|
||||
Records.createdon = currentdate;//to get Current date and Time for when the Record is created
|
||||
// Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
||||
@ -189,4 +189,15 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
getAllPdTeam(): Observable<any> {
|
||||
return this._http.get(this.apiUrl+'getListOfPDTeam')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -26,11 +26,9 @@ import { RouterModule } from '@angular/router';
|
||||
import { SettingsRoutes } from './settings.routing';
|
||||
import { RegisterComponent } from '../session/register/register.component';
|
||||
import { UserService } from './service/user.service';
|
||||
|
||||
import { MastersModule } from './masters/masters.module';
|
||||
// import { EntityModule } from './entity/entity.module';
|
||||
// import { AddEntityComponent } from './entity/add-entity/add-entity.component';
|
||||
// import { EditEntityComponent } from './entity/edit-entity/edit-entity.component';
|
||||
// import { EntityListComponent } from './entity/entity-list/entity-list.component';
|
||||
import { PdTeamModule } from './pd-team/pd-team.module';
|
||||
|
||||
import { EntityModule } from './entity/entity.module';
|
||||
// import { HttpClientModule } from '@angular/common/http';
|
||||
@ -39,6 +37,7 @@ import { EntityModule } from './entity/entity.module';
|
||||
CommonModule,
|
||||
RouterModule.forChild(SettingsRoutes),MatCardModule,
|
||||
MastersModule,
|
||||
PdTeamModule,
|
||||
EntityModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { MastersModule } from './masters/masters.module';
|
||||
|
||||
import { PdTeamModule } from './pd-team/pd-team.module';
|
||||
import { EntityModule } from './entity/entity.module';
|
||||
|
||||
//import { EntityModule } from './entity/entity.module';
|
||||
@ -16,10 +16,9 @@ export const SettingsRoutes: Routes = [{
|
||||
},{
|
||||
path:'entity',
|
||||
loadChildren:'./entity/entity.module#EntityModule'
|
||||
},{
|
||||
path:'pdteam',
|
||||
loadChildren:'./pd-team/pd-team.module#PdTeamModule'
|
||||
}
|
||||
// {
|
||||
// path:'entitymodule',
|
||||
// loadChildren:'./entity/entity.module#EntityModule'
|
||||
// }
|
||||
]
|
||||
}]
|
||||
@ -53,6 +53,7 @@ const MENUITEMS : Menu[] = [
|
||||
{state:'users',name:'Users'},
|
||||
{state:'mastermodule',name:'Master Details'},
|
||||
{state:'entity',name:'Entities'},
|
||||
{state:'pdteamlist',name:'PD Team'},
|
||||
|
||||
|
||||
],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user