master changes
This commit is contained in:
parent
1a86382a15
commit
72e10b4b26
@ -52,7 +52,7 @@ const sineedgeIdentity = environment.identityPoolId//"ap-south-1:9a551eab-97cf-4
|
|||||||
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://localhost/sineedge/sparqapi/api/";
|
const apiurl = environment.apiUrl;
|
||||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(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.city_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>
|
||||||
|
|
||||||
|
|||||||
@ -26,19 +26,31 @@ export class CityListComponent implements OnInit {
|
|||||||
CityList: any = [];
|
CityList: any = [];
|
||||||
|
|
||||||
//, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
|
// displayedColumns = ['city_id','name', 'fk_state_id','state_name' , 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','CityName','Name', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllCity().subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// get CityList() {
|
// get CityList() {
|
||||||
// return this._MastersService.getAllCity();
|
// return this._MastersService.getAllCity();
|
||||||
@ -47,7 +59,7 @@ export class CityListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCity();
|
//this.getCity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,18 +89,18 @@ export class CityListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getCity() {
|
//getCity() {
|
||||||
this.loader = true;
|
//this.loader = true;
|
||||||
this._MastersService.getAllCity().subscribe(dataresult => {
|
// this._MastersService.getAllCity().subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.CityList = dataresult.records;
|
// this.CityList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
deleteCity(id: number) {
|
deleteCity(id: number) {
|
||||||
var PrimaryKeyWithValue ={'city_id':id};
|
var PrimaryKeyWithValue ={'city_id':id};
|
||||||
|
|||||||
@ -76,14 +76,9 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="CommentsOnLocalityName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Comments On Locality Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.rating}} </mat-cell>
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -97,8 +92,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCommentsOnLocality(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCommentsOnLocality(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,19 +26,31 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CommentsOnLocalityList: any = [];
|
CommentsOnLocalityList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['comments_on_locality_id','rating','isactive','actions'];
|
//displayedColumns = ['comments_on_locality_id','rating','isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
//displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','CommentsOnLocalityName', 'IsActive','Actions'];
|
||||||
|
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get CommentsOnLocalityList() {
|
// get CommentsOnLocalityList() {
|
||||||
// return this._MastersService.getAllCommentsOnLocality();
|
// return this._MastersService.getAllCommentsOnLocality();
|
||||||
@ -47,7 +59,7 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
// dataSource = new UserDataSource(this._MastersService);
|
// dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCommentsOnLocality();
|
//this.getCommentsOnLocality();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,18 +89,18 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getCommentsOnLocality() {
|
// getCommentsOnLocality() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('COMMENTSONLOCALITY').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.CommentsOnLocalityList = dataresult.records;
|
// this.CommentsOnLocalityList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteCommentsOnLocality(id: number) {
|
deleteCommentsOnLocality(id: number) {
|
||||||
var PrimaryKeyWithValue ={'comments_on_locality_id':id};
|
var PrimaryKeyWithValue ={'comments_on_locality_id':id};
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- <div class="mb-1">
|
<!-- <div class="ml-xs mr-xs">
|
||||||
<h2 mat-dialog-title>Company
|
<h2 mat-dialog-title>Company
|
||||||
<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>
|
||||||
</h2>
|
</h2>
|
||||||
@ -31,41 +31,41 @@ fxLayoutAlign="center">
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<mat-dialog-content>
|
<mat-dialog-content>
|
||||||
<!-- displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo']; -->
|
<!-- displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo']; -->
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company Name" required [formControl]="_companyForm.controls['name']">
|
<input matInput type="text" placeholder="Company Name" required [formControl]="_companyForm.controls['name']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline1" required [formControl]="_companyForm.controls['addressline1']">
|
<input matInput type="text" placeholder="Company addressline1" required [formControl]="_companyForm.controls['addressline1']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">You must include a addressline1.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">You must include a addressline1.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline2" required [formControl]="_companyForm.controls['addressline2']">
|
<input matInput type="text" placeholder="Company addressline2" required [formControl]="_companyForm.controls['addressline2']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline3" required [formControl]="_companyForm.controls['addressline3']">
|
<input matInput type="text" placeholder="Company addressline3" required [formControl]="_companyForm.controls['addressline3']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="mb-1">
|
<!-- <div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="City" required [formControl]="_companyForm.controls['city']">
|
<input matInput type="text" placeholder="City" required [formControl]="_companyForm.controls['city']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<!-- <ngx-select-dropdown [multiple]="false" [value]="citydatas.city_id" [options]="citydatas" ></ngx-select-dropdown> -->
|
<!-- <ngx-select-dropdown [multiple]="false" [value]="citydatas.city_id" [options]="citydatas" ></ngx-select-dropdown> -->
|
||||||
<mat-select placeholder="Pick Up City name" required [formControl]="_companyForm.controls['city']">
|
<mat-select placeholder="Pick Up City name" required [formControl]="_companyForm.controls['city']">
|
||||||
@ -76,7 +76,7 @@ fxLayoutAlign="center">
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
|
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
|
||||||
<mat-hint>pincode should be in 6 digit format</mat-hint>
|
<mat-hint>pincode should be in 6 digit format</mat-hint>
|
||||||
@ -87,7 +87,7 @@ fxLayoutAlign="center">
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Pick Up State Name" required [formControl]="_companyForm.controls['state']">
|
<mat-select placeholder="Pick Up State Name" required [formControl]="_companyForm.controls['state']">
|
||||||
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
||||||
@ -96,7 +96,7 @@ fxLayoutAlign="center">
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="mb-1">
|
<!-- <div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="logo" required [formControl]="_companyForm.controls['logo']">
|
<input matInput type="text" placeholder="logo" required [formControl]="_companyForm.controls['logo']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['logo'].valid && _companyForm.controls['logo'].touched" class="mat-text-warn">You must include a logo.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['logo'].valid && _companyForm.controls['logo'].touched" class="mat-text-warn">You must include a logo.</mat-error>
|
||||||
@ -104,11 +104,11 @@ fxLayoutAlign="center">
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="mb-1">
|
<!--<div class="ml-xs mr-xs">
|
||||||
logo
|
logo
|
||||||
<input type="file" (change)="onFileChange($event)" [formControl]="_companyForm.controls['logo']"/>
|
<input type="file" (change)="onFileChange($event)" [formControl]="_companyForm.controls['logo']"/>
|
||||||
<!-- <span *ngIf="usersData!=''">{{img}}</span> -->
|
<!- <span *ngIf="usersData!=''">{{img}}</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -44,7 +44,7 @@ export class CompanyDialogComponent implements OnInit {
|
|||||||
city: [this.data.city, Validators.compose([Validators.required])],
|
city: [this.data.city, Validators.compose([Validators.required])],
|
||||||
state: [this.data.state, Validators.compose([Validators.required])],
|
state: [this.data.state, Validators.compose([Validators.required])],
|
||||||
pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
|
pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
|
||||||
logo : [this.data.logo]
|
// logo : [this.data.logo]
|
||||||
});
|
});
|
||||||
|
|
||||||
this._masterService.getAllMasterData('STATE')
|
this._masterService.getAllMasterData('STATE')
|
||||||
@ -68,14 +68,14 @@ export class CompanyDialogComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
onFileChange($event) {
|
// onFileChange($event) {
|
||||||
//console.log($event.target.files[0]);
|
// //console.log($event.target.files[0]);
|
||||||
|
|
||||||
//if($event.target.files[0] < 0 ){
|
// //if($event.target.files[0] < 0 ){
|
||||||
this.files = $event.target.files[0];
|
// this.files = $event.target.files[0];
|
||||||
//}
|
// //}
|
||||||
//console.log(this.files);
|
// //console.log(this.files);
|
||||||
}
|
// }
|
||||||
// onSubmit() {
|
// onSubmit() {
|
||||||
// if (isNaN(this.data.ID)) {
|
// if (isNaN(this.data.ID)) {
|
||||||
// this._companyService.addCompany(this._companyForm.value);
|
// this._companyService.addCompany(this._companyForm.value);
|
||||||
|
|||||||
@ -109,29 +109,25 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="Name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="City">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="State">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let row"> {{row.state_name}} </mat-cell>
|
||||||
<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>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCompany(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,8 @@ export class CompanyListComponent implements OnInit {
|
|||||||
CompanyList: any = [];
|
CompanyList: any = [];
|
||||||
|
|
||||||
//displayedColumns = ['Company_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
//displayedColumns = ['Company_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||||
displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state','city_name', 'state_name', 'pincode', 'logo','action'];
|
//displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state','city_name', 'state_name', 'pincode', 'logo','action'];
|
||||||
|
displayedColumns = ['SerialNo', 'Name', 'City', 'State' , 'Action'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
@ -41,7 +42,19 @@ export class CompanyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
|
||||||
|
this._MastersService.getAllCompany().subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get CompanyList() {
|
// get CompanyList() {
|
||||||
// return this._MastersService.getAllCompany();
|
// return this._MastersService.getAllCompany();
|
||||||
@ -50,7 +63,7 @@ export class CompanyListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCompany();
|
//this.getCompany();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -80,18 +93,18 @@ export class CompanyListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getCompany() {
|
// getCompany() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllCompany().subscribe(dataresult => {
|
// this._MastersService.getAllCompany().subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.CompanyList = dataresult.records;
|
// this.CompanyList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteCompany(id: number) {
|
deleteCompany(id: number) {
|
||||||
var PrimaryKeyWithValue ={'company_id':id};
|
var PrimaryKeyWithValue ={'company_id':id};
|
||||||
|
|||||||
@ -75,14 +75,9 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="Description">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -96,8 +91,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerBehaviour(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCustomerBehaviour(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,20 +26,32 @@ export class CustomerBehaviourListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CustomerBehaviourList: any = [];
|
CustomerBehaviourList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['customer_behaviour_id', 'description', 'isactive','actions'];
|
//displayedColumns = ['customer_behaviour_id', 'description', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
||||||
|
displayedColumns = ['SerialNo','Description', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get CustomerBehaviourList() {
|
// get CustomerBehaviourList() {
|
||||||
// return this._MastersService.getAllCustomerBehaviour();
|
// return this._MastersService.getAllCustomerBehaviour();
|
||||||
@ -48,7 +60,7 @@ export class CustomerBehaviourListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCustomerBehaviour();
|
//this.getCustomerBehaviour();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -78,18 +90,18 @@ export class CustomerBehaviourListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getCustomerBehaviour() {
|
// getCustomerBehaviour() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.CustomerBehaviourList = dataresult.records;
|
// this.CustomerBehaviourList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteCustomerBehaviour(id: number) {
|
deleteCustomerBehaviour(id: number) {
|
||||||
var PrimaryKeyWithValue ={'customer_behaviour_id':id};
|
var PrimaryKeyWithValue ={'customer_behaviour_id':id};
|
||||||
|
|||||||
@ -81,16 +81,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="Customer Segment Name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>CustomerSegmentName</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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}}-->
|
||||||
@ -100,10 +95,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCustomerSegment(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCustomerSegment(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -25,20 +25,32 @@ export class CustomerSegmentListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
CustomerSegmentList: any = [];
|
CustomerSegmentList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
|
// displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
||||||
|
displayedColumns = ['SerialNo','CustomerSegmentName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get CustomerSegmentList() {
|
// get CustomerSegmentList() {
|
||||||
// return this._MastersService.getAllCustomerSegment();
|
// return this._MastersService.getAllCustomerSegment();
|
||||||
@ -47,7 +59,7 @@ export class CustomerSegmentListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCustomerSegment();
|
// this.getCustomerSegment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,18 +89,18 @@ export class CustomerSegmentListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getCustomerSegment() {
|
// getCustomerSegment() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.CustomerSegmentList = dataresult.records;
|
// this.CustomerSegmentList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteCustomerSegment(id: number) {
|
deleteCustomerSegment(id: number) {
|
||||||
var PrimaryKeyWithValue ={'customer_segment_id':id};
|
var PrimaryKeyWithValue ={'customer_segment_id':id};
|
||||||
|
|||||||
@ -102,8 +102,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editDesignation(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteDesignation(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export class DesignationListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
DesignationList: any = [];
|
DesignationList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['designation_id', 'name', 'short_name','isactive','actions'];
|
// displayedColumns = ['designation_id', 'name', 'short_name','isactive','actions'];
|
||||||
|
displayedColumns = ['SerialNo','Designation Name', 'IsActive','Actions'];
|
||||||
|
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
@ -40,7 +41,18 @@ export class DesignationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('DESIGNATION').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get DesignationList() {
|
// get DesignationList() {
|
||||||
// return this._MastersService.getAllDesignation();
|
// return this._MastersService.getAllDesignation();
|
||||||
@ -49,7 +61,7 @@ export class DesignationListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getDesignation();
|
//this.getDesignation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,18 +91,18 @@ export class DesignationListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getDesignation() {
|
// getDesignation() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('DESIGNATION').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('DESIGNATION').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.DesignationList = dataresult.records;
|
// this.DesignationList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteDesignation(id: number) {
|
deleteDesignation(id: number) {
|
||||||
var PrimaryKeyWithValue ={'designation_id':id};
|
var PrimaryKeyWithValue ={'designation_id':id};
|
||||||
|
|||||||
@ -90,16 +90,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="FrequencyName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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}}-->
|
||||||
@ -109,10 +104,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editFrequency(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteFrequency(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,20 +26,32 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
FrequencyList: any = [];
|
FrequencyList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['frequency_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
// displayedColumns = ['frequency_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
||||||
|
displayedColumns = ['SerialNo','FrequencyName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('FREQUENCY').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get FrequencyList() {
|
// get FrequencyList() {
|
||||||
// return this._MastersService. getAllFrequency();
|
// return this._MastersService. getAllFrequency();
|
||||||
@ -48,7 +60,7 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
// dataSource = new UserDataSource(this._MastersService);
|
// dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getFrequency();
|
//this.getFrequency();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -78,18 +90,18 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getFrequency() {
|
// getFrequency() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('FREQUENCY').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('FREQUENCY').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.FrequencyList = dataresult.records;
|
// this.FrequencyList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteFrequency(id: number) {
|
deleteFrequency(id: number) {
|
||||||
var PrimaryKeyWithValue ={'frequency_id':id};
|
var PrimaryKeyWithValue ={'frequency_id':id};
|
||||||
|
|||||||
@ -91,16 +91,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="Industry Classification">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Industry Classification Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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}}-->
|
||||||
@ -110,10 +105,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editIndustryClassification(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteIndustryClassification(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -33,14 +33,14 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
IndustryClassificationList: any = [];
|
IndustryClassificationList: any = [];
|
||||||
|
|
||||||
|
|
||||||
displayedColumns = ['industry_classification_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
//displayedColumns = ['industry_classification_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
//industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','Industry Classification', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -48,7 +48,18 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _IMService: MastersService) { }
|
private _IMService: MastersService) {
|
||||||
|
this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get IndustryClassificationList() {
|
// get IndustryClassificationList() {
|
||||||
// return this._IMService.getAllIndustryClassification();
|
// return this._IMService.getAllIndustryClassification();
|
||||||
@ -59,7 +70,7 @@ export class IndustryClassificationListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getIndustryClassification();
|
// this.getIndustryClassification();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -96,8 +96,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editLenderHierarchy(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteLenderHierarchy(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,18 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get LenderHierarchyList() {
|
// get LenderHierarchyList() {
|
||||||
// return this._MastersService. getAllLenderHierarchy();
|
// return this._MastersService. getAllLenderHierarchy();
|
||||||
@ -48,7 +59,7 @@ export class LenderHierarchyListComponent implements OnInit {
|
|||||||
// dataSource = new UserDataSource(this._MastersService);
|
// dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getLenderHierarchy();
|
// this.getLenderHierarchy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -95,15 +95,12 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="OccupationMember">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Occupation Non Earning Member </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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>
|
||||||
@ -116,8 +113,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteMemberOccupation(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
MemberOccupationList: any = [];
|
MemberOccupationList: any = [];
|
||||||
|
|
||||||
|
|
||||||
displayedColumns = ['occupation_non_earning_member_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
//displayedColumns = ['occupation_non_earning_member_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
//occupation_non_earning_member_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//occupation_non_earning_member_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
// @ViewChild(MatPaginator) paginator: MatPaginator;
|
// @ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ -36,14 +36,25 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','OccupationMember', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _memberService: MastersService) { }
|
private _memberService: MastersService) {
|
||||||
|
this._memberService.getAllMasterData('OCCUPATIONMEMBERS').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get MemberOccupationList() {
|
// get MemberOccupationList() {
|
||||||
// return this._memberService.getAllMembersOccupation();
|
// return this._memberService.getAllMembersOccupation();
|
||||||
|
|||||||
@ -93,8 +93,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<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)="deleteBranch(row.city_id)"><mat-icon>delete_outline</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>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,20 +26,32 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PDAllocationTypeList: any = [];
|
PDAllocationTypeList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['pd_allocation_type_id','pd_allocation_type_name','isactive','actions'];
|
//displayedColumns = ['pd_allocation_type_id','pd_allocation_type_name','isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','PD Allocation Type', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// get PDAllocationTypeList() {
|
// get PDAllocationTypeList() {
|
||||||
// return this._MastersService.getAllPDAllocationType();
|
// return this._MastersService.getAllPDAllocationType();
|
||||||
|
|||||||
@ -27,20 +27,31 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PdLocationApproachList: any = [];
|
PdLocationApproachList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['pd_allocation_type_id', 'pd_allocation_type_name', 'isactive','actions'];
|
// displayedColumns = ['pd_allocation_type_id', 'pd_allocation_type_name', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','PD Location Name','IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get PdLocationApproachList() {
|
// get PdLocationApproachList() {
|
||||||
// return this._MastersService.getAllPdLocationApproach();
|
// return this._MastersService.getAllPdLocationApproach();
|
||||||
@ -49,7 +60,7 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getPdLocationApproach();
|
// this.getPdLocationApproach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,18 +90,18 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getPdLocationApproach() {
|
// getPdLocationApproach() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.PdLocationApproachList = dataresult.records;
|
// this.PdLocationApproachList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deletePdLocationApproach(id: number) {
|
deletePdLocationApproach(id: number) {
|
||||||
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
var PrimaryKeyWithValue ={'pd_allocation_type_id':id};
|
||||||
|
|||||||
@ -95,8 +95,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPDType(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deletePDType(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -27,20 +27,31 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PDTypeList: any = [];
|
PDTypeList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['pd_type_id', 'type_name', 'isactive','actions'];
|
//displayedColumns = ['pd_type_id', 'type_name', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
//displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','PD Type', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _PDTypeService: MastersService) { }
|
private _PDTypeService: MastersService) {
|
||||||
|
this._PDTypeService.getAllMasterData('PDTYPE').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get PDTypeList() {
|
// get PDTypeList() {
|
||||||
// return this._PDTypeService.getAllPDType();
|
// return this._PDTypeService.getAllPDType();
|
||||||
@ -49,7 +60,7 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
// dataSource = new UserDataSource(this._PDTypeService);
|
// dataSource = new UserDataSource(this._PDTypeService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getPDType();
|
//this.getPDType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,18 +90,18 @@ export class PdTypeListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getPDType() {
|
// getPDType() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._PDTypeService.getAllMasterData('PDTYPE').subscribe(dataresult => {
|
// this._PDTypeService.getAllMasterData('PDTYPE').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.PDTypeList = dataresult.records;
|
// this.PDTypeList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deletePDType(id: number) {
|
deletePDType(id: number) {
|
||||||
var PrimaryKeyWithValue ={'pd_type_id':id};
|
var PrimaryKeyWithValue ={'pd_type_id':id};
|
||||||
|
|||||||
@ -19,14 +19,14 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="ProductName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Product Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="Abbr">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Abbrevation </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.abbr}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -40,8 +40,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editProductMaster(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteProductMaster(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -204,7 +204,7 @@
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<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 datatable>
|
||||||
@ -216,7 +216,7 @@
|
|||||||
<th style="text-align: center;">Product Abbreviation</th>
|
<th style="text-align: center;">Product Abbreviation</th>
|
||||||
<th style="text-align: center;">Is Actvie</th>
|
<th style="text-align: center;">Is Actvie</th>
|
||||||
<th style="text-align: center;">Action</th>
|
<th style="text-align: center;">Action</th>
|
||||||
</thead>
|
</thead> -->
|
||||||
|
|
||||||
<!-- <tr *ngFor="let PM of ProductMasterList; let i=index" class="body-cell">
|
<!-- <tr *ngFor="let PM of ProductMasterList; let i=index" class="body-cell">
|
||||||
<td style="text-align: center;">{{i+1}}</td>
|
<td style="text-align: center;">{{i+1}}</td>
|
||||||
@ -227,7 +227,7 @@
|
|||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteProductMaster(PM.ID)"><mat-icon>delete_outline</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteProductMaster(PM.ID)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</td>
|
</td>
|
||||||
</tr> -->
|
</tr> -->
|
||||||
<tr *ngIf="ProductMasterList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
|
<!-- <tr *ngIf="ProductMasterList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
|
||||||
<tr *ngFor="let PM of ProductMasterList; let i=index" class="body-cell">
|
<tr *ngFor="let PM of ProductMasterList; let i=index" class="body-cell">
|
||||||
|
|
||||||
<td style="text-align: center;">{{i+1}}</td>
|
<td style="text-align: center;">{{i+1}}</td>
|
||||||
@ -236,15 +236,15 @@
|
|||||||
<td style="text-align: center;">{{PM.abbr}}</td>
|
<td style="text-align: center;">{{PM.abbr}}</td>
|
||||||
<td style="text-align: center;">{{PM.isactive}}</td>
|
<td style="text-align: center;">{{PM.isactive}}</td>
|
||||||
<td style="text-align: center;">
|
<td style="text-align: center;">
|
||||||
<!-- <td style="text-align: center;font-size: 20px"><a (click)="editUserDetails(us.userid,us.aws_name)"><i class="fa fa-pencil"></i></a></td> -->
|
<!-- <td style="text-align: center;font-size: 20px"><a (click)="editUserDetails(us.userid,us.aws_name)"><i class="fa fa-pencil"></i></a></td> ->
|
||||||
<a (click)="editProductMaster(PM)"><mat-icon>edit</mat-icon></a>
|
<a (click)="editProductMaster(PM)"><mat-icon>edit</mat-icon></a>
|
||||||
<a (click)="deleteProductMaster(PM.product_id)"><mat-icon>delete_outline</mat-icon></a>
|
<a (click)="deleteProductMaster(PM.product_id)"><mat-icon>delete_outline</mat-icon></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table> -->
|
||||||
|
|
||||||
</div>
|
<!-- </div>
|
||||||
<br>
|
<br> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="example-container mat-elevation-z8">
|
<!-- <div class="example-container mat-elevation-z8">
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export class ProductListComponent implements OnInit {
|
|||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','ProductName','Abbr', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ -51,7 +51,7 @@ export class ProductListComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
this.dataSource.sort = this.sort;
|
this.dataSource.sort = this.sort;
|
||||||
this.getProductMaster();
|
//this.getProductMaster();
|
||||||
}
|
}
|
||||||
|
|
||||||
applyFilter(filterValue: string) {
|
applyFilter(filterValue: string) {
|
||||||
@ -59,7 +59,18 @@ export class ProductListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _ProductService: MastersService) {}
|
private _ProductService: MastersService) {
|
||||||
|
this._ProductService.getAllMasterData('PRODUCTS').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
//To open dialog for add the data
|
//To open dialog for add the data
|
||||||
addProductMaster() {
|
addProductMaster() {
|
||||||
@ -92,18 +103,18 @@ export class ProductListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getProductMaster() {
|
// getProductMaster() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._ProductService.getAllMasterData('PRODUCTS').subscribe(dataresult => {
|
// this._ProductService.getAllMasterData('PRODUCTS').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.ProductMasterList = dataresult.records;
|
// this.ProductMasterList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
//To inactive the data
|
//To inactive the data
|
||||||
deleteProductMaster(id: number) {
|
deleteProductMaster(id: number) {
|
||||||
|
|||||||
@ -77,15 +77,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="RegionName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Region Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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>
|
||||||
@ -98,8 +94,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteregions(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -27,20 +27,32 @@ export class RegionsListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
regionsList: any = [];
|
regionsList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['region_id', 'name', 'isactive','actions'];
|
//displayedColumns = ['region_id', 'name', 'isactive','actions'];
|
||||||
//region_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//region_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','RegionName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _regionsService: MastersService) { }
|
private _regionsService: MastersService) {
|
||||||
|
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// get regionsList() {
|
// get regionsList() {
|
||||||
// return this._regionsService.getAllregions();
|
// return this._regionsService.getAllregions();
|
||||||
@ -49,7 +61,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._regionsService);
|
//dataSource = new UserDataSource(this._regionsService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getregions();
|
// this.getregions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,18 +91,18 @@ export class RegionsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getregions() {
|
// getregions() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._regionsService.getAllMasterData('REGIONS').subscribe(dataresult => {
|
// this._regionsService.getAllMasterData('REGIONS').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.regionsList = dataresult.records;
|
// this.regionsList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteregions(id: number) {
|
deleteregions(id: number) {
|
||||||
var PrimaryKeyWithValue ={'region_id':id};
|
var PrimaryKeyWithValue ={'region_id':id};
|
||||||
|
|||||||
@ -96,15 +96,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="RelationShipName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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>
|
||||||
@ -117,8 +113,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editRelationShip(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteRelationShip(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -29,30 +29,43 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
RelationShipList: any = [];
|
RelationShipList: any = [];
|
||||||
|
|
||||||
|
//displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
|
||||||
private _MastersService: MastersService) { }
|
|
||||||
|
|
||||||
// get RelationShipList() {
|
|
||||||
// return this._MastersService.getAllRelationShip();
|
|
||||||
// }
|
|
||||||
|
|
||||||
displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
//relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','RelationShipName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private dialog: MatDialog,
|
||||||
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get RelationShipList() {
|
||||||
|
// return this._MastersService.getAllRelationShip();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getRelationShip();
|
//this.getRelationShip();
|
||||||
}
|
}
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
@ -84,18 +97,18 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getRelationShip() {
|
// getRelationShip() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.RelationShipList = dataresult.records;
|
// this.RelationShipList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteRelationShip(id: number) {
|
deleteRelationShip(id: number) {
|
||||||
var PrimaryKeyWithValue ={'relationship_id':id};
|
var PrimaryKeyWithValue ={'relationship_id':id};
|
||||||
|
|||||||
@ -116,14 +116,14 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="StateName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="RegionName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Region Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.region_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -137,8 +137,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editState(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteState(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,20 +26,31 @@ export class StatesListComponent implements OnInit {
|
|||||||
StateList: any = [];
|
StateList: any = [];
|
||||||
|
|
||||||
//displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
//displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||||
displayedColumns = ['state_id', 'fk_region_id','region_name', 'name', 'code', 'isactive','actions'];
|
// displayedColumns = ['state_id', 'fk_region_id','region_name', 'name', 'code', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','StateName','RegionName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _statesService: MastersService) { }
|
private _statesService: MastersService) {
|
||||||
|
this._statesService.getAllState().subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// get StatesList() {
|
// get StatesList() {
|
||||||
// return this._statesService.getAllStates();
|
// return this._statesService.getAllStates();
|
||||||
@ -48,7 +59,7 @@ export class StatesListComponent implements OnInit {
|
|||||||
//dataSource = new UserDataSource(this._statesService);
|
//dataSource = new UserDataSource(this._statesService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getState();
|
// this.getState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -78,18 +89,18 @@ export class StatesListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getState() {
|
// getState() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._statesService. getAllState().subscribe(dataresult => {
|
// this._statesService. getAllState().subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.StateList = dataresult.records;
|
// this.StateList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteState(id: number) {
|
deleteState(id: number) {
|
||||||
var PrimaryKeyWithValue ={'state_id':id};
|
var PrimaryKeyWithValue ={'state_id':id};
|
||||||
|
|||||||
@ -106,14 +106,14 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="ProductName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Product Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.product_name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
<ng-container matColumnDef="SubProductName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Sub-Product Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
@ -127,8 +127,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editSubProductMaster(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteSubProductMaster(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -26,33 +26,46 @@ export class SubProductListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
SubProductMasterList: any = [];
|
SubProductMasterList: any = [];
|
||||||
|
//displayedColumns = ['subproduct_id','fk_product_id','product_name','name','abbr','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
|
||||||
private _MastersService: MastersService) { }
|
|
||||||
|
|
||||||
// get SubProductMasterList() {
|
|
||||||
// return this._MastersService.getAllSubProductMaster();
|
|
||||||
// }
|
|
||||||
|
|
||||||
displayedColumns = ['subproduct_id','fk_product_id','product_name','name','abbr','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
//subproduct_id, fk_product_id, name, abbr, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//subproduct_id, fk_product_id, name, abbr, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','ProductName','SubProductName','IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private dialog: MatDialog,
|
||||||
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllSubProduct().subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// get SubProductMasterList() {
|
||||||
|
// return this._MastersService.getAllSubProductMaster();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getSubProductMaster();
|
//this.getSubProductMaster();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,18 +94,18 @@ export class SubProductListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getSubProductMaster() {
|
// getSubProductMaster() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllSubProduct().subscribe(dataresult => {
|
// this._MastersService.getAllSubProduct().subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.SubProductMasterList = dataresult.records;
|
// this.SubProductMasterList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteSubProductMaster(id: number) {
|
deleteSubProductMaster(id: number) {
|
||||||
var PrimaryKeyWithValue ={'subproduct_id':id};
|
var PrimaryKeyWithValue ={'subproduct_id':id};
|
||||||
|
|||||||
@ -96,16 +96,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="TitleName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Title Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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}}-->
|
||||||
@ -117,8 +112,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editTitle(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteTitle(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -27,33 +27,42 @@ export class TitleListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
TitleList: any = [];
|
TitleList: any = [];
|
||||||
|
//displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
|
||||||
private _MastersService: MastersService) { }
|
|
||||||
|
|
||||||
displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
|
|
||||||
//title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','TitleName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private dialog: MatDialog,
|
||||||
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('TITLES').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// get TitleList() {
|
// get TitleList() {
|
||||||
// return this._MastersService.getAllTitle();
|
// return this._MastersService.getAllTitle();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getTitle();
|
//this.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -83,18 +92,18 @@ export class TitleListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getTitle() {
|
// getTitle() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('TITLES').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('TITLES').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.TitleList = dataresult.records;
|
// this.TitleList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
deleteTitle(id: number) {
|
deleteTitle(id: number) {
|
||||||
var PrimaryKeyWithValue ={'title_id':id};
|
var PrimaryKeyWithValue ={'title_id':id};
|
||||||
|
|||||||
@ -25,25 +25,36 @@ export class ActivityListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
ActivityList: any = [];
|
ActivityList: any = [];
|
||||||
|
|
||||||
displayedColumns = ['type_of_activity_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
// displayedColumns = ['type_of_activity_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','ActivityName','IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _MastersService: MastersService) { }
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// dataSource = new UserDataSource(this._MastersService);
|
// dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getActivity();
|
//this.getActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,18 +84,18 @@ export class ActivityListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getActivity() {
|
// getActivity() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.ActivityList = dataresult.records;
|
// this.ActivityList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
deleteActivity(id: number) {
|
deleteActivity(id: number) {
|
||||||
|
|||||||
@ -90,15 +90,11 @@
|
|||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="CityName">
|
<ng-container matColumnDef="UOMName">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> UOM Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="StateName">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> State Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.cityname}} </mat-cell>
|
|
||||||
</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>
|
||||||
@ -111,8 +107,8 @@
|
|||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> 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 class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editCity(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editUOM(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.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
<button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteUOM(row.city_id)"><mat-icon>delete_outline</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -29,31 +29,43 @@ export class UomListComponent implements OnInit {
|
|||||||
isPopupOpened = true;
|
isPopupOpened = true;
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
UOMList: any = [];
|
UOMList: any = [];
|
||||||
|
//displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
||||||
constructor(private dialog: MatDialog,
|
|
||||||
private _MastersService: MastersService) { }
|
|
||||||
|
|
||||||
// get UOMList() {
|
|
||||||
// return this._MastersService.getAllUom();
|
|
||||||
// }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.getUOM();
|
|
||||||
}
|
|
||||||
|
|
||||||
displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
|
|
||||||
//uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
//uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
|
||||||
|
|
||||||
userData = null;
|
userData = null;
|
||||||
|
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
// displayedColumns = ['SerialNo','BranchName','CityName', 'IsActive','Actions'];
|
displayedColumns = ['SerialNo','UOMName', 'IsActive','Actions'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private dialog: MatDialog,
|
||||||
|
private _MastersService: MastersService) {
|
||||||
|
this._MastersService.getAllMasterData('UOM').subscribe(
|
||||||
|
data => {
|
||||||
|
this.userData = data.records;
|
||||||
|
if(data.records === ''){
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
}else{
|
||||||
|
this.dataLength = 0}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get UOMList() {
|
||||||
|
// return this._MastersService.getAllUom();
|
||||||
|
// }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
//this.getUOM();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._MastersService);
|
//dataSource = new UserDataSource(this._MastersService);
|
||||||
|
|
||||||
|
|
||||||
@ -84,15 +96,15 @@ export class UomListComponent implements OnInit {
|
|||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getUOM() {
|
getUOM() {
|
||||||
this.loader = true;
|
// this.loader = true;
|
||||||
this._MastersService.getAllMasterData('UOM').subscribe(dataresult => {
|
// this._MastersService.getAllMasterData('UOM').subscribe(dataresult => {
|
||||||
|
|
||||||
this.loader = false;
|
// this.loader = false;
|
||||||
|
|
||||||
if (dataresult.dataStatus === true) {
|
// if (dataresult.dataStatus === true) {
|
||||||
this.UOMList = dataresult.records;
|
// this.UOMList = dataresult.records;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { of } from 'rxjs';
|
|||||||
|
|
||||||
/** Imported Service Files Are., */
|
/** Imported Service Files Are., */
|
||||||
import { AwsService } from '../../../AwsService/aws.service';
|
import { AwsService } from '../../../AwsService/aws.service';
|
||||||
|
import { environment } from 'environments/environment';
|
||||||
|
|
||||||
|
|
||||||
/** Consant Value For Created Date And Updated Date */
|
/** Consant Value For Created Date And Updated Date */
|
||||||
@ -24,7 +25,7 @@ export interface Master {
|
|||||||
export class MastersService {
|
export class MastersService {
|
||||||
|
|
||||||
|
|
||||||
private apiUrl = 'http://localhost/sparqapi/api/';
|
private apiUrl = environment.apiUrl;
|
||||||
|
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import { Injectable } from '@angular/core';
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
import { AwsService } from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
const apiurl = 'http://localhost/sineedge/sparqapi/api/';
|
import { environment } from 'environments/environment';
|
||||||
|
const apiurl = environment.apiUrl;
|
||||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|||||||
@ -23,5 +23,6 @@ export const environment = {
|
|||||||
sts_endpoint: '',
|
sts_endpoint: '',
|
||||||
dynamodb_endpoint: '',
|
dynamodb_endpoint: '',
|
||||||
s3_endpoint: '',
|
s3_endpoint: '',
|
||||||
accessToken:''
|
accessToken:'',
|
||||||
|
apiUrl:'http://localhost/sparqapi/api/'
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user