master changes

This commit is contained in:
venbatechnologies@gmail.com 2018-09-26 00:08:29 +05:30
parent 35bceabaf5
commit cf7b107426
21 changed files with 137 additions and 203 deletions

View File

@ -51,7 +51,8 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907"; const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
const vendorIdenttiy = ""; const vendorIdenttiy = "";
// serviceProvider // serviceProvider
const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
//const apiurl = "http://localhost/sparqapi/api/";
@Injectable({ @Injectable({
providedIn: "root" providedIn: "root"

View File

@ -39,7 +39,9 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907"; const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
const vendorIdenttiy = ""; const vendorIdenttiy = "";
// serviceProvider // serviceProvider
const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
//const apiurl = "http://localhost/sparqapi/api/";
export interface Callback { export interface Callback {
callback(): void; callback(): void;

View File

@ -16,7 +16,7 @@
<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; let i = index;"> {{i+1}} </mat-cell> <mat-cell *matCellDef="let row; let i = index;" class="example-margin"> {{i+1}} </mat-cell>
</ng-container> </ng-container>
<!-- <ng-container matColumnDef="branch_id"> <!-- <ng-container matColumnDef="branch_id">

View File

@ -150,7 +150,6 @@
</mat-row> </mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div> </div>

View File

@ -16,9 +16,8 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Customer Segment &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 72%;"> Customer Segment &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></div> <div style="width: 28%;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>

View File

@ -16,8 +16,7 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Industry Classification &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 70%;"> Industry Classification &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>

View File

@ -16,8 +16,7 @@ fxLayoutGap.xs="0">
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Lender Hierarchy &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 70%;"> Lender Hierarchy &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>

View File

@ -14,11 +14,9 @@
<div fxFlex="2px"></div> <div fxFlex="2px"></div>
</div>--> </div>-->
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row">
fxLayoutAlign="center"> <h2 mat-dialog-title style="width: 85%;">Occupation of Non earning members</h2>
<h2 mat-dialog-title style="width: 30%;">Occupation of Non earning members &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <div style="width: 10%;text-align:right;">
<div style="width: 40%;"></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> <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>

View File

@ -102,7 +102,7 @@ export class MembersOccupationListComponent implements OnInit {
this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe( this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(
data => { data => {
if(data.status === 200){ if(data.dataStatus == true){
this.noRecordFound = false; this.noRecordFound = false;
this.userData = data.records; this.userData = data.records;
this.dataLength = data.records.length; this.dataLength = data.records.length;

View File

@ -6,67 +6,14 @@
<div *ngIf="loader"> <div *ngIf="loader">
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar> <mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
</div> </div>
<!--<div datatable> <div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<table style="border-collapse: collapse">
<thead>
<th style="text-align: center;">#</th>
<th style="text-align: center;">PD Allocation Type Name</th>
<th style="text-align: center;">Isactive</th>
<th style="text-align: center;">Action</th>
</thead>
<tr *ngIf="PDAllocationTypeList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
<tr *ngFor="let PAT of PDAllocationTypeList; let i=index">
<td style="text-align: center;">{{i+1}}</td>
<td style="text-align: center;">{{PAT.pd_allocation_type_name}}</td>
<td style="text-align: center;">{{PAT.isactive}}</td>
<td style="text-align: center;">
<a (click)="editPDAllocationType(PAT)"><mat-icon>edit</mat-icon></a>
<a (click)="deletePDAllocationType(PAT.pd_allocation_type_id)"><mat-icon>delete_outline</mat-icon></a>
</td>
</tr>
</table>
</div>
<!--<div>
<mat-table [dataSource]="dataSource"> ->
-- pd_allocation_type_id: any; pd_allocation_type_name: any; createdon: any; fk_createdby: any; updatedon: any; isactive: any; ->
<mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="pd_allocation_type_name">
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
<mat-cell *matCellDef="let user"> {{user.pd_allocation_type_name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="pd_allocation_type_id">
<mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>
<mat-cell *matCellDef="let user"> {{user.pd_allocation_type_id}} </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)="editPDAllocationType(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)="deletePDAllocationType(user.PDAllocationType_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>
</mattable>
</div>-->
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
<div class="example-header"> <div class="example-header">
<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>
<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>
@ -81,36 +28,49 @@
<ng-container matColumnDef="pd_allocation_logic"> <ng-container matColumnDef="pd_allocation_logic">
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Allocation Logic </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header> PD Allocation Logic </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.pd_allocation_logic}} </mat-cell> <mat-cell *matCellDef="let row"> {{row.pd_allocation_logic}} </mat-cell>
<!-- <mat-slide-toggle>Slide me!</mat-slide-toggle> -->
</ng-container> </ng-container>
<ng-container matColumnDef="isactive"> <!--<ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--> <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> <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> <ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template>
</mat-cell> </mat-cell>
</ng-container> </ng-container>-->
<!-- <ng-container matColumnDef="default">
<mat-cell *matCellDef="let row">
<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="default"> <ng-container matColumnDef="default">
<mat-header-cell *matHeaderCellDef mat-sort-header> Default </mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header> Default </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--> <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> <mat-slide-toggle *ngIf="row.default == 0;else alternative;"
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> class="example-margin"
matTooltip="Not a Default"
matTooltipPosition="above"
checked="false"
(change)="defaultPDAllocationType(row.pd_allocation_type_id)"
onclick="return confirm('Are you sure?')">
</mat-slide-toggle>
<ng-template #alternative>
<mat-slide-toggle class="example-margin"
disabled="true" checked="true"
matTooltip="Default"
matTooltipPosition="above">
</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> </mat-cell>
</ng-container> </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)="editPDAllocationType(row)"><mat-icon>edit</mat-icon></button>
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePDAllocationType(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
</mat-cell>
</ng-container> -->
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"> <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-row>
</mat-table> </mat-table>
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>

View File

@ -118,11 +118,6 @@
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
} }
.active:hover{ .example-margin {
color: green; margin: 10px;
font-size: 20px;
}
.deactive:hover{
color: red;
font-size: 20px;
} }

View File

@ -1,17 +1,17 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core'; /** Common Imports */
import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material'; import { Component,
OnInit,
import { Observable, Subject } from 'rxjs'; OnDestroy,
import { Http, Response } from '@angular/http'; ViewChild } from '@angular/core';
import 'rxjs/add/operator/map'; import { MatDialog,
MatDialogRef,
import { DataSource } from '@angular/cdk/collections'; MatDialogConfig,
import { map } from 'rxjs/operators'; MatPaginator,
import { of as observableOf, merge } from 'rxjs'; MatSort,
MatTableDataSource } from '@angular/material';
/** Service */
import { MastersService } from '../../../../service/masters/masters.service'; import { MastersService } from '../../../../service/masters/masters.service';
import { PdAllocationTypeDialogComponent } from '../pd-allocation-type-dialog/pd-allocation-type-dialog.component'; /** Model */
import { PdAllocationType } from '../../../model/pd'; import { PdAllocationType } from '../../../model/pd';
@ -22,73 +22,38 @@ import { PdAllocationType } from '../../../model/pd';
}) })
export class PdAllocationTypeListComponent implements OnInit { export class PdAllocationTypeListComponent implements OnInit {
isPopupOpened = true; //isPopupOpened = true;
loader: boolean = false; loader: boolean = false;
PDAllocationTypeList: any = []; PDAllocationTypeList: any = [];
noRecordFound: boolean = false; noRecordFound: boolean = false;
userData = null; userData = null;
defaultdatas : any = [];
defdatas : any = [];
public dataLength: number; public dataLength: number;
public dataSource = new MatTableDataSource(); public dataSource = new MatTableDataSource();
//displayedColumns = ['SerialNo','PDALLOCATIONTYPE','pdallocationlogic','IsActive']; //displayedColumns = ['SerialNo','PDALLOCATIONTYPE','pdallocationlogic','IsActive'];
displayedColumns = ['serialno','pd_allocation_type_name','isactive','pd_allocation_logic','default']; displayedColumns = ['serialno','pd_allocation_type_name','pd_allocation_logic','default'];
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
constructor(private dialog: MatDialog, constructor(private _MastersService: MastersService) {
private _MastersService: MastersService) { this.getPDAllocationType();
this.getPDAllocationType();
} }
// get PDAllocationTypeList() { ngOnInit() {}
// return this._MastersService.getAllPDAllocationType();
// }
//dataSource = new UserDataSource(this._MastersService);
ngOnInit() {
}
addPDAllocationType() {
this.isPopupOpened = true;
const dialogRef = this.dialog.open(PdAllocationTypeDialogComponent, {
data: {}
});
dialogRef.afterClosed().subscribe(result => {
this.getPDAllocationType();
this.isPopupOpened = false;
});
}
editPDAllocationType(arr: any[]) {
this.isPopupOpened = true;
//const contact = this._MastersService.getAllPDAllocationType().find(c => c.ID === id);
const dialogRef = this.dialog.open(PdAllocationTypeDialogComponent, {
data: arr
});
dialogRef.afterClosed().subscribe(result => {
this.getPDAllocationType();
this.isPopupOpened = false;
});
}
//To get data for listing //To get data for listing
getPDAllocationType() { getPDAllocationType() {
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe( this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
data => { data => {
if(data.status === 200){ if(data.dataStatus == true){
this.noRecordFound = false; this.noRecordFound = false;
this.userData = data.records; this.userData = data.records;
this.dataLength = data.records.length; this.dataLength = data.records.length;
@ -100,12 +65,48 @@ export class PdAllocationTypeListComponent implements OnInit {
}) })
} }
deletePDAllocationType(id: number) { /** For Changing Default Value.,
var PrimaryKeyWithValue ={'pd_allocation_type_id':id}; * To Set Value Default Value '1' For Only One Record
this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDALLOCATIONTYPE') * And Remaining All are set to '0'
.subscribe( data => { this.getPDAllocationType();}) */
//this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDALLOCATIONTYPE'); defaultPDAllocationType(id: number){
}
var defaultDatas = [];//Empty array to store defaultDatas
defaultDatas.push({'pd_allocation_type_id':id,'default': 1});
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
data => {
if(data.dataStatus == true){
let allDefaultDatas = data.records;
allDefaultDatas = allDefaultDatas.filter(Datas=>Datas.default == 1 );
allDefaultDatas.forEach((item, index) => {
// console.log('id',item.pd_allocation_type_id);
// console.log('value',item.default);
let dataChanges = {
pd_allocation_type_id:item.pd_allocation_type_id,
default:0
};
defaultDatas.push(dataChanges);
});
}
});
//console.log(defaultDatas);
this._MastersService.editMasterDetails(defaultDatas,'PDALLOCATIONTYPE')
.subscribe(dataresult=>{
if (dataresult.dataStatus == true){
//alert("my check");
this.getPDAllocationType();
}
else{
alert("SomeThing Wents Wrong Try Again !");
}
});
}
/** For Display Tables Pagination And Sorting */ /** For Display Tables Pagination And Sorting */
ngAfterViewInit() { ngAfterViewInit() {
this.dataSource.paginator = this.paginator; this.dataSource.paginator = this.paginator;
@ -120,19 +121,4 @@ applyFilter(filterValue: string) {
} }
} }
/**End Of List Component */
export class UserDataSource extends DataSource<any> {
constructor(private _bs: MastersService) {
super();
}
connect(): Observable<PdAllocationType[]> {
//return this.userService.getUser();
//return this._bs.getAllPDAllocationType();
return this._bs.getAllMasterData('PDALLOCATIONTYPE');
}
disconnect() {}
}

View File

@ -16,8 +16,8 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;">PD Location Approach &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 70%;">PD Location Approach &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>

View File

@ -16,8 +16,7 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Product Details &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 70%;"> Product Details &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>

View File

@ -16,9 +16,9 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Region &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 35%;"> Region &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></div> <div style="width: 32%;"></div>
<div style="width: 30%;text-align:right;"> <div style="width: 33%;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>

View File

@ -16,9 +16,9 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Relation Ship &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 54%;"> Relation Ship &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></div>
<div style="width: 30%;text-align:right;"> <div style="width: 46%;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>

View File

@ -17,9 +17,8 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Sub Product Details &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 80%;"> Sub Product Details &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></div> <div style="width: 20%;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>
@ -31,7 +30,6 @@ fxLayoutAlign="center">
<div class="form-group"> <div class="form-group">
<mat-dialog-content> <mat-dialog-content>
<div class="ml-xs mr-xs">
<!-- <mat-form-field> <!-- <mat-form-field>
<input matInput placeholder="Pick Up Product Name" [matAutocomplete]="tdAuto" [(ngModel)]="currentState" #modelDir="ngModel" required <input matInput placeholder="Pick Up Product Name" [matAutocomplete]="tdAuto" [(ngModel)]="currentState" #modelDir="ngModel" required
(ngModelChange)="this.tdStates = filterStates(currentState)" [disabled]="tdDisabled"> (ngModelChange)="this.tdStates = filterStates(currentState)" [disabled]="tdDisabled">
@ -54,7 +52,6 @@ fxLayoutAlign="center">
</mat-form-field> --> </mat-form-field> -->
</div>
<div class="ml-xs mr-xs"> <div class="ml-xs mr-xs">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">

View File

@ -16,9 +16,9 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;">Title &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 33%;">Title &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></div> <div style="width: 35%;"></div>
<div style="width: 30%;text-align:right;"> <div style="width: 32%;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>

View File

@ -17,9 +17,9 @@
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 40%;"> Type of activity&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 80%;"> Type of activity &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 30%;"></div>
<div style="width: 30%;text-align:right;"> <div style="width: 20%;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>

View File

@ -16,8 +16,7 @@ fxLayoutGap.xs="0">
<div class="ml-xs mr-xs" style="width: 100%;" <div class="ml-xs mr-xs" style="width: 100%;"
fxLayout="row" fxLayout="row"
fxLayoutAlign="center"> fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 30%;"> Unit of Measurement &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2> <h2 mat-dialog-title style="width: 70%;"> Unit of Measurement &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2>
<div style="width: 40%;"></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>

View File

@ -25,7 +25,8 @@ export interface Master {
export class MastersService { export class MastersService {
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
// private apiUrl = "http://localhost/sparqapi/api/";
constructor(private _http: HttpClient, constructor(private _http: HttpClient,