merge changes: kms
This commit is contained in:
parent
5b56faeb1d
commit
9daa64572a
@ -1,6 +1,14 @@
|
|||||||
<div align="right" *ngIf="viewPdList">
|
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||||
<button mat-stroked-button color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1"><mat-icon>map</mat-icon>Map List</button>
|
<div *ngIf="!noRecordFound" class="ml-xs mr-xs" style="width: 80%;">
|
||||||
<button mat-stroked-button color="primary" (click)="addPdDetails()" class="mr-1 mb-1"><mat-icon>add</mat-icon>Add PD</button>
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 80%;">No records found</div>
|
||||||
|
<div class="ml-xs mr-xs" style="width: 20%;text-align:right" *ngIf="viewPdList">
|
||||||
|
<button mat-fab color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1" matTooltip="Map List" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
|
||||||
|
<button mat-fab color="primary" (click)="addPdDetails()" class="mr-1 mb-1" matTooltip="Add PD" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-card *ngIf="viewPdList">
|
<mat-card *ngIf="viewPdList">
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
|
|||||||
@ -83,6 +83,12 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
this.viewPdList = !this.viewPdList;
|
this.viewPdList = !this.viewPdList;
|
||||||
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
|
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
|
||||||
|
|
||||||
|
}
|
||||||
|
//Global filter
|
||||||
|
applyFilter(filterValue: string) {
|
||||||
|
filterValue = filterValue.trim(); // Remove whitespace
|
||||||
|
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||||
|
this.dataSource.filter = filterValue;
|
||||||
}
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.viewPdList=false;
|
this.viewPdList=false;
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
import { CompanyDetailsModule } from './company-details.module';
|
|
||||||
|
|
||||||
describe('CompanyDetailsModule', () => {
|
|
||||||
let companyDetailsModule: CompanyDetailsModule;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
companyDetailsModule = new CompanyDetailsModule();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create an instance', () => {
|
|
||||||
expect(companyDetailsModule).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
declarations: []
|
|
||||||
})
|
|
||||||
export class CompanyDetailsModule { }
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
import { Routes } from '@angular/router';
|
|
||||||
//import { MastersComponent } from './masters.component';
|
|
||||||
|
|
||||||
|
|
||||||
export const CompanyDetailsRoutes: Routes = [
|
|
||||||
{
|
|
||||||
|
|
||||||
//path: '',
|
|
||||||
//component: PdTeamListComponent
|
|
||||||
//component: IndustryMasterListComponent
|
|
||||||
|
|
||||||
}];
|
|
||||||
@ -51,7 +51,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -59,7 +59,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
(change)="isactiveBranch(row.branch_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
|
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|||||||
@ -14,7 +14,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { BranchDialogComponent } from '../branch-dialog/branch-dialog.component';
|
import { BranchDialogComponent } from '../branch-dialog/branch-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Branch } from '../../../model/branch';
|
import { Branch } from '../../../model/branch';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-branch-list',
|
selector: 'app-branch-list',
|
||||||
templateUrl: './branch-list.component.html',
|
templateUrl: './branch-list.component.html',
|
||||||
@ -120,7 +121,7 @@ export class BranchListComponent implements OnInit {
|
|||||||
this.getBranch();
|
this.getBranch();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
Swal("SomeThing Wents Wrong Try Again !");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -140,11 +141,46 @@ export class BranchListComponent implements OnInit {
|
|||||||
this.getBranch();
|
this.getBranch();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true"
|
checked="true"
|
||||||
(change)="isactiveCity(row.city_id,row.isactive)"
|
(change)="isactiveCity(row.city_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -149,7 +149,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false"
|
checked="false"
|
||||||
(change)="isactiveCity(row.city_id,row.isactive)"
|
(change)="isactiveCity(row.city_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</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>
|
<!-- <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> -->
|
<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> -->
|
||||||
|
|||||||
@ -14,6 +14,10 @@ import { CityDialogComponent } from '../city-dialog/city-dialog.component';
|
|||||||
/** Model */
|
/** Model */
|
||||||
import { City } from '../../../model/city';
|
import { City } from '../../../model/city';
|
||||||
|
|
||||||
|
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-city-list',
|
selector: 'app-city-list',
|
||||||
templateUrl: './city-list.component.html',
|
templateUrl: './city-list.component.html',
|
||||||
@ -126,12 +130,50 @@ pageSize = 10;
|
|||||||
this.getCity();
|
this.getCity();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -122,7 +122,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -130,7 +130,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
(change)="isactiveCommentsOnLocality(row.comments_on_locality_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import { CommentsOnLocalityDialogComponent } from '../comments-on-locality-dialo
|
|||||||
/** Model */
|
/** Model */
|
||||||
import { CommentsOnLocality } from '../../../model/comments-on-locality';
|
import { CommentsOnLocality } from '../../../model/comments-on-locality';
|
||||||
|
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-comments-on-locality-list',
|
selector: 'app-comments-on-locality-list',
|
||||||
templateUrl: './comments-on-locality-list.component.html',
|
templateUrl: './comments-on-locality-list.component.html',
|
||||||
@ -125,12 +127,50 @@ export class CommentsOnLocalityListComponent implements OnInit {
|
|||||||
this.getCommentsOnLocality();
|
this.getCommentsOnLocality();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -0,0 +1,81 @@
|
|||||||
|
<mat-card-content>
|
||||||
|
<h2> Company </h2>
|
||||||
|
|
||||||
|
<form [formGroup]="_companyForm" (submit)="onSubmit()">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<!-- <input matInput type="text" placeholder="Name" required [formControl]="_companyForm.controls['name']"> -->
|
||||||
|
<input matInput type="text" placeholder="Name" required formControlName="name">
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput type="text" placeholder="Addressline1" required formControlName="addressline1">
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">You must include a addressline1.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput type="text" placeholder="Addressline2" formControlName="addressline2">
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">You must include a Name.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput type="text" placeholder="Addressline3" formControlName="addressline3">
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="City" required formControlName="city" (selectionChange)="getRelevantState($event)">
|
||||||
|
|
||||||
|
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="State" formControlName="state" [disabled]="true">
|
||||||
|
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['state'].valid && _companyForm.controls['state'].touched" class="mat-text-warn">You must Pickup a State.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-xs mr-xs">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput type="text" placeholder="Pin code" required formControlName="pincode">
|
||||||
|
<mat-hint>pincode should be in 6 digit format</mat-hint>
|
||||||
|
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('required') && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
|
||||||
|
<!-- <mat-error *ngIf="!_companyForm.controls['pincode'].valid && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include a pincode number.</mat-error> -->
|
||||||
|
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('minlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode must be at least 5 characters long.</mat-error>
|
||||||
|
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('maxlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode name cannot exceed 6 characters.</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit" [disabled]="!_companyForm.valid"><mat-icon>save</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-card-content>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { CompanyComponent } from './company.component';
|
||||||
|
|
||||||
|
describe('CompanyComponent', () => {
|
||||||
|
let component: CompanyComponent;
|
||||||
|
let fixture: ComponentFixture<CompanyComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ CompanyComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(CompanyComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,180 @@
|
|||||||
|
|
||||||
|
import { Component,
|
||||||
|
OnInit,
|
||||||
|
Inject } from '@angular/core';
|
||||||
|
import { FormBuilder,
|
||||||
|
FormGroup,
|
||||||
|
Validators,
|
||||||
|
FormControl } from '@angular/forms';
|
||||||
|
|
||||||
|
/** Service */
|
||||||
|
import { MastersService } from '../../../service/masters/masters.service';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-company',
|
||||||
|
templateUrl: './company.component.html',
|
||||||
|
styleUrls: ['./company.component.scss']
|
||||||
|
})
|
||||||
|
|
||||||
|
export class CompanyComponent implements OnInit {
|
||||||
|
|
||||||
|
public _companyForm: FormGroup;
|
||||||
|
public companyData: any = [];
|
||||||
|
|
||||||
|
stateDatas: any[];
|
||||||
|
citydatas: any[];
|
||||||
|
errorMessage:string;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private _formBuilder: FormBuilder,
|
||||||
|
private _mastersService: MastersService) { }
|
||||||
|
|
||||||
|
FetchFormValue() {
|
||||||
|
this._mastersService.getAllCompany().subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if(dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
this.companyData = dataresult.records;
|
||||||
|
|
||||||
|
this._companyForm.controls['company_id'].setValue(this.companyData[0].company_id);
|
||||||
|
this._companyForm.controls['name'].setValue(this.companyData[0].name);
|
||||||
|
this._companyForm.controls['addressline1'].setValue(this.companyData[0].addressline1);
|
||||||
|
this._companyForm.controls['addressline2'].setValue(this.companyData[0].addressline2);
|
||||||
|
this._companyForm.controls['addressline3'].setValue(this.companyData[0].addressline3);
|
||||||
|
this._companyForm.controls['city'].setValue(this.companyData[0].city);
|
||||||
|
this._companyForm.controls['state'].setValue(this.companyData[0].state);
|
||||||
|
this._companyForm.controls['pincode'].setValue(this.companyData[0].pincode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
ngOnInit() {
|
||||||
|
|
||||||
|
this.CompanyFormData();
|
||||||
|
this.FetchFormValue();
|
||||||
|
// this._mastersService.getAllCompany().subscribe(
|
||||||
|
// dataresult => {
|
||||||
|
// if(dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
// this.companyData = dataresult.records;
|
||||||
|
|
||||||
|
// this._companyForm.controls['company_id'].setValue(this.companyData[0].company_id);
|
||||||
|
// this._companyForm.controls['name'].setValue(this.companyData[0].name);
|
||||||
|
// this._companyForm.controls['addressline1'].setValue(this.companyData[0].addressline1);
|
||||||
|
// this._companyForm.controls['addressline2'].setValue(this.companyData[0].addressline2);
|
||||||
|
// this._companyForm.controls['addressline3'].setValue(this.companyData[0].addressline3);
|
||||||
|
// this._companyForm.controls['city'].setValue(this.companyData[0].city);
|
||||||
|
// this._companyForm.controls['state'].setValue(this.companyData[0].state);
|
||||||
|
// this._companyForm.controls['pincode'].setValue(this.companyData[0].pincode);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
|
||||||
|
|
||||||
|
this._mastersService.getAllMasterData('STATE')
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.dataStatus == true){
|
||||||
|
this.stateDatas = data.records;
|
||||||
|
this.stateDatas = this.stateDatas.filter(dataresult=>dataresult.isactive == 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
this._mastersService.getAllMasterData('CITY')
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.dataStatus == true){
|
||||||
|
this.citydatas = data.records;
|
||||||
|
this.citydatas = this.citydatas.filter(dataresult=>dataresult.isactive == 1 );
|
||||||
|
//this._companyForm.controls['state'].setValue(this.companyData[0].state);
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getRelevantState(event){
|
||||||
|
// console.log(event);
|
||||||
|
// console.log('cityid',event.value);
|
||||||
|
// console.log('statedata',this.stateDatas);
|
||||||
|
//let cityid = event.value;
|
||||||
|
let alldata = this.citydatas.filter(data => data.city_id == event.value);
|
||||||
|
// console.log('to getrelated id datas',alldata);
|
||||||
|
// console.log('get correct', alldata[0].name);
|
||||||
|
this._companyForm.controls['state'].setValue(alldata[0].fk_state_id);
|
||||||
|
//event.source.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** For CompanyFormData */
|
||||||
|
CompanyFormData() {
|
||||||
|
|
||||||
|
this._companyForm = this._formBuilder.group({
|
||||||
|
|
||||||
|
company_id: [null],
|
||||||
|
name: [null, Validators.compose([Validators.required])],
|
||||||
|
addressline1: [null, Validators.compose([Validators.required])],
|
||||||
|
addressline2: [null],
|
||||||
|
addressline3: [null],
|
||||||
|
city: [null, Validators.compose([Validators.required])],
|
||||||
|
state: [null,{disabled: true}],
|
||||||
|
pincode: [null, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
|
||||||
|
var CompanyFormValue = this._companyForm.value;
|
||||||
|
|
||||||
|
if(isNaN(this._companyForm['company_id']))
|
||||||
|
{
|
||||||
|
|
||||||
|
Object.keys(CompanyFormValue).forEach((key) => ( CompanyFormValue[key] == null) && delete CompanyFormValue[key]);
|
||||||
|
|
||||||
|
//After Saving the Company data then popup close
|
||||||
|
this._mastersService.addCompanyDetails(CompanyFormValue).subscribe(
|
||||||
|
|
||||||
|
dataresult=>{
|
||||||
|
if (dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
alert("Data Saved Successfully");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe(
|
||||||
|
dataresult=>{
|
||||||
|
if (dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
alert("Data Edited Successfully");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** To Reset Popup Data For Edit*/
|
||||||
|
onResetForEdit(){
|
||||||
|
//this.CompanyFormData();
|
||||||
|
this.FetchFormValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmptyObject(obj) {
|
||||||
|
return (obj && (Object.keys(obj).length === 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -122,7 +122,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -130,7 +130,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false"
|
checked="false"
|
||||||
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
(change)="isactiveCustomerBehaviour(row.customer_behaviour_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { CustomerBehaviourDialogComponent } from '../customer-behaviour-dialog/customer-behaviour-dialog.component';
|
import { CustomerBehaviourDialogComponent } from '../customer-behaviour-dialog/customer-behaviour-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { CustomerBehaviour } from '../../../model/customer-behaviour';
|
import { CustomerBehaviour } from '../../../model/customer-behaviour';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-customer-behaviour-list',
|
selector: 'app-customer-behaviour-list',
|
||||||
@ -127,10 +128,50 @@ pageSize = 10;
|
|||||||
this.getCustomerBehaviour();
|
this.getCustomerBehaviour();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -118,7 +118,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -126,7 +126,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
(change)="isactiveCustomerSegment(row.customer_segment_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { CustomerSegmentDialogComponent } from '../customer-segment-dialog/customer-segment-dialog.component';
|
import { CustomerSegmentDialogComponent } from '../customer-segment-dialog/customer-segment-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { CustomerSegment } from '../../../model/customer-segment';
|
import { CustomerSegment } from '../../../model/customer-segment';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-customer-segment-list',
|
selector: 'app-customer-segment-list',
|
||||||
@ -129,10 +130,50 @@ displayedColumns = ['serialno','name','actions','isactive'];
|
|||||||
this.getCustomerSegment();
|
this.getCustomerSegment();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveDesignation(row.designation_id,row.isactive)"
|
(change)="isactiveDesignation(row.designation_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -118,7 +118,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveDesignation(row.designation_id,row.isactive)"
|
(change)="isactiveDesignation(row.designation_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { DesignationDialogComponent } from '../designation-dialog/designation-dialog.component';
|
import { DesignationDialogComponent } from '../designation-dialog/designation-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Designation } from '../../../model/designation';
|
import { Designation } from '../../../model/designation';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-designation-list',
|
selector: 'app-designation-list',
|
||||||
@ -123,10 +124,50 @@ pageSize = 10;
|
|||||||
this.getDesignation();
|
this.getDesignation();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -117,7 +117,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
|
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -125,7 +125,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false"
|
checked="false"
|
||||||
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
|
(change)="isactiveFrequency(row.frequency_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { FrequencyDialogComponent }from '../frequency-dialog/frequency-dialog.component';
|
import { FrequencyDialogComponent }from '../frequency-dialog/frequency-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Frequency } from '../../../model/frequency';
|
import { Frequency } from '../../../model/frequency';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -134,10 +136,49 @@ export class FrequencyListComponent implements OnInit {
|
|||||||
this.getFrequency();
|
this.getFrequency();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -48,14 +48,14 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
|
(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 >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
class="example-margin"
|
class="example-margin"
|
||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
|
(change)="isactiveIndustryClassification(row.industry_classification_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { IndustryClassificationDialogComponent } from '../industry_classification-dialog/industry_classification-dialog.component';
|
import { IndustryClassificationDialogComponent } from '../industry_classification-dialog/industry_classification-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { IndustryClassification } from '../../../model/industry_classification';
|
import { IndustryClassification } from '../../../model/industry_classification';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-industry_classification-list',
|
selector: 'app-industry_classification-list',
|
||||||
@ -143,11 +145,48 @@ pageSize = 10;
|
|||||||
this.getIndustryClassification();
|
this.getIndustryClassification();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -107,7 +107,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
|
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -115,7 +115,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
|
(change)="isactiveLenderHierarchy(row.lender_hierarchy_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -19,7 +19,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { LenderHierarchyDialogComponent }from '../lender-hierarchy-dialog/lender-hierarchy-dialog.component';
|
import { LenderHierarchyDialogComponent }from '../lender-hierarchy-dialog/lender-hierarchy-dialog.component';
|
||||||
/**Model */
|
/**Model */
|
||||||
import { LenderHierarchy } from '../../../model/lender-hierarchy';
|
import { LenderHierarchy } from '../../../model/lender-hierarchy';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-lender-hierarchy-list',
|
selector: 'app-lender-hierarchy-list',
|
||||||
@ -146,10 +147,47 @@ isactiveLenderHierarchy(id: number,isactive : number) {
|
|||||||
this.getLenderHierarchy();
|
this.getLenderHierarchy();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -131,7 +131,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
(change)="isactiveMemberOccupations(row.occupation_non_earning_member_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
<!-- <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> -->
|
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
|
||||||
|
|||||||
@ -18,7 +18,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { MembersOccupationDialogComponent } from '../members-occupation-dialog/members-occupation-dialog.component';
|
import { MembersOccupationDialogComponent } from '../members-occupation-dialog/members-occupation-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { MembersOccupation } from '../../../model/members-occupation';
|
import { MembersOccupation } from '../../../model/members-occupation';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-members-occupation-list',
|
selector: 'app-members-occupation-list',
|
||||||
@ -149,10 +150,47 @@ export class MembersOccupationListComponent implements OnInit {
|
|||||||
this.getMemberOccupation();
|
this.getMemberOccupation();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
matTooltipPosition="above"
|
matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="defaultPDAllocationType(row.pd_allocation_type_id)"
|
(change)="defaultPDAllocationType(row.pd_allocation_type_id)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #alternative>
|
<ng-template #alternative>
|
||||||
<mat-slide-toggle class="example-margin"
|
<mat-slide-toggle class="example-margin"
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import { NotifierService } from 'angular-notifier';
|
|||||||
/** Model */
|
/** Model */
|
||||||
import { PdAllocationType } from '../../model/pd';
|
import { PdAllocationType } from '../../model/pd';
|
||||||
|
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pd-allocation-type-list',
|
selector: 'app-pd-allocation-type-list',
|
||||||
@ -121,7 +123,9 @@ export class PdAllocationTypeListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
//console.log('at last Completed Section');
|
//console.log('at last Completed Section');
|
||||||
}
|
}
|
||||||
|
active(){
|
||||||
|
Swal('Are you sure?')
|
||||||
|
}
|
||||||
/** For Display Tables Pagination And Sorting */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -110,7 +110,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
(change)="isactivePdLocationApproach(row.pd_location_approach_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
<!-- <mat-icon *ngIf="row.isactive == 1;else notactive;" class="hover-icon" matTooltip="Active" matTooltipPosition="above">done</mat-icon>
|
<!-- <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> -->
|
<ng-template #notactive ><mat-icon class="hover-icon" matTooltip="Inactive" matTooltipPosition="above">clear</mat-icon></ng-template> -->
|
||||||
|
|||||||
@ -23,7 +23,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { PdLocationApproachDialogComponent } from '../pd-location-approach-dialog/pd-location-approach-dialog.component';
|
import { PdLocationApproachDialogComponent } from '../pd-location-approach-dialog/pd-location-approach-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { PdLocationApproach } from '../../../model/pd';
|
import { PdLocationApproach } from '../../../model/pd';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pd-location-approach-list',
|
selector: 'app-pd-location-approach-list',
|
||||||
@ -137,10 +138,46 @@ export class PdLocationApproachListComponent implements OnInit {
|
|||||||
this.getPdLocationApproach();
|
this.getPdLocationApproach();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -104,7 +104,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -112,7 +112,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
(change)="isactivePDType(row.pd_type_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -15,7 +15,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { PdTypeDialogComponent } from '../pd-type-dialog/pd-type-dialog.component';
|
import { PdTypeDialogComponent } from '../pd-type-dialog/pd-type-dialog.component';
|
||||||
/**Model */
|
/**Model */
|
||||||
import { PdType } from '../../../model/pd';
|
import { PdType } from '../../../model/pd';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pd-type-list',
|
selector: 'app-pd-type-list',
|
||||||
@ -129,10 +130,46 @@ isactivePDType(id: number,isactive : number) {
|
|||||||
this.getPDType();
|
this.getPDType();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -63,7 +63,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
(change)="isactiveProductMaster(row.product_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { ProductDialogComponent } from '../product-dialog/product-dialog.component';
|
import { ProductDialogComponent } from '../product-dialog/product-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { ProductMaster } from '../../../model/product-master';
|
import { ProductMaster } from '../../../model/product-master';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-product-list',
|
selector: 'app-product-list',
|
||||||
templateUrl: './product-list.component.html',
|
templateUrl: './product-list.component.html',
|
||||||
@ -137,11 +138,46 @@ export class ProductListComponent implements OnInit {
|
|||||||
this.getProductMaster();
|
this.getProductMaster();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -56,7 +56,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
(change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -14,7 +14,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
|
|
||||||
/** Dialog Component */
|
/** Dialog Component */
|
||||||
import { QuestionCategoryDialogComponent } from '../question-category-dialog/question-category-dialog.component';
|
import { QuestionCategoryDialogComponent } from '../question-category-dialog/question-category-dialog.component';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-question-category-list',
|
selector: 'app-question-category-list',
|
||||||
templateUrl: './question-category-list.component.html',
|
templateUrl: './question-category-list.component.html',
|
||||||
@ -121,10 +122,46 @@ export class QuestionCategoryListComponent implements OnInit {
|
|||||||
this.getQuestionCategory();
|
this.getQuestionCategory();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveregions(row.region_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -41,7 +41,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveregions(row.region_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { RegionsDialogComponent } from '../regions-dialog/regions-dialog.component';
|
import { RegionsDialogComponent } from '../regions-dialog/regions-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Regions } from '../../../model/regions';
|
import { Regions } from '../../../model/regions';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-regions-list',
|
selector: 'app-regions-list',
|
||||||
@ -112,7 +113,7 @@ export class RegionsListComponent implements OnInit {
|
|||||||
this.getregions();
|
this.getregions();
|
||||||
}
|
}
|
||||||
else{
|
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.getregions();
|
||||||
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
//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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -127,7 +127,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -135,7 +135,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
(change)="isactiveRelationShip(row.relationship_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { RelationShipDialogComponent } from '../relation-ship-dialog/relation-ship-dialog.component';
|
import { RelationShipDialogComponent } from '../relation-ship-dialog/relation-ship-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { RelationShip } from '../../../model/relation-ship';
|
import { RelationShip } from '../../../model/relation-ship';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-relation-ship-list',
|
selector: 'app-relation-ship-list',
|
||||||
templateUrl: './relation-ship-list.component.html',
|
templateUrl: './relation-ship-list.component.html',
|
||||||
@ -108,7 +109,7 @@ export class RelationShipListComponent implements OnInit {
|
|||||||
this.getRelationShip();
|
this.getRelationShip();
|
||||||
}
|
}
|
||||||
else{
|
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');
|
//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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -150,7 +150,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveState(row.state_id,row.isactive)"
|
(change)="isactiveState(row.state_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -158,7 +158,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveState(row.state_id,row.isactive)"
|
(change)="isactiveState(row.state_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { StatesDialogComponent } from '../states-dialog/states-dialog.component';
|
import { StatesDialogComponent } from '../states-dialog/states-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { States } from '../../../model/states';
|
import { States } from '../../../model/states';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-states-list',
|
selector: 'app-states-list',
|
||||||
@ -105,7 +106,7 @@ isactiveState(id: number,isactive : number) {
|
|||||||
this.getState();
|
this.getState();
|
||||||
}
|
}
|
||||||
else{
|
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.getState();
|
||||||
//this._statesService.deleteMasterDetails('state_id',id,'STATE');
|
//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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -139,7 +139,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -147,7 +147,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
(change)="isactiveSubProductMaster(row.subproduct_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { SubProductDialogComponent } from '../sub-product-dialog/sub-product-dialog.component';
|
import { SubProductDialogComponent } from '../sub-product-dialog/sub-product-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { SubProductMaster } from '../../../model/sub-product-master';
|
import { SubProductMaster } from '../../../model/sub-product-master';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-sub-product-list',
|
selector: 'app-sub-product-list',
|
||||||
@ -145,10 +146,47 @@ getSubProductMaster() {
|
|||||||
this.getSubProductMaster();
|
this.getSubProductMaster();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveTitle(row.title_id,row.isactive)"
|
(change)="isactiveTitle(row.title_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -131,7 +131,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveTitle(row.title_id,row.isactive)"
|
(change)="isactiveTitle(row.title_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -14,7 +14,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { TitleDialogComponent } from '../title-dialog/title-dialog.component';
|
import { TitleDialogComponent } from '../title-dialog/title-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Title } from '../../../model/title';
|
import { Title } from '../../../model/title';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-title-list',
|
selector: 'app-title-list',
|
||||||
templateUrl: './title-list.component.html',
|
templateUrl: './title-list.component.html',
|
||||||
@ -132,10 +133,47 @@ export class TitleListComponent implements OnInit {
|
|||||||
this.getTitle();
|
this.getTitle();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -117,7 +117,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -125,7 +125,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false"
|
checked="false"
|
||||||
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
(change)="isactiveActivity(row.type_of_activity_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import { MastersService } from '../../../../service/masters/masters.service';
|
|||||||
import { ActivityDialogComponent } from '../activity-dialog/activity-dialog.component';
|
import { ActivityDialogComponent } from '../activity-dialog/activity-dialog.component';
|
||||||
/** Model */
|
/** Model */
|
||||||
import { Activity } from '../../../model/activity';
|
import { Activity } from '../../../model/activity';
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-activity-list',
|
selector: 'app-activity-list',
|
||||||
templateUrl: './activity-list.component.html',
|
templateUrl: './activity-list.component.html',
|
||||||
@ -140,10 +141,47 @@ export class ActivityListComponent implements OnInit {
|
|||||||
this.getActivity();
|
this.getActivity();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="deactive()">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
@ -52,7 +52,7 @@
|
|||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
(change)="isactiveUOM(row.uom_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
(click)="active()">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -20,7 +20,8 @@ import { UomDialogComponent } from '../uom-dialog/uom-dialog.component';
|
|||||||
/** Model */
|
/** Model */
|
||||||
import { Uom } from '../../../model/uom';
|
import { Uom } from '../../../model/uom';
|
||||||
|
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-uom-list',
|
selector: 'app-uom-list',
|
||||||
@ -155,10 +156,48 @@ export class UomListComponent implements OnInit {
|
|||||||
this.getUOM();
|
this.getUOM();
|
||||||
}
|
}
|
||||||
else{
|
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 */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -7,7 +7,10 @@
|
|||||||
<br>
|
<br>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select color="accent" placeholder="Select" #singleSelect required [formControl]="masterCtrl">
|
<mat-select color="accent" placeholder="Select" #singleSelect required [formControl]="masterCtrl">
|
||||||
<ngx-mat-select-search [formControl]="masterFilterCtrl" ></ngx-mat-select-search>
|
<ngx-mat-select-search [formControl]="masterFilterCtrl"
|
||||||
|
[placeholderLabel]="'Find Masters...'"
|
||||||
|
[noEntriesFoundLabel]="'no matching found'">
|
||||||
|
</ngx-mat-select-search>
|
||||||
<mat-option *ngFor="let master of filteredMasters | async" [value]="master.id">
|
<mat-option *ngFor="let master of filteredMasters | async" [value]="master.id">
|
||||||
{{master.name}}
|
{{master.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@ -70,9 +73,10 @@
|
|||||||
<div *ngIf="masterCtrl.value =='master-18'">
|
<div *ngIf="masterCtrl.value =='master-18'">
|
||||||
<app-lender-hierarchy-list></app-lender-hierarchy-list>
|
<app-lender-hierarchy-list></app-lender-hierarchy-list>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div *ngIf="masterCtrl.value =='master-19'">
|
<div *ngIf="masterCtrl.value =='master-19'">
|
||||||
<app-company-list></app-company-list>
|
<!-- <app-company-list></app-company-list> -->
|
||||||
</div> -->
|
<app-company></app-company>
|
||||||
|
</div>
|
||||||
<div *ngIf="masterCtrl.value =='master-20'">
|
<div *ngIf="masterCtrl.value =='master-20'">
|
||||||
<app-question-category-list></app-question-category-list>
|
<app-question-category-list></app-question-category-list>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
//import { startWith } from 'rxjs/operators';
|
//import { startWith } from 'rxjs/operators';
|
||||||
|
|
||||||
|
|
||||||
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild, Input } from '@angular/core';
|
||||||
import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
|
import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
|
||||||
import { ReplaySubject } from 'rxjs';
|
import { ReplaySubject } from 'rxjs';
|
||||||
import { MatSelect } from '@angular/material';
|
import { MatSelect } from '@angular/material';
|
||||||
@ -118,7 +118,7 @@ export class MastersComponent implements OnInit {
|
|||||||
{id: 'master-16',name: 'Customer Segment'},
|
{id: 'master-16',name: 'Customer Segment'},
|
||||||
{id: 'master-17',name: 'Designation'},
|
{id: 'master-17',name: 'Designation'},
|
||||||
{id: 'master-18',name: 'Lender Hierarchy'},
|
{id: 'master-18',name: 'Lender Hierarchy'},
|
||||||
// {id: 'master-19',name: 'Company Details'},
|
{id: 'master-19',name: 'Company Details'},
|
||||||
{id: 'master-20',name: 'Question Category'},
|
{id: 'master-20',name: 'Question Category'},
|
||||||
{id: 'master-21',name: 'PD Type'},
|
{id: 'master-21',name: 'PD Type'},
|
||||||
{id: 'master-22',name: 'Approach to PD location'},
|
{id: 'master-22',name: 'Approach to PD location'},
|
||||||
@ -126,16 +126,14 @@ export class MastersComponent implements OnInit {
|
|||||||
{id: 'master-24',name: 'PD Notification'},
|
{id: 'master-24',name: 'PD Notification'},
|
||||||
// {id: 'master-25',name: 'PD Office Lender'},
|
// {id: 'master-25',name: 'PD Office Lender'},
|
||||||
// {id: 'master-25',name: 'PD Team'},
|
// {id: 'master-25',name: 'PD Team'},
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/** list of masters filtered by search keyword */
|
/** list of masters filtered by search keyword */
|
||||||
public filteredMasters: ReplaySubject<Master[]> = new ReplaySubject<Master[]>(1);
|
public filteredMasters: ReplaySubject<Master[]> = new ReplaySubject<Master[]>(1);
|
||||||
|
|
||||||
|
|
||||||
@ViewChild('singleSelect') singleSelect: MatSelect;
|
@ViewChild('singleSelect') singleSelect: MatSelect;
|
||||||
|
|
||||||
|
|
||||||
/** Subject that emits when the component has been destroyed. */
|
/** Subject that emits when the component has been destroyed. */
|
||||||
private _onDestroy = new Subject<void>();
|
private _onDestroy = new Subject<void>();
|
||||||
|
|
||||||
@ -151,10 +149,10 @@ export class MastersComponent implements OnInit {
|
|||||||
|
|
||||||
// listen for search field value changes
|
// listen for search field value changes
|
||||||
this.masterFilterCtrl.valueChanges
|
this.masterFilterCtrl.valueChanges
|
||||||
.pipe(takeUntil(this._onDestroy))
|
.pipe(takeUntil(this._onDestroy))
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
this.filterMasters();
|
this.filterMasters();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,7 @@ import { CityDialogComponent } from './component/city/city-dialog/city-dialog.co
|
|||||||
import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component';
|
import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component';
|
||||||
import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component';
|
import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component';
|
||||||
import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list.component';
|
import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list.component';
|
||||||
|
import { CompanyComponent } from './component/company/company.component';
|
||||||
//import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
//import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component';
|
||||||
|
|
||||||
|
|
||||||
@ -206,6 +207,7 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
CustomerSegmentDialogComponent,
|
CustomerSegmentDialogComponent,
|
||||||
StatesDialogComponent,
|
StatesDialogComponent,
|
||||||
CompanyDialogComponent,
|
CompanyDialogComponent,
|
||||||
|
CompanyComponent,
|
||||||
CityDialogComponent,
|
CityDialogComponent,
|
||||||
RegionsDialogComponent,
|
RegionsDialogComponent,
|
||||||
QuestionCategoryDialogComponent,
|
QuestionCategoryDialogComponent,
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
<mat-select placeholder="City" required formControlName="fk_city" multiple>
|
<mat-select placeholder="City" required formControlName="fk_city" multiple>
|
||||||
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
|
<mat-option *ngFor="let cd of citydatas " [value]="cd.city_id" (onSelectionChange)="onChangeCityDatas($event)" >{{ cd.name }} </mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_city.hasError('required')" class="mat-text-warn">You must Select Cities.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button> -->
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit()" ><mat-icon>settings_backup_restore</mat-icon></button>
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button" (click)="onResetForEdit($event)" ><mat-icon>settings_backup_restore</mat-icon></button> -->
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -162,9 +162,9 @@ export class PdTeamEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** To Reset Popup Data For Add*/
|
/** To Reset Popup Data For Add*/
|
||||||
onResetForEdit(){
|
// onResetForEdit(){
|
||||||
this.PdTeamFormDatas();
|
// this.PdTeamFormDatas();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**on change function for customer segment to dispaly the as List in html page */
|
/**on change function for customer segment to dispaly the as List in html page */
|
||||||
onChangeCustomerSegmentDatas($event){
|
onChangeCustomerSegmentDatas($event){
|
||||||
@ -182,11 +182,12 @@ export class PdTeamEditComponent implements OnInit {
|
|||||||
|
|
||||||
/**on change function for City to display the as List in html page */
|
/**on change function for City to display the as List in html page */
|
||||||
onChangeCityDatas($event){
|
onChangeCityDatas($event){
|
||||||
|
|
||||||
var mycheck = 0 ;
|
var mycheck = 0 ;
|
||||||
//let cityName = $event.source.value;
|
|
||||||
let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0];
|
let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0];
|
||||||
|
|
||||||
if($event.source._selected === true ){
|
if($event.source._selected == true ){
|
||||||
|
|
||||||
for(let Duplication_City of this.pdTeamCityArray){
|
for(let Duplication_City of this.pdTeamCityArray){
|
||||||
|
|
||||||
@ -199,7 +200,7 @@ export class PdTeamEditComponent implements OnInit {
|
|||||||
if(data.name == cityName.name){
|
if(data.name == cityName.name){
|
||||||
alert('"'+data.name+'" Already Existing with "'+ teamname +'"');
|
alert('"'+data.name+'" Already Existing with "'+ teamname +'"');
|
||||||
$event.source._selected = false;
|
$event.source._selected = false;
|
||||||
mycheck++;
|
mycheck=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -217,6 +218,7 @@ export class PdTeamEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**on change function for Product to display the data as List in html page */
|
/**on change function for Product to display the data as List in html page */
|
||||||
onChangeProductDatas($event){
|
onChangeProductDatas($event){
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" matTooltip="Add PD Team" matTooltipPosition="above" [routerLink]="['/setting/pdteam/addpdteam']" ><mat-icon>add</mat-icon></button>
|
||||||
|
=======
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team" matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team" matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
|
>>>>>>> 3ad6314e0e602cb2c232acb142715009dca646f9
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -79,7 +83,7 @@
|
|||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
|
||||||
<mat-paginator *ngIf="!noRecordFound" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator *ngIf="!noRecordFound" [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Component,
|
import { Component,
|
||||||
OnInit,
|
OnInit,
|
||||||
ViewChild } from '@angular/core';
|
ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { MatSort,
|
import { MatSort,
|
||||||
MatPaginator,
|
MatPaginator,
|
||||||
MatTableDataSource } from '@angular/material';
|
MatTableDataSource } from '@angular/material';
|
||||||
@ -29,6 +29,7 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
PdTeamList: any = [];
|
PdTeamList: any = [];
|
||||||
color = 'primary';
|
color = 'primary';
|
||||||
|
pageSize = 10;
|
||||||
userData = null;
|
userData = null;
|
||||||
noRecordFound: boolean = false;
|
noRecordFound: boolean = false;
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
private router: Router,
|
|
||||||
private _MasterService: MastersService,
|
private _MasterService: MastersService,
|
||||||
private _PdTeamService: PdTeamService) {
|
private _PdTeamService: PdTeamService) {
|
||||||
this.getPdTeam();
|
this.getPdTeam();
|
||||||
@ -53,11 +54,6 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() { this.getPdTeam(); }
|
ngOnInit() { this.getPdTeam(); }
|
||||||
|
|
||||||
/** To add data */
|
|
||||||
addPdTeam() {
|
|
||||||
this.router.navigate(['/setting/pdteam/addpdteam']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** To edit data */
|
/** To edit data */
|
||||||
editPdTeam(detail){
|
editPdTeam(detail){
|
||||||
|
|
||||||
@ -103,6 +99,25 @@ managepdteam(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
||||||
|
isactivePdTeam(id: number,isactive : number) {
|
||||||
|
|
||||||
|
let ActiveDatas = isactive == 0
|
||||||
|
? { 'pdteam_id':id,'isactive': '1'}
|
||||||
|
: { 'pdteam_id':id,'isactive': '0'}
|
||||||
|
|
||||||
|
this._MasterService.editMasterDetails(ActiveDatas,'PDTEAM')
|
||||||
|
.subscribe(dataresult=>{
|
||||||
|
if (dataresult.dataStatus == true){
|
||||||
|
//alert("my check");
|
||||||
|
this.getPdTeam();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** For Display Tables Pagination And Sorting */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -1,54 +1,53 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
|
|
||||||
<div style="margin: 6px; padding: 4px;">
|
<div style="margin: 6px; padding: 4px;">
|
||||||
<div class="p_title" style="font-size: 26px; font-style: bold;">Manage PD Team</div>
|
<div class="p_title" style="font-size: 26px; font-style: bold;">Manage PD Team</div>
|
||||||
<!--<div class="sub_title" style="font-size: 11px;">List of Entity Master Details</div>-->
|
<!--<div class="sub_title" style="font-size: 11px;">List of Entity Master Details</div>-->
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
|
||||||
<div *ngIf="loader">
|
|
||||||
<mat-progress-bar mode="indeterminate" color="primary" class="mb-1"></mat-progress-bar>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" *ngIf="viewpage">
|
<div *ngIf="loader">
|
||||||
<div fxFlex="100%">
|
<mat-progress-bar mode="indeterminate" color="primary" class="mb-1"></mat-progress-bar>
|
||||||
|
|
||||||
<div fxLayout="row wrap">
|
</div>
|
||||||
<div fxFlex.gt-sm="30" fxFlex.gt-xs="30" fxFlex="50" *ngFor="let pdteamdetails of pdTeamManageData; let i = index;" >
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" *ngIf="viewpage">
|
||||||
<mat-card class="mb-1">
|
<div fxFlex="100%">
|
||||||
|
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="30" fxFlex.gt-xs="30" fxFlex="50" *ngFor="let pdteamdetails of pdTeamManageData; let i = index;" >
|
||||||
|
<mat-card class="mb-1">
|
||||||
|
|
||||||
|
<mat-card-title style="margin-bottom:0px!important;" ><span fxFlex="80">{{pdteamdetails.team_name | titlecase}}</span> <mat-icon (click)="cityinfo(pdteamdetails.pdteam_id)" color="primary" matTooltip="Click for more info" matTooltipPosition="above" fxFlex="16" style="text-align:right;">info</mat-icon></mat-card-title>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<mat-card-subtitle >{{pdteamdetails.short_name}}</mat-card-subtitle>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<mat-list class='bag' [dragula]='"bag"' [dragulaModel]="pdteamdetails.USERPROFILE" [attr.data-id]="pdteamdetails.pdteam_id" >
|
||||||
|
|
||||||
|
|
||||||
|
<mat-list-item *ngFor="let users of pdteamdetails.USERPROFILE let i=index" [attr.data-id]="users.userid" [attr.data-index]="i">
|
||||||
|
<div #bag1 class="d-flex w-100 justify-content-between">
|
||||||
|
{{ users.user_full_name |titlecase}}
|
||||||
|
|
||||||
<mat-card-title style="margin-bottom:0px!important;" >{{pdteamdetails.team_name | titlecase}} <mat-icon (click)="cityinfo(pdteamdetails.pdteam_id)"style="margin-left:29px;;">info</mat-icon></mat-card-title>
|
<i class="fa fa-arrows-alt ml-1 mr-1"aria-hidden="true"></i></div></mat-list-item>
|
||||||
|
|
||||||
<br/>
|
|
||||||
<mat-card-subtitle >{{pdteamdetails.short_name}}</mat-card-subtitle>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<mat-list class='bag' [dragula]='"bag"' [dragulaModel]="pdteamdetails.USERPROFILE" [attr.data-id]="pdteamdetails.pdteam_id" >
|
|
||||||
|
|
||||||
|
|
||||||
<mat-list-item *ngFor="let users of pdteamdetails.USERPROFILE let i=index" [attr.data-id]="users.userid" [attr.data-index]="i">
|
</mat-list>
|
||||||
<div #bag1 class="d-flex w-100 justify-content-between">
|
</mat-card>
|
||||||
{{ users.user_full_name |titlecase}}
|
|
||||||
|
|
||||||
<i class="fa fa-arrows-alt ml-1 mr-1"aria-hidden="true"></i></div></mat-list-item>
|
|
||||||
|
|
||||||
|
|
||||||
</mat-list>
|
</div>
|
||||||
</mat-card>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<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>
|
||||||
<div style="width: 10%; text-align: right;">
|
</div>
|
||||||
<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>
|
||||||
</div>
|
<div *ngIf="!viewpage" style="text-align: center">
|
||||||
</div>
|
<span>{{pdTeamManageData}}</span>
|
||||||
<div *ngIf="!viewpage" style="text-align: center">
|
</div>
|
||||||
<span>{{pdTeamManageData}}</span>
|
</mat-card>
|
||||||
</div>
|
|
||||||
</mat-card>
|
|
||||||
@ -22,3 +22,4 @@
|
|||||||
.tooltip:hover .tooltiptext {
|
.tooltip:hover .tooltiptext {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ export class PdTeamManageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cityinfo(id) {
|
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 >");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -286,7 +286,7 @@ editPDAllocationType(Records: any,MasterName:string): Observable<any> {
|
|||||||
// formData.append('logo',Records.logo);
|
// formData.append('logo',Records.logo);
|
||||||
// formData.append('records',JSON.stringify(Records));
|
// formData.append('records',JSON.stringify(Records));
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"saveCompany", ArrayData)
|
return this._http.post<any>(this.apiUrl+"saveMaster", ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -64,7 +64,7 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
||||||
|
|
||||||
var ArrayData = { "records": Records }
|
var ArrayData = { "records": Records }
|
||||||
|
console.log(ArrayData);
|
||||||
return this._http.post(this.apiUrl+'savePDTeam',ArrayData)
|
return this._http.post(this.apiUrl+'savePDTeam',ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
|
|||||||
@ -124,6 +124,12 @@
|
|||||||
.mat-cell{
|
.mat-cell{
|
||||||
font-size:1.2em !important;
|
font-size:1.2em !important;
|
||||||
}
|
}
|
||||||
|
.swal2-header {
|
||||||
|
text-align:left !important;
|
||||||
|
}
|
||||||
|
.swal2-title {
|
||||||
|
text-align:left !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />
|
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user