pd mrge changes
This commit is contained in:
parent
70df2c85df
commit
5b76899b13
@ -24,10 +24,10 @@ import { CognitoService } from './cognito.service';
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const sineedge_poolData = {
|
// const sineedge_poolData = {
|
||||||
UserPoolId: "ap-south-1_y7dt3iEaX", //ap-south-1_qQ85yQZJO UserName :SPARQ_SINEEDGE_DEV
|
// UserPoolId: "ap-south-1_y7dt3iEaX", //ap-south-1_qQ85yQZJO UserName :SPARQ_SINEEDGE_DEV
|
||||||
ClientId: "291qt4smn5pql6o8cc2hi201lj" // ClientName: SINEEDGE_DEV_WEB
|
// ClientId: "291qt4smn5pql6o8cc2hi201lj" // ClientName: SINEEDGE_DEV_WEB
|
||||||
};
|
// };
|
||||||
const sineedgedev_poolData = {
|
const sineedgedev_poolData = {
|
||||||
UserPoolId: "ap-south-1_qQ85yQZJO", // UserName :SPARQ_SINEEDGE_DEV
|
UserPoolId: "ap-south-1_qQ85yQZJO", // UserName :SPARQ_SINEEDGE_DEV
|
||||||
ClientId: "2o5c3cs9k3als16nqhp3irh8rs" // ClientName: SINEEDGE_DEV_WEB
|
ClientId: "2o5c3cs9k3als16nqhp3irh8rs" // ClientName: SINEEDGE_DEV_WEB
|
||||||
@ -37,10 +37,10 @@ const lender_poolData = {
|
|||||||
ClientId: "6egsdssf0i7h2o9mscqgqbn788" // ClientName:LENDER_DEV_WEB
|
ClientId: "6egsdssf0i7h2o9mscqgqbn788" // ClientName:LENDER_DEV_WEB
|
||||||
};
|
};
|
||||||
const vendor_poolData = {
|
const vendor_poolData = {
|
||||||
UserPoolId: "",
|
UserPoolId: "ap-south-1_K57yPaWxV",
|
||||||
ClientId: ""
|
ClientId: ""
|
||||||
}
|
}
|
||||||
const sineedgeUserPool = new CognitoUserPool(sineedge_poolData);
|
// const sineedgeUserPool = new CognitoUserPool(sineedge_poolData);
|
||||||
const lenderUserPool = new CognitoUserPool(lender_poolData);
|
const lenderUserPool = new CognitoUserPool(lender_poolData);
|
||||||
const sineedgedevUserpool = new CognitoUserPool(sineedgedev_poolData);
|
const sineedgedevUserpool = new CognitoUserPool(sineedgedev_poolData);
|
||||||
|
|
||||||
@ -48,8 +48,8 @@ const sineedgedevUserpool = new CognitoUserPool(sineedgedev_poolData);
|
|||||||
* Identity PoolID
|
* Identity PoolID
|
||||||
*/
|
*/
|
||||||
const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";
|
const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";
|
||||||
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
|
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
|
||||||
const vendorIdenttiy = "";
|
const vendorIdenttiy = "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874";
|
||||||
// serviceProvider
|
// serviceProvider
|
||||||
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
|
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
//const apiurl = "http://localhost/sparqapi/api/";
|
//const apiurl = "http://localhost/sparqapi/api/";
|
||||||
@ -355,6 +355,29 @@ export class AwsService {
|
|||||||
/* more items */
|
/* more items */
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
}else if(userData.type.entity_type_id == 3){
|
||||||
|
params = {
|
||||||
|
UserPoolId: vendor_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.email /* required */,
|
||||||
|
DesiredDeliveryMediums: [
|
||||||
|
"EMAIL"
|
||||||
|
/* more items */
|
||||||
|
],
|
||||||
|
// ForceAliasCreation: true || false,
|
||||||
|
MessageAction: "SUPPRESS",
|
||||||
|
TemporaryPassword: "temp1234",
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: userData.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91" + userData.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
console.log(params);
|
console.log(params);
|
||||||
return Observable.create(observe => {
|
return Observable.create(observe => {
|
||||||
@ -390,27 +413,19 @@ export class AwsService {
|
|||||||
this.getconfig();
|
this.getconfig();
|
||||||
|
|
||||||
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
||||||
if(userData.userid === null ){
|
|
||||||
for(let role of userData.role){
|
|
||||||
|
|
||||||
let params: any;
|
let params: any;
|
||||||
if (userData.type.entity_type_id == 1) {
|
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
GroupName: role.GroupName /* required */,
|
GroupName: "ADMIN" /* required */,
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
};
|
};
|
||||||
|
|
||||||
} else if (userData.type.entity_type_id == 2) {
|
|
||||||
params = {
|
|
||||||
GroupName: role.GroupName /* required */,
|
|
||||||
UserPoolId: lender_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
|
||||||
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
//(params);
|
//(params);
|
||||||
return Observable.create(observe=>{
|
return Observable.create(observe=>{
|
||||||
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
@ -431,50 +446,9 @@ export class AwsService {
|
|||||||
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}else{
|
}
|
||||||
let params :any;
|
|
||||||
console.log(userData);
|
|
||||||
console.log(cognitodata);
|
|
||||||
if (userData.fk_entity_id == 1) {
|
|
||||||
|
|
||||||
params = {
|
|
||||||
GroupName: cognitodata.GroupName /* required */,
|
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
|
||||||
Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
|
||||||
};
|
|
||||||
|
|
||||||
} else if (userData.fk_entity_id == 2) {
|
|
||||||
params = {
|
|
||||||
GroupName: cognitodata.GroupName /* required */,
|
|
||||||
UserPoolId: lender_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
|
||||||
Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
//(params);
|
|
||||||
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
|
||||||
|
|
||||||
cognitoidentityserviceprovider.adminAddUserToGroup(params, function (
|
|
||||||
err,
|
|
||||||
data
|
|
||||||
) {
|
|
||||||
if (err) {
|
|
||||||
alert(err.message);
|
|
||||||
}//(err, err.stack);
|
|
||||||
// an error occurred
|
|
||||||
else {//(data);
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -560,7 +534,7 @@ export class AwsService {
|
|||||||
)[0];
|
)[0];
|
||||||
// (userGroup);
|
// (userGroup);
|
||||||
if (userGroup == "ADMIN") {
|
if (userGroup == "ADMIN") {
|
||||||
if (userData.fk_entity_id == 1) {
|
if (userData.fk_entity_type_id == 1) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
||||||
Username: userData.aws_name,//userData.email /* required */,
|
Username: userData.aws_name,//userData.email /* required */,
|
||||||
@ -579,7 +553,7 @@ export class AwsService {
|
|||||||
/* more items */
|
/* more items */
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if (userData.fk_entity_id == 2) {
|
} else if (userData.fk_entity_type_id == 2) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: lender_poolData.UserPoolId /* required */,
|
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||||
Username: userData.aws_name /* required */,
|
Username: userData.aws_name /* required */,
|
||||||
|
|||||||
@ -398,10 +398,10 @@
|
|||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-sidenav>
|
</mat-sidenav>
|
||||||
</mat-sidenav-container>
|
</mat-sidenav-container>
|
||||||
<!-- Demo Purposes Only -->
|
<!-- Settings icon -->
|
||||||
<button mat-fab color="warn" class="mat-fab-bottom-right" (click)="showSettings = true">
|
<!-- <button mat-fab color="warn" class="mat-fab-bottom-right" (click)="showSettings = true">
|
||||||
<mat-icon class="mat-24">settings</mat-icon>
|
<mat-icon class="mat-24">settings</mat-icon>
|
||||||
</button>
|
</button>-->
|
||||||
<mat-card class="settings-panel" *ngIf="showSettings">
|
<mat-card class="settings-panel" *ngIf="showSettings">
|
||||||
<mat-toolbar color="warn">
|
<mat-toolbar color="warn">
|
||||||
<span fxFlex>Options</span>
|
<span fxFlex>Options</span>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
layoutDir = 'ltr';
|
layoutDir = 'ltr';
|
||||||
menuLayout : any = 'vertical-menu';
|
menuLayout : any = 'vertical-menu';
|
||||||
selectedSidebarImage : any = 'bg-1';
|
selectedSidebarImage : any = 'bg-1';
|
||||||
selectedSidebarColor : any = 'sidebar-blue';
|
selectedSidebarColor : any = 'sidebar-red';
|
||||||
selectedHeaderColor : any = 'header-default';
|
selectedHeaderColor : any = 'header-default';
|
||||||
collapsedClass : any = 'side-panel-opened';
|
collapsedClass : any = 'side-panel-opened';
|
||||||
|
|
||||||
|
|||||||
@ -20,9 +20,9 @@ export interface Master {
|
|||||||
|
|
||||||
export class PdTrigerService {
|
export class PdTrigerService {
|
||||||
|
|
||||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||||
//private apiUrl = "http://ssa.sineedge.com/sparqtest/api/";
|
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
private _aws:AwsService) { }
|
private _aws:AwsService) { }
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
import { CompanyDetailsModule } from './company-details.module';
|
||||||
|
|
||||||
|
describe('CompanyDetailsModule', () => {
|
||||||
|
let companyDetailsModule: CompanyDetailsModule;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
companyDetailsModule = new CompanyDetailsModule();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(companyDetailsModule).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
],
|
||||||
|
declarations: []
|
||||||
|
})
|
||||||
|
export class CompanyDetailsModule { }
|
||||||
12
ng6-seed/src/app/settings/company-details/company-details.routing.ts
Executable file
12
ng6-seed/src/app/settings/company-details/company-details.routing.ts
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
import { Routes } from '@angular/router';
|
||||||
|
//import { MastersComponent } from './masters.component';
|
||||||
|
|
||||||
|
|
||||||
|
export const CompanyDetailsRoutes: Routes = [
|
||||||
|
{
|
||||||
|
|
||||||
|
//path: '',
|
||||||
|
//component: PdTeamListComponent
|
||||||
|
//component: IndustryMasterListComponent
|
||||||
|
|
||||||
|
}];
|
||||||
@ -1,130 +1,80 @@
|
|||||||
<!-- <div style="text-align: right;">
|
<mat-card-content>
|
||||||
<!-- <button mat-stroked-button [color]="color" (click)="addBranch()"> + Add Branch</button> -->
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <button mat-icon-button class="mr-1 mb-1 hover-icon" style="height: 40%;" ><mat-icon>add_box</mat-icon></button> -->
|
<!-- <div class="filter-header">
|
||||||
|
<mat-form-field>
|
||||||
<!-- <button mat-fab class="mr-1 mb-1" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button> -->
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
<!-- <mat-button-toggle class="mr-1 mb-1">Single toggle</mat-button-toggle> -->
|
</mat-form-field>
|
||||||
<!-- </div> -->
|
</div> -->
|
||||||
<!-- <br> -->
|
|
||||||
<!-- <div *ngIf="loader">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
</div>
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<br> -->
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
<mat-card-content>
|
</mat-form-field>
|
||||||
<div *ngIf="!noRecordFound" class="example-container mat-elevation-z8">
|
|
||||||
<!-- <div class="example-header" fxLayout="row">
|
|
||||||
<div class="ml-xs mr-xs" style="width: 80%;">
|
|
||||||
<mat-form-field>
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="example-header">
|
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
|
||||||
<!-- <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;"color="primary" ><mat-icon>add</mat-icon></button> -->
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
|
||||||
<ng-container matColumnDef="serialno">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row;" class="example-margin"> {{row.serialno}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="branch_id">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch ID </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.branch_id}} </mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<ng-container matColumnDef="name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
|
||||||
<!-- <mat-cell *matCellDef="let row">{{row.branch_id.toString() + ' ' + row.name.toString()}} </mat-cell> -->
|
|
||||||
<mat-cell *matCellDef="let row">{{row.name}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="city_name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row">
|
|
||||||
<!-{{row.isactive}}->
|
|
||||||
<mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
|
||||||
<ng-template #notactive>
|
|
||||||
<mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon>
|
|
||||||
</ng-template>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<ng-container matColumnDef="actions">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Actions </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row">
|
|
||||||
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
|
||||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteBranch(row.branch_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
|
||||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
|
||||||
checked="true" [color]="color"
|
|
||||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle>
|
|
||||||
<ng-template #notactive >
|
|
||||||
<mat-slide-toggle
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Inactive" matTooltipPosition="above"
|
|
||||||
checked="false" [color]="color"
|
|
||||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle></ng-template>
|
|
||||||
<!-- <mat-slide-toggle
|
|
||||||
class="example-margin"
|
|
||||||
[color]="color"
|
|
||||||
[checked]="checked"
|
|
||||||
[disabled]="disabled"
|
|
||||||
(change)="changed(row.branch_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle> -->
|
|
||||||
<!-- <mat-slide-toggle (change)="changed()"> Slide me!</mat-slide-toggle> -->
|
|
||||||
<!-- <button mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)" *ngIf="row.isactive == 1;else notactive;"><mat-icon>done</mat-icon></button>
|
|
||||||
<ng-template #notactive ><button mat-icon-button class="deactive" matTooltip="Inactive" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>clear</mat-icon></button></ng-template> -->
|
|
||||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>done</mat-icon></button>
|
|
||||||
<button *ngIf="row.isactive == 0;" mat-icon-button class="deactive" matTooltip="Inactive" matTooltipPosition="above" (click)="isactiveBranch(row.branch_id,row.isactive)"><mat-icon>close</mat-icon></button> -->
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
|
||||||
</mat-row>
|
|
||||||
</mat-table>
|
|
||||||
|
|
||||||
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<mat-table [dataSource]="dataSource" *ngIf="!noRecordFound" matSort>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="serialno">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="name">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Branch Name </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"> {{row.name}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="city_name">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> City Name </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"> {{row.city_name}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="actions">
|
||||||
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row">
|
||||||
|
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editBranch(row)"><mat-icon>edit</mat-icon></button>
|
||||||
|
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCity(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="isactive">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||||
|
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||||
|
class="example-margin"
|
||||||
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
|
checked="true" [color]="color"
|
||||||
|
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle>
|
||||||
|
<ng-template #notactive >
|
||||||
|
<mat-slide-toggle
|
||||||
|
class="example-margin"
|
||||||
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
|
checked="false" [color]="color"
|
||||||
|
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle></ng-template>
|
||||||
|
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
|
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
</mat-row>
|
||||||
|
</mat-table>
|
||||||
|
|
||||||
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<!-- <p *ngIf="dataSource.length === 0">No records found</p> -->
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -1,126 +1,14 @@
|
|||||||
|
/** Table SerialNo CSS */
|
||||||
/* Structure
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 56px;
|
|
||||||
max-height: 56px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
font-size: 20px;
|
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-input-container {
|
|
||||||
font-size: 14px;
|
|
||||||
flex-grow: 1;
|
|
||||||
margin-left: 32px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-no-results {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 24px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
Selection styles
|
|
||||||
.example-selection-header {
|
|
||||||
font-size: 18px;
|
|
||||||
background: rgba(255, 64, 129, 0.3);
|
|
||||||
border-bottom: 1px solid #d696ac;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-column-select {
|
|
||||||
max-width: 54px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-row:hover, .example-selected-row {
|
|
||||||
background: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-row:active, .mat-row.example-selected-row {
|
|
||||||
background: #eaeaea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-table {
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 500px;
|
|
||||||
}
|
|
||||||
/*** Structure *
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 30px;
|
|
||||||
width : 80%;
|
|
||||||
margin : 20px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}****/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// .example-header {
|
|
||||||
// min-height: 56px;
|
|
||||||
// max-height: 56px;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// padding: 8px 24px 0;
|
|
||||||
// font-size: 20px;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// border-bottom: 1px solid transparent;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// .active:hover{
|
|
||||||
// color: green;
|
|
||||||
// font-size: 20px;
|
|
||||||
// }
|
|
||||||
// .deactive:hover{
|
|
||||||
// color: red;
|
|
||||||
// font-size: 20px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mat-cell{
|
|
||||||
// display:flex !important;
|
|
||||||
// justify-content:center!important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mat-header-cell {
|
|
||||||
// display:flex;
|
|
||||||
// justify-content:center;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-h2 {
|
|
||||||
// margin: 10px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-section {
|
|
||||||
// display: flex;
|
|
||||||
// align-content: center;
|
|
||||||
// align-items: center;
|
|
||||||
// height: 60px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.example-margin {
|
.example-margin {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Table CSS - Dislplay Data */
|
||||||
.mat-table {
|
.mat-table {
|
||||||
display: table;
|
display: table;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 500px;
|
||||||
|
|
||||||
> .mat-header-row, > .mat-row {
|
> .mat-header-row, > .mat-row {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
@ -137,54 +25,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Table CSS -nocontent */
|
||||||
.mat-form-field {
|
|
||||||
font-size: 14px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nocontent {
|
.nocontent {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
//display:flex;
|
|
||||||
//justify-content:center;
|
|
||||||
// min-height: 56px;
|
|
||||||
// max-height: 56px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example-container {
|
/** Table CSS - Search(or)Filter Field */
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** new ..**
|
|
||||||
.example-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-header {
|
|
||||||
min-height: 64px;
|
|
||||||
padding: 8px 24px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-form-field {
|
.mat-form-field {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-table {
|
.filter-container {
|
||||||
overflow: auto;
|
display: flex;
|
||||||
max-height: 500px;
|
flex-direction: column;
|
||||||
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
.filter-header {
|
||||||
|
min-height: 64px;
|
||||||
|
padding: 8px 24px 0;
|
||||||
|
}
|
||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
@ -77,11 +77,12 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<!-- <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button> -->
|
<!-- <button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addBranch()" matTooltip="Add Branch" matTooltipPosition="above"><mat-icon>add</mat-icon></button> -->
|
||||||
@ -91,7 +92,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort>
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -160,11 +161,11 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -63,18 +63,19 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
|
|
||||||
@ -85,7 +86,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -139,9 +140,8 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
@ -71,20 +71,20 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerBehaviour()" matTooltip="Add Customer Behaviour" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerBehaviour()" matTooltip="Add Customer Behaviour" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -140,9 +140,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
|
||||||
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
<!-- <div *ngIf="noRecordFound" style="color: red; font-size: 16px;">No records found</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,25 +67,26 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerSegment()" matTooltip="Add Customer Segment" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addCustomerSegment()" matTooltip="Add Customer Segment" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -136,9 +137,8 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -67,18 +67,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addDesignation()" matTooltip="Add Designation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addDesignation()" matTooltip="Add Designation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -87,7 +88,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -135,11 +136,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|||||||
@ -76,18 +76,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addFrequency()" matTooltip="Add Frequency" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addFrequency()" matTooltip="Add Frequency" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -96,7 +97,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -142,9 +143,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||||
</div> <br> -->
|
</div> <br> -->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
|
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -15,17 +15,18 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addIndustryClassification()" matTooltip="Add Industry Classification" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addIndustryClassification()" matTooltip="Add Industry Classification" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -72,12 +73,12 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="noRecordFound" class="example-container mat-elevation-z8">
|
<!-- <div *ngIf="noRecordFound" class="example-container mat-elevation-z8">
|
||||||
<div class="nocontent">No records found</div>
|
<div class="nocontent">No records found</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -62,18 +62,19 @@
|
|||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addLenderHierarchy()" matTooltip="Add Lender Hierarchy" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addLenderHierarchy()" matTooltip="Add Lender Hierarchy" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -81,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -132,10 +133,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -80,18 +80,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addMemberOccupation()" matTooltip="Add Member's Occupation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addMemberOccupation()" matTooltip="Add Member's Occupation" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -100,7 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -150,9 +151,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -63,25 +63,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdLocationApproach()" matTooltip="Add Pd Location Approach" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdLocationApproach()" matTooltip="Add Pd Location Approach" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -129,9 +130,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row; let i = index;"> {{i+1}} </mat-cell>
|
<mat-cell *matCellDef="let row;"> {{row.serialno}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="pdnotification_id">
|
<ng-container matColumnDef="pdnotification_id">
|
||||||
|
|||||||
@ -128,12 +128,12 @@ export class PdNotificationListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
//console.log(this.notificationData);
|
//console.log(this.notificationData);
|
||||||
this.dataLength = data.records.length;
|
this.dataLength = data.records.length;
|
||||||
// if(data.records.length >= 1){
|
if(data.records.length >= 1){
|
||||||
// this.notificationData = this.notificationData.map((val, i)=>{
|
this.notificationData = this.notificationData.map((val, i)=>{
|
||||||
// val['serialno'] = i + 1;
|
val['serialno'] = i + 1;
|
||||||
// return val;
|
return val;
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
this.dataSource.data = this.notificationData;
|
this.dataSource.data = this.notificationData;
|
||||||
}else{
|
}else{
|
||||||
this.noRecordFound = true;
|
this.noRecordFound = true;
|
||||||
@ -193,7 +193,7 @@ SaveData(dataSource){
|
|||||||
dataresult => {
|
dataresult => {
|
||||||
if(dataresult.dataStatus == true){
|
if(dataresult.dataStatus == true){
|
||||||
//alert('Updated Successfully !');
|
//alert('Updated Successfully !');
|
||||||
this.getPdNotification();
|
//this.getPdNotification();
|
||||||
this.notifier.notify('success', 'Record Updated Successfully.!');
|
this.notifier.notify('success', 'Record Updated Successfully.!');
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -1,149 +0,0 @@
|
|||||||
|
|
||||||
<!-- <div style="text-align: right;">
|
|
||||||
<!- <button mat-stroked-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button> ->
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<mat-card-content>
|
|
||||||
<!-- <div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
|
||||||
</div> <br> -->
|
|
||||||
|
|
||||||
<!-- <div *ngIf="!noRecordFound" class="example-container mat-elevation-z8"> -->
|
|
||||||
<!-- <div class="example-header">
|
|
||||||
<mat-form-field>
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <mat-table [dataSource]="dataSource" matSort > -->
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="serialno">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="team_name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}--
|
|
||||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
|
||||||
checked="true"
|
|
||||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle>
|
|
||||||
<ng-template #notactive >
|
|
||||||
<mat-slide-toggle
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Inactive" matTooltipPosition="above"
|
|
||||||
checked="false"
|
|
||||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle></ng-template>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<!-- <ng-container matColumnDef="actions">
|
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row">
|
|
||||||
<button mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container> -->
|
|
||||||
|
|
||||||
<!-- <mat-header-row *matHeaderRo wDef="displayedColumns"></mat-header-row>
|
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
|
||||||
</mat-row>
|
|
||||||
</mat-table> -->
|
|
||||||
|
|
||||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
|
||||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
|
||||||
<!-- <button mat-raised-button color="primary" (click)="ExportTOExcel()">Export as Excel</button> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
|
||||||
<!-- <div class="filter-header">
|
|
||||||
<mat-form-field>
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div> -->
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="team_name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
|
||||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
|
||||||
checked="true" [color]="color"
|
|
||||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle>
|
|
||||||
<ng-template #notactive >
|
|
||||||
<mat-slide-toggle
|
|
||||||
class="example-margin"
|
|
||||||
matTooltip="Inactive" matTooltipPosition="above"
|
|
||||||
checked="false" [color]="color"
|
|
||||||
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
|
||||||
onclick="return confirm('Are you sure?')">
|
|
||||||
</mat-slide-toggle></ng-template>
|
|
||||||
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
|
||||||
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="actions">
|
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let row">
|
|
||||||
<!-- <button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editMemberOccupation(row)"><mat-icon>edit</mat-icon></button> -->
|
|
||||||
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
|
|
||||||
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteMemberOccupation(row.occupation_non_earning_member_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
|
||||||
</mat-row>
|
|
||||||
</mat-table>
|
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
|
||||||
|
|
||||||
</mat-card-content>
|
|
||||||
<notifier-container></notifier-container>
|
|
||||||
@ -1,152 +0,0 @@
|
|||||||
import { Component,
|
|
||||||
OnInit,
|
|
||||||
ViewChild } from '@angular/core';
|
|
||||||
|
|
||||||
import { MatDialog,
|
|
||||||
MatDialogRef,
|
|
||||||
MatDialogConfig,
|
|
||||||
MatPaginator,
|
|
||||||
MatSort,
|
|
||||||
MatTableDataSource } from '@angular/material';
|
|
||||||
/** Service */
|
|
||||||
import { MastersService } from '../../../../service/masters/masters.service';
|
|
||||||
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
|
||||||
|
|
||||||
/** Dialog Component */
|
|
||||||
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-pd-team-list',
|
|
||||||
templateUrl: './pd-team-list.component.html',
|
|
||||||
styleUrls: ['./pd-team-list.component.scss']
|
|
||||||
})
|
|
||||||
export class PdTeamListComponent implements OnInit {
|
|
||||||
|
|
||||||
//Variable Declaration part
|
|
||||||
isPopupOpened: boolean = true;
|
|
||||||
loader: boolean = false;
|
|
||||||
PdTeamList: any = [];
|
|
||||||
color = 'primary';
|
|
||||||
userData = null;
|
|
||||||
noRecordFound: boolean = false;
|
|
||||||
|
|
||||||
|
|
||||||
public dataLength: number;
|
|
||||||
public dataSource = new MatTableDataSource();
|
|
||||||
displayedColumns = ['serialno','team_name','actions', 'isactive'];
|
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
|
||||||
|
|
||||||
constructor(private dialog: MatDialog,
|
|
||||||
private _MasterService: MastersService,
|
|
||||||
private _PdTeamService: PdTeamService) {
|
|
||||||
this.getPdTeam();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {}
|
|
||||||
|
|
||||||
//To open dialog for add the data
|
|
||||||
addPdTeam() {
|
|
||||||
this.isPopupOpened = true;
|
|
||||||
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
|
|
||||||
data: {}
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
|
||||||
this.getPdTeam();
|
|
||||||
this.isPopupOpened = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//To open dialog for edit the data
|
|
||||||
editPdTeam(arr: any[]) {
|
|
||||||
// let a:any;
|
|
||||||
// if(arr.length !=0){
|
|
||||||
// a = arr;
|
|
||||||
// }else{
|
|
||||||
// a ='';
|
|
||||||
// }
|
|
||||||
// console.log(a);
|
|
||||||
this.isPopupOpened = true;
|
|
||||||
const dialogRef = this.dialog.open(PdTeamDialogComponent, {
|
|
||||||
|
|
||||||
data: arr
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
|
||||||
this.getPdTeam();
|
|
||||||
this.isPopupOpened = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//To get data for listing
|
|
||||||
getPdTeam() {
|
|
||||||
|
|
||||||
//this.loader = true;
|
|
||||||
this._PdTeamService.getAllPdTeamList().subscribe(
|
|
||||||
//this._MasterService.getAllMasterData('PDTEAM').subscribe(
|
|
||||||
data => {
|
|
||||||
if(data.dataStatus == true){
|
|
||||||
//this.loader = false;
|
|
||||||
this.noRecordFound = false;
|
|
||||||
this.userData = data.records;
|
|
||||||
this.dataLength = data.records.length;
|
|
||||||
if(data.records.length >= 1){
|
|
||||||
this.userData = this.userData.map((val, i)=>{
|
|
||||||
val['serialno'] = i + 1;
|
|
||||||
return val;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.dataSource.data = this.userData;
|
|
||||||
}else{
|
|
||||||
this.noRecordFound = true;
|
|
||||||
this.dataLength = 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//To inactive the data
|
|
||||||
deletePdTeam(id: number) {
|
|
||||||
var PrimaryKeyWithValue ={'pdteam_id':id};
|
|
||||||
this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'PDTEAM')
|
|
||||||
.subscribe( data => { });
|
|
||||||
this.getPdTeam();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
|
||||||
isactivePdTeam(id: number,isactive : number) {
|
|
||||||
|
|
||||||
let ActiveDatas = isactive == 0
|
|
||||||
? { 'pdteam_id':id,'isactive': '1'}
|
|
||||||
: { 'pdteam_id':id,'isactive': '0'}
|
|
||||||
|
|
||||||
this._MasterService.editMasterDetails(ActiveDatas,'PDTEAM')
|
|
||||||
.subscribe(dataresult=>{
|
|
||||||
if (dataresult.dataStatus == true){
|
|
||||||
//alert("my check");
|
|
||||||
this.getPdTeam();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** For Display Tables Pagination And Sorting */
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.dataSource.paginator = this.paginator;
|
|
||||||
this.dataSource.sort = this.sort;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** For Display Tables Filtering */
|
|
||||||
applyFilter(filterValue: string) {
|
|
||||||
filterValue = filterValue.trim(); // Remove whitespace
|
|
||||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
|
||||||
this.dataSource.filter = filterValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
/** End of ListComponent */
|
|
||||||
@ -61,18 +61,19 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
|
|
||||||
@ -81,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -129,9 +130,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
<br> -->
|
<br> -->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
@ -16,19 +16,19 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div *ngIf="noRecordFound" class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addProductMaster()" matTooltip="Add Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addProductMaster()" matTooltip="Add Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -82,9 +82,9 @@
|
|||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
<!-- Copyright 2018 Google Inc. All Rights Reserved.
|
<!-- Copyright 2018 Google Inc. All Rights Reserved.
|
||||||
Use of this source code is governed by an MIT-style license that
|
Use of this source code is governed by an MIT-style license that
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br> -->
|
<br> -->
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
@ -17,17 +17,18 @@
|
|||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addQuestionCategory()" matTooltip="Add Question Category" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addQuestionCategory()" matTooltip="Add Question Category" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -73,7 +74,7 @@
|
|||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator> -->
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 15, 20, 25]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,92 +1,19 @@
|
|||||||
|
<mat-card-content>
|
||||||
<!-- <div style="text-align: right;">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <button mat-stroked-button [color]="color" > + Add regions</button> --
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<mat-card-content>
|
|
||||||
<!-- <div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
|
||||||
</div>
|
|
||||||
<br> -->
|
|
||||||
<!-- <div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
|
||||||
</div> <br> -->
|
|
||||||
<!-- <div datatable>
|
|
||||||
<table style="border-collapse: collapse">
|
|
||||||
<thead>
|
|
||||||
<th style="text-align: center;">#</th>
|
|
||||||
<th style="text-align: center;">Regions Name</th>
|
|
||||||
<th style="text-align: center;">IsActive</th>
|
|
||||||
<th style="text-align: center;">Action</th>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tr *ngIf="regionsList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
|
|
||||||
<tr *ngFor="let RL of regionsList; let i=index">
|
|
||||||
<td style="text-align: center;">{{i+1}}</td>
|
|
||||||
<td style="text-align: center;">{{RL.name}}</td>
|
|
||||||
<td style="text-align: center;">{{RL.isactive}}</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<a (click)="editregions(RL)"><mat-icon>edit</mat-icon></a>
|
|
||||||
<a (click)="deleteregions(RL.region_id)"><mat-icon>delete_outline</mat-icon></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--<div> <mat-table [dataSource]="dataSource"> ->
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
|
||||||
<ng-container matColumnDef="name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.name}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="region_id">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.region_id}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> isactive </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.isactive}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="actions">
|
|
||||||
<mat-header-cell *matHeaderCellDef></mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user">
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(user)"><mat-icon>edit</mat-icon></button>
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteregions(user.regions_id)"><mat-icon>delete_outline</mat-icon></button>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
|
||||||
</mat-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>-->
|
|
||||||
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
|
||||||
<!-- <div class="filter-header">
|
|
||||||
<mat-form-field>
|
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
|
||||||
</mat-form-field>
|
|
||||||
</div> -->
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addregions()" matTooltip="Add Region" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addregions()" matTooltip="Add Region" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -97,13 +24,10 @@
|
|||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Region 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="isactive">
|
<ng-container matColumnDef="isactive">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||||
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
|
||||||
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
|
|
||||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||||
class="example-margin"
|
class="example-margin"
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
@ -126,19 +50,14 @@
|
|||||||
<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 [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editregions(row)"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button [color]="color" 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)="deleteregions(row.regions_id)"><mat-icon>delete_outline</mat-icon></button> -->
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -82,18 +82,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addRelationShip()" matTooltip="Add Relation ship" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addRelationShip()" matTooltip="Add Relation ship" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -103,7 +104,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -111,7 +112,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Relation Ship Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Relationship 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>
|
||||||
|
|
||||||
@ -152,10 +153,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -102,18 +102,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>-->
|
<br>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addState()" matTooltip="Add State" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addState()" matTooltip="Add State" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -122,7 +123,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -175,10 +176,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<!-- <div style="text-align: right;"> -->
|
||||||
<!-- <button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button> -->
|
<!-- <button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button> -->
|
||||||
|
|
||||||
</div>
|
<!-- </div>
|
||||||
<br>
|
<br> -->
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
@ -92,19 +92,19 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div *ngIf="noRecordFound" class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addSubProductMaster()" matTooltip="Add Sub Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addSubProductMaster()" matTooltip="Add Sub Product" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -165,10 +165,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -79,18 +79,19 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addTitle()" matTooltip="Add Title" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addTitle()" matTooltip="Add Title" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -100,7 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -148,10 +149,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -75,18 +75,19 @@
|
|||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addActivity()" matTooltip="Add Activity()" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addActivity()" matTooltip="Add Activity()" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
@ -94,7 +95,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -142,10 +143,10 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -1,94 +1,18 @@
|
|||||||
<!-- <div style="text-align: right;">
|
|
||||||
<!- <button mat-stroked-button [color]="color" (click)="addUOM()" > + Add UOM</button> ->
|
|
||||||
<button mat-fab class="mr-1 mb-1" [color]="color" (click)="addUOM()" matTooltip="Add UOM" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
|
||||||
</div> -->
|
|
||||||
<mat-card-content>
|
|
||||||
|
|
||||||
<!-- <div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
|
||||||
</div>
|
|
||||||
<br> -->
|
|
||||||
|
|
||||||
<!-- <div datatable>
|
|
||||||
<table style="border-collapse: collapse">
|
|
||||||
<thead>
|
|
||||||
<th style="text-align: center;">#</th>
|
|
||||||
<th style="text-align: center;">UOM</th>
|
|
||||||
<th style="text-align: center;">IsActive</th>
|
|
||||||
<th style="text-align: center;">Action</th>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tr *ngIf="UOMList.length === 0" > <td colspan="4" style="text-align: center;"> No Records </td></tr>
|
<mat-card-content>
|
||||||
<tr *ngFor="let UL of UOMList; let i=index">
|
<div class="filter-container mat-elevation-z8">
|
||||||
<td style="text-align: center;">{{i+1}}</td>
|
|
||||||
<td style="text-align: center;">{{UL.name}}</td>
|
|
||||||
<td style="text-align: center;">{{UL.isactive}}</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<a (click)="editUOM(UL)"><mat-icon>edit</mat-icon></a>
|
|
||||||
<a (click)="deleteUOM(UL.uom_id)"><mat-icon>delete_outline</mat-icon></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];->
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<!-- <mat-table [dataSource]="dataSource"> ->
|
|
||||||
<mat-table [dataSource]="dataSource" matSort>
|
|
||||||
<ng-container matColumnDef="name">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Name </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.name}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="uom_id">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> ID </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.uom_id}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="createdon">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> createdon </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.createdon}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="fk_createdby">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> createdby </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.fk_createdby}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="updatedon">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> updated on </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.updatedon}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="fk_updatedby">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> updatedby </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.fk_updatedby}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="isactive">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> isactive </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user"> {{user.isactive}} </mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container matColumnDef="actions">
|
|
||||||
<mat-header-cell *matHeaderCellDef></mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let user">
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editUOM(user)"><mat-icon>edit</mat-icon></button>
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteUOM(user.uom_id)"><mat-icon>delete_outline</mat-icon></button>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
|
||||||
</mat-table>
|
|
||||||
</div>-->
|
|
||||||
<div *ngIf="!noRecordFound" class="filter-container mat-elevation-z8">
|
|
||||||
<!-- <div class="filter-header">
|
<!-- <div class="filter-header">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<div class="ml-xs mr-xs" style="width: 90%;">
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addUOM()" matTooltip="Add UOM" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addUOM()" matTooltip="Add UOM" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
@ -97,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-table [dataSource]="dataSource" matSort >
|
<mat-table [dataSource]="dataSource" *ngIf="!noRecordFound" matSort >
|
||||||
|
|
||||||
<ng-container matColumnDef="serialno">
|
<ng-container matColumnDef="serialno">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
@ -146,9 +70,9 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="noRecordFound" class="nocontent">No records found</div>
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<!-- <app-pd-office-lender-list></app-pd-office-lender-list>
|
<!-- <app-pd-office-lender-list></app-pd-office-lender-list>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="masterCtrl.value =='master-26'">-->
|
<div *ngIf="masterCtrl.value =='master-26'">-->
|
||||||
<app-pd-team-list></app-pd-team-list>
|
<!-- <app-pd-team-list></app-pd-team-list> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ import { PdLocationApproachListComponent } from './component/pd-location-approac
|
|||||||
import { PdTypeListComponent } from './component/pd-type/pd-type-list/pd-type-list.component';
|
import { PdTypeListComponent } from './component/pd-type/pd-type-list/pd-type-list.component';
|
||||||
import { LenderHierarchyListComponent } from './component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component';
|
import { LenderHierarchyListComponent } from './component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component';
|
||||||
import { QuestionCategoryListComponent } from './component/question-category/question-category-list/question-category-list.component';
|
import { QuestionCategoryListComponent } from './component/question-category/question-category-list/question-category-list.component';
|
||||||
import { PdTeamDialogComponent } from './component/pd-team/pd-team-dialog/pd-team-dialog.component';
|
//import { PdTeamDialogComponent } from './component/pd-team/pd-team-dialog/pd-team-dialog.component';
|
||||||
|
|
||||||
|
|
||||||
/** Master Child Component - For Dialogboxes*/
|
/** Master Child Component - For Dialogboxes*/
|
||||||
@ -82,7 +82,7 @@ import { CityDialogComponent } from './component/city/city-dialog/city-dialog.co
|
|||||||
import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component';
|
import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component';
|
||||||
import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component';
|
import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component';
|
||||||
import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list.component';
|
import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list.component';
|
||||||
import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
//import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
||||||
|
|
||||||
|
|
||||||
/** Master Routes */
|
/** Master Routes */
|
||||||
@ -208,8 +208,6 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
CompanyDialogComponent,
|
CompanyDialogComponent,
|
||||||
CityDialogComponent,
|
CityDialogComponent,
|
||||||
RegionsDialogComponent,
|
RegionsDialogComponent,
|
||||||
PdTeamDialogComponent,
|
|
||||||
PdTeamListComponent,
|
|
||||||
QuestionCategoryDialogComponent,
|
QuestionCategoryDialogComponent,
|
||||||
QuestionCategoryListComponent
|
QuestionCategoryListComponent
|
||||||
],
|
],
|
||||||
@ -238,7 +236,6 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
CompanyDialogComponent,
|
CompanyDialogComponent,
|
||||||
CityDialogComponent,
|
CityDialogComponent,
|
||||||
RegionsDialogComponent,
|
RegionsDialogComponent,
|
||||||
PdTeamDialogComponent,
|
|
||||||
QuestionCategoryDialogComponent
|
QuestionCategoryDialogComponent
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,86 @@
|
|||||||
|
<div style="max-height: 580px;">
|
||||||
|
<form [formGroup]="_pdTeamForm" (submit)="onSubmit()">
|
||||||
|
<mat-card style="padding: 6px;">
|
||||||
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||||
|
<h2 mat-dialog-title style="width: 50%;">PD TEAM</h2>
|
||||||
|
<div style="width: 20%;"></div>
|
||||||
|
<div style="width: 30%;text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Team Details</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<input matInput type="text" placeholder="Team Name" required formControlName="team_name">
|
||||||
|
<mat-error *ngIf="submitted && f.team_name.hasError('required')" class="mat-text-warn">You must Include Team Name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Lender" required formControlName="fk_lender">
|
||||||
|
<mat-option *ngFor="let ld of lenderdatas" [value]="ld.entity_id" >{{ ld.short_name }} {{ ld.full_name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_lender.hasError('required')" class="mat-text-warn">You must Select Lender Name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Cities Coverd</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="City" required formControlName="fk_city" multiple>
|
||||||
|
<mat-option *ngFor="let cd of citydatas" [value]="cd" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Cities are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedCityDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Products</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Product" required formControlName="fk_product" multiple>
|
||||||
|
<mat-option *ngFor="let pd of productdatas " [value]="pd" (onSelectionChange)="onChangeProductDatas($event)" >{{ pd.name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Products are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedProductDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Customers Segment</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
|
||||||
|
<mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple>
|
||||||
|
<mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd" (onSelectionChange)="onChangeCustomerSegmentDatas($event)">{{csd.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Customer segment are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedSegmentDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PdTeamAddComponent } from './pd-team-add.component';
|
||||||
|
|
||||||
|
describe('PdTeamAddComponent', () => {
|
||||||
|
let component: PdTeamAddComponent;
|
||||||
|
let fixture: ComponentFixture<PdTeamAddComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PdTeamAddComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PdTeamAddComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,203 @@
|
|||||||
|
import { Component, OnInit, Inject } from '@angular/core';
|
||||||
|
import { FormBuilder,
|
||||||
|
FormGroup,
|
||||||
|
Validators,
|
||||||
|
FormControl } from '@angular/forms';
|
||||||
|
import { MatDialog,
|
||||||
|
MatDialogRef,
|
||||||
|
MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
/** Service */
|
||||||
|
import { MastersService } from '../../service/masters/masters.service';
|
||||||
|
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-team-add',
|
||||||
|
templateUrl: './pd-team-add.component.html',
|
||||||
|
styleUrls: ['./pd-team-add.component.scss']
|
||||||
|
})
|
||||||
|
export class PdTeamAddComponent implements OnInit {
|
||||||
|
|
||||||
|
public _pdTeamForm: FormGroup;
|
||||||
|
public submitted = false;
|
||||||
|
color = 'primary';
|
||||||
|
errorMessage:string;
|
||||||
|
|
||||||
|
//This Type Of Array Declaration for select dropdown to list the datas
|
||||||
|
citydatas: any[];
|
||||||
|
lenderdatas: any[];
|
||||||
|
productdatas: any[];
|
||||||
|
customerSegmentdatas: any[];
|
||||||
|
|
||||||
|
//This Type Of Array Declaration
|
||||||
|
pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
|
||||||
|
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
|
||||||
|
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
|
||||||
|
|
||||||
|
//This Type Of Array Declaration for Local Purpose and List the data in html page
|
||||||
|
selectedCityDatas : any=[];
|
||||||
|
selectedProductDatas : any=[];
|
||||||
|
selectedSegmentDatas : any=[];
|
||||||
|
|
||||||
|
constructor(private _formBuilder: FormBuilder,
|
||||||
|
private _notifier: NotifierService,
|
||||||
|
private _pdTeamService: PdTeamService,
|
||||||
|
private _router: Router,
|
||||||
|
private _masterService: MastersService)
|
||||||
|
{
|
||||||
|
this._notifier = _notifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.PdTeamFormDatas();
|
||||||
|
|
||||||
|
/** To Display The City Data For City DropDown */
|
||||||
|
this._masterService.getAllMasterData('CITY').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.citydatas = dataresult.records;
|
||||||
|
this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('ENTITY').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.lenderdatas = dataresult.records;
|
||||||
|
this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('PRODUCTS').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.productdatas = dataresult.records;
|
||||||
|
this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.customerSegmentdatas = dataresult.records;
|
||||||
|
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Pd Team Form Datas */
|
||||||
|
PdTeamFormDatas(){
|
||||||
|
this._pdTeamForm = this._formBuilder.group({
|
||||||
|
pdteam_id: [null, Validators.compose([Validators.required])],
|
||||||
|
team_name: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_lender: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_city: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_customer_segment: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_product:[null, Validators.compose([Validators.required])],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** convenience getter for easy access to form fields */
|
||||||
|
get f() { return this._pdTeamForm.controls; }
|
||||||
|
|
||||||
|
/** For Popup Close Button */
|
||||||
|
onNoClick(): void {
|
||||||
|
this._router.navigate(['/setting/pdteam/pdteamlist']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
if (this._pdTeamForm.invalid) {
|
||||||
|
// this.errorMessage = "Please Fill All Mandate Fields.";
|
||||||
|
// return;
|
||||||
|
alert('Please Fill All Mandate Fields.');
|
||||||
|
} else {
|
||||||
|
|
||||||
|
var pdTeamFormValues = this._pdTeamForm.value;
|
||||||
|
|
||||||
|
//To Remove The "Null" With Key also
|
||||||
|
Object.keys(pdTeamFormValues).forEach(
|
||||||
|
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
|
||||||
|
|
||||||
|
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
console.log(dataresult);
|
||||||
|
this._notifier.notify('success', 'Record Edited Successfully.!');
|
||||||
|
// alert('Record Successfully.!');
|
||||||
|
this._router.navigate(['/setting/pdteam/pdteamlist']);
|
||||||
|
this._pdTeamForm.reset();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
//alert('Some Thing Wents Wrong Try Again !');
|
||||||
|
//this.errorMessage = "Some Thing Wents Wrong Try Again !";
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
// this.errorMessage = "Something Wents Wrong Try Again !";
|
||||||
|
//alert('Some Thing Wents Wrong Try Again !');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** To Reset Popup Data For Add*/
|
||||||
|
|
||||||
|
onResetForAdd(){
|
||||||
|
alert("reset function");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for customer segment to dispaly the as List in html page */
|
||||||
|
onChangeCustomerSegmentDatas($event){
|
||||||
|
let CustomerSegmentName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedSegmentDatas.push(CustomerSegmentName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
|
||||||
|
this.selectedSegmentDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for City to display the as List in html page */
|
||||||
|
onChangeCityDatas($event){
|
||||||
|
|
||||||
|
let cityName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedCityDatas.push(cityName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedCityDatas.indexOf(cityName);
|
||||||
|
this.selectedCityDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for Product to display the data as List in html page */
|
||||||
|
onChangeProductDatas($event){
|
||||||
|
|
||||||
|
let productName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedProductDatas.push(productName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedProductDatas.indexOf(productName);
|
||||||
|
this.selectedProductDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/** End Of PD TEAM ADD Component */
|
||||||
@ -36,14 +36,13 @@
|
|||||||
<mat-error *ngIf="!_pdTeamForm.controls['fk_city_id'].valid && _pdTeamForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pick Up the City Name.</mat-error>
|
<mat-error *ngIf="!_pdTeamForm.controls['fk_city_id'].valid && _pdTeamForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pick Up the City Name.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div datatable class="row-border hover ml-xs mr-xs">
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<th>S.no</th>
|
<th style="text-align: center;">S.no</th>
|
||||||
<th style="text-align: left;">Lender Name</th>
|
<th style="text-align: left;">Lender Name</th>
|
||||||
<th style="text-align: left;">City Name</th>
|
<th style="text-align: left;">City Name</th>
|
||||||
<th>Action</th>
|
<th style="text-align: right;">Action</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tr *ngFor="let PD of PDTeamMapping; let i=index">
|
<tr *ngFor="let PD of PDTeamMapping; let i=index">
|
||||||
|
|
||||||
@ -53,26 +52,22 @@
|
|||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<button mat-icon-button class="hover-icon" matTooltip="RemoveData" matTooltipPosition="above" type="button" (click)="deletePdTeamMap(PD,i)"><mat-icon>delete</mat-icon></button>
|
<button mat-icon-button class="hover-icon" matTooltip="RemoveData" matTooltipPosition="above" type="button" (click)="deletePdTeamMap(PD,i)"><mat-icon>delete</mat-icon></button>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngFor="let PM of tempArray; let i=index">
|
<tr *ngFor="let PM of tempArray; let i=index">
|
||||||
|
|
||||||
<td style="text-align: center;" >{{i+PDTeamMaplen+1}}</td>
|
<td style="text-align: center;" >{{i+PDTeamMaplen+1}}</td>
|
||||||
|
|
||||||
<td style="text-align: left;">{{PM.lenderid.full_name}}</td>
|
<td style="text-align: left;">{{PM.lenderid.full_name}}</td>
|
||||||
<td style="text-align: left;">{{PM.cityid.name}}</td>
|
<td style="text-align: left;">{{PM.cityid.name}}</td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<button mat-icon-button matTooltip="RemoveData" matTooltipPosition="above" (click)="removevalue(i)"><mat-icon>delete</mat-icon></button>
|
<button mat-icon-button matTooltip="RemoveData" matTooltipPosition="above" (click)="removevalue(i)"><mat-icon>delete</mat-icon></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<hr><br>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" [color]='color' matTooltip="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" [color]='color' matTooltip="Reset" matTooltipPosition="above" type="reset" ><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||||
@ -87,4 +82,5 @@
|
|||||||
|
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -9,8 +9,8 @@ import { MatDialog,
|
|||||||
MatDialogRef,
|
MatDialogRef,
|
||||||
MAT_DIALOG_DATA } from '@angular/material';
|
MAT_DIALOG_DATA } from '@angular/material';
|
||||||
/** Service */
|
/** Service */
|
||||||
import { MastersService } from '../../../../service/masters/masters.service';
|
import { MastersService } from '../../service/masters/masters.service';
|
||||||
import { PdTeamService } from '../../../../service/masters/pd-team.service';
|
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -115,10 +115,13 @@ isactivePDTeamChild(id: number,isactive : number) {
|
|||||||
this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP')
|
this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP')
|
||||||
.subscribe(dataresult=>{
|
.subscribe(dataresult=>{
|
||||||
if (dataresult.dataStatus == true){
|
if (dataresult.dataStatus == true){
|
||||||
alert("Successfully InActive !");
|
//alert("Successfully InActive !");
|
||||||
|
this.notifier.notify('success', 'Record Successfully InActive.!');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
|
||||||
|
//alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
this.notifier.notify('warning', 'Sorry Try Again !');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -171,7 +174,8 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
|||||||
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
//alert('');
|
||||||
|
this.notifier.notify('info', 'Already Exists.!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -183,7 +187,9 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
|||||||
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists on Other Team "'+item.team_name+'"');
|
//this.notifier.notify('success', 'Already Exists.!');
|
||||||
|
//alert('Already Exists on Other Team "'+item.team_name+'"');
|
||||||
|
this.notifier.notify( 'info', 'Already Exists on Other Team'+item.team_name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -198,7 +204,9 @@ if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
|||||||
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
//alert('Already Exists');
|
||||||
|
this.notifier.notify( 'info', 'Already Exists');
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -256,6 +264,7 @@ if(isNaN(this.data.pdteam_id)) {
|
|||||||
//console.log(pdTeamFormValues);
|
//console.log(pdTeamFormValues);
|
||||||
//To Remove The "Null" With Key
|
//To Remove The "Null" With Key
|
||||||
Object.keys(pdTeamFormValues).forEach(
|
Object.keys(pdTeamFormValues).forEach(
|
||||||
|
//getAllPdTeam();
|
||||||
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] &&
|
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] &&
|
||||||
delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
|
delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
|
||||||
|
|
||||||
@ -272,10 +281,11 @@ if (dataresult.dataStatus == true){
|
|||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
//Need To Dispaly saving Datas
|
//Need To Dispaly saving Datas
|
||||||
// alert("Data Saved Successfully");
|
// alert("Data Saved Successfully");
|
||||||
this.notifier.notify('success', 'Record Saved Successfully.!');
|
this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
//alert("");
|
||||||
|
this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
<div style="max-height: 580px;">
|
||||||
|
<form [formGroup]="_pdTeamForm" (submit)="onSubmit()">
|
||||||
|
<mat-card style="padding: 6px;">
|
||||||
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||||
|
<h2 mat-dialog-title style="width: 50%;">PD TEAM</h2>
|
||||||
|
<div style="width: 20%;"></div>
|
||||||
|
<div style="width: 30%;text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Team Details</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<input matInput type="text" placeholder="Team Name" required formControlName="team_name">
|
||||||
|
<mat-error *ngIf="submitted && f.team_name.hasError('required')" class="mat-text-warn">You must Include Team Name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Lender" required formControlName="fk_lender">
|
||||||
|
<mat-option *ngFor="let ld of lenderdatas" [value]="ld.entity_id" >{{ ld.short_name }} {{ ld.full_name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_lender.hasError('required')" class="mat-text-warn">You must Select Lender Name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Cities Coverd</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="City" required formControlName="fk_city" multiple>
|
||||||
|
<mat-option *ngFor="let cd of citydatas" [value]="cd" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Cities are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedCityDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Products</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Product" required formControlName="fk_product" multiple>
|
||||||
|
<mat-option *ngFor="let pd of productdatas " [value]="pd" (onSelectionChange)="onChangeProductDatas($event)" >{{ pd.name }} </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_product.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Products are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedProductDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h6>Customers Segment</h6><hr><br>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
|
||||||
|
<mat-select placeholder="Customer Segment" required formControlName="fk_customer_segment" multiple>
|
||||||
|
<mat-option *ngFor="let csd of customerSegmentdatas" [value]="csd" (onSelectionChange)="onChangeCustomerSegmentDatas($event)">{{csd.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_customer_segment.hasError('required')" class="mat-text-warn">You must Select Customer Segment.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<span fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<h6> The Selected Customer segment are., </h6>
|
||||||
|
<ul *ngFor="let data of selectedSegmentDatas">
|
||||||
|
<li>{{data}}</li>
|
||||||
|
</ul>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PdTeamEditComponent } from './pd-team-edit.component';
|
||||||
|
|
||||||
|
describe('PdTeamEditComponent', () => {
|
||||||
|
let component: PdTeamEditComponent;
|
||||||
|
let fixture: ComponentFixture<PdTeamEditComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PdTeamEditComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PdTeamEditComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,207 @@
|
|||||||
|
|
||||||
|
import { Component, OnInit, Inject } from '@angular/core';
|
||||||
|
|
||||||
|
import { FormBuilder,
|
||||||
|
FormGroup,
|
||||||
|
Validators,
|
||||||
|
FormControl } from '@angular/forms';
|
||||||
|
import { MatDialog,
|
||||||
|
MatDialogRef,
|
||||||
|
MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
|
||||||
|
/** Service */
|
||||||
|
import { MastersService } from '../../service/masters/masters.service';
|
||||||
|
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-team-edit',
|
||||||
|
templateUrl: './pd-team-edit.component.html',
|
||||||
|
styleUrls: ['./pd-team-edit.component.scss']
|
||||||
|
})
|
||||||
|
export class PdTeamEditComponent implements OnInit {
|
||||||
|
|
||||||
|
public _pdTeamForm: FormGroup;
|
||||||
|
public submitted = false;
|
||||||
|
color = 'primary';
|
||||||
|
errorMessage:string;
|
||||||
|
|
||||||
|
//This Type Of Array Declaration for select dropdown to list the datas
|
||||||
|
citydatas: any[];
|
||||||
|
lenderdatas: any[];
|
||||||
|
productdatas: any[];
|
||||||
|
customerSegmentdatas: any[];
|
||||||
|
|
||||||
|
//This Type Of Array Declaration
|
||||||
|
pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
|
||||||
|
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
|
||||||
|
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
|
||||||
|
|
||||||
|
//This Type Of Array Declaration for Local Purpose and List the data in html page
|
||||||
|
selectedCityDatas : any=[];
|
||||||
|
selectedProductDatas : any=[];
|
||||||
|
selectedSegmentDatas : any=[];
|
||||||
|
|
||||||
|
constructor(private _formBuilder: FormBuilder,
|
||||||
|
private _notifier: NotifierService,
|
||||||
|
private _pdTeamService: PdTeamService,
|
||||||
|
private _router: Router,
|
||||||
|
private _masterService: MastersService)
|
||||||
|
{
|
||||||
|
this._notifier = _notifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.PdTeamFormDatas();
|
||||||
|
|
||||||
|
/** To Display The City Data For City DropDown */
|
||||||
|
this._masterService.getAllMasterData('CITY').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.citydatas = dataresult.records;
|
||||||
|
this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('ENTITY').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.lenderdatas = dataresult.records;
|
||||||
|
this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('PRODUCTS').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.productdatas = dataresult.records;
|
||||||
|
this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
|
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
this.customerSegmentdatas = dataresult.records;
|
||||||
|
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Pd Team Form Datas */
|
||||||
|
PdTeamFormDatas(){
|
||||||
|
this._pdTeamForm = this._formBuilder.group({
|
||||||
|
pdteam_id: [null, Validators.compose([Validators.required])],
|
||||||
|
team_name: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_lender: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_city: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_customer_segment: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_product:[null, Validators.compose([Validators.required])],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** convenience getter for easy access to form fields */
|
||||||
|
get f() { return this._pdTeamForm.controls; }
|
||||||
|
|
||||||
|
/** For Popup Close Button */
|
||||||
|
onNoClick(): void {
|
||||||
|
this._router.navigate(['/setting/pdteam/pdteamlist']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
if (this._pdTeamForm.invalid) {
|
||||||
|
// this.errorMessage = "Please Fill All Mandate Fields.";
|
||||||
|
// return;
|
||||||
|
alert('Please Fill All Mandate Fields.');
|
||||||
|
} else {
|
||||||
|
|
||||||
|
var pdTeamFormValues = this._pdTeamForm.value;
|
||||||
|
|
||||||
|
//To Remove The "Null" With Key also
|
||||||
|
Object.keys(pdTeamFormValues).forEach(
|
||||||
|
(key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
|
||||||
|
|
||||||
|
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if (dataresult.status == 200) {
|
||||||
|
console.log(dataresult);
|
||||||
|
// this._notifier.notify('success', 'Record Saved Successfully.!');
|
||||||
|
alert('Record Saved Successfully.!');
|
||||||
|
this._router.navigate(['/setting/pdteam/pdteamlist']);
|
||||||
|
this._pdTeamForm.reset();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
alert('Some Thing Wents Wrong Try Again !');
|
||||||
|
//this.errorMessage = "Some Thing Wents Wrong Try Again !";
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
// this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
// this.errorMessage = "Something Wents Wrong Try Again !";
|
||||||
|
alert('Some Thing Wents Wrong Try Again !');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** To Reset Popup Data For Add*/
|
||||||
|
|
||||||
|
onResetForAdd(){
|
||||||
|
alert("reset function");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for customer segment to dispaly the as List in html page */
|
||||||
|
onChangeCustomerSegmentDatas($event){
|
||||||
|
let CustomerSegmentName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedSegmentDatas.push(CustomerSegmentName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
|
||||||
|
this.selectedSegmentDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for City to display the as List in html page */
|
||||||
|
onChangeCityDatas($event){
|
||||||
|
|
||||||
|
let cityName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedCityDatas.push(cityName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedCityDatas.indexOf(cityName);
|
||||||
|
this.selectedCityDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**on change function for Product to display the data as List in html page */
|
||||||
|
onChangeProductDatas($event){
|
||||||
|
|
||||||
|
let productName = $event.source.value.name;
|
||||||
|
if($event.source._selected === true ){
|
||||||
|
this.selectedProductDatas.push(productName);
|
||||||
|
}
|
||||||
|
else if($event.source._selected === false ){
|
||||||
|
let index = this.selectedProductDatas.indexOf(productName);
|
||||||
|
this.selectedProductDatas.splice(index,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/** End Of PD TEAM ADD Component */
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
<mat-card>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
|
||||||
|
<div class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<mat-card-title><span> PD Team Masters</span></mat-card-title>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<mat-card-content>
|
||||||
|
<!-- <div *ngIf="loader">
|
||||||
|
<mat-progress-bar mode="indeterminate" [color]="color" class="mb-1"></mat-progress-bar>
|
||||||
|
</div> <br> -->
|
||||||
|
|
||||||
|
<div class="filter-container mat-elevation-z8">
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 90%;">
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<mat-table *ngIf="!noRecordFound" [dataSource]="dataSource" matSort >
|
||||||
|
|
||||||
|
<ng-container matColumnDef="serialno">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Sl </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row; let i = index;"> {{row.serialno}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="team_name">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Team Name </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"> {{row.team_name}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="lender_name">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender Name </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"> {{row.lender_name}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="isactive">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||||
|
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||||
|
class="example-margin"
|
||||||
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
|
checked="true" [color]="color"
|
||||||
|
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle>
|
||||||
|
<ng-template #notactive >
|
||||||
|
<mat-slide-toggle
|
||||||
|
class="example-margin"
|
||||||
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
|
checked="false" [color]="color"
|
||||||
|
(change)="isactivePdTeam(row.pdteam_id,row.isactive)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle></ng-template>
|
||||||
|
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="actions">
|
||||||
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let row">
|
||||||
|
|
||||||
|
<button mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editPdTeam(row)"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||||
|
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
</mat-row>
|
||||||
|
</mat-table>
|
||||||
|
|
||||||
|
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
</div>
|
||||||
|
<!-- <div *ngIf="noRecordFound" class="nocontent">No records found</div> -->
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -1,35 +1,7 @@
|
|||||||
|
/** Card title */
|
||||||
// .example-container {
|
.mat-card-title{
|
||||||
// display: flex;
|
font-size: 25px !important;
|
||||||
// flex-direction: column;
|
}
|
||||||
// min-width: 300px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-header {
|
|
||||||
// min-height: 64px;
|
|
||||||
// padding: 8px 24px 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .mat-form-field {
|
|
||||||
// font-size: 14px;
|
|
||||||
// width: 100%;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .mat-table {
|
|
||||||
// overflow: auto;
|
|
||||||
// max-height: 500px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .nocontent {
|
|
||||||
// color: red;
|
|
||||||
// font-size: 16px;
|
|
||||||
// text-align: center;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .example-margin {
|
|
||||||
// margin: 10px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/** Table SerialNo CSS */
|
/** Table SerialNo CSS */
|
||||||
.example-margin {
|
.example-margin {
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
import { Component,
|
||||||
|
OnInit,
|
||||||
|
ViewChild } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { MatSort,
|
||||||
|
MatPaginator,
|
||||||
|
MatTableDataSource } from '@angular/material';
|
||||||
|
/** Service */
|
||||||
|
import { MastersService } from '../../service/masters/masters.service';
|
||||||
|
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||||
|
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
|
/** Dialog Component */
|
||||||
|
import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
|
||||||
|
/** Add Component */
|
||||||
|
//import { } from '../pd-team-add/pd-team-add.component;
|
||||||
|
/** Edit Component */
|
||||||
|
//import { } from '../pd-team-add/pd-team-add.component;
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-team-list',
|
||||||
|
templateUrl: './pd-team-list.component.html',
|
||||||
|
styleUrls: ['./pd-team-list.component.scss']
|
||||||
|
})
|
||||||
|
export class PdTeamListComponent implements OnInit {
|
||||||
|
|
||||||
|
//Variable Declaration part
|
||||||
|
isPopupOpened: boolean = true;
|
||||||
|
loader: boolean = false;
|
||||||
|
PdTeamList: any = [];
|
||||||
|
color = 'primary';
|
||||||
|
userData = null;
|
||||||
|
noRecordFound: boolean = false;
|
||||||
|
private notifier: NotifierService;
|
||||||
|
|
||||||
|
public dataLength: number;
|
||||||
|
public dataSource = new MatTableDataSource();
|
||||||
|
displayedColumns = ['serialno','team_name','lender_name','actions','isactive'];
|
||||||
|
|
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
|
constructor(notifier: NotifierService,
|
||||||
|
private router: Router,
|
||||||
|
private _MasterService: MastersService,
|
||||||
|
private _PdTeamService: PdTeamService) {
|
||||||
|
this.getPdTeam();
|
||||||
|
this.notifier = notifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {}
|
||||||
|
|
||||||
|
/** To add data */
|
||||||
|
addPdTeam() {
|
||||||
|
this.router.navigate(['/setting/pdteam/addpdteam']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** To edit data */
|
||||||
|
editPdTeam() {
|
||||||
|
this.router.navigate(['/setting/pdteam/editpdteam']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** To get data for listing */
|
||||||
|
getPdTeam() {
|
||||||
|
|
||||||
|
this._PdTeamService.getAllPdTeam().subscribe(
|
||||||
|
data => {
|
||||||
|
//console.log('data',data);
|
||||||
|
if(data.dataStatus == true){
|
||||||
|
|
||||||
|
this.noRecordFound = false;
|
||||||
|
this.userData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
if(data.records.length >= 1){
|
||||||
|
this.userData = this.userData.map((val, i)=>{
|
||||||
|
val['serialno'] = i + 1;
|
||||||
|
return val;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.dataSource.data = this.userData;
|
||||||
|
}else{
|
||||||
|
this.noRecordFound = true;
|
||||||
|
this.dataLength = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** For Display Tables Pagination And Sorting */
|
||||||
|
ngAfterViewInit() {
|
||||||
|
this.dataSource.paginator = this.paginator;
|
||||||
|
this.dataSource.sort = this.sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** For Display Tables Filtering */
|
||||||
|
applyFilter(filterValue: string) {
|
||||||
|
filterValue = filterValue.trim(); // Remove whitespace
|
||||||
|
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||||
|
this.dataSource.filter = filterValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/** End of ListComponent */
|
||||||
13
ng6-seed/src/app/settings/pd-team/pd-team.module.spec.ts
Normal file
13
ng6-seed/src/app/settings/pd-team/pd-team.module.spec.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { PdTeamModule } from './pd-team.module';
|
||||||
|
|
||||||
|
describe('PdTeamModule', () => {
|
||||||
|
let pdTeamModule: PdTeamModule;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
pdTeamModule = new PdTeamModule();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(pdTeamModule).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
111
ng6-seed/src/app/settings/pd-team/pd-team.module.ts
Normal file
111
ng6-seed/src/app/settings/pd-team/pd-team.module.ts
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import {
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatSelectModule,
|
||||||
|
MatDialogModule,
|
||||||
|
MatProgressBarModule,MatToolbarModule,MatCheckboxModule,
|
||||||
|
MatTableModule,MatPaginatorModule,MatSortModule} from '@angular/material';
|
||||||
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
|
|
||||||
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
||||||
|
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||||
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
|
||||||
|
import { PdTeamDialogComponent } from './pd-team-dialog/pd-team-dialog.component';
|
||||||
|
import { PdTeamListComponent } from './pd-team-list/pd-team-list.component';
|
||||||
|
|
||||||
|
/** Route */
|
||||||
|
import { PdTeamRoutes } from './pd-team.routing';
|
||||||
|
|
||||||
|
/** Service */
|
||||||
|
import { PdTeamService } from '../service/masters/pd-team.service';
|
||||||
|
import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component';
|
||||||
|
import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom angular notifier options
|
||||||
|
*/
|
||||||
|
const customNotifierOptions: NotifierOptions = {
|
||||||
|
position: {
|
||||||
|
horizontal: {
|
||||||
|
position: 'right',
|
||||||
|
distance: 12
|
||||||
|
},
|
||||||
|
vertical: {
|
||||||
|
position: 'top',
|
||||||
|
distance: 32,
|
||||||
|
gap: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme: 'material',
|
||||||
|
behaviour: {
|
||||||
|
autoHide: 5000,
|
||||||
|
onClick: 'hide',
|
||||||
|
onMouseover: 'pauseAutoHide',
|
||||||
|
showDismissButton: true,
|
||||||
|
stacking: 4
|
||||||
|
},
|
||||||
|
animations: {
|
||||||
|
enabled: true,
|
||||||
|
show: {
|
||||||
|
preset: 'slide',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
preset: 'fade',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease',
|
||||||
|
offset: 50
|
||||||
|
},
|
||||||
|
shift: {
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
overlap: 150
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule, ReactiveFormsModule,
|
||||||
|
RouterModule.forChild(PdTeamRoutes),
|
||||||
|
MatCardModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatTableModule,
|
||||||
|
MatPaginatorModule,
|
||||||
|
MatProgressBarModule,
|
||||||
|
MatDialogModule,
|
||||||
|
MatSortModule,
|
||||||
|
MatToolbarModule,
|
||||||
|
MatSelectModule,
|
||||||
|
FlexLayoutModule,
|
||||||
|
NgxMatSelectSearchModule,
|
||||||
|
NgxDatatableModule,
|
||||||
|
MatSortModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
|
MatTooltipModule,
|
||||||
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
|
],
|
||||||
|
declarations: [PdTeamDialogComponent,
|
||||||
|
PdTeamListComponent,
|
||||||
|
PdTeamAddComponent,
|
||||||
|
PdTeamEditComponent],
|
||||||
|
|
||||||
|
providers: [PdTeamService ],
|
||||||
|
entryComponents: [PdTeamDialogComponent]
|
||||||
|
})
|
||||||
|
export class PdTeamModule { }
|
||||||
21
ng6-seed/src/app/settings/pd-team/pd-team.routing.ts
Executable file
21
ng6-seed/src/app/settings/pd-team/pd-team.routing.ts
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
import { Routes } from '@angular/router';
|
||||||
|
import { PdTeamAddComponent } from '../pd-team/pd-team-add/pd-team-add.component';
|
||||||
|
import { PdTeamEditComponent } from '../pd-team/pd-team-edit/pd-team-edit.component';
|
||||||
|
import { PdTeamListComponent } from '../pd-team/pd-team-list/pd-team-list.component';
|
||||||
|
|
||||||
|
|
||||||
|
export const PdTeamRoutes: Routes = [{
|
||||||
|
|
||||||
|
path: '',
|
||||||
|
children: [{
|
||||||
|
path: 'pdteamlist',
|
||||||
|
component: PdTeamListComponent
|
||||||
|
},{
|
||||||
|
path: 'addpdteam',
|
||||||
|
component: PdTeamAddComponent
|
||||||
|
},{
|
||||||
|
path:'editpdteam',
|
||||||
|
component:PdTeamEditComponent
|
||||||
|
}]
|
||||||
|
}];
|
||||||
|
|
||||||
@ -299,6 +299,7 @@ editPDAllocationType(Records: any,MasterName:string): Observable<any> {
|
|||||||
item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
||||||
item.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
item.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
||||||
delete item.pd_status_name; // to delete the pd_status_name
|
delete item.pd_status_name; // to delete the pd_status_name
|
||||||
|
delete item.serialno;
|
||||||
});
|
});
|
||||||
|
|
||||||
//console.log('Service Data',Records);
|
//console.log('Service Data',Records);
|
||||||
|
|||||||
@ -23,8 +23,8 @@ export interface Master {
|
|||||||
export class PdTeamService {
|
export class PdTeamService {
|
||||||
|
|
||||||
|
|
||||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
//private apiUrl = "http://localhost/sparqapi/api/";
|
private apiUrl = "http://localhost/sparqapi/api/";
|
||||||
|
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
@ -37,7 +37,7 @@ private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
|||||||
* 1st argument is "Records": any - Set of Data To Adding to database
|
* 1st argument is "Records": any - Set of Data To Adding to database
|
||||||
*/
|
*/
|
||||||
addPdTeamDetail(Records: any): Observable<any> {
|
addPdTeamDetail(Records: any): Observable<any> {
|
||||||
|
console.log('From Service Data',Records);
|
||||||
Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record
|
Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record
|
||||||
Records.createdon = currentdate;//to get Current date and Time for when the Record is created
|
Records.createdon = currentdate;//to get Current date and Time for when the Record is created
|
||||||
// Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
// Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
||||||
@ -189,4 +189,15 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
getAllPdTeam(): Observable<any> {
|
||||||
|
return this._http.get(this.apiUrl+'getListOfPDTeam')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4,6 +4,7 @@ import { Observable } from 'rxjs/internal/Observable';
|
|||||||
import { AwsService } from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
|
const apiurl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
|
// const apiurl = "http://localhost/sparqapi/api/";
|
||||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -85,7 +86,15 @@ export class UserService {
|
|||||||
return this.http.post(apiurl+'getListOfMaster',master_name);
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
roles(){
|
||||||
|
let master_name = {'master_name':'ROLES'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
entitiesDetails(){
|
||||||
|
let master_name = {'master_name':'ENTITY'};
|
||||||
|
return this.http.post(apiurl+'getListOfMaster',master_name);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -124,59 +133,53 @@ export class UserService {
|
|||||||
console.log(users);
|
console.log(users);
|
||||||
|
|
||||||
|
|
||||||
let roles:any=[];
|
// let roles:any=[];
|
||||||
for(var role of users.role){
|
// for(var role of users.role){
|
||||||
|
|
||||||
roles.push({ "user_role": role.GroupName });
|
|
||||||
}
|
|
||||||
|
|
||||||
let designation:any;
|
let enities:any;
|
||||||
if(users.type.entity_type_id ==2){
|
if(users.type.entity_type_id ==2 || users.type.entity_type_id == 3){
|
||||||
let lenderhie:any =[];
|
enities = users.lenVenName.entity_id;
|
||||||
lenderhie.push(users.lenderHierarchy);
|
|
||||||
formData.append('lender_hierarchy',JSON.stringify(lenderhie));
|
|
||||||
designation = '';
|
|
||||||
}else if(users.type.entity_type_id ==1){
|
}else if(users.type.entity_type_id ==1){
|
||||||
designation =users.designation.designation_id;
|
enities =null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let pdtypeid:any;
|
let pdtypeid:any;
|
||||||
let productid:any;
|
|
||||||
let pdteam:any;
|
let pdteam:any;
|
||||||
let cust:any;
|
|
||||||
if(users.product != null && users.customer != null && users.pdteam !=null && users.pdtype !=null){
|
if(users.pdteam !=null && users.pdtype !=null){
|
||||||
pdtypeid = users.pdtype.pd_type_id;
|
pdtypeid = users.pdtype.pd_type_id;
|
||||||
productid = users.product.product_id;
|
|
||||||
pdteam = users.pdteam.pdteam_id;
|
pdteam = users.pdteam.pdteam_id;
|
||||||
cust = users.customer.customer_segment_id;
|
|
||||||
|
}
|
||||||
|
let userid:any;
|
||||||
|
if(users.userid != null){
|
||||||
|
userid = users.userid
|
||||||
}
|
}
|
||||||
let pdofficer = {
|
let pdofficer = {
|
||||||
'fk_pd_type_id':pdtypeid,
|
'fk_pd_type_id':pdtypeid,
|
||||||
'fk_product_id':productid,
|
|
||||||
'fk_customer_segment':cust,
|
|
||||||
'fk_team_id':pdteam,
|
'fk_team_id':pdteam,
|
||||||
'fk_user_id':users.userid
|
'fk_user_id':userid
|
||||||
|
|
||||||
};
|
};
|
||||||
let records:any = {
|
let records:any = {
|
||||||
"userid":users.userid,
|
"userid":userid,
|
||||||
"aws_name": aws_name,
|
"aws_name": aws_name,
|
||||||
"first_name": users.firstName,
|
"first_name": users.firstName,
|
||||||
"last_name": users.lastName,
|
"last_name": users.lastName,
|
||||||
"mobile_no": users.phone,
|
"mobile_no": users.phone,
|
||||||
"email": users.email,
|
"email": users.email,
|
||||||
"alt_email":users.altemail,
|
|
||||||
"alt_mobile_no":users.altphone,
|
|
||||||
"addressline1":users.address1,
|
|
||||||
"addressline2":users.address2,
|
|
||||||
"addressline3":users.address3,
|
|
||||||
"isactive":users.isactive,
|
"isactive":users.isactive,
|
||||||
"fk_entity_id":users.type.entity_type_id,
|
|
||||||
"fk_designation":designation,
|
"fk_entity_type_id":users.type.entity_type_id,
|
||||||
|
"fk_entity_id":enities,
|
||||||
"fk_city":users.city.city_id,
|
"fk_city":users.city.city_id,
|
||||||
"fk_state":users.state.state_id,
|
"fk_state":users.state.state_id,
|
||||||
"pincode":users.pincode,
|
|
||||||
"profilepic":profilepic,
|
"profilepic":profilepic,
|
||||||
"fk_createdby":createdby,
|
"fk_createdby":createdby,
|
||||||
"fk_updatedby":updateby,
|
"fk_updatedby":updateby,
|
||||||
@ -185,7 +188,7 @@ export class UserService {
|
|||||||
};
|
};
|
||||||
//console.log(roles);
|
//console.log(roles);
|
||||||
formData.append('records',JSON.stringify(records));
|
formData.append('records',JSON.stringify(records));
|
||||||
formData.append('roles',JSON.stringify(roles));
|
formData.append('roles',JSON.stringify(({ "user_role": users.role.role_id})));
|
||||||
formData.append('profilepic',users.userpic);
|
formData.append('profilepic',users.userpic);
|
||||||
formData.append('pdofficer',JSON.stringify(pdofficer));
|
formData.append('pdofficer',JSON.stringify(pdofficer));
|
||||||
|
|
||||||
|
|||||||
@ -26,11 +26,9 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { SettingsRoutes } from './settings.routing';
|
import { SettingsRoutes } from './settings.routing';
|
||||||
import { RegisterComponent } from '../session/register/register.component';
|
import { RegisterComponent } from '../session/register/register.component';
|
||||||
import { UserService } from './service/user.service';
|
import { UserService } from './service/user.service';
|
||||||
|
|
||||||
import { MastersModule } from './masters/masters.module';
|
import { MastersModule } from './masters/masters.module';
|
||||||
// import { EntityModule } from './entity/entity.module';
|
import { PdTeamModule } from './pd-team/pd-team.module';
|
||||||
// import { AddEntityComponent } from './entity/add-entity/add-entity.component';
|
|
||||||
// import { EditEntityComponent } from './entity/edit-entity/edit-entity.component';
|
|
||||||
// import { EntityListComponent } from './entity/entity-list/entity-list.component';
|
|
||||||
|
|
||||||
import { EntityModule } from './entity/entity.module';
|
import { EntityModule } from './entity/entity.module';
|
||||||
// import { HttpClientModule } from '@angular/common/http';
|
// import { HttpClientModule } from '@angular/common/http';
|
||||||
@ -39,6 +37,7 @@ import { EntityModule } from './entity/entity.module';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
RouterModule.forChild(SettingsRoutes),MatCardModule,
|
RouterModule.forChild(SettingsRoutes),MatCardModule,
|
||||||
MastersModule,
|
MastersModule,
|
||||||
|
PdTeamModule,
|
||||||
EntityModule,
|
EntityModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { MastersModule } from './masters/masters.module';
|
import { MastersModule } from './masters/masters.module';
|
||||||
|
import { PdTeamModule } from './pd-team/pd-team.module';
|
||||||
import { EntityModule } from './entity/entity.module';
|
import { EntityModule } from './entity/entity.module';
|
||||||
|
|
||||||
//import { EntityModule } from './entity/entity.module';
|
//import { EntityModule } from './entity/entity.module';
|
||||||
@ -16,10 +16,9 @@ export const SettingsRoutes: Routes = [{
|
|||||||
},{
|
},{
|
||||||
path:'entity',
|
path:'entity',
|
||||||
loadChildren:'./entity/entity.module#EntityModule'
|
loadChildren:'./entity/entity.module#EntityModule'
|
||||||
|
},{
|
||||||
|
path:'pdteam',
|
||||||
|
loadChildren:'./pd-team/pd-team.module#PdTeamModule'
|
||||||
}
|
}
|
||||||
// {
|
|
||||||
// path:'entitymodule',
|
|
||||||
// loadChildren:'./entity/entity.module#EntityModule'
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
@ -11,11 +11,11 @@
|
|||||||
<!-- <mat-card-subtitle>Angular2 custom validation</mat-card-subtitle> -->
|
<!-- <mat-card-subtitle>Angular2 custom validation</mat-card-subtitle> -->
|
||||||
<form [formGroup]="regForm" (ngSubmit)="register(regForm.value)">
|
<form [formGroup]="regForm" (ngSubmit)="register(regForm.value)">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-card-title>Personal</mat-card-title><hr/><br/>
|
<mat-card-title>Personal</mat-card-title><hr/>
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="First name" [formControl]="regForm.controls['firstName']">
|
<input matInput placeholder="First name" [formControl]="regForm.controls['firstName']" required>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('required') && regForm.controls['firstName'].touched" class="mat-text-warn">You must include a first name.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('required') && regForm.controls['firstName'].touched" class="mat-text-warn">You must include a first name.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('minlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('minlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Last name" [formControl]="regForm.controls['lastName']">
|
<input matInput placeholder="Last name" [formControl]="regForm.controls['lastName']" required>
|
||||||
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">You must include a last name.</mat-error>
|
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">You must include a last name.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <mat-error *ngIf="regForm.controls['lastName'].hasError('minlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
<!-- <mat-error *ngIf="regForm.controls['lastName'].hasError('minlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
||||||
@ -36,25 +36,30 @@
|
|||||||
<img [src]="profileurl" style="width: 17%;height: 50%;border-radius: 50%;"></span>
|
<img [src]="profileurl" style="width: 17%;height: 50%;border-radius: 50%;"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-card-title>Account Details</mat-card-title><hr/><br/>
|
<mat-card-title>Account Details</mat-card-title><hr/>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Email address" [formControl]="regForm.controls['email']" type="email">
|
<input matInput placeholder="Email address" [formControl]="regForm.controls['email']" type="email" required>
|
||||||
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">You must include an email address.</mat-error>
|
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">You must include an email address.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">You must include a valid email address.</mat-error>
|
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">You must include a valid email address.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
<input matInput placeholder="Phone number" [formControl]="regForm.controls['phone']" type="number" required>
|
||||||
|
<mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error>
|
||||||
|
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-card-title>Contact Information</mat-card-title><hr/><br/>
|
<!-- <mat-card-title>Contact Information</mat-card-title><hr/>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Phone number" [formControl]="regForm.controls['phone']" type="text">
|
<input matInput placeholder="Phone number" [formControl]="regForm.controls['phone']" type="text">
|
||||||
@ -68,13 +73,13 @@
|
|||||||
<mat-error *ngIf="regForm.controls['altphone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
<mat-error *ngIf="regForm.controls['altphone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
|
<!-- <mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error>
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
<input matInput placeholder="Address 1" [formControl]="regForm.controls['address1']">
|
<input matInput placeholder="Address 1" [formControl]="regForm.controls['address1']">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
|
|
||||||
<input matInput placeholder="Address 2" [formControl]="regForm.controls['address2']">
|
<input matInput placeholder="Address 2" [formControl]="regForm.controls['address2']">
|
||||||
@ -89,10 +94,10 @@
|
|||||||
|
|
||||||
<input matInput placeholder="Pincode" [formControl]="regForm.controls['pincode']">
|
<input matInput placeholder="Pincode" [formControl]="regForm.controls['pincode']">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<mat-select matInput placeholder="Select State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)">
|
<mat-select matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let s of State" [value]="s" >
|
<mat-option *ngFor="let s of State" [value]="s" >
|
||||||
{{s.name}}
|
{{s.name}}
|
||||||
@ -101,7 +106,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<mat-select matInput placeholder="Select City" [formControl]="regForm.controls['city']" required>
|
<mat-select matInput placeholder="City" [formControl]="regForm.controls['city']" required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let c of City" [value]="c">
|
<mat-option *ngFor="let c of City" [value]="c">
|
||||||
{{c.name}}
|
{{c.name}}
|
||||||
@ -113,7 +118,7 @@
|
|||||||
<mat-card-title>Role Information</mat-card-title><hr/><br/>
|
<mat-card-title>Role Information</mat-card-title><hr/><br/>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<mat-select matInput placeholder="Select Enitity type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
|
<mat-select matInput placeholder="Enitity type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
|
||||||
required>
|
required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let types of types" [value]="types">
|
<mat-option *ngFor="let types of types" [value]="types">
|
||||||
@ -125,13 +130,29 @@
|
|||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <span *ngIf="roleload"> -->
|
<!-- <span *ngIf="roleload"> -->
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '2'">
|
||||||
|
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let ent of entities" [value]="ent">
|
||||||
|
{{ent.full_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '3'">
|
||||||
|
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let ent of entities" [value]="ent">
|
||||||
|
{{ent.full_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<mat-select matInput placeholder="Select Role" [formControl]="regForm.controls['role']" required multiple>
|
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
|
||||||
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">ALL</mat-option> -->
|
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">ALL</mat-option> -->
|
||||||
<mat-option *ngFor="let role of roles" [value]="role" (onSelectionChange)="toggleAllSelection($event)">
|
<mat-option *ngFor="let role of roles" [value]="role" >
|
||||||
{{role.GroupName}}
|
{{role.role_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
|
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
|
||||||
@ -139,33 +160,19 @@
|
|||||||
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '1'">
|
|
||||||
<mat-select matInput placeholder="Select designation" [formControl]="regForm.controls['designation']" required>
|
|
||||||
<mat-option>--</mat-option>
|
|
||||||
<mat-option *ngFor="let d of designation" [value]="d">
|
|
||||||
{{d.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '2'">
|
|
||||||
<mat-select matInput placeholder="Select lenderHierarchy" [formControl]="regForm.controls['lenderHierarchy']" required>
|
|
||||||
<mat-option>--</mat-option>
|
|
||||||
<mat-option *ngFor="let l of lenderHierarchy" [value]="l">
|
|
||||||
{{l.lender_hierarchy}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2" *ngIf="roleAccess">
|
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2" *ngIf="roleAccess">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" >
|
|
||||||
|
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" >
|
||||||
<mat-select matInput placeholder="Select Customer" [formControl]="regForm.controls['customer']" required (selectionChange)="getcity($event)">
|
<mat-select matInput placeholder="Select Customer" [formControl]="regForm.controls['customer']" required (selectionChange)="getcity($event)">
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let C of customerSeg" [value]="C" >
|
<mat-option *ngFor="let C of customerSeg" [value]="C" >
|
||||||
{{C.name}}
|
{{C.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||||
<mat-select matInput placeholder="Select Product" [formControl]="regForm.controls['product']" required>
|
<mat-select matInput placeholder="Select Product" [formControl]="regForm.controls['product']" required>
|
||||||
@ -176,10 +183,10 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||||
<mat-select matInput placeholder="Select PDTEAM" [formControl]="regForm.controls['pdteam']" required (selectionChange)="getcity($event)">
|
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
|
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
|
||||||
{{pd.team_name}}
|
{{pd.team_name}}
|
||||||
@ -188,7 +195,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||||
<mat-select matInput placeholder="Select PDTYPE" [formControl]="regForm.controls['pdtype']" required>
|
<mat-select matInput placeholder="PD Type" [formControl]="regForm.controls['pdtype']" required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
||||||
{{PDT.type_name}}
|
{{PDT.type_name}}
|
||||||
@ -199,10 +206,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
UserProfile
|
UserProfile
|
||||||
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" />
|
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" accept="image/*" />
|
||||||
|
<br/>
|
||||||
<span *ngIf="usersData!=''">{{img}}</span>
|
<div *ngIf="imageaccess">
|
||||||
<!-- <img [src]="file" style="width: 40px;height: 50px;"> -->
|
<img [src]="filename" style="width: 27%;
|
||||||
|
height: 62%;
|
||||||
|
border-radius: 50%;
|
||||||
|
">
|
||||||
|
</div>
|
||||||
|
<span *ngIf="usersData !=''">
|
||||||
|
{{img}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { FileUploader } from 'ng2-file-upload/ng2-file-upload';
|
|||||||
import { MatOption } from '@angular/material';
|
import { MatOption } from '@angular/material';
|
||||||
import { UserService } from '../../service/user.service';
|
import { UserService } from '../../service/user.service';
|
||||||
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
||||||
const pdoff = "PDOFFICER";
|
const pdoff = "PD Officer";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-register',
|
selector: 'app-register',
|
||||||
@ -19,6 +19,10 @@ const pdoff = "PDOFFICER";
|
|||||||
|
|
||||||
|
|
||||||
export class RegisterComponent implements OnInit {
|
export class RegisterComponent implements OnInit {
|
||||||
|
Cities: any;
|
||||||
|
role: any;
|
||||||
|
imageaccess: boolean = false;
|
||||||
|
filename:any;
|
||||||
roleload:boolean = false;
|
roleload:boolean = false;
|
||||||
pdTeam: any = [];
|
pdTeam: any = [];
|
||||||
customerSeg: any = [];
|
customerSeg: any = [];
|
||||||
@ -48,6 +52,8 @@ export class RegisterComponent implements OnInit {
|
|||||||
@ViewChild('allSelected') private allSelected: MatOption;
|
@ViewChild('allSelected') private allSelected: MatOption;
|
||||||
profileurl: any;
|
profileurl: any;
|
||||||
profileaccess: boolean;
|
profileaccess: boolean;
|
||||||
|
entitiesDetails:any;
|
||||||
|
entities:any;
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
|
private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
|
||||||
,private elementRef: ElementRef,public users:UserService) { }
|
,private elementRef: ElementRef,public users:UserService) { }
|
||||||
@ -65,23 +71,14 @@ export class RegisterComponent implements OnInit {
|
|||||||
firstName: [null, Validators.compose([Validators.required, Validators.minLength(2)])],
|
firstName: [null, Validators.compose([Validators.required, Validators.minLength(2)])],
|
||||||
lastName: [null, Validators.compose([Validators.required])],
|
lastName: [null, Validators.compose([Validators.required])],
|
||||||
phone: [null, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(12)])],
|
phone: [null, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(12)])],
|
||||||
altphone: [null, Validators.compose([Validators.minLength(10), Validators.maxLength(12)])],
|
|
||||||
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
||||||
altemail: [null, Validators.compose([CustomValidators.email])],
|
|
||||||
role: [null, Validators.compose([Validators.required])],
|
role: [null, Validators.compose([Validators.required])],
|
||||||
type: [null, Validators.compose([Validators.required])],
|
type: [null, Validators.compose([Validators.required])],
|
||||||
address1: [null, ''],
|
|
||||||
address2: [null, ''],
|
|
||||||
address3: [null, ''],
|
|
||||||
state: [null, Validators.compose([Validators.required])],
|
state: [null, Validators.compose([Validators.required])],
|
||||||
city: [null, Validators.compose([Validators.required])],
|
city: [null, Validators.compose([Validators.required])],
|
||||||
designation: [null, Validators.compose([Validators.required])],
|
lenVenName: [null, Validators.compose([Validators.required])],
|
||||||
userpic: [null],
|
userpic: [null],
|
||||||
isactive: [true],
|
isactive: [true],
|
||||||
pincode: [null],
|
|
||||||
lenderHierarchy:[null,Validators.compose([Validators.required])],
|
|
||||||
customer:[null,Validators.compose([Validators.required])],
|
|
||||||
product:[null,Validators.compose([Validators.required])],
|
|
||||||
pdteam:[null,Validators.compose([Validators.required])],
|
pdteam:[null,Validators.compose([Validators.required])],
|
||||||
pdtype:[null,Validators.compose([Validators.required])],
|
pdtype:[null,Validators.compose([Validators.required])],
|
||||||
|
|
||||||
@ -91,12 +88,6 @@ export class RegisterComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelect(e){
|
|
||||||
// alert();
|
|
||||||
// console.log(e)
|
|
||||||
// console.log(e.isUserInput);
|
|
||||||
// console.log(this.regForm.controls['role'].value);
|
|
||||||
}
|
|
||||||
|
|
||||||
regdata() {
|
regdata() {
|
||||||
this.users.entityType().subscribe(res => {
|
this.users.entityType().subscribe(res => {
|
||||||
@ -104,12 +95,23 @@ export class RegisterComponent implements OnInit {
|
|||||||
if (this.types.status == 200) {
|
if (this.types.status == 200) {
|
||||||
this.types = this.types.records;
|
this.types = this.types.records;
|
||||||
//console.log(this.types);
|
//console.log(this.types);
|
||||||
|
this.regForm.controls['type'].setValue(this.types[0]);
|
||||||
|
this.users.roles().subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.roleload = false;
|
||||||
|
//console.log(roleload);
|
||||||
|
this.role = res;
|
||||||
|
if(this.role.dataStatus == true){
|
||||||
|
this.role = this.role.records;
|
||||||
|
this.checktype(this.types[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.City().subscribe(res => {
|
this.users.City().subscribe(res => {
|
||||||
this.City = res;
|
this.Cities = res;
|
||||||
if (this.City.status == 200) {
|
if (this.Cities.status == 200) {
|
||||||
this.City = this.City.records.filter(City=>City.isactive ==1);
|
this.Cities = this.Cities.records.filter(City=>City.isactive ==1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.State().subscribe(res => {
|
this.users.State().subscribe(res => {
|
||||||
@ -118,25 +120,7 @@ export class RegisterComponent implements OnInit {
|
|||||||
this.State = this.State.records.filter(state=>state.isactive ==1);
|
this.State = this.State.records.filter(state=>state.isactive ==1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.designation().subscribe(res => {
|
|
||||||
this.designation = res;
|
|
||||||
if (this.designation.status == 200) {
|
|
||||||
this.designation = this.designation.records.filter(des=>des.isactive ==1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.lenderHierarchy().subscribe(res=>{
|
|
||||||
this.lenderHierarchy = res;
|
|
||||||
if(this.lenderHierarchy.status ==200){
|
|
||||||
this.lenderHierarchy = this.lenderHierarchy.records.filter(len=>len.isactive ==1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.products().subscribe(res=>{
|
|
||||||
this.product = res;
|
|
||||||
if(this.product.status == 200){
|
|
||||||
this.product = this.product.records.filter(product=>product.isactive ==1);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.pdTeam().subscribe(res=>{
|
this.users.pdTeam().subscribe(res=>{
|
||||||
|
|
||||||
this.pdTeam = res;
|
this.pdTeam = res;
|
||||||
@ -150,28 +134,39 @@ export class RegisterComponent implements OnInit {
|
|||||||
this.pdType = this.pdType.records.filter(pdty=>pdty.isactive ==1);
|
this.pdType = this.pdType.records.filter(pdty=>pdty.isactive ==1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.customerSegment().subscribe(res=>{
|
|
||||||
this.customerSeg = res;
|
|
||||||
if(this.customerSeg.status == 200){
|
|
||||||
this.customerSeg = this.customerSeg.records.filter(cus=>cus.isactive ==1);
|
this.users.entitiesDetails().subscribe(res=>{
|
||||||
console.log(this.customerSeg);
|
this.entitiesDetails = res;
|
||||||
|
if(this.entitiesDetails.dataStatus == true){
|
||||||
|
this.entitiesDetails = this.entitiesDetails.records;
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
//console.log(this.State+''+this.types+''+this.City+''+this.designation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onFileChange($event) {
|
onFileChange($event) {
|
||||||
//console.log($event.target.files[0]);
|
//console.log($event.target.files[0]);
|
||||||
|
this.imageaccess = true;
|
||||||
|
var reader = new FileReader();
|
||||||
//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);
|
||||||
// let file = ;
|
|
||||||
console.log($event.target.result);
|
reader.onload = ($event: ProgressEvent) => {
|
||||||
|
// console.log((<FileReader>$event.target).result);
|
||||||
|
this.filename = (<FileReader>$event.target).result;
|
||||||
|
}
|
||||||
|
|
||||||
|
reader.readAsDataURL($event.target.files[0]);
|
||||||
//}
|
//}
|
||||||
//console.log(this.files);
|
//console.log(this.files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
register(userData) {
|
register(userData) {
|
||||||
// console.log(userData);
|
console.log(userData);
|
||||||
let data:any;
|
let data:any;
|
||||||
|
|
||||||
// console.log(this.files);
|
// console.log(this.files);
|
||||||
@ -192,7 +187,9 @@ this.loader = true;
|
|||||||
|
|
||||||
this.AWS.register(userData).subscribe(res => {
|
this.AWS.register(userData).subscribe(res => {
|
||||||
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {
|
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {
|
||||||
|
if(userData.role.role_id == 10){
|
||||||
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
||||||
|
});}
|
||||||
this.users.saveRecords(res, userData).subscribe(res => {
|
this.users.saveRecords(res, userData).subscribe(res => {
|
||||||
data = res;
|
data = res;
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
@ -204,11 +201,14 @@ this.loader = true;
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
//})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.AWS.adminchangeData(this.usersData,userData).subscribe(res=>{
|
this.AWS.adminchangeData(this.usersData,userData).subscribe(res=>{
|
||||||
|
if(userData.role.role_id == 10){
|
||||||
|
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
||||||
|
});}
|
||||||
this.users.saveRecords(res,userData).subscribe(res=>{
|
this.users.saveRecords(res,userData).subscribe(res=>{
|
||||||
this.loader = false;
|
this.loader = false;
|
||||||
alert('Update User');
|
alert('Update User');
|
||||||
@ -221,42 +221,42 @@ this.loader = true;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleAllSelection(e) {
|
toggleAllSelection(e,enitiyid) {
|
||||||
|
console.log(enitiyid);
|
||||||
if(e.source.selected){
|
// if(e.value){
|
||||||
|
|
||||||
if(e.source.value.GroupName == pdoff){
|
// if(e.value.role_name == pdoff && enitiyid.entity_type_id == 1){
|
||||||
|
// console.log(e.value);
|
||||||
|
// this.roleAccess = true;
|
||||||
|
// }else{
|
||||||
|
// this.roleAccess = false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
if (this.usersData != '' && this.usersData !==undefined || e.value.role_name == pdoff && enitiyid.entity_type_id == 1) {
|
||||||
|
console.log(e);
|
||||||
|
if(e.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdoff && enitiyid.entity_type_id == 1){
|
||||||
|
|
||||||
this.roleAccess = true;
|
this.roleAccess = true;
|
||||||
}
|
}else{
|
||||||
}else{
|
|
||||||
if(e.source.value.GroupName == pdoff){
|
|
||||||
this.roleAccess = false;
|
this.roleAccess = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (this.usersData != '' && this.usersData !==undefined) {
|
|
||||||
let users: any;
|
|
||||||
|
|
||||||
console.log(this.usersData);
|
|
||||||
//for (let role of this.usersData[0]) {
|
|
||||||
//this.AWS.adminremoveGroup(roles,this.usersData);
|
|
||||||
if(e.source.selected){
|
|
||||||
this.AWS.UserGroup(e.source.value,this.usersData);
|
|
||||||
|
|
||||||
}else{
|
|
||||||
this.AWS.adminremoveGroup(e.source.value,this.usersData);
|
|
||||||
console.log("else");
|
|
||||||
}
|
|
||||||
//this.AWS.adminremoveGroup()
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.roleAccess = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
getcity(e){
|
getcity(e){
|
||||||
// console.log(e)
|
console.log(e);
|
||||||
// this.City =[]= this.City.filter(city=>city.fk_state == e.state_id)[0];
|
console.log(this.Cities);
|
||||||
|
|
||||||
|
|
||||||
|
this.City = this.Cities.filter(city=>city.fk_state_id == e.value.state_id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
userupdate() {
|
userupdate() {
|
||||||
|
|
||||||
@ -266,70 +266,73 @@ this.loader = true;
|
|||||||
this.users.entityType().subscribe(res => {
|
this.users.entityType().subscribe(res => {
|
||||||
this.types = res;
|
this.types = res;
|
||||||
if (this.types.status == 200) {
|
if (this.types.status == 200) {
|
||||||
let type = this.types.records;
|
let type = this.types.records.filter(type=>type.isactive ==1);
|
||||||
this.types= type.filter(type => type.entity_type_id == this.usersData.fk_entity_id);
|
this.types= type.filter(type => type.entity_type_id == this.usersData.fk_entity_type_id);
|
||||||
this.checktype(this.types[0]);
|
|
||||||
|
|
||||||
this.regForm.controls['type'].setValue(this.types[0]);
|
this.regForm.controls['type'].setValue(this.types[0]);
|
||||||
|
|
||||||
|
|
||||||
|
this.users.entitiesDetails().subscribe(res=>{
|
||||||
|
this.entitiesDetails = res;
|
||||||
|
if(this.entitiesDetails.dataStatus == true){
|
||||||
|
this.entitiesDetails = this.entitiesDetails.records.filter(ent=>ent.isactive ==1);
|
||||||
|
let entitiy = this.entitiesDetails.filter(ent=>this.usersData.fk_entity_id == ent.entity_id)[0];
|
||||||
|
this.regForm.controls['lenVenName'].setValue(entitiy);
|
||||||
|
|
||||||
|
this.users.roles().subscribe(res=>{
|
||||||
|
|
||||||
|
this.roleload = false;
|
||||||
|
//console.log(roleload);
|
||||||
|
this.role = res;
|
||||||
|
if(this.role.dataStatus == true){
|
||||||
|
this.role = this.role.records;
|
||||||
|
this.checktype(this.types[0]);
|
||||||
|
|
||||||
|
let role = this.role.filter(role=>role.role_type == this.usersData.fk_entity_type_id && role.role_id == this.usersData.user_role)[0];
|
||||||
|
this.regForm.controls['role'].setValue(role);
|
||||||
|
console.log(role);
|
||||||
|
this.toggleAllSelection(role,this.types[0]);
|
||||||
|
// this.regForm.controls['role'].setValue(role);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.City().subscribe(res => {
|
|
||||||
this.City = res;
|
|
||||||
if (this.City.status == 200) {
|
|
||||||
this.City = this.City.records;
|
|
||||||
let citys = this.City.filter(city => city.city_id == this.usersData.fk_city)[0];
|
|
||||||
this.regForm.controls['city'].setValue(citys);
|
|
||||||
// console.log(this.City);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.State().subscribe(res => {
|
this.users.State().subscribe(res => {
|
||||||
this.State = res;
|
this.State = res;
|
||||||
if (this.State.status == 200) {
|
if (this.State.status == 200) {
|
||||||
this.State = this.State.records;
|
this.State = this.State.records.filter(ent=>ent.isactive ==1);
|
||||||
let states = this.State.filter(state => state.state_id == this.usersData.fk_state)[0];
|
let states = this.State.filter(state => state.state_id == this.usersData.fk_state)[0];
|
||||||
// console.log(this.State);
|
console.log(states);
|
||||||
this.regForm.controls['state'].setValue(states);
|
this.regForm.controls['state'].setValue(states);
|
||||||
|
this.users.City().subscribe(res => {
|
||||||
|
this.Cities = res;
|
||||||
|
if (this.Cities.status == 200) {
|
||||||
|
//this.City = this.Cities.records;
|
||||||
|
this.Cities = this.Cities.records.filter(ent=>ent.isactive ==1);
|
||||||
|
let City = this.Cities.filter(city=>city.fk_state_id == states.state_id && city.city_id == this.usersData.fk_city)[0];
|
||||||
|
let value = {'value':{'state_id':states.state_id}};
|
||||||
|
this.getcity(value);
|
||||||
|
this.regForm.controls['city'].setValue(City);
|
||||||
|
// let citys = this.Cities.filter(city => city.city_id == this.usersData.fk_city)[0];
|
||||||
|
// this.regForm.controls['city'].setValue(citys);
|
||||||
|
// console.log(this.City);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.users.designation().subscribe(res => {
|
|
||||||
this.designation = res;
|
|
||||||
if (this.designation.status == 200) {
|
|
||||||
this.designation = this.designation.records;
|
|
||||||
let des = this.designation.filter(des => des.designation_id == this.usersData.fk_designation)[0];
|
|
||||||
this.regForm.controls['designation'].setValue(des);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.lenderHierarchy().subscribe(res=>{
|
|
||||||
this.lenderHierarchy = res;
|
|
||||||
if(this.lenderHierarchy.status ==200){
|
|
||||||
this.lenderHierarchy = this.lenderHierarchy.records;
|
|
||||||
let hie = this.lenderHierarchy.filter(hie => hie.lender_hierarchy_id == this.usersData.fk_hierarchy_id)[0];
|
|
||||||
console.log(hie);
|
|
||||||
this.regForm.controls['lenderHierarchy'].setValue(hie);
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.users.products().subscribe(res=>{
|
|
||||||
this.product = res;
|
|
||||||
if(this.product.status == 200){
|
|
||||||
this.product = this.product.records;
|
|
||||||
//console.log(this.usersData.fk_product_id);
|
|
||||||
let pro = this.product.filter(pro=>pro.product_id == this.usersData.fk_product_id)[0];
|
|
||||||
//console.log(pro);
|
|
||||||
this.regForm.controls['product'].setValue(pro);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.users.pdTeam().subscribe(res=>{
|
this.users.pdTeam().subscribe(res=>{
|
||||||
|
|
||||||
this.pdTeam = res;
|
this.pdTeam = res;
|
||||||
if(this.pdTeam.status == 200){
|
if(this.pdTeam.status == 200){
|
||||||
this.pdTeam = this.pdTeam.records;
|
this.pdTeam = this.pdTeam.records.filter(ent=>ent.isactive ==1);
|
||||||
let pdteam = this.pdTeam.filter(pd=>pd.pdteam_id == this.usersData.fk_team_id)[0];
|
let pdteam = this.pdTeam.filter(pd=>pd.pdteam_id == this.usersData.fk_team_id)[0];
|
||||||
this.regForm.controls['pdteam'].setValue(pdteam);
|
this.regForm.controls['pdteam'].setValue(pdteam);
|
||||||
}
|
}
|
||||||
@ -337,20 +340,12 @@ this.loader = true;
|
|||||||
this.users.pdType().subscribe(res=>{
|
this.users.pdType().subscribe(res=>{
|
||||||
this.pdType = res;
|
this.pdType = res;
|
||||||
if(this.pdType.status == 200){
|
if(this.pdType.status == 200){
|
||||||
this.pdType = this.pdType.records;
|
this.pdType = this.pdType.records.filter(ent=>ent.isactive ==1);
|
||||||
let pdtype = this.pdType.filter(pdt=>pdt.pd_type_id == this.usersData.fk_pd_type_id)[0];
|
let pdtype = this.pdType.filter(pdt=>pdt.pd_type_id == this.usersData.fk_pd_type_id)[0];
|
||||||
this.regForm.controls['pdtype'].setValue(pdtype);
|
this.regForm.controls['pdtype'].setValue(pdtype);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.users.customerSegment().subscribe(res=>{
|
|
||||||
this.customerSeg = res;
|
|
||||||
if(this.customerSeg.status == 200){
|
|
||||||
this.customerSeg = this.customerSeg.records;
|
|
||||||
let cust = this.customerSeg.filter(cus=>cus.customer_segment_id == this.usersData.fk_customer_segment)[0];
|
|
||||||
this.regForm.controls['customer'].setValue(cust);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let users= {
|
let users= {
|
||||||
'userid':this.usersData.userid,
|
'userid':this.usersData.userid,
|
||||||
'entityid':this.usersData.fk_entity_id,
|
'entityid':this.usersData.fk_entity_id,
|
||||||
@ -372,12 +367,8 @@ this.loader = true;
|
|||||||
this.regForm.controls['firstName'].setValue(this.usersData.user_first_name);
|
this.regForm.controls['firstName'].setValue(this.usersData.user_first_name);
|
||||||
this.regForm.controls['lastName'].setValue(this.usersData.user_last_name);
|
this.regForm.controls['lastName'].setValue(this.usersData.user_last_name);
|
||||||
this.regForm.controls['phone'].setValue(this.usersData.mobile_no);
|
this.regForm.controls['phone'].setValue(this.usersData.mobile_no);
|
||||||
this.regForm.controls['altphone'].setValue(this.usersData.alt_mobile_no);
|
|
||||||
this.regForm.controls['email'].setValue(this.usersData.email);
|
this.regForm.controls['email'].setValue(this.usersData.email);
|
||||||
this.regForm.controls['altemail'].setValue(this.usersData.alt_email);
|
|
||||||
this.regForm.controls['address1'].setValue(this.usersData.addressline1);
|
|
||||||
this.regForm.controls['address2'].setValue(this.usersData.addressline2);
|
|
||||||
this.regForm.controls['address3'].setValue(this.usersData.addressline3);
|
|
||||||
if (this.usersData.isactive == 1) {
|
if (this.usersData.isactive == 1) {
|
||||||
this.regForm.controls['isactive'].setValue(true);
|
this.regForm.controls['isactive'].setValue(true);
|
||||||
} else {
|
} else {
|
||||||
@ -385,31 +376,29 @@ this.loader = true;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this.regForm.controls['userpic'].setValue(this.usersData.profilepic);
|
// this.regForm.controls['userpic'].setValue(this.usersData.profilepic);
|
||||||
this.regForm.controls['pincode'].setValue(this.usersData.pincode);
|
|
||||||
this.img = this.usersData.profilepic;
|
this.img = this.usersData.profilepic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
checktype(e){
|
checktype(e){
|
||||||
//console.log(e);
|
console.log(e);
|
||||||
|
this.roleAccess= false;
|
||||||
let userRole:any = [];
|
let userRole:any;
|
||||||
if(e !== undefined){
|
if(e !== undefined){
|
||||||
this.roleload = true;
|
|
||||||
//console.log(roleload);
|
//console.log(roleload);
|
||||||
this.AWS.adminlistgroup(e.entity_type_id).subscribe(res=>{
|
|
||||||
this.roleload = false;
|
this.roles = this.role.filter(role=>role.role_type == e.entity_type_id);
|
||||||
//console.log(roleload);
|
console.log(this.roles);
|
||||||
this.roles = res;
|
// let role = this.roles.filter(role=>role.role_id == this.usersData.user_role_id);
|
||||||
if(this.usersData !==undefined){
|
// console.log(role);
|
||||||
for (let role of this.usersData[0]) {
|
// this.regForm.controls['role'].setValue(role);
|
||||||
//console.log(role);
|
|
||||||
userRole.push(this.roles.filter(roles => roles.GroupName == role.user_role)[0]);
|
|
||||||
//console.log(userRole);
|
|
||||||
this.regForm.controls['role'].setValue(userRole);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
switch (e.entity_type_id) {
|
switch (e.entity_type_id) {
|
||||||
case "1":
|
case "1":
|
||||||
this.typeValue =1;
|
this.typeValue =1;
|
||||||
@ -417,16 +406,18 @@ this.loader = true;
|
|||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
this.typeValue =2;
|
this.typeValue =2;
|
||||||
|
this.entities = this.entitiesDetails.filter(entity=>entity.fk_entity_type_id == e.entity_type_id);
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
this.typeValue =3;
|
this.typeValue =3;
|
||||||
|
this.entities = this.entitiesDetails.filter(entity=>entity.fk_entity_type_id == e.entity_type_id);
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
this.typeValue = -1;
|
this.typeValue = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@ const MENUITEMS : Menu[] = [
|
|||||||
{state:'users',name:'Users'},
|
{state:'users',name:'Users'},
|
||||||
{state:'mastermodule',name:'Master Details'},
|
{state:'mastermodule',name:'Master Details'},
|
||||||
{state:'entity',name:'Entities'},
|
{state:'entity',name:'Entities'},
|
||||||
|
{state:'pdteamlist',name:'PD Team'},
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { QuestionsModule } from './questions/questions.module';
|
import { QuestionsModule } from './questions/questions.module';
|
||||||
|
import { TemplatesModule } from './templates/templates.module';
|
||||||
export const TemplateRoutes: Routes = [{
|
export const TemplateRoutes: Routes = [{
|
||||||
path: '',
|
path: '',
|
||||||
children:[{
|
children:[{
|
||||||
path:'questions',
|
path:'questions',
|
||||||
loadChildren:'./questions/questions.module#QuestionsModule'
|
loadChildren:'./questions/questions.module#QuestionsModule'
|
||||||
},
|
},{
|
||||||
// {
|
path:'templates',
|
||||||
// path:'templates',
|
loadChildren:'./templates/templates.module#TemplatesModule'
|
||||||
// loadChildren:'./templates/templates.module#TemplatesModule'
|
}
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|||||||
@ -1,2 +1,56 @@
|
|||||||
<button>Back To List</button>
|
<mat-card style="padding: 6px;">
|
||||||
<h3>Template Edit Component</h3>
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
||||||
|
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
||||||
|
<div style="width: 20%;"></div>
|
||||||
|
<div style="width: 30%;text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"
|
||||||
|
(click)="backToList()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form (submit)="onSubmit()">
|
||||||
|
<mat-card style="padding: 6px;">
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
|
<mat-form-field class="ml-xs">
|
||||||
|
<input matInput placeholder="Template Name">
|
||||||
|
<mat-error *ngIf="submitted && f.pan.hasError('required')" class="mat-text-warn">You must Include Pan Number.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</form>
|
||||||
|
<button mat-raised-button (click)="isLinear = !isLinear" id="toggle-linear">
|
||||||
|
{{!isLinear ? 'Enable linear mode' : 'Disable linear mode'}}
|
||||||
|
</button>
|
||||||
|
<mat-vertical-stepper [linear]="isLinear" #stepper>
|
||||||
|
<mat-step [stepControl]="firstFormGroup">
|
||||||
|
<form [formGroup]="firstFormGroup">
|
||||||
|
<ng-template matStepLabel>Fill out your name</ng-template>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Last name, First name" formControlName="firstCtrl" required>
|
||||||
|
</mat-form-field>
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperNext>Next</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-step>
|
||||||
|
<mat-step [stepControl]="secondFormGroup">
|
||||||
|
<form [formGroup]="secondFormGroup">
|
||||||
|
<ng-template matStepLabel>Fill out your address</ng-template>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Address" formControlName="secondCtrl" required>
|
||||||
|
</mat-form-field>
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperPrevious>Back</button>
|
||||||
|
<button mat-button matStepperNext>Next</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-step>
|
||||||
|
<mat-step>
|
||||||
|
<ng-template matStepLabel>Done</ng-template>
|
||||||
|
You are now done.
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperPrevious>Back</button>
|
||||||
|
<button mat-button (click)="stepper.reset()">Reset</button>
|
||||||
|
</div>
|
||||||
|
</mat-step>
|
||||||
|
</mat-vertical-stepper>
|
||||||
|
</mat-card>
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
import { Component, ViewChild, OnInit } from '@angular/core';
|
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
||||||
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { DataSource } from '@angular/cdk/table';
|
import { DataSource } from '@angular/cdk/table';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
import { TemplateListComponent } from './../templates.list.component';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Template Edit component
|
* Template Edit component
|
||||||
* : kdk
|
* : kdk
|
||||||
@ -12,13 +15,27 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
selector: 'app-list',
|
selector: 'app-list',
|
||||||
templateUrl: './templates.edit.component.html'
|
templateUrl: './templates.edit.component.html'
|
||||||
})
|
})
|
||||||
export class TemplateEditComponent implements OnInit {
|
export class TemplateEditComponent implements OnInit, OnDestroy {
|
||||||
|
public pageTitle: string = "Edit Template";
|
||||||
|
|
||||||
|
constructor( private route: ActivatedRoute,
|
||||||
constructor() {
|
private router: Router,
|
||||||
|
private templateListComponent : TemplateListComponent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.templateListComponent.showListView(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
backToList(){
|
||||||
|
this.templateListComponent.showListView(true);
|
||||||
|
this.router.navigate([ '../../' ], { relativeTo: this.route });
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
//Called once, before the instance is destroyed.
|
||||||
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
this.templateListComponent.showListView(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
<div *ngIf="listView">
|
<div *ngIf="listView">
|
||||||
<h3>Template List Component</h3>
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<input matInput [(ngModel)]="names" placeholder="Contact Person">
|
||||||
|
<!--<mat-error *ngIf="submitted && f.contact_person.hasError('required')" class="mat-text-warn">You must Include Contact Person.</mat-error>-->
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<button (click)="goToEdit()">Edit</button>
|
<button (click)="goToEdit()">Edit</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!listView">
|
<div>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import { Component, ViewChild, OnInit } from '@angular/core';
|
import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
||||||
import { DataSource } from '@angular/cdk/table';
|
import { DataSource } from '@angular/cdk/table';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
@ -12,21 +13,35 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
selector: 'app-list',
|
selector: 'app-list',
|
||||||
templateUrl: './templates.list.component.html'
|
templateUrl: './templates.list.component.html'
|
||||||
})
|
})
|
||||||
export class TemplateListComponent implements OnInit {
|
export class TemplateListComponent implements OnInit, OnDestroy {
|
||||||
public listView: boolean = true;
|
public listView: boolean = true;
|
||||||
constructor() {
|
public names: string;
|
||||||
|
constructor(
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private router: Router) {
|
||||||
|
// this.names = 'dinesh';
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// alert(1);
|
// alert(1);
|
||||||
|
alert();
|
||||||
|
this.listView = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
goToEdit(){
|
goToEdit(){
|
||||||
|
this.router.navigate([ '../list/edit', '1' ], { relativeTo: this.route });
|
||||||
this.listView = false;
|
this.listView = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(){
|
showListView(status: boolean){
|
||||||
// alert(2);
|
// alert(2);
|
||||||
|
this.listView = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
//Called once, before the instance is destroyed.
|
||||||
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
alert();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule,
|
MatToolbarModule,MatSelectModule,
|
||||||
MatListModule, MatMenuModule,
|
MatListModule, MatMenuModule,
|
||||||
MatCheckboxModule
|
MatCheckboxModule, MatStepperModule
|
||||||
} from '@angular/material';
|
} from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
@ -86,6 +86,7 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
||||||
|
MatStepperModule,
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatCheckboxModule,
|
MatCheckboxModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
|||||||
@ -13,11 +13,15 @@ const routes: Routes = [
|
|||||||
path: 'templates',
|
path: 'templates',
|
||||||
component: TemplatesComponent,
|
component: TemplatesComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
path: '',
|
||||||
|
pathMatch: 'full',
|
||||||
|
redirectTo: 'list'
|
||||||
|
},{
|
||||||
path: 'list',
|
path: 'list',
|
||||||
component: TemplateListComponent,
|
component: TemplateListComponent,
|
||||||
children: [{
|
children: [{
|
||||||
path: 'edit',
|
path: 'edit/:question-id',
|
||||||
component: TemplateEditComponent,
|
component: TemplateEditComponent,
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -480,7 +480,7 @@
|
|||||||
.sidebar-red {
|
.sidebar-red {
|
||||||
.sidebar-panel {
|
.sidebar-panel {
|
||||||
.bg-overlay {
|
.bg-overlay {
|
||||||
background: rgba(244, 67, 54, 0.8)!important;
|
background: rgb(227, 31, 38)!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
.sk-cube-grid .sk-cube {
|
.sk-cube-grid .sk-cube {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 33%;
|
height: 33%;
|
||||||
background: #673ab7;
|
background: rgb(227, 31, 38);
|
||||||
float: left;
|
float: left;
|
||||||
-webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
|
-webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
|
||||||
animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
|
animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user