diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json
index f30e1a2fb..179ae916f 100644
--- a/ng6-seed/package-lock.json
+++ b/ng6-seed/package-lock.json
@@ -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",
diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts
index 36ddffe86..38c9f3f67 100755
--- a/ng6-seed/src/app/AwsService/aws.service.ts
+++ b/ng6-seed/src/app/AwsService/aws.service.ts
@@ -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 => {
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
index fcdbc2c68..87583e4fc 100644
--- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html
@@ -46,22 +46,13 @@
Active
-
+
-
-
-
-
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
index 5fea0b7ff..19aa459a0 100644
--- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
index 728a52b03..ab87e331e 100644
--- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html
@@ -136,21 +136,13 @@
Is Active
-
-
-
-
-
+ [checked] ="row.isactive==1?true:false"
+ [matTooltip]="row.isactive==1?'Active':'Inactive'"
+ matTooltipPosition="above"
+ (click)="isactiveCity(row.city_id,row.isactive)">
+
diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
index 7ffbdfaca..c4650cb55 100644
--- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
index 78aafa8a6..c6280c1b6 100644
--- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
@@ -117,21 +117,13 @@
Active
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts
index 555e8188e..d48c39b26 100644
--- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
index e422a9d8e..f81f8dc6e 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
@@ -117,21 +117,13 @@
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
index 23d9d760b..1f8b9ae5b 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
index a11e5ff36..e2d7926c8 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html
@@ -113,21 +113,13 @@
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
index 351e48ebf..3d38c6aa8 100644
--- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
@@ -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() {
diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
index 53fd768ea..df4a3b3fd 100644
--- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html
@@ -112,21 +112,13 @@
Active
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
index ae4898113..de0724da1 100644
--- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
index 29f81a42a..0b7df57f9 100644
--- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html
@@ -43,20 +43,13 @@
-
-
-
-
+
+
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
index 64a5e7508..e71ff61cf 100644
--- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html
index fc9991cd7..f584c3440 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html
@@ -97,21 +97,14 @@
Active
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts
index eea52387e..60882f741 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html
index 08a08a66d..56d5593cb 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html
@@ -50,7 +50,7 @@
-->
Lender-SMS
-
+
@@ -58,7 +58,7 @@
PD Officer-SMS
-
+
@@ -67,7 +67,7 @@
PD Incharge -SMS
-
+
@@ -78,7 +78,7 @@
Lender -MAIL
-
+
@@ -86,7 +86,7 @@
PD Incharge -MAIL
-
+
@@ -95,7 +95,7 @@
PD Officer -MAIL
-
+
@@ -128,7 +128,7 @@
-
+
diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts
index 11be83104..1c5c0a727 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts
@@ -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{
diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html
index ed7ac372d..076e5c6af 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html
@@ -99,21 +99,13 @@
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts
index 2b8fd6a48..6bc49a851 100644
--- a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
index 677912f7f..9d25f7627 100644
--- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html
@@ -50,21 +50,14 @@
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts
index b9450c013..fc7819b9e 100644
--- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html
index 1ef449d34..b211bea07 100644
--- a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html
@@ -43,21 +43,14 @@
Active
-
-
-
+
-
+ 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)">
+
diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts
index 0e1bfe851..1e2e65fc4 100644
--- a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts
@@ -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() {
diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html
index 716f3fcd0..6c7da361a 100644
--- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html
@@ -28,21 +28,14 @@
Active
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
index 6c557b120..0e95650eb 100644
--- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts
@@ -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() {
diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
index ca7f53328..4cc6458f1 100644
--- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html
@@ -122,21 +122,13 @@
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
index 66a664b08..831f7aa82 100644
--- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
index 197920973..e05fc3fd6 100644
--- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html
@@ -145,21 +145,13 @@
-
-
-
-
-
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
index d15ad883e..73da95f1e 100644
--- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts
@@ -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() {
diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
index 590ea0f63..bfb5268e2 100644
--- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html
@@ -134,21 +134,14 @@
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
index 13dbcdf18..19facb1ab 100644
--- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
index fcca0155c..404b6bbff 100644
--- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html
@@ -118,21 +118,14 @@
-
-
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
index 2bb829d34..b6bed9d33 100644
--- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts
@@ -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() {
diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
index aabc465a8..bc821adff 100644
--- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html
@@ -110,23 +110,15 @@
Active
+
+
-
-
-
-
-
diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
index 903302c6f..5d62a89ff 100644
--- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
index ca7892d3c..be4c55b5d 100644
--- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
+++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html
@@ -37,23 +37,15 @@
Active
+
+
-
-
-
-
-
diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
index e34ced40b..338a042af 100644
--- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
+++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts
@@ -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;
diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html
index 541e9da76..c9c2714db 100644
--- a/ng6-seed/src/app/settings/masters/masters.component.html
+++ b/ng6-seed/src/app/settings/masters/masters.component.html
@@ -81,16 +81,10 @@
-
-
diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
index f6b8c606e..1996831ec 100644
--- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
+++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
@@ -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; };
diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts
index 790abd315..f65a45feb 100755
--- a/ng6-seed/src/app/settings/users/register/register.component.ts
+++ b/ng6-seed/src/app/settings/users/register/register.component.ts
@@ -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=>{
diff --git a/ng6-seed/src/app/settings/users/user-list/user-list.component.html b/ng6-seed/src/app/settings/users/user-list/user-list.component.html
index 1d9c308f8..4a9ed0e45 100644
--- a/ng6-seed/src/app/settings/users/user-list/user-list.component.html
+++ b/ng6-seed/src/app/settings/users/user-list/user-list.component.html
@@ -48,7 +48,16 @@
Active
-
+
+
+
+
+
diff --git a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts
index 5d9842295..0c423572b 100644
--- a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts
+++ b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts
@@ -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({
diff --git a/ng6-seed/src/app/settings/users/users.module.ts b/ng6-seed/src/app/settings/users/users.module.ts
index c079b54bc..0f8c5e310 100644
--- a/ng6-seed/src/app/settings/users/users.module.ts
+++ b/ng6-seed/src/app/settings/users/users.module.ts
@@ -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,
],
diff --git a/ng6-seed/src/app/template/questions/list/list.component.ts b/ng6-seed/src/app/template/questions/list/list.component.ts
index 4ef7238db..25f3de4b4 100644
--- a/ng6-seed/src/app/template/questions/list/list.component.ts
+++ b/ng6-seed/src/app/template/questions/list/list.component.ts
@@ -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;