master changes
This commit is contained in:
parent
6a383a4cf8
commit
afbf9fbb9b
@ -20,9 +20,9 @@ export interface Master {
|
|||||||
|
|
||||||
export class PdTrigerService {
|
export class PdTrigerService {
|
||||||
|
|
||||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||||
//private apiUrl = "http://ssa.sineedge.com/sparqtest/api/";
|
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
private _aws:AwsService) { }
|
private _aws:AwsService) { }
|
||||||
|
|||||||
@ -1,53 +1,31 @@
|
|||||||
<!-- <div style="text-align: right;">
|
|
||||||
<!-- <button mat-stroked-button [color]="color" (click)="addBranch()"> + Add Branch</button> -->
|
|
||||||
<!-- <button mat-icon-button class="mr-1 mb-1 hover-icon" style="height: 40%;" ><mat-icon>add_box</mat-icon></button> -->
|
|
||||||
|
|
||||||
<!-- <button mat-fab class="mr-1 mb-1" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button> -->
|
|
||||||
<!-- <mat-button-toggle class="mr-1 mb-1">Single toggle</mat-button-toggle> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- <br> -->
|
|
||||||
<!-- <div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
|
||||||
</div>
|
|
||||||
<br> -->
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="example-header" fxLayout="row">
|
<!-- <div class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 80%;">
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
|
||||||
<button mat-fab class="mr-1 mb-1" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="example-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<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="primary" ><mat-icon>add</mat-icon></button> -->
|
|
||||||
<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>
|
<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>
|
</div>
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
<mat-table [dataSource]="dataSource" matSort>
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row;" class="example-margin"> {{row.serialno}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}}</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="branch_id">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch ID </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.branch_id}} </mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
||||||
<!-- <mat-cell *matCellDef="let row">{{row.branch_id.toString() + ' ' + row.name.toString()}} </mat-cell> -->
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -56,22 +34,11 @@
|
|||||||
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
||||||
</ng-container>
|
</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-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">
|
<ng-container matColumnDef="actions">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Actions </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row">
|
<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 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)="deleteBranch(row.branch_id)"><mat-icon>delete_outline</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>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -93,19 +60,7 @@
|
|||||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
onclick="return confirm('Are you sure?')">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
<!-- <mat-slide-toggle
|
|
||||||
class="example-margin"
|
|
||||||
[color]="color"
|
|
||||||
[checked]="checked"
|
|
||||||
[disabled]="disabled"
|
|
||||||
(change)="changed(row.branch_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle> -->
|
|
||||||
<!-- <mat-slide-toggle (change)="changed()"> Slide me!</mat-slide-toggle> -->
|
|
||||||
<!-- <button mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)" *ngIf="row.isactive == 1;else notactive;"><mat-icon>done</mat-icon></button>
|
|
||||||
<ng-template #notactive ><button mat-icon-button class="deactive" matTooltip="Inactive" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>clear</mat-icon></button></ng-template> -->
|
|
||||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>done</mat-icon></button>
|
|
||||||
<button *ngIf="row.isactive == 0;" mat-icon-button class="deactive" matTooltip="Inactive" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>close</mat-icon></button> -->
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -114,17 +69,11 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</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>
|
</mat-card-content>
|
||||||
|
|
||||||
<!-- <p *ngIf="dataSource.length === 0">No records found</p> -->
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -1,126 +1,14 @@
|
|||||||
|
/** Table SerialNo CSS */
|
||||||
/* Structure
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 56px;
|
|
||||||
max-height: 56px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
font-size: 20px;
|
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-input-container {
|
|
||||||
font-size: 14px;
|
|
||||||
flex-grow: 1;
|
|
||||||
margin-left: 32px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-no-results {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 24px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
Selection styles
|
|
||||||
.example-selection-header {
|
|
||||||
font-size: 18px;
|
|
||||||
background: rgba(255, 64, 129, 0.3);
|
|
||||||
border-bottom: 1px solid #d696ac;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-column-select {
|
|
||||||
max-width: 54px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-row:hover, .example-selected-row {
|
|
||||||
background: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-row:active, .mat-row.example-selected-row {
|
|
||||||
background: #eaeaea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-table {
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 500px;
|
|
||||||
}
|
|
||||||
/*** Structure *
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 30px;
|
|
||||||
width : 80%;
|
|
||||||
margin : 20px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}****/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// .example-header {
|
|
||||||
// min-height: 56px;
|
|
||||||
// max-height: 56px;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// padding: 8px 24px 0;
|
|
||||||
// font-size: 20px;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// border-bottom: 1px solid transparent;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// .active:hover{
|
|
||||||
// color: green;
|
|
||||||
// font-size: 20px;
|
|
||||||
// }
|
|
||||||
// .deactive:hover{
|
|
||||||
// color: red;
|
|
||||||
// font-size: 20px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mat-cell{
|
|
||||||
// display:flex !important;
|
|
||||||
// justify-content:center!important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mat-header-cell {
|
|
||||||
// display:flex;
|
|
||||||
// justify-content:center;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-h2 {
|
|
||||||
// margin: 10px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-section {
|
|
||||||
// display: flex;
|
|
||||||
// align-content: center;
|
|
||||||
// align-items: center;
|
|
||||||
// height: 60px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.example-margin {
|
.example-margin {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Table CSS - Dislplay Data */
|
||||||
.mat-table {
|
.mat-table {
|
||||||
display: table;
|
display: table;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 500px;
|
||||||
|
|
||||||
> .mat-header-row, > .mat-row {
|
> .mat-header-row, > .mat-row {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
@ -137,54 +25,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Table CSS -nocontent */
|
||||||
.mat-form-field {
|
|
||||||
font-size: 14px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nocontent {
|
.nocontent {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
//display:flex;
|
|
||||||
//justify-content:center;
|
|
||||||
// min-height: 56px;
|
|
||||||
// max-height: 56px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example-container {
|
/** Table CSS - Search(or)Filter Field */
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** new ..**
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-form-field {
|
.mat-form-field {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-table {
|
.filter-container {
|
||||||
overflow: auto;
|
display: flex;
|
||||||
max-height: 500px;
|
flex-direction: column;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-header {
|
||||||
|
min-height: 64px;
|
||||||
|
padding: 8px 24px 0;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
@ -11,6 +11,7 @@ MatTableDataSource } from '@angular/material';
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { MastersService } from '../../../../service/masters/masters.service';
|
import { MastersService } from '../../../../service/masters/masters.service';
|
||||||
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
/** Dialog Component */
|
/** Dialog Component */
|
||||||
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||||
@ -30,6 +31,7 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
color = 'primary';
|
color = 'primary';
|
||||||
userData = null;
|
userData = null;
|
||||||
noRecordFound: boolean = false;
|
noRecordFound: boolean = false;
|
||||||
|
private notifier: NotifierService;
|
||||||
|
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
@ -39,10 +41,11 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog, notifier: NotifierService,
|
||||||
private _MasterService: MastersService,
|
private _MasterService: MastersService,
|
||||||
private _PdTeamService: PdTeamService) {
|
private _PdTeamService: PdTeamService) {
|
||||||
this.getPdTeam();
|
this.getPdTeam();
|
||||||
|
this.notifier = notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
@ -130,7 +133,8 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
this.getPdTeam();
|
this.getPdTeam();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
//alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user