Sweet Alert 2 In master

This commit is contained in:
saravanakumarkandasami 2018-10-13 17:59:20 +05:30
parent 3ad6314e0e
commit 2c6d5d51b2
48 changed files with 911 additions and 93 deletions

View File

@ -42,7 +42,7 @@
<!-- <button *ngIf="row.isactive == 1;" mat-icon-button class="hover-icon" matTooltip="Delete" matTooltipPosition="above" (click)="deleteCity(row.city_id)"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
<ng-container matColumnDef="isactive">
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
<mat-cell *matCellDef="let row"><!--{{row.isactive}}-->
@ -51,7 +51,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveBranch(row.branch_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -59,7 +59,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveBranch(row.branch_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>

View File

@ -14,8 +14,9 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { BranchDialogComponent } from '../branch-dialog/branch-dialog.component';
/** Model */
import { Branch } from '../../../model/branch';
@Component({
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-branch-list',
templateUrl: './branch-list.component.html',
styleUrls: ['./branch-list.component.scss']
@ -120,7 +121,7 @@ export class BranchListComponent implements OnInit {
this.getBranch();
}
else{
alert("SomeThing Wents Wrong Try Again !");
Swal("SomeThing Wents Wrong Try Again !");
}
});
}
@ -140,11 +141,46 @@ export class BranchListComponent implements OnInit {
this.getBranch();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -141,15 +141,15 @@
matTooltip="Active" matTooltipPosition="above"
checked="true"
(change)="isactiveCity(row.city_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<ng-template #notactive >
<mat-slide-toggle
class="example-margin" [color]="color"
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveCity(row.city_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
<!-- <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> -->

View File

@ -14,6 +14,10 @@ import { CityDialogComponent } from '../city-dialog/city-dialog.component';
/** Model */
import { City } from '../../../model/city';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-city-list',
templateUrl: './city-list.component.html',
@ -126,12 +130,50 @@ pageSize = 10;
this.getCity();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -122,7 +122,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -130,7 +130,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,6 +16,8 @@ import { CommentsOnLocalityDialogComponent } from '../comments-on-locality-dialo
/** Model */
import { CommentsOnLocality } from '../../../model/comments-on-locality';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-comments-on-locality-list',
templateUrl: './comments-on-locality-list.component.html',
@ -125,12 +127,50 @@ export class CommentsOnLocalityListComponent implements OnInit {
this.getCommentsOnLocality();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -122,7 +122,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -130,7 +130,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { CustomerBehaviourDialogComponent } from '../customer-behaviour-dialog/customer-behaviour-dialog.component';
/** Model */
import { CustomerBehaviour } from '../../../model/customer-behaviour';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-customer-behaviour-list',
@ -127,10 +128,50 @@ pageSize = 10;
this.getCustomerBehaviour();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -118,7 +118,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -126,7 +126,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { CustomerSegmentDialogComponent } from '../customer-segment-dialog/customer-segment-dialog.component';
/** Model */
import { CustomerSegment } from '../../../model/customer-segment';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-customer-segment-list',
@ -129,10 +130,50 @@ displayedColumns = ['serialno','name','actions','isactive'];
this.getCustomerSegment();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -110,7 +110,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveDesignation(row.designation_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -118,7 +118,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveDesignation(row.designation_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { DesignationDialogComponent } from '../designation-dialog/designation-dialog.component';
/** Model */
import { Designation } from '../../../model/designation';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-designation-list',
@ -123,10 +124,50 @@ pageSize = 10;
this.getDesignation();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -117,7 +117,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -125,7 +125,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,6 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { FrequencyDialogComponent }from '../frequency-dialog/frequency-dialog.component';
/** Model */
import { Frequency } from '../../../model/frequency';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
@ -134,10 +136,49 @@ export class FrequencyListComponent implements OnInit {
this.getFrequency();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -48,18 +48,18 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
onclick="return confirm('Are you sure?')"></mat-slide-toggle>
(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)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
<mat-cell *matCellDef="let row">

View File

@ -16,6 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { IndustryClassificationDialogComponent } from '../industry_classification-dialog/industry_classification-dialog.component';
/** Model */
import { IndustryClassification } from '../../../model/industry_classification';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-industry_classification-list',
@ -143,10 +145,47 @@ pageSize = 10;
this.getIndustryClassification();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {

View File

@ -107,7 +107,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -115,7 +115,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -19,7 +19,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { LenderHierarchyDialogComponent }from '../lender-hierarchy-dialog/lender-hierarchy-dialog.component';
/**Model */
import { LenderHierarchy } from '../../../model/lender-hierarchy';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-lender-hierarchy-list',
@ -146,10 +147,47 @@ isactiveLenderHierarchy(id: number,isactive : number) {
this.getLenderHierarchy();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -123,7 +123,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -131,7 +131,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->

View File

@ -18,7 +18,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { MembersOccupationDialogComponent } from '../members-occupation-dialog/members-occupation-dialog.component';
/** Model */
import { MembersOccupation } from '../../../model/members-occupation';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-members-occupation-list',
@ -149,10 +150,47 @@ export class MembersOccupationListComponent implements OnInit {
this.getMemberOccupation();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -62,7 +62,7 @@
matTooltipPosition="above"
checked="false" [color]="color"
(change)="defaultPDAllocationType(row.pd_allocation_type_id)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle>
<ng-template #alternative>
<mat-slide-toggle class="example-margin"

View File

@ -15,6 +15,8 @@ import { NotifierService } from 'angular-notifier';
/** Model */
import { PdAllocationType } from '../../model/pd';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-pd-allocation-type-list',
@ -121,7 +123,9 @@ export class PdAllocationTypeListComponent implements OnInit {
});
//console.log('at last Completed Section');
}
active(){
Swal('Are you sure?')
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -102,7 +102,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -110,7 +110,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->

View File

@ -23,7 +23,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { PdLocationApproachDialogComponent } from '../pd-location-approach-dialog/pd-location-approach-dialog.component';
/** Model */
import { PdLocationApproach } from '../../../model/pd';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-pd-location-approach-list',
@ -137,10 +138,46 @@ export class PdLocationApproachListComponent implements OnInit {
this.getPdLocationApproach();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {

View File

@ -104,7 +104,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactivePDType(row.pd_type_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -112,7 +112,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactivePDType(row.pd_type_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { PdTypeDialogComponent } from '../pd-type-dialog/pd-type-dialog.component';
/**Model */
import { PdType } from '../../../model/pd';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-pd-type-list',
@ -129,10 +130,46 @@ isactivePDType(id: number,isactive : number) {
this.getPDType();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {

View File

@ -55,7 +55,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveProductMaster(row.product_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -63,7 +63,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveProductMaster(row.product_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { ProductDialogComponent } from '../product-dialog/product-dialog.component';
/** Model */
import { ProductMaster } from '../../../model/product-master';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-product-list',
templateUrl: './product-list.component.html',
@ -137,11 +138,46 @@ export class ProductListComponent implements OnInit {
this.getProductMaster();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -48,7 +48,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -56,7 +56,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -14,7 +14,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
/** Dialog Component */
import { QuestionCategoryDialogComponent } from '../question-category-dialog/question-category-dialog.component';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-question-category-list',
templateUrl: './question-category-list.component.html',
@ -121,11 +122,47 @@ export class QuestionCategoryListComponent implements OnInit {
this.getQuestionCategory();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -33,7 +33,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveregions(row.region_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -41,7 +41,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveregions(row.region_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { RegionsDialogComponent } from '../regions-dialog/regions-dialog.component';
/** Model */
import { Regions } from '../../../model/regions';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-regions-list',
@ -112,7 +113,7 @@ export class RegionsListComponent implements OnInit {
this.getregions();
}
else{
alert("SomeThing Wents Wrong Try Again !");
Swal("SomeThing Wents Wrong Try Again !");
}
});
}
@ -124,6 +125,42 @@ export class RegionsListComponent implements OnInit {
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() {

View File

@ -127,7 +127,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -135,7 +135,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { RelationShipDialogComponent } from '../relation-ship-dialog/relation-ship-dialog.component';
/** Model */
import { RelationShip } from '../../../model/relation-ship';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-relation-ship-list',
templateUrl: './relation-ship-list.component.html',
@ -108,7 +109,7 @@ export class RelationShipListComponent implements OnInit {
this.getRelationShip();
}
else{
alert("SomeThing Wents Wrong Try Again !");
Swal("SomeThing Wents Wrong Try Again !");
}
});
}
@ -145,6 +146,42 @@ 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;

View File

@ -150,7 +150,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveState(row.state_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -158,7 +158,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveState(row.state_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { StatesDialogComponent } from '../states-dialog/states-dialog.component';
/** Model */
import { States } from '../../../model/states';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-states-list',
@ -105,7 +106,7 @@ isactiveState(id: number,isactive : number) {
this.getState();
}
else{
alert("SomeThing Wents Wrong Try Again !");
Swal("SomeThing Wents Wrong Try Again !");
}
});
}
@ -137,7 +138,42 @@ 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() {

View File

@ -139,7 +139,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -147,7 +147,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { SubProductDialogComponent } from '../sub-product-dialog/sub-product-dialog.component';
/** Model */
import { SubProductMaster } from '../../../model/sub-product-master';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-sub-product-list',
@ -145,10 +146,47 @@ getSubProductMaster() {
this.getSubProductMaster();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -123,7 +123,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveTitle(row.title_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -131,7 +131,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveTitle(row.title_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -14,7 +14,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { TitleDialogComponent } from '../title-dialog/title-dialog.component';
/** Model */
import { Title } from '../../../model/title';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-title-list',
templateUrl: './title-list.component.html',
@ -132,10 +133,47 @@ export class TitleListComponent implements OnInit {
this.getTitle();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -117,7 +117,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -125,7 +125,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false"
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
import { ActivityDialogComponent } from '../activity-dialog/activity-dialog.component';
/** Model */
import { Activity } from '../../../model/activity';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-activity-list',
templateUrl: './activity-list.component.html',
@ -140,10 +141,47 @@ export class ActivityListComponent implements OnInit {
this.getActivity();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {

View File

@ -44,7 +44,7 @@
matTooltip="Active" matTooltipPosition="above"
checked="true" [color]="color"
(change)="isactiveUOM(row.uom_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="deactive()">
</mat-slide-toggle>
<ng-template #notactive >
<mat-slide-toggle
@ -52,7 +52,7 @@
matTooltip="Inactive" matTooltipPosition="above"
checked="false" [color]="color"
(change)="isactiveUOM(row.uom_id,row.isactive)"
onclick="return confirm('Are you sure?')">
(click)="active()">
</mat-slide-toggle></ng-template>
</mat-cell>
</ng-container>

View File

@ -20,7 +20,8 @@ import { UomDialogComponent } from '../uom-dialog/uom-dialog.component';
/** Model */
import { Uom } from '../../../model/uom';
/**sweet alert */
import Swal from 'sweetalert2';
@Component({
selector: 'app-uom-list',
@ -155,10 +156,48 @@ export class UomListComponent implements OnInit {
this.getUOM();
}
else{
alert("SomeThing Wents Wrong Try Again !");
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'
)
}
})
}
/** For Display Tables Pagination And Sorting */
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -41,7 +41,7 @@
</div>
<div style="width: 10%; text-align: right;">
<div style="width: 100%; text-align: right;">
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" color="primary" matTooltip="Submit" [disabled]="btnsave" (click)="getnewTeamDetails()" matTooltipPosition="above"><mat-icon>save</mat-icon></button>
</div>
</div>

View File

@ -22,3 +22,4 @@
.tooltip:hover .tooltiptext {
visibility: visible;
}

View File

@ -111,7 +111,7 @@ export class PdTeamManageComponent implements OnInit {
}
}
cityinfo(id) {
Swal("<h5 style='align-items:left !important';>CITY:<br/>"+this.pdTeamManageData[id].CITYMAP+'<br/>'+"PRODUCTS: "+this.pdTeamManageData[id].PRODUCTS+"<br/>"+"CS: "+this.pdTeamManageData[id].CUSTOMERSEGMENT+".. </h5 >");
Swal("<h5>CITY:<br/>"+this.pdTeamManageData[id].CITYMAP+'<br/>'+"PRODUCTS: <br/>"+this.pdTeamManageData[id].PRODUCTS+"<br/>"+"CS: "+this.pdTeamManageData[id].CUSTOMERSEGMENT+".. </h5 >");

View File

@ -124,6 +124,12 @@
.mat-cell{
font-size:1.2em !important;
}
.swal2-header {
text-align:left !important;
}
.swal2-title {
text-align:left !important;
}
</style>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />