master issues fixes : ps
This commit is contained in:
parent
37ab34c0ef
commit
8c17c9504a
31
ng6-seed/package-lock.json
generated
31
ng6-seed/package-lock.json
generated
@ -4273,7 +4273,8 @@
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
@ -4688,7 +4689,8 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
@ -4744,6 +4746,7 @@
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
@ -4787,12 +4790,14 @@
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.2",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7182,6 +7187,24 @@
|
||||
"integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==",
|
||||
"dev": true
|
||||
},
|
||||
"ng-pick-datetime": {
|
||||
"version": "5.2.6",
|
||||
"resolved": "https://registry.npmjs.org/ng-pick-datetime/-/ng-pick-datetime-5.2.6.tgz",
|
||||
"integrity": "sha512-5vXK+qCKn2Jn1GvcZTd7bYkkiNIrpEk147l/wSRlgitZHIiswsNCNfceNCSvZvgrQL2WncNvGKzDX8zM4sXu3Q==",
|
||||
"requires": {
|
||||
"@angular/cdk": "^5.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/cdk": {
|
||||
"version": "5.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-5.2.5.tgz",
|
||||
"integrity": "sha512-GN8m1d+VcCE9+Bgwv06Y8YJKyZ0i9ZIq2ZPBcJYt+KVgnVVRg4JkyUNxud07LNsvzOX22DquHqmIZiC4hAG7Ag==",
|
||||
"requires": {
|
||||
"tslib": "^1.7.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ng2-charts": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/ng2-charts/-/ng2-charts-1.6.0.tgz",
|
||||
|
||||
@ -308,7 +308,7 @@ export class AwsService {
|
||||
)[0];
|
||||
// (userGroup);
|
||||
if (userGroup == "ADMIN") {
|
||||
if (userData.type.fk_entity_type_id == 1) {
|
||||
if (userData.type.entity_type_id == 1) {
|
||||
params = {
|
||||
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
||||
Username: userData.email /* required */,
|
||||
@ -331,7 +331,7 @@ export class AwsService {
|
||||
/* more items */
|
||||
]
|
||||
};
|
||||
} else if (userData.type.fk_entity_type_id == 2) {
|
||||
} else if (userData.type.entity_type_id == 2) {
|
||||
console.log(2);
|
||||
params = {
|
||||
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||
@ -355,7 +355,7 @@ export class AwsService {
|
||||
/* more items */
|
||||
]
|
||||
};
|
||||
}else if(userData.type.fk_entity_type_id == 3){
|
||||
}else if(userData.type.entity_type_id == 3){
|
||||
params = {
|
||||
UserPoolId: vendor_poolData.UserPoolId /* required */,
|
||||
Username: userData.email /* required */,
|
||||
@ -411,7 +411,7 @@ export class AwsService {
|
||||
|
||||
console.log(userData);
|
||||
this.getconfig();
|
||||
|
||||
//console.log(userData);
|
||||
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
||||
|
||||
|
||||
@ -433,7 +433,7 @@ export class AwsService {
|
||||
};
|
||||
}
|
||||
|
||||
//(params);
|
||||
//console.log(params);
|
||||
return Observable.create(observe=>{
|
||||
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||
|
||||
@ -473,7 +473,7 @@ export class AwsService {
|
||||
//cognitosdata = 7;
|
||||
let params:any;
|
||||
if (userGroup == 'ADMIN') {
|
||||
if(user.type.fk_entity_type_id ==1){
|
||||
if(user.type.entity_type_id ==1){
|
||||
params = {
|
||||
UserAttributes: [ /* required */
|
||||
{
|
||||
@ -491,7 +491,7 @@ export class AwsService {
|
||||
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||
Username: user.email /* required */
|
||||
};
|
||||
}else if(user.type.fk_entity_type_id ==2){
|
||||
}else if(user.type.entity_type_id ==2){
|
||||
params = {
|
||||
UserAttributes: [ /* required */
|
||||
{
|
||||
@ -509,6 +509,24 @@ export class AwsService {
|
||||
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||
Username: user.email /* required */
|
||||
};
|
||||
}else if(user.type.entity_type_id ==3){
|
||||
params = {
|
||||
UserAttributes: [ /* required */
|
||||
{
|
||||
Name: 'locale', /* required */
|
||||
Value: cognitosdata.toString()
|
||||
},{
|
||||
Name:"email_verified",
|
||||
Value:"true"
|
||||
},{
|
||||
Name:"phone_number_verified",
|
||||
Value:"true"
|
||||
}
|
||||
/* more items */
|
||||
],
|
||||
UserPoolId: vendor_poolData.UserPoolId, /* required */
|
||||
Username: user.email /* required */
|
||||
};
|
||||
}
|
||||
//console.log(params);
|
||||
return Observable.create(observe => {
|
||||
|
||||
@ -46,22 +46,13 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>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)"
|
||||
(click)="deactive()">
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveBranch(row.branch_id,row.isactive)">
|
||||
</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)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -48,6 +48,9 @@ export class BranchListComponent implements OnInit {
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
|
||||
constructor(private dialog: MatDialog,
|
||||
private _mastersService: MastersService) {
|
||||
@ -126,61 +129,50 @@ export class BranchListComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/** For Changing active States which means both Changing Active And Inactive alternatively */
|
||||
isactiveBranch(id: number,isactive : number) {
|
||||
|
||||
let ActiveDatas = isactive == 0
|
||||
/** For Changing active States which means both Changing Active And Inactive alternatively
|
||||
* Sweetalert2 for active and deactive */
|
||||
isactiveBranch(id: number,isactive : number){
|
||||
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'branch_id':id,'isactive': '1'}
|
||||
: { 'branch_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'BRANCH')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getBranch();
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
|
||||
//if is active '1' have TO deactive So deactive messages
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'BRANCH')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getBranch();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getBranch();
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -136,21 +136,13 @@
|
||||
<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;"
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true"
|
||||
(change)="isactiveCity(row.city_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false"
|
||||
(change)="isactiveCity(row.city_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveCity(row.city_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
<!-- <button mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveCity(row.city_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)="isactiveCity(row.city_id,row.isactive)"><mat-icon>clear</mat-icon></button></ng-template> -->
|
||||
</mat-cell>
|
||||
|
||||
@ -44,6 +44,8 @@ pageSize = 10;
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
constructor(private dialog: MatDialog,
|
||||
private _mastersService: MastersService) {
|
||||
@ -122,58 +124,43 @@ pageSize = 10;
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'city_id':id,'isactive': '1'}
|
||||
: { 'city_id':id,'isactive': '0'};
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'CITY')
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'CITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
this.getCity();
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
else{
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'CITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getCity();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getCity();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -117,21 +117,13 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> 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)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -31,10 +31,14 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
||||
|
||||
CommentsOnLocalityList: any = [];
|
||||
userData = null;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
|
||||
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
//displayedColumns = ['SerialNo','CommentsOnLocalityName', 'IsActive','Actions'];
|
||||
@ -119,58 +123,42 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'comments_on_locality_id':id,'isactive': '1'}
|
||||
: { 'comments_on_locality_id':id,'isactive': '0'};
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'CITY')
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'COMMENTSONLOCALITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
this.getCommentsOnLocality();
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._mastersService.editMasterDetails(ActiveDatas,'COMMENTSONLOCALITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getCommentsOnLocality();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getCommentsOnLocality();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -117,21 +117,13 @@
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<!-- <button mat-icon-button class="active" matTooltip="Active" matTooltipPosition="above" (click)="isactiveCustomerBehaviour(row.customer_behaviour_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)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"><mat-icon>clear</mat-icon></button></ng-template> -->
|
||||
<mat-slide-toggle *ngIf="row.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false"
|
||||
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -30,6 +30,9 @@ export class CustomerBehaviourListComponent implements OnInit {
|
||||
CustomerBehaviourList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
userData = null;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -119,59 +122,41 @@ pageSize = 10;
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'customer_behaviour_id':id,'isactive': '1'}
|
||||
: { 'customer_behaviour_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'CUSTOMERBEHAVIOUR')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getCustomerBehaviour();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'CUSTOMERBEHAVIOUR')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getCustomerBehaviour();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getCustomerBehaviour();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -113,21 +113,13 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -28,6 +28,9 @@ export class CustomerSegmentListComponent implements OnInit {
|
||||
loader: boolean = false;
|
||||
CustomerSegmentList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -121,58 +124,42 @@ displayedColumns = ['serialno','name','actions','isactive'];
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'customer_segment_id':id,'isactive': '1'}
|
||||
: { 'customer_segment_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'CUSTOMERSEGMENT')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getCustomerSegment();
|
||||
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'CUSTOMERSEGMENT')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getCustomerSegment();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getCustomerSegment();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
|
||||
@ -112,21 +112,13 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>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)="isactiveFrequency(row.frequency_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false"
|
||||
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveFrequency(row.frequency_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -31,6 +31,9 @@ export class FrequencyListComponent implements OnInit {
|
||||
loader: boolean = false;
|
||||
FrequencyList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -127,58 +130,41 @@ export class FrequencyListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'frequency_id':id,'isactive': '1'}
|
||||
: { 'frequency_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'FREQUENCY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getFrequency();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'FREQUENCY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getFrequency();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getFrequency();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -43,20 +43,13 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
|
||||
(click)="deactive()"></mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
<!-- <mat-slide-toggle
|
||||
class="example-margin"
|
||||
[matTooltip] = "row.isactive == 1 ? Inactive : Active"
|
||||
|
||||
@ -38,7 +38,9 @@ export class IndustryClassificationListComponent implements OnInit {
|
||||
IndustryClassificationList: any = [];
|
||||
|
||||
noRecordFound: boolean = false;
|
||||
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
userData = null;
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
@ -136,57 +138,41 @@ pageSize = 10;
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'industry_classification_id':id,'isactive': '1'}
|
||||
: { 'industry_classification_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._IMService.editMasterDetails(ActiveDatas,'INDUSTRYCLASSIFICATION')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getIndustryClassification();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._IMService.editMasterDetails(ActiveDatas,'INDUSTRYCLASSIFICATION')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getIndustryClassification();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getIndustryClassification();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -118,21 +118,14 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> 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)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<!-- <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>
|
||||
|
||||
@ -31,6 +31,9 @@ export class MembersOccupationListComponent implements OnInit {
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
MemberOccupationList: any = [];
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -141,56 +144,42 @@ export class MembersOccupationListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'occupation_non_earning_member_id':id,'isactive': '1'}
|
||||
: { 'occupation_non_earning_member_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._memberService.editMasterDetails(ActiveDatas,'OCCUPATIONMEMBERS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getMemberOccupation();
|
||||
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._memberService.editMasterDetails(ActiveDatas,'OCCUPATIONMEMBERS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getMemberOccupation();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getMemberOccupation();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -97,21 +97,14 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>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)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
<!-- <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>
|
||||
|
||||
@ -43,6 +43,9 @@ export class PdLocationApproachListComponent implements OnInit {
|
||||
|
||||
userData = null;
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
displayedColumns = ['serialno','description','actions', 'isactive'];
|
||||
@ -129,56 +132,42 @@ export class PdLocationApproachListComponent implements OnInit {
|
||||
? { 'pd_location_approach_id':id,'isactive': '1'}
|
||||
: { 'pd_location_approach_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
//this._MastersService.editMasterDetails(ActiveDatas,'PDLOCATIONAPPROACH')
|
||||
this._MastersService.editMasterDetails(pdLocationApproachFormValue,'PDLOCATIONAPPROACH')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getPdLocationApproach();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(pdLocationApproachFormValue,'PDLOCATIONAPPROACH')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getPdLocationApproach();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getPdLocationApproach();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
</div> -->
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender-SMS </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row;let i=index;">
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_lender" [checked]="row.sms_lender==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.sms_lender" [checked]="row.sms_lender==1 ? true:false"></mat-checkbox>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Officer-SMS</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<!-- {{row.sms_pdofficer}} -->
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_pdofficer" [checked]="row.sms_pdofficer==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.sms_pdofficer" [checked]="row.sms_pdofficer==1 ? true:false"></mat-checkbox>
|
||||
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.sms_pdofficer == 1 ? smsPdofficerCheck : smsPdofficerUncheck"></mat-checkbox> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -67,7 +67,7 @@
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Incharge -SMS</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<!-- {{row.sms_pdincharge}} -->
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.sms_pdincharge" [checked]="row.sms_pdincharge==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.sms_pdincharge" [checked]="row.sms_pdincharge==1 ? true:false"></mat-checkbox>
|
||||
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.sms_pdincharge == 1 ? Check : Uncheck"></mat-checkbox> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -78,7 +78,7 @@
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Lender -MAIL</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<!-- {{row.mail_lender}} -->
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_lender" [checked]="row.mail_lender==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.mail_lender" [checked]="row.mail_lender==1 ? true:false"></mat-checkbox>
|
||||
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_lender == 1 ? Check : Uncheck"></mat-checkbox> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -86,7 +86,7 @@
|
||||
<ng-container matColumnDef="mail_pdincharge">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Incharge -MAIL </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_pdincharge" [checked]="row.mail_pdincharge==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.mail_pdincharge" [checked]="row.mail_pdincharge==1 ? true:false"></mat-checkbox>
|
||||
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdincharge == 1 ? Check : Uncheck"></mat-checkbox> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -95,7 +95,7 @@
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> PD Officer -MAIL</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
<!-- {{row.mail_pdofficer}} -->
|
||||
<mat-checkbox color="primary" class="example-margin" (change)="modelChanged(row,$event)" [(ngModel)]="row.mail_pdofficer" [checked]="row.mail_pdofficer==1 ? true:false"></mat-checkbox>
|
||||
<mat-checkbox color="primary" class="example-margin" [(ngModel)]="row.mail_pdofficer" [checked]="row.mail_pdofficer==1 ? true:false"></mat-checkbox>
|
||||
<!-- <mat-checkbox class="example-margin" [(ngModel)]="row.mail_pdofficer == 1 ? Check : Uncheck"></mat-checkbox> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@ -128,7 +128,7 @@
|
||||
<mat-toolbar-row fxLayout >
|
||||
<button class="mr-1 mb-1 save-button" fxFlex="10%" fxLayoutAlign="center" mat-raised-button color="primary" class="hover-icon" matTooltip="Save Data" matTooltipPosition="above" (click)="SaveData(dataSource)">Save</button>
|
||||
<!-- <span class="empty-spacer"></span> -->
|
||||
<mat-paginator fxFlex="90%" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator fxFlex="90%" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</mat-toolbar-row>
|
||||
</mat-toolbar>
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ export class PdNotificationListComponent implements OnInit {
|
||||
};
|
||||
notificationData = null;
|
||||
noRecordFound: boolean = false;
|
||||
pageSize = 10;
|
||||
private notifier: NotifierService;
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
@ -193,7 +194,8 @@ SaveData(dataSource){
|
||||
dataresult => {
|
||||
if(dataresult.dataStatus == true){
|
||||
//alert('Updated Successfully !');
|
||||
//this.getPdNotification();
|
||||
|
||||
this.getPdNotification();
|
||||
this.notifier.notify('success', 'Record Updated Successfully.!');
|
||||
|
||||
}else{
|
||||
|
||||
@ -99,21 +99,13 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactivePDType(row.pd_type_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -30,6 +30,9 @@ export class PdTypeListComponent implements OnInit {
|
||||
loader: boolean = false;
|
||||
PDTypeList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -122,55 +125,41 @@ isactivePDType(id: number,isactive : number) {
|
||||
? { 'pd_type_id':id,'isactive': '1'}
|
||||
: { 'pd_type_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._PDTypeService.editMasterDetails(ActiveDatas,'PDTYPE')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getPDType();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._PDTypeService.editMasterDetails(ActiveDatas,'PDTYPE')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getPDType();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getPDType();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -50,21 +50,14 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveProductMaster(row.product_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -31,6 +31,9 @@ export class ProductListComponent implements OnInit {
|
||||
ProductMasterList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
userData = null;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -129,55 +132,42 @@ export class ProductListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'product_id':id,'isactive': '1'}
|
||||
: { 'product_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._ProductService.editMasterDetails(ActiveDatas,'PRODUCTS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getProductMaster();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._ProductService.editMasterDetails(ActiveDatas,'PRODUCTS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getProductMaster();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getProductMaster();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -43,21 +43,14 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> 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)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveQuestionCategory(row.question_category_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveQuestionCategory(row.question_category_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -29,6 +29,9 @@ export class QuestionCategoryListComponent implements OnInit {
|
||||
QuestionCategoryList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
userData = null;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -115,53 +118,41 @@ export class QuestionCategoryListComponent implements OnInit {
|
||||
? { 'question_category_id':id,'isactive': '1'}
|
||||
: { 'question_category_id':id,'isactive': '0'}
|
||||
|
||||
this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getQuestionCategory();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getQuestionCategory();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getQuestionCategory();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
|
||||
@ -28,21 +28,14 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> 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)="isactiveregions(row.region_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveregions(row.region_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -32,6 +32,9 @@ export class RegionsListComponent implements OnInit {
|
||||
regionsList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
color = 'primary';
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
userData = null;
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -103,64 +106,48 @@ export class RegionsListComponent implements OnInit {
|
||||
? { 'region_id':id,'isactive': '1'}
|
||||
: { 'region_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
||||
.subscribe(dataresult=>{
|
||||
|
||||
|
||||
if (dataresult.dataStatus == true){
|
||||
|
||||
this.getregions();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getregions();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getregions();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
deleteregions(id: number) {
|
||||
var PrimaryKeyWithValue ={'region_id':id};
|
||||
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { });
|
||||
this.getregions();
|
||||
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
|
||||
@ -122,21 +122,13 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveRelationShip(row.relationship_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -29,6 +29,9 @@ export class RelationShipListComponent implements OnInit {
|
||||
loader: boolean = false;
|
||||
RelationShipList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -100,20 +103,42 @@ export class RelationShipListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'relationship_id':id,'isactive': '1'}
|
||||
: { 'relationship_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'RELATIONSHIPS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getRelationShip();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'RELATIONSHIPS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getRelationShip();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getRelationShip();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//To get data for listing
|
||||
getRelationShip() {
|
||||
this._MastersService.getAllMasterData('RELATIONSHIPS').subscribe(
|
||||
@ -146,42 +171,7 @@ export class RelationShipListComponent implements OnInit {
|
||||
|
||||
//this._MastersService.deleteMasterDetails('relationship_id',id,'RELATIONSHIPS');
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -145,21 +145,13 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveState(row.state_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveState(row.state_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveState(row.state_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -29,6 +29,9 @@ export class StatesListComponent implements OnInit {
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
StateList: any = [];
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -97,19 +100,42 @@ isactiveState(id: number,isactive : number) {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'state_id':id,'isactive': '1'}
|
||||
: { 'state_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._statesService.editMasterDetails(ActiveDatas,'STATE')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getState();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._statesService.editMasterDetails(ActiveDatas,'STATE')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getState();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getState();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//To get data for listing
|
||||
getState() {
|
||||
this._statesService.getAllState().subscribe(
|
||||
@ -138,42 +164,6 @@ isactiveState(id: number,isactive : number) {
|
||||
this.getState();
|
||||
//this._statesService.deleteMasterDetails('state_id',id,'STATE');
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
|
||||
@ -134,21 +134,14 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveSubProductMaster(row.subproduct_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -34,6 +34,9 @@ export class SubProductListComponent implements OnInit {
|
||||
|
||||
userData = null;
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
|
||||
@ -137,56 +140,41 @@ getSubProductMaster() {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'subproduct_id':id,'isactive': '1'}
|
||||
: { 'subproduct_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'SUBPRODUCTS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getSubProductMaster();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'SUBPRODUCTS')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getSubProductMaster();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getSubProductMaster();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -118,21 +118,14 @@
|
||||
<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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveTitle(row.title_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveTitle(row.title_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveTitle(row.title_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -27,6 +27,9 @@ export class TitleListComponent implements OnInit {
|
||||
loader: boolean = false;
|
||||
TitleList: any = [];
|
||||
noRecordFound: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -124,55 +127,42 @@ export class TitleListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'title_id':id,'isactive': '1'}
|
||||
: { 'title_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'TITLES')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getTitle();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'TITLES')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getTitle();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getTitle();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
|
||||
@ -110,23 +110,15 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveActivity(row.type_of_activity_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
<!-- <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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false"
|
||||
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -26,7 +26,10 @@ import Swal from 'sweetalert2';
|
||||
export class ActivityListComponent implements OnInit {
|
||||
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
loader: boolean = false;
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
ActivityList: any = [];
|
||||
|
||||
// displayedColumns = ['type_of_activity_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
|
||||
@ -133,56 +136,42 @@ export class ActivityListComponent implements OnInit {
|
||||
? { 'type_of_activity_id':id,'isactive': '1'}
|
||||
: { 'type_of_activity_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'TYPEOFACTIVITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getActivity();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'TYPEOFACTIVITY')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getActivity();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getActivity();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -37,23 +37,15 @@
|
||||
<ng-container matColumnDef="isactive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle
|
||||
class="example-margin" [color]="color"
|
||||
[checked] ="row.isactive==1?true:false"
|
||||
[matTooltip]="row.isactive==1?'Active':'Inactive'"
|
||||
matTooltipPosition="above"
|
||||
(click)="isactiveUOM(row.uom_id,row.isactive)">
|
||||
</mat-slide-toggle>
|
||||
<!-- <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;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
||||
(click)="deactive()">
|
||||
</mat-slide-toggle>
|
||||
<ng-template #notactive >
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
matTooltip="Inactive" matTooltipPosition="above"
|
||||
checked="false" [color]="color"
|
||||
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
||||
(click)="active()">
|
||||
</mat-slide-toggle></ng-template>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -33,6 +33,9 @@ export class UomListComponent implements OnInit {
|
||||
isPopupOpened: boolean = true;
|
||||
loader: boolean = false;
|
||||
UOMList: any = [];
|
||||
SwalButtonText: string;
|
||||
SwalMessage: string;
|
||||
|
||||
color = 'primary';
|
||||
// pagination variable details
|
||||
pageSize = 10;
|
||||
@ -147,57 +150,41 @@ export class UomListComponent implements OnInit {
|
||||
let ActiveDatas = isactive == 0
|
||||
? { 'uom_id':id,'isactive': '1'}
|
||||
: { 'uom_id':id,'isactive': '0'}
|
||||
|
||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'UOM')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
//alert("my check");
|
||||
this.getUOM();
|
||||
if(isactive == 1){
|
||||
this.SwalButtonText = 'Yes, deactivate it!';
|
||||
this.SwalMessage = 'Deactivated!';
|
||||
}
|
||||
else{
|
||||
Swal("SomeThing Wents Wrong Try Again !");
|
||||
this.SwalButtonText = 'Yes, activate it!';
|
||||
this.SwalMessage = 'Activated!';
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: this.SwalButtonText
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this._MastersService.editMasterDetails(ActiveDatas,'UOM')
|
||||
.subscribe(dataresult=>{
|
||||
if (dataresult.dataStatus == true){
|
||||
Swal(this.SwalMessage,'success');
|
||||
this.getUOM();
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.getUOM();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** For Display Tables Pagination And Sorting */
|
||||
ngAfterViewInit() {
|
||||
this.dataSource.paginator = this.paginator;
|
||||
|
||||
@ -81,16 +81,10 @@
|
||||
<div *ngIf="masterCtrl.value =='20'">
|
||||
<app-frequency-list></app-frequency-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='21'">
|
||||
<app-designation-list></app-designation-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='22'">
|
||||
<!-- <app-company-list></app-company-list> -->
|
||||
<app-company></app-company>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='23'">
|
||||
<app-lender-hierarchy-list></app-lender-hierarchy-list>
|
||||
</div>
|
||||
<div *ngIf="masterCtrl.value =='26'">
|
||||
<app-pd-notification-list></app-pd-notification-list>
|
||||
</div>
|
||||
|
||||
@ -23,8 +23,8 @@ export interface Master {
|
||||
export class PdTeamService {
|
||||
|
||||
|
||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
//private apiUrl = "http://localhost/sparqapi/api/";
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = "http://192.168.0.21:9999/AWSEC2/sparqapi/api/";
|
||||
pk: { "primary_key": any; };
|
||||
|
||||
|
||||
|
||||
@ -207,6 +207,7 @@ this.loader = true;
|
||||
} else {
|
||||
this.AWS.adminchangeData(this.usersData,userData).subscribe(res=>{
|
||||
if(userData.role.role_id == 10){
|
||||
userData.aws_name = this.usersData.aws_name;
|
||||
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
||||
});}
|
||||
this.users.saveRecords(res,userData).subscribe(res=>{
|
||||
|
||||
@ -48,7 +48,16 @@
|
||||
<ng-container matColumnDef="IsActive">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Active </mat-header-cell>
|
||||
<mat-cell *matCellDef="let us"><!--{{row.isactive}}-->
|
||||
<mat-slide-toggle *ngIf="us.isactive == 1;else notactive;"
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
[checked]="us.isactive == 1 ? true : false " [color]="color"
|
||||
[matTooltip]="us.isactive == 1 ? 'Active': 'Deactive'" matTooltipPosition="above"
|
||||
(click)="isactive(us.userid,us.aws_name)">
|
||||
</mat-slide-toggle>
|
||||
|
||||
|
||||
|
||||
<!-- <mat-slide-toggle *ngIf="us.isactive == 1;else notactive;"
|
||||
class="example-margin"
|
||||
matTooltip="Active" matTooltipPosition="above"
|
||||
checked="true" [color]="color"
|
||||
@ -62,7 +71,7 @@
|
||||
checked="false" [color]="color"
|
||||
(change)="isactive(us.userid,us.aws_name)"
|
||||
(click)=active()>
|
||||
</mat-slide-toggle></ng-template>
|
||||
</mat-slide-toggle></ng-template> -->
|
||||
<!-- <a (click)="isactive(us.userid,us.aws_name)"><mat-icon *ngIf="us.isactive == 1;else notactive;" class="active" matTooltip="Active" matTooltipPosition="above">done</mat-icon></a>
|
||||
<a (click)="isactive(us.userid,us.aws_name)"><ng-template #notactive ><mat-icon class="deactive" matTooltip="Inactive" matTooltipPosition="above">close</mat-icon></ng-template></a> -->
|
||||
</mat-cell>
|
||||
|
||||
@ -85,47 +85,78 @@ export class UserListComponent implements OnInit {
|
||||
let data:any;
|
||||
let userstatus = this.userdata.filter((users) => users.userid == id)[0];
|
||||
if (userstatus.isactive == 1) {
|
||||
this.aws.admindisabelUser(userstatus, awsname).subscribe(res => {
|
||||
if (res == 0) {
|
||||
let users = {
|
||||
|
||||
'userid': userstatus.userid,
|
||||
'isactive': '0',
|
||||
}
|
||||
|
||||
|
||||
this.users.adminupendis(users).subscribe(res => {
|
||||
data = res;
|
||||
if (data.status == 200) {
|
||||
this.getusers();
|
||||
//this.shared.redirectTo(this.route.url);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, deactivate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this.aws.admindisabelUser(userstatus, awsname).subscribe(res => {
|
||||
if (res == 0) {
|
||||
let users = { 'userid': userstatus.userid,'isactive': '0'}
|
||||
this.users.adminupendis(users).subscribe(res => {
|
||||
data = res;
|
||||
if (data.status == 200) {
|
||||
Swal(
|
||||
'Deactivated!',
|
||||
'success'
|
||||
)
|
||||
this.getusers();
|
||||
//this.shared.redirectTo(this.route.url);
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getusers();
|
||||
}
|
||||
})//swal End Here
|
||||
} else {
|
||||
this.aws.adminenableUser(userstatus, awsname).subscribe(res => {
|
||||
console.log(res);
|
||||
if (res == 1) {
|
||||
let users = {
|
||||
'userid': userstatus.userid,
|
||||
'isactive': '1',
|
||||
}
|
||||
|
||||
|
||||
this.users.adminupendis(users).subscribe(res => {
|
||||
data = res;
|
||||
if (data.status == 200) {
|
||||
this.getusers();
|
||||
//this.shared.redirectTo(this.route.url);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this.aws.adminenableUser(userstatus, awsname).subscribe(res => {
|
||||
//console.log(res);
|
||||
if (res == 1) {
|
||||
let users = { 'userid': userstatus.userid,
|
||||
'isactive': '1'}
|
||||
this.users.adminupendis(users).subscribe(res => {
|
||||
data = res;
|
||||
if (data.status == 200) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
this.getusers();
|
||||
//this.shared.redirectTo(this.route.url);
|
||||
}
|
||||
else{
|
||||
Swal("Sorry Try Again !");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getusers();
|
||||
}
|
||||
})//swal End Here
|
||||
}
|
||||
}
|
||||
editUserDetails(userId){
|
||||
|
||||
let userDetails = this.userdata.filter(users=>users.userid == userId)[0];
|
||||
@ -148,23 +179,6 @@ export class UserListComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
//Sweetalert2 for active and deactive
|
||||
active(){
|
||||
Swal({
|
||||
title: 'Are you sure?',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, activate it!'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
Swal(
|
||||
'Activated!',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
deactive()
|
||||
{
|
||||
Swal({
|
||||
|
||||
@ -11,6 +11,9 @@ import {
|
||||
MatListModule, MatMenuModule,
|
||||
} from '@angular/material';
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
|
||||
@ -33,7 +36,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone
|
||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
||||
MatSlideToggleModule,
|
||||
MatSlideToggleModule,MatTooltipModule,
|
||||
FormsModule, ReactiveFormsModule,
|
||||
// HttpClientModule,
|
||||
],
|
||||
|
||||
@ -38,7 +38,7 @@ export class ListComponent implements OnInit {
|
||||
questionListData = null;
|
||||
public dataLength: number;
|
||||
public dataSource = new MatTableDataSource();
|
||||
displayedColumns = ['categroy_name', 'question', 'actions'];
|
||||
displayedColumns = ['category_name', 'question', 'actions'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) sort: MatSort;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user