- {{ pd.name }}
+ {{ pd.name }}
You must Select Product.
@@ -64,7 +64,7 @@
- {{csd.name}}
+ {{csd.name}}
You must Select Customer Segment.
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts
index 74b53b844..e4d53370e 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts
+++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts
@@ -10,8 +10,9 @@ import { FormBuilder,
import { MastersService } from '../../service/masters/masters.service';
import { PdTeamService } from '../../service/masters/pd-team.service';
import { NotifierService } from 'angular-notifier';
-import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
+
import { Router } from '@angular/router';
+import { empty } from 'rxjs';
@Component({
selector: 'app-pd-team-add',
@@ -21,6 +22,7 @@ import { Router } from '@angular/router';
export class PdTeamAddComponent implements OnInit {
public _pdTeamForm: FormGroup;
+private notifier: NotifierService;
public submitted = false;
color = 'primary';
errorMessage:string;
@@ -32,7 +34,7 @@ productdatas: any[];
customerSegmentdatas: any[];
//This Type Of Array Declaration
-pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
+pdTeamCityArray:any= [];
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
@@ -47,13 +49,24 @@ constructor(private _formBuilder: FormBuilder,
private _router: Router,
private _masterService: MastersService)
{
- this._notifier = _notifier;
+ this.notifier = _notifier;
}
ngOnInit() {
this.PdTeamFormDatas();
+/** For Checking City Validation datas - checking purpose - Already exists are not */
+this._pdTeamService.getAllPdTeamCityMapping()
+ .subscribe(
+ dataresult => {
+ if(dataresult.dataStatus == true){
+ //this.AllPDTeamMapData = dataresult.records;
+ this.pdTeamCityArray = dataresult.records;
+
+ }
+});
+// console.log('All Datas for Validation purpose',this.pdTeamCityArray);
/** To Display The City Data For City DropDown */
this._masterService.getAllMasterData('CITY').subscribe(
dataresult => {
@@ -117,69 +130,87 @@ onNoClick(): void {
/** To Save/Edited Popup Data */
onSubmit() {
this.submitted = true;
+ var pdTeamFormValues = this._pdTeamForm.value;
+ Object.keys(pdTeamFormValues).forEach(
+ (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
// stop here if form is invalid
- if (this._pdTeamForm.invalid) {
- // this.errorMessage = "Please Fill All Mandate Fields.";
- // return;
- alert('Please Fill All Mandate Fields.');
- } else {
+ // if (pdTeamFormValues.invalid) {
+ // // this.errorMessage = "Please Fill All Mandate Fields.";
+ // // return;
+ // alert('Please Fill All Mandate Fields.');
+ // } else {
+
- var pdTeamFormValues = this._pdTeamForm.value;
//To Remove The "Null" With Key also
- Object.keys(pdTeamFormValues).forEach(
- (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
-
+
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
dataresult => {
if (dataresult.status == 200) {
- console.log(dataresult);
- this._notifier.notify('success', 'Record Edited Successfully.!');
-// alert('Record Successfully.!');
+
+ this.notifier.notify('success', 'Record Edited Successfully.!');
+ alert('Success.!');
this._router.navigate(['/setting/pdteam/pdteamlist']);
this._pdTeamForm.reset();
}
else {
- this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ alert('Wrong.!');
//alert('Some Thing Wents Wrong Try Again !');
//this.errorMessage = "Some Thing Wents Wrong Try Again !";
}
- }, error => {
- this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Something Wents Wrong Try Again !";
- //alert('Some Thing Wents Wrong Try Again !');
});
- }
+
}
-/** To Reset Popup Data For Add*/
-
-onResetForAdd(){
-alert("reset function");
-}
-
/**on change function for customer segment to dispaly the as List in html page */
onChangeCustomerSegmentDatas($event){
- let CustomerSegmentName = $event.source.value.name;
+ //let CustomerSegmentName = $event.source.value.name;
+ let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0];
+
if($event.source._selected === true ){
- this.selectedSegmentDatas.push(CustomerSegmentName);
+ this.selectedSegmentDatas.push(CustomerSegmentName.name);
}
else if($event.source._selected === false ){
- let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
+ let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
this.selectedSegmentDatas.splice(index,1);
}
}
/**on change function for City to display the as List in html page */
onChangeCityDatas($event){
+ var mycheck = 0 ;
+ //let cityName = $event.source.value;
+ let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0];
- let cityName = $event.source.value.name;
if($event.source._selected === true ){
- this.selectedCityDatas.push(cityName);
+
+ for(let Duplication_City of this.pdTeamCityArray){
+
+ let teamname = Duplication_City.team_name;
+ let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value);
+
+ if(dup_cityname != ''){
+ for(let data of dup_cityname){
+
+ if(data.name == cityName.name){
+ alert('"'+data.name+'" Already Existing with "'+ teamname +'"');
+ $event.source._selected = false;
+ mycheck++;
+ }
+
+ }
+ }
+ }
+
+ if(mycheck == 0){
+ this.selectedCityDatas.push(cityName.name);
+ }
+
}
else if($event.source._selected === false ){
- let index = this.selectedCityDatas.indexOf(cityName);
+ let index = this.selectedCityDatas.indexOf(cityName.name);
this.selectedCityDatas.splice(index,1);
}
@@ -188,12 +219,14 @@ onChangeCityDatas($event){
/**on change function for Product to display the data as List in html page */
onChangeProductDatas($event){
- let productName = $event.source.value.name;
+ //let productName = $event.source.value.name;
+ let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0];
+
if($event.source._selected === true ){
- this.selectedProductDatas.push(productName);
+ this.selectedProductDatas.push(productName.name);
}
else if($event.source._selected === false ){
- let index = this.selectedProductDatas.indexOf(productName);
+ let index = this.selectedProductDatas.indexOf(productName.name);
this.selectedProductDatas.splice(index,1);
}
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html
deleted file mode 100644
index b1a63ac70..000000000
--- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
PD Team Details
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss
deleted file mode 100644
index 3e80f0dbb..000000000
--- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-mat-form-field{
- width:100%;
-}
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts
deleted file mode 100644
index c23f17f93..000000000
--- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { PdTeamDialogComponent } from './pd-team-dialog.component';
-
-describe('PdTeamDialogComponent', () => {
- let component: PdTeamDialogComponent;
- let fixture: ComponentFixture
;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ PdTeamDialogComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(PdTeamDialogComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts
deleted file mode 100644
index 6a01db192..000000000
--- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts
+++ /dev/null
@@ -1,537 +0,0 @@
-import { Component,
- OnInit,
- Inject } from '@angular/core';
-import { FormBuilder,
- FormGroup,
- Validators,
- FormControl } from '@angular/forms';
-import { MatDialog,
- MatDialogRef,
- MAT_DIALOG_DATA } from '@angular/material';
-/** Service */
-import { MastersService } from '../../service/masters/masters.service';
-import { PdTeamService } from '../../service/masters/pd-team.service';
-import { NotifierService } from 'angular-notifier';
-
-@Component({
- selector: 'app-pd-team-dialog',
- templateUrl: './pd-team-dialog.component.html',
- styleUrls: ['./pd-team-dialog.component.scss']
-})
-
-
-export class PdTeamDialogComponent implements OnInit {
-
-public _pdTeamForm: FormGroup;
-private notifier: NotifierService;
-color = 'primary';
-citydatas: any[];
-lenderdatas: any[];
-errorMessage:string;
-selectedValueForLender: any;
-selectedValueForCity: any;
-tempArray: Array<{lenderid: number, cityid: number}> = [];
-PDTeamMapping: any[];
-AllPDTeamMapData: any[];
-PDTeamMaplen:any = 0;
-
-
-constructor(private _formBuilder: FormBuilder,notifier: NotifierService,
-private dialogRef: MatDialogRef,
-private _pdTeamService: PdTeamService,
-private _masterService: MastersService,
-@Inject(MAT_DIALOG_DATA) public data: any) {
- this.notifier = notifier;
-}
-
-
-ngOnInit() {
- this.PdTeamFormDatas();
- if(isNaN(this.data.pdteam_id)){}
- else{
- this._pdTeamService.getAllPdTeamMapListWithPK(this.data.pdteam_id) // note, removed this.countries =
- .subscribe(
- dataresult => {
- if(dataresult.dataStatus == true){
- this.PDTeamMapping = dataresult.records;
- this.PDTeamMaplen = this.PDTeamMapping.length;
- }
- });
- }
- this._pdTeamService.getAllPdTeamMapList() // note, removed this.countries =
- .subscribe(
- dataresult => {
- if(dataresult.dataStatus == true){
- this.AllPDTeamMapData = dataresult.records;
- }
- });
-
- /** For City Drop Datas*/
- this._masterService.getAllMasterData('CITY')
- .subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.citydatas = dataresult.records;
- this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
- }
-
- }, error => this.errorMessage = error);
-
- /** For Entity Drop Datas*/
- this._masterService.getAllMasterData('ENTITY')
- .subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.lenderdatas = dataresult.records;
- this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
- }
-
- }, error => this.errorMessage = error);
-
-}
-
-/** Pd Team Form Datas */
-PdTeamFormDatas(){
-this._pdTeamForm = this._formBuilder.group({
-
- pdteam_id: [this.data.pdteam_id],
- team_name: [this.data.team_name, Validators.compose([Validators.required])],
- fk_city_id: [null, Validators.compose([Validators.required])],
- fk_lender_id: [null, Validators.compose([Validators.required])],
- temp_array: [this.tempArray]
-
-});
-
-}
-
-// isactivePDTeamChild(PD.pdteam_map_id,PD.isactive)
-isactivePDTeamChild(id: number,isactive : number) {
-
- let ActiveDatas = isactive == 0
- ? { 'pdteam_map_id':id,'isactive': '1'}
- : { 'pdteam_map_id':id,'isactive': '0'}
-
-//private _masterService: MastersService,
-this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP')
- .subscribe(dataresult=>{
- if (dataresult.dataStatus == true){
- //alert("Successfully InActive !");
- this.notifier.notify('success', 'Record Successfully InActive.!');
- }
- else{
-
- //alert("SomeThing Wents Wrong Try Again !");
- this.notifier.notify('warning', 'Sorry Try Again !');
- }
- });
-}
-
-// deletePdTeamMap(arr: any) {
-// //console.log(arr);
-// //var PrimaryKeyWithValue ={'pdteam_map_id':arr.id};
-// //fk_team_id
-// this._pdTeamService.updatePdTeam(arr)
-// .subscribe( data => { });
-// this._pdTeamService.deletePdTeamMap(arr)
-// .subscribe( data => { });
-// //this.getPdTeam();
-// }
-
-deletePdTeamMap(PdTeamMaparr,i) {
- let datas :any = [];
- this._pdTeamService.deletePdTeamMapDetails(PdTeamMaparr)
- .subscribe(data => {
- datas = data;
- if(datas.dataStatus == true){
- this.PDTeamMapping.splice(i, 1);
- //alert('Deleted Successfully');
-
- }
-
- });
-}
-
-
-removevalue(i:number) {
- //const index: number = this.tempArray.indexOf(i);
- if (i !== -1) {
- this.tempArray.splice(i, 1);
- }
- //console.log('delete function',this.tempArray);
-
-}
-
-doSomething(){
-var check = 0 ;
- // console.log(this._pdTeamForm.controls['fk_city_id'].value.city_id);
- // console.log(this._pdTeamForm.controls['fk_lender_id'].value.entity_id);
-if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
- &&(this._pdTeamForm.controls['fk_lender_id'].value.entity_id != ''))
-{
-
- this.tempArray.forEach(item => {
- if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
- (item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
- {
- check++;
- //alert('');
- this.notifier.notify('info', 'Already Exists.!');
- }
- });
-
- if(this.AllPDTeamMapData !== undefined){
-
- this.AllPDTeamMapData.forEach(item => {
- if(item.fk_team_id != this._pdTeamForm.controls['pdteam_id'].value){
- if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
- (item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
- {
- check++;
- //this.notifier.notify('success', 'Already Exists.!');
- //alert('Already Exists on Other Team "'+item.team_name+'"');
- this.notifier.notify( 'info', 'Already Exists on Other Team'+item.team_name );
- }
- }
- });
- }
-
- if(isNaN(this.data.pdteam_id)) {}
- else{
-// console.log(this.PDTeamMapping.length);
- if(this.PDTeamMapping !== undefined){
- this.PDTeamMapping.forEach(item => {
- if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
- (item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
- {
- check++;
- //alert('Already Exists');
- this.notifier.notify( 'info', 'Already Exists');
-
- }
- });
- }
- }
- }
- // this.tempArray.forEach(this.data, function (value, key) {
-
- // if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
- // (value.lenderid.entity_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
- // {
- // check++;
- // console.log('for loop');
- // }
- // });
-
- if(check == 0){
-
- if((this._pdTeamForm.controls['fk_lender_id'].value != null) && (this._pdTeamForm.controls['fk_city_id'].value != null)){
-
- this.tempArray.push({
- 'lenderid':this._pdTeamForm.controls['fk_lender_id'].value,
- 'cityid': this._pdTeamForm.controls['fk_city_id'].value
- })
-
- }
- //console.log('if condition',check);
- }
- else{
- //console.log('else condition',check);
- }
- // console.log('Temparray',this.tempArray);
- // console.log(this._pdTeamForm.controls['fk_city_id'].value);
- // console.log(this._pdTeamForm.controls['fk_lender_id'].value);
-
-
-}
-
-/** For Popup Close Button */
-onNoClick(): void {
-this.dialogRef.close();
-}
-// OnSumbitForAdd(){
-// this._pdTeamForm.controls['team_name'].value;
-// this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
-// dataresult=>{
-// if (dataresult.dataStatus == true){ }
-// })
-// }
-/** To Save/Edited Popup Data */
-onSubmit() {
-
-var pdTeamFormValues = this._pdTeamForm.value;
-
-if(isNaN(this.data.pdteam_id)) {
-//console.log(pdTeamFormValues);
-//To Remove The "Null" With Key
-Object.keys(pdTeamFormValues).forEach(
- //getAllPdTeam();
- (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] &&
- delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
-
-
-//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
-//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
-//console.log(pdTeamFormValues);
-//this._memberService.addMasterDetails(OccupationFormValues,'OCCUPATIONMEMBERS').subscribe(
-this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
-dataresult=>{
- console.log(dataresult);
-if (dataresult.dataStatus == true){
- //After Saving the data then popup close
- this.dialogRef.close();
- //Need To Dispaly saving Datas
- // alert("Data Saved Successfully");
- this.notifier.notify('success', 'Record Saved Successfully.!');
- }
- else{
- //alert("");
- this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
- }
-
-});
-} else {
- Object.keys(pdTeamFormValues).forEach(
- (key) => delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']);
-
-this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe(
-
-dataresult=>{
-if (dataresult.dataStatus == true){
-//After Editing the data then popup close
-this.dialogRef.close();
-//Need To Display saving Datas
-//alert("Data Edited Successfully");
-this.notifier.notify('success', 'Record Edited Successfully.!');
- }
- else{
- //alert("SomeThing Wents Wrong Try Again !");
- this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
- }
- });
-}
-}
-
-// onSubmit() {
-// if (isNaN(this.data.ID)) {
-// this._memberService.addMembersOccupation(this._occupationForm.value);
-// this.dialogRef.close();
-// } else {
-// this._memberService.editMembersOccupation(this._occupationForm.value);
-// this.dialogRef.close();
-// }
-// }
-
-/** To Reset Popup Data For Add*/
-
- onResetForAdd(){
- this._pdTeamForm.reset();
- this.tempArray = [];
- //console.log(this.tempArray);
- }
-
- /** To Reset Popup Data For Edit*/
- onResetForEdit(){
- this.PdTeamFormDatas();
- this.tempArray = [];
- }
- isEmptyObject(obj) {
- return (obj && (Object.keys(obj).length === 0));
- }
-
-}
-
-/** End Of Pd Dialog Component */
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
-import { Component,
- OnInit,
- ViewChild,
- Inject } from '@angular/core';
-import { FormBuilder,
- FormGroup,
- FormArray,
- Validators,
- FormControl } from '@angular/forms';
-import { MatDialog,
- MatOption,
- MatDialogRef,
- MAT_DIALOG_DATA } from '@angular/material';
-
-/** Service *
-import { MastersService } from '../../../../service/masters/masters.service';
-import { PdTeamService } from '../../../../service/masters/pd-team.service';
-
-@Component({
- selector: 'app-pd-team-dialog',
- templateUrl: './pd-team-dialog.component.html',
- styleUrls: ['./pd-team-dialog.component.scss']
-})
-
-export class PdTeamDialogComponent implements OnInit {
-
- public _pdTeamForm: FormGroup;
- citydatas: any[];
- lenderdatas: any[];
- errorMessage:string;
-
- @ViewChild('allSelected') private allSelected: MatOption;
-
- constructor(private _formBuilder: FormBuilder,
- private dialogRef: MatDialogRef,
- private _MastersService: MastersService,
- private _PdTeamService: PdTeamService,
- @Inject(MAT_DIALOG_DATA) public data: any) { }
-
- ngOnInit() {
-
- this._pdTeamForm = this._formBuilder.group({
-
- pdteam_id: [this.data.pdteam_id],
- team_name: [this.data.team_name, Validators.compose([Validators.required])],
- fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])],
- fk_lender_id: [this.data.fk_lender_id, Validators.compose([Validators.required])],
- // city_ids: this._formBuilder.array([
- // this._formBuilder.group({
- // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id],
- // fk_team_id:[this.data.pdteam_id],
- // fk_city_id: [this.data.fk_city_id]
- // })
- // ])
- // city_ids: [this._formBuilder.group({
- // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id],
- // fk_team_id:[this.data.pdteam_id],
- // fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])],
- // })
- // ]
- // fk_city_id: this._formBuilder.array([this.data.fk_city_id, Validators.compose([Validators.required])])
-
- });
- console.log(this._pdTeamForm);
-
- /** For SelectDrop Datas For Multiple Datas*
- // this._MastersService.getAllMasterData('CITY')
- // .subscribe(
- // data => {
- // let userRole:any = [];
- // if (data.status == 200) {
- // this.citydatas = data.records;
- // this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
- // if(this.data.pdteam_id != null){
- // for (let cities of this.data[0]) {
- // //console.log(role);
- // userRole.push(this.citydatas.filter(city => city.city_id == cities.fk_city_id)[0]);
- // this._pdTeamForm.controls['fk_city_id'].setValue(userRole);
- // }
- // console.log(userRole);
- // }
- // }
- // }, error => this.errorMessage = error);
-
- /** For Drop Datas*
- this._MastersService.getAllMasterData('CITY')
- .subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.citydatas = dataresult.records;
- this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
- }
-
- }, error => this.errorMessage = error);
-
- /** For Drop Datas*
- this._MastersService.getAllMasterData('ENTITY')
- .subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.lenderdatas = dataresult.records;
- this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
- }
-
- }, error => this.errorMessage = error);
-
-
- }
-
-
-
- //pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
- /** For Popup Close Button *
- onNoClick(): void {
- this.dialogRef.close();
- }
-//pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
- /** To Save/Edited Popup Data *
- onSubmit() {
-
- var pdTeamFormValues = this._pdTeamForm.value;
-
- console.log('b4 null val pdTeamFormValues',pdTeamFormValues);
- if(isNaN(this.data.pdteam_id)) {
-
- Object.keys(pdTeamFormValues).forEach(
- (key) => (pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]
- );
-
- console.log('After null val pdTeamFormValues',pdTeamFormValues);
- // // var start_index = 2
- // // var number_of_elements_to_remove = 1;
- // // var removed_elements = pdTeamFormValues.splice(start_index, number_of_elements_to_remove);
- // // console.log(removed_elements);
- // //["k"]
-
- // pdTeamFormValues.splice(3, 1);
- // console.log(pdTeamFormValues);
-
- this._PdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe(
- dataresult=>{
- if (dataresult.dataStatus == true){
- //After Saving the data then popup close
- this.dialogRef.close();
- //Need To Dispaly saving Datas
- alert("Data Saved Successfully");
- }
- else{
- alert("SomeThing Wents Wrong Try Again !");
- }
-
- });
- } else { alert('Not Yet Completed Edit Function'); }
- // //this._MastersService.editProductMaster(this._pdTeamForm.value);
- // this._MastersService.editMasterDetails(this._pdTeamForm.value,'PDTEAM').subscribe( dataresult=>{
- // if (dataresult.dataStatus == true){
- // //After Editing0 the data then popup close
- // this.dialogRef.close();
- // //Need To Display saving Datas
- // alert("Data Edited Successfully");
- // }
- // else{
- // alert("SomeThing Wents Wrong Try Again !");
- // }
- // });
- // }
- }
-
- /** To Reset Popup Data /
- onReset(){
- this._pdTeamForm.reset();
- }
-
-}
-/** End Of Product Master Component*/
-
-
-
-
-
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html
index be23374a8..42f4f724f 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html
+++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html
@@ -28,7 +28,7 @@
- {{ cd.name }}
+ {{ cd.name }}
You must Select Cities.
@@ -47,7 +47,7 @@
- {{ pd.name }}
+ {{ pd.name }}
You must Select Product.
@@ -64,7 +64,7 @@
- {{csd.name}}
+ {{csd.name}}
You must Select Customer Segment.
@@ -77,7 +77,8 @@
-
+
+
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts
index 2bb0fa976..a0cc5afa9 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts
+++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts
@@ -1,32 +1,35 @@
-import { Component, OnInit, Inject } from '@angular/core';
+import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder,
FormGroup,
Validators,
FormControl } from '@angular/forms';
-import { MatDialog,
- MatDialogRef,
- MAT_DIALOG_DATA } from '@angular/material';
/** Service */
import { MastersService } from '../../service/masters/masters.service';
import { PdTeamService } from '../../service/masters/pd-team.service';
import { NotifierService } from 'angular-notifier';
-import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
-import { Router } from '@angular/router';
-
+
+/** Here this component is like as a partent component */
+import { PdTeamListComponent } from './../pd-team-list/pd-team-list.component';
+
@Component({
selector: 'app-pd-team-edit',
templateUrl: './pd-team-edit.component.html',
styleUrls: ['./pd-team-edit.component.scss']
})
+
export class PdTeamEditComponent implements OnInit {
public _pdTeamForm: FormGroup;
public submitted = false;
+ private notifier: NotifierService;
color = 'primary';
errorMessage:string;
+
+ //This "childMessage" to get the function or data from partent component
+ @Input() public childMessage: any;
//This Type Of Array Declaration for select dropdown to list the datas
citydatas: any[];
@@ -34,8 +37,8 @@ export class PdTeamEditComponent implements OnInit {
productdatas: any[];
customerSegmentdatas: any[];
- //This Type Of Array Declaration
- pdTeamCityArray: Array<{teamid: number, cityid: number}> = [];
+ //This Type Of Array Declaration for Validation
+ pdTeamCityArray:any= [];
pdTeamProductArray: Array<{teamid: number, productid: number}> = [];
pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = [];
@@ -43,165 +46,213 @@ export class PdTeamEditComponent implements OnInit {
selectedCityDatas : any=[];
selectedProductDatas : any=[];
selectedSegmentDatas : any=[];
+ //EditDatasforFormGroup: any;
constructor(private _formBuilder: FormBuilder,
private _notifier: NotifierService,
private _pdTeamService: PdTeamService,
- private _router: Router,
- private _masterService: MastersService)
- {
- this._notifier = _notifier;
- }
-
+ private _PdTeamListComponent: PdTeamListComponent,
+ private _masterService: MastersService) {
+ this.notifier = _notifier;
+ }
+ /** Onready function */
ngOnInit() {
- this.PdTeamFormDatas();
+
+ this.PdTeamFormDatas();
+ //console.log('hai I am Child This onready function',this.childMessage);
+ // this._pdTeamService.getAllPDTeamWithPDTeamID(this.childMessage).subscribe(
+ // dataresult => {
+ // console.log(dataresult);
+ // this.EditDatasforFormGroup = dataresult.records;
+ // console.log(this.EditDatasforFormGroup);
+ // });
+ /** For Checking City Validation datas - checking purpose - Already exists are not */
+ this._pdTeamService.getAllPdTeamCityMapping().subscribe(
+ dataresult => {
+ if(dataresult.dataStatus == true){
+ //this.AllPDTeamMapData = dataresult.records;
+ this.pdTeamCityArray = dataresult.records;
+ }
+ }, error => this.errorMessage =
error);
+
+ /** To Display The City Data For City DropDown */
+ this._masterService.getAllMasterData('CITY').subscribe(
+ dataresult => {
+ if (dataresult.dataStatus == true) {
+ this.citydatas = dataresult.records;
+ this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
+ }
+
+ }, error => this.errorMessage = error);
+
+ /** To Display The Entities Data For Entities DropDown */
+ this._masterService.getAllMasterData('ENTITY').subscribe(
+ dataresult => {
+ if (dataresult.dataStatus == true) {
+ this.lenderdatas = dataresult.records;
+ this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
+ }
+ }, error => this.errorMessage = error);
- /** To Display The City Data For City DropDown */
- this._masterService.getAllMasterData('CITY').subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.citydatas = dataresult.records;
- this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
- }
-
- }, error => this.errorMessage = error);
-
- /** To Display The Entities Data For Entities DropDown */
- this._masterService.getAllMasterData('ENTITY').subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.lenderdatas = dataresult.records;
- this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
- }
- }, error => this.errorMessage = error);
-
- /** To Display The Entities Data For Entities DropDown */
- this._masterService.getAllMasterData('PRODUCTS').subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.productdatas = dataresult.records;
- this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
+ /** To Display The Entities Data For Entities DropDown */
+ this._masterService.getAllMasterData('PRODUCTS').subscribe(
+ dataresult => {
+ if (dataresult.dataStatus == true) {
+ this.productdatas = dataresult.records;
+ this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
+ }
+ }, error => this.errorMessage = error);
+
+ /** To Display The Entities Data For Entities DropDown */
+ this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
+ dataresult => {
+ if (dataresult.dataStatus == true) {
+ this.customerSegmentdatas = dataresult.records;
+ this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
+ }
+ }, error => this.errorMessage = error)
}
- }, error => this.errorMessage = error);
-
- /** To Display The Entities Data For Entities DropDown */
- this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.customerSegmentdatas = dataresult.records;
- this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
- }
- }, error => this.errorMessage = error);
- }
/** Pd Team Form Datas */
PdTeamFormDatas(){
- this._pdTeamForm = this._formBuilder.group({
- pdteam_id: [null, Validators.compose([Validators.required])],
- team_name: [null, Validators.compose([Validators.required])],
- fk_lender: [null, Validators.compose([Validators.required])],
- fk_city: [null, Validators.compose([Validators.required])],
- fk_customer_segment: [null, Validators.compose([Validators.required])],
- fk_product:[null, Validators.compose([Validators.required])],
+ //console.log('Patricular pdteam_id Datas',this.childMessage);
+ // let PdTeamcity:any = [];
+ // for (let ptc of this.childMessage[0].CITYMAP) {
+ // //PdTeamcity.push(ptc);
+ // PdTeamcity.push(this.citydatas.filter(dataresults => this.selectedCityDatas == ptc));
+ // //this._pdTeamForm.controls['fk_city'].setValue(PdTeamcity);
+ // }
+ // console.log('PdTeamcity',PdTeamcity);
+
+ let PdTeamCity:any = [];
+ for(let ptc of this.childMessage[0].CITYMAP){
+ PdTeamCity.push(ptc.city_id);
+ }
+
+ let PdTeamProduct:any = [];
+ for(let ptp of this.childMessage[0].PRODUCTS){
+ PdTeamProduct.push(ptp.product_id);
+ }
+
+ let PdTeamCS:any = [];
+ for(let ptcs of this.childMessage[0].CUSTOMERSEGMENT){
+ PdTeamCS.push(ptcs.customer_segment_id);
+ }
+
+ this._pdTeamForm = this._formBuilder.group({
+ pdteam_id: [this.childMessage[0].pdteam_id, Validators.compose([Validators.required])],
+ team_name: [this.childMessage[0].team_name, Validators.compose([Validators.required])],
+ fk_lender: [this.childMessage[0].fk_lender_id, Validators.compose([Validators.required])],
+ fk_city: [PdTeamCity, Validators.compose([Validators.required])],
+ fk_customer_segment: [PdTeamCS, Validators.compose([Validators.required])],
+ fk_product:[PdTeamProduct, Validators.compose([Validators.required])],
});
+
}
/** convenience getter for easy access to form fields */
get f() { return this._pdTeamForm.controls; }
-
+
/** For Popup Close Button */
onNoClick(): void {
- this._router.navigate(['/setting/pdteam/pdteamlist']);
+ this._PdTeamListComponent.changeListView();
}
- /** To Save/Edited Popup Data */
- /** To Save/Edited Popup Data */
- onSubmit() {
- this.submitted = true;
- // stop here if form is invalid
- if (this._pdTeamForm.invalid) {
- // this.errorMessage = "Please Fill All Mandate Fields.";
- // return;
- alert('Please Fill All Mandate Fields.');
- } else {
-
- var pdTeamFormValues = this._pdTeamForm.value;
-
- //To Remove The "Null" With Key also
- Object.keys(pdTeamFormValues).forEach(
- (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
-
- this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- console.log(dataresult);
- // this._notifier.notify('success', 'Record Saved Successfully.!');
- alert('Record Saved Successfully.!');
- this._router.navigate(['/setting/pdteam/pdteamlist']);
- this._pdTeamForm.reset();
- }
- else {
- //this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- alert('Some Thing Wents Wrong Try Again !');
- //this.errorMessage = "Some Thing Wents Wrong Try Again !";
- }
- }, error => {
- // this._notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Something Wents Wrong Try Again !";
- alert('Some Thing Wents Wrong Try Again !');
- });
- }
- }
-
-
/** To Reset Popup Data For Add*/
-
- onResetForAdd(){
- alert("reset function");
+ onResetForEdit(){
+ this.PdTeamFormDatas();
}
/**on change function for customer segment to dispaly the as List in html page */
onChangeCustomerSegmentDatas($event){
- let CustomerSegmentName = $event.source.value.name;
+ //let CustomerSegmentName = $event.source.value.name;
+ let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0];
+
if($event.source._selected === true ){
- this.selectedSegmentDatas.push(CustomerSegmentName);
+ this.selectedSegmentDatas.push(CustomerSegmentName.name);
}
else if($event.source._selected === false ){
- let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName);
+ let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
this.selectedSegmentDatas.splice(index,1);
}
}
/**on change function for City to display the as List in html page */
onChangeCityDatas($event){
+ var mycheck = 0 ;
+ //let cityName = $event.source.value;
+ let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0];
+
+ if($event.source._selected === true ){
+
+ for(let Duplication_City of this.pdTeamCityArray){
+
+ let teamname = Duplication_City.team_name;
+ let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value);
+
+ if(dup_cityname != ''){
+ for(let data of dup_cityname){
+
+ if(data.name == cityName.name){
+ alert('"'+data.name+'" Already Existing with "'+ teamname +'"');
+ $event.source._selected = false;
+ mycheck++;
+ }
- let cityName = $event.source.value.name;
- if($event.source._selected === true ){
- this.selectedCityDatas.push(cityName);
- }
- else if($event.source._selected === false ){
- let index = this.selectedCityDatas.indexOf(cityName);
- this.selectedCityDatas.splice(index,1);
- }
-
+ }
+ }
+ }
+
+ if(mycheck == 0){
+ this.selectedCityDatas.push(cityName.name);
+ }
+
+ }
+ else if($event.source._selected === false ){
+ let index = this.selectedCityDatas.indexOf(cityName.name);
+ this.selectedCityDatas.splice(index,1);
+ }
}
-
+
/**on change function for Product to display the data as List in html page */
onChangeProductDatas($event){
-
- let productName = $event.source.value.name;
+
+ //let productName = $event.source.value.name;
+ let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0];
if($event.source._selected === true ){
- this.selectedProductDatas.push(productName);
+ this.selectedProductDatas.push(productName.name);
}
else if($event.source._selected === false ){
- let index = this.selectedProductDatas.indexOf(productName);
+ let index = this.selectedProductDatas.indexOf(productName.name);
this.selectedProductDatas.splice(index,1);
}
+
+ }
+
+ /** To Edited form Data */
+ onSubmit() {
+
+ var pdTeamFormValues = this._pdTeamForm.value;
+ Object.keys(pdTeamFormValues).forEach(
+ (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]);
+
+ this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe(
+
+ dataresult=>{
+ if (dataresult.dataStatus == true){
+ alert("Data Edited Successfully");
+ this.notifier.notify('success', 'Record Edited Successfully.!');
+ }
+ else{
+ alert("SomeThing Wents Wrong Try Again !");
+ this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
+ }
+ });
}
- }
- /** End Of PD TEAM ADD Component */
\ No newline at end of file
+}
+/** End Of PD Team Edit Component */
\ No newline at end of file
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html
index 80bb14541..848631ed1 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html
+++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html
@@ -1,4 +1,5 @@
-
+
+
PD Team Masters
@@ -22,9 +23,7 @@
-
-
-
+
Sl
@@ -67,7 +66,7 @@
Actions
-
+
@@ -79,7 +78,10 @@
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts
index 892b0e2f7..390529b82 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts
+++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts
@@ -11,8 +11,6 @@ import { PdTeamService } from '../../service/masters/pd-team.service';
import { NotifierService } from 'angular-notifier';
-/** Dialog Component */
-import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component';
/** Add Component */
//import { } from '../pd-team-add/pd-team-add.component;
/** Edit Component */
@@ -33,10 +31,13 @@ export class PdTeamListComponent implements OnInit {
color = 'primary';
userData = null;
noRecordFound: boolean = false;
+
private notifier: NotifierService;
-
+ public listView: any = true;
public dataLength: number;
public dataSource = new MatTableDataSource();
+ public parentMessage: any = [];
+
displayedColumns = ['serialno','team_name','lender_name','actions','isactive'];
@ViewChild(MatPaginator) paginator: MatPaginator;
@@ -50,7 +51,7 @@ export class PdTeamListComponent implements OnInit {
this.notifier = notifier;
}
- ngOnInit() {}
+ ngOnInit() { this.getPdTeam(); }
/** To add data */
addPdTeam() {
@@ -58,10 +59,22 @@ export class PdTeamListComponent implements OnInit {
}
/** To edit data */
- editPdTeam() {
- this.router.navigate(['/setting/pdteam/editpdteam']);
+ editPdTeam(detail){
+
+ this._PdTeamService.getAllPDTeamWithPDTeamID(detail).subscribe(
+ dataresult => {
+ this.parentMessage = dataresult;
+ this.parentMessage = this.parentMessage.records;
+ this.listView = false;
+
+ });
}
+ changeListView(){
+ this.getPdTeam();
+ this.listView = true;
+ }
+
/** To get data for listing */
getPdTeam() {
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts
index c17d54794..cc7958bc3 100644
--- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts
+++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts
@@ -1,6 +1,8 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
+import { NotifierModule, NotifierOptions } from 'angular-notifier';
+import { FlexLayoutModule } from '@angular/flex-layout';
import {
MatCardModule,
MatIconModule,
@@ -17,19 +19,17 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
-import { NotifierModule, NotifierOptions } from 'angular-notifier';
-import { FlexLayoutModule } from '@angular/flex-layout';
-import { PdTeamDialogComponent } from './pd-team-dialog/pd-team-dialog.component';
import { PdTeamListComponent } from './pd-team-list/pd-team-list.component';
+import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component';
+import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component';
+
/** Route */
import { PdTeamRoutes } from './pd-team.routing';
/** Service */
import { PdTeamService } from '../service/masters/pd-team.service';
-import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component';
-import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component';
/**
* Custom angular notifier options
@@ -100,12 +100,13 @@ const customNotifierOptions: NotifierOptions = {
MatTooltipModule,
NotifierModule.withConfig(customNotifierOptions),
],
- declarations: [PdTeamDialogComponent,
+ declarations: [
PdTeamListComponent,
PdTeamAddComponent,
PdTeamEditComponent],
- providers: [PdTeamService ],
- entryComponents: [PdTeamDialogComponent]
+ providers: [PdTeamService]
+
+ //entryComponents: [PdTeamDialogComponent]
})
export class PdTeamModule { }
diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
index d2a4dbc68..1b339e139 100644
--- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
+++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts
@@ -25,6 +25,7 @@ export class PdTeamService {
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
private apiUrl = "http://localhost/sparqapi/api/";
+ pk: { "primary_key": any; };
constructor(private _http: HttpClient,
@@ -37,7 +38,7 @@ private apiUrl = "http://localhost/sparqapi/api/";
* 1st argument is "Records": any - Set of Data To Adding to database
*/
addPdTeamDetail(Records: any): Observable {
- console.log('From Service Data',Records);
+ console.log('Add PD team Details In Service',Records);
Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record
Records.createdon = currentdate;//to get Current date and Time for when the Record is created
// Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
@@ -58,7 +59,7 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData)
* 1st argument is "Records": any - Set of Updated Data
*/
editPdTeamDetail(Records: any): Observable {
-
+ console.log('Update PD team Details In Service',Records);
Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
@@ -134,16 +135,24 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData)
* TO Get the Master Datas using API Call
* 1st argument is "TableName" :string - Table Name
*/
- getAllPdTeamList(): Observable {
-
- return this._http.get(this.apiUrl+"getListOfPDTeam")
- .pipe(
- catchError(this.handleError('role', []))
- )
+ getAllPdTeam(): Observable {
+
+ return this._http.post(this.apiUrl+'getListOfPDTeam','')
+ .pipe(
+ catchError(this.handleError('role', []))
+ )
}
+ getAllPDTeamWithPDTeamID(Primarykey): Observable {
- /** Get All PD Team Child Data using API call Based on Primary Key */
+ var pk = { "primary_key":Primarykey }
+ return this._http.post(this.apiUrl+'getListOfPDTeam',pk)
+ .pipe(
+ catchError(this.handleError('role', []))
+ )
+}
+
+ // /** Get All PD Team Child Data using API call Based on Primary Key */
getAllPdTeamMapListWithPK(Primarykey): Observable {
var pk = { "primary_key":Primarykey }
@@ -165,6 +174,14 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData)
)
}
+ getAllPdTeamCityMapping(): Observable {
+ //var vaildateKey = { "vaildate_key": 'cityvaildation1' }
+ return this._http.get(this.apiUrl+'getListOfPDTeamCityMapping')
+ .pipe(
+ catchError(this.handleError('role', []))
+ )
+ }
+
/**
* TO get City Data For Listing Screen
@@ -192,12 +209,11 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData)
/**
*
*/
-getAllPdTeam(): Observable {
- return this._http.get(this.apiUrl+'getListOfPDTeam')
- .pipe(
- catchError(this.handleError('role', []))
- )
-
-}
+// getAllPdTeam(): Observable {
+// return this._http.get(this.apiUrl+'getListOfPDTeam')
+// .pipe(
+// catchError(this.handleError('role', []))
+// )
+// }
}
\ No newline at end of file
diff --git a/ng6-seed/src/assets/styles/scss/_app.variables.scss b/ng6-seed/src/assets/styles/scss/_app.variables.scss
index cab788b37..406ea8711 100644
--- a/ng6-seed/src/assets/styles/scss/_app.variables.scss
+++ b/ng6-seed/src/assets/styles/scss/_app.variables.scss
@@ -37,7 +37,7 @@ $main-bg-color:linear-gradient(58deg, #f44336, #673ab7);
//
// Typography
//
-$font-size-base: 0.875rem !default;
+$font-size-base: 1.2rem !default;
$font-weight-base: 400 !default;
$font-weight-medium: 500 !default;
$font-weight-bold: 600 !default;
diff --git a/ng6-seed/src/assets/styles/scss/_material.variables.scss b/ng6-seed/src/assets/styles/scss/_material.variables.scss
index c218bf189..160dee2cb 100644
--- a/ng6-seed/src/assets/styles/scss/_material.variables.scss
+++ b/ng6-seed/src/assets/styles/scss/_material.variables.scss
@@ -4,7 +4,7 @@
@import '~@angular/material/theming';
/**-- $primary: mat-palette($mat-deep-purple); --*/
-$primary: mat-palette($mat-light-blue);
+$primary: mat-palette($mat-red);
$accent: mat-palette($mat-amber, A200, A100, A400);
$warn: mat-palette($mat-red);
$theme: mat-light-theme($primary, $accent, $warn);
@@ -24,5 +24,5 @@ $dark-foreground: map-get($dark-theme, foreground);
-
+
diff --git a/ng6-seed/src/assets/styles/scss/core/_main-header.scss b/ng6-seed/src/assets/styles/scss/core/_main-header.scss
index 38eee1653..c33d92320 100644
--- a/ng6-seed/src/assets/styles/scss/core/_main-header.scss
+++ b/ng6-seed/src/assets/styles/scss/core/_main-header.scss
@@ -91,10 +91,10 @@ mat-toolbar {
.head-menu {
font-size: 1.3rem !important;
border-bottom: 2px solid rgba(255, 255, 255, 0.2);
- background: linear-gradient(58deg, #f44336, #673ab7);
+ background: linear-gradient(58deg, #ca2126, #ca2126);
color: #fff;
&:hover {
- background: linear-gradient(58deg, #f44336, #673ab7);
+ background: linear-gradient(58deg, #ca2126, #673ab7);
}
}
img {
diff --git a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss
index 46d4e3064..67cb61bff 100644
--- a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss
+++ b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss
@@ -39,7 +39,7 @@
flex-direction: row;
align-items: center;
height: 48px;
- padding: 0 16px;
+ padding: 0 8px;
color: $sidebar-menu-color;
}
.sub-menu {
diff --git a/ng6-seed/src/assets/styles/scss/material/_buttons.scss b/ng6-seed/src/assets/styles/scss/material/_buttons.scss
index 1a100dade..bde7a368f 100644
--- a/ng6-seed/src/assets/styles/scss/material/_buttons.scss
+++ b/ng6-seed/src/assets/styles/scss/material/_buttons.scss
@@ -11,6 +11,10 @@ $mat-fab-padding: 16px !default;
}
}
+[mat-raised-button] {
+ color:red;
+}
+
[mat-icon-button] {
&[mat-button-sm] {
padding: 0;