master issues fixes : ps
This commit is contained in:
parent
3a0e22c3fc
commit
0b46834933
28
ng6-seed/package-lock.json
generated
28
ng6-seed/package-lock.json
generated
@ -4294,12 +4294,14 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@ -4314,17 +4316,20 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@ -4441,7 +4446,8 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@ -4453,6 +4459,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -4467,6 +4474,7 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@ -4474,12 +4482,14 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@ -4498,6 +4508,7 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@ -4578,7 +4589,8 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@ -4590,6 +4602,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@ -4711,6 +4724,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addBranch()"> + Add Branch</button>
|
<button mat-stroked-button [color]="color" (click)="addBranch()"> + Add Branch</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCity()"> + Add City</button>
|
<button mat-stroked-button [color]="color" (click)="addCity()"> + Add City</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="loader">
|
<div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
|
<button mat-stroked-button [color]="color" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCompany()" > + Add Company</button>
|
<button mat-stroked-button [color]="color" (click)="addCompany()" > + Add Company</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
|
<button mat-stroked-button [color]="color" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
|
<button mat-stroked-button [color]="color" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addDesignation()" > + Add Designation</button>
|
<button mat-stroked-button [color]="color" (click)="addDesignation()" > + Add Designation</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addFrequency()" > + Add Frequency</button>
|
<button mat-stroked-button [color]="color" (click)="addFrequency()" > + Add Frequency</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addIndustryClassification()" > + Add Industry Classification</button>
|
<button mat-stroked-button [color]="color" (click)="addIndustryClassification()" > + Add Industry Classification</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
|
<button mat-stroked-button [color]="color" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
|
<button mat-stroked-button [color]="color" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
|
<button mat-stroked-button [color]="color" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -87,4 +87,4 @@
|
|||||||
|
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -29,6 +29,7 @@ selectedValueForLender: any;
|
|||||||
selectedValueForCity: any;
|
selectedValueForCity: any;
|
||||||
tempArray: Array<{lenderid: number, cityid: number}> = [];
|
tempArray: Array<{lenderid: number, cityid: number}> = [];
|
||||||
PDTeamMapping: any[];
|
PDTeamMapping: any[];
|
||||||
|
AllPDTeamMapData: any[];
|
||||||
PDTeamMaplen:any = 0;
|
PDTeamMaplen:any = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -43,15 +44,22 @@ ngOnInit() {
|
|||||||
this.PdTeamFormDatas();
|
this.PdTeamFormDatas();
|
||||||
if(isNaN(this.data.pdteam_id)){}
|
if(isNaN(this.data.pdteam_id)){}
|
||||||
else{
|
else{
|
||||||
this._pdTeamService.getAllPdTeamMapList(this.data.pdteam_id) // note, removed this.countries =
|
this._pdTeamService.getAllPdTeamMapListWithPK(this.data.pdteam_id) // note, removed this.countries =
|
||||||
.subscribe(
|
.subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if(dataresult.dataStatus == true){
|
if(dataresult.dataStatus == true){
|
||||||
this.PDTeamMapping = dataresult.records;
|
this.PDTeamMapping = dataresult.records;
|
||||||
this.PDTeamMaplen = this.PDTeamMapping.length;
|
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*/
|
/** For City Drop Datas*/
|
||||||
this._masterService.getAllMasterData('CITY')
|
this._masterService.getAllMasterData('CITY')
|
||||||
@ -141,40 +149,52 @@ removevalue(i:number) {
|
|||||||
if (i !== -1) {
|
if (i !== -1) {
|
||||||
this.tempArray.splice(i, 1);
|
this.tempArray.splice(i, 1);
|
||||||
}
|
}
|
||||||
console.log('delete function',this.tempArray);
|
//console.log('delete function',this.tempArray);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
doSomething(){
|
doSomething(){
|
||||||
var check = 0 ;
|
var check = 0 ;
|
||||||
// console.log(this.selectedValueForLender);
|
|
||||||
// console.log(this.selectedValueForCity);
|
if((this._pdTeamForm.controls['fk_city_id'].value.city_id != null)
|
||||||
|
&&(this._pdTeamForm.controls['fk_lender_id'].value.entity_id) != null)
|
||||||
|
{
|
||||||
|
|
||||||
this.tempArray.forEach(item => {
|
this.tempArray.forEach(item => {
|
||||||
if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
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))
|
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
alert('Already Exists');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(this.AllPDTeamMapData !== undefined){
|
||||||
|
this.AllPDTeamMapData.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 on Other Team "'+item.team_name+'"');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(isNaN(this.data.pdteam_id)) {}
|
if(isNaN(this.data.pdteam_id)) {}
|
||||||
else{
|
else{
|
||||||
//console.log(this.PDTeamMapping);
|
|
||||||
// console.log(this.PDTeamMapping.length);
|
// console.log(this.PDTeamMapping.length);
|
||||||
if(this.PDTeamMapping !== undefined){
|
if(this.PDTeamMapping !== undefined){
|
||||||
this.PDTeamMapping.forEach(item => {
|
this.PDTeamMapping.forEach(item => {
|
||||||
if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
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))
|
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
alert('Already Exists');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.tempArray.forEach(this.data, function (value, key) {
|
// this.tempArray.forEach(this.data, function (value, key) {
|
||||||
|
|
||||||
// if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
// if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button>
|
<button mat-stroked-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPDType()" > + Add PDType</button>
|
<button mat-stroked-button [color]="color" (click)="addPDType()" > + Add PDType</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addProductMaster()" > + Add Product</button>
|
<button mat-stroked-button [color]="color" (click)="addProductMaster()" > + Add Product</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addQuestionCategory()" > + Add Question Category</button>
|
<button mat-stroked-button [color]="color" (click)="addQuestionCategory()" > + Add Question Category</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addregions()" > + Add regions</button>
|
<button mat-stroked-button [color]="color" (click)="addregions()" > + Add regions</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
@ -96,17 +96,17 @@
|
|||||||
class="example-margin"
|
class="example-margin"
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveregions(row.regions_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
onclick="return confirm('Are you sure?')">
|
||||||
</mat-slide-toggle>
|
</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)="isactiveregions(row.regions_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
onclick="return confirm('Are you sure?')">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { MatDialog,
|
|||||||
MatSort,
|
MatSort,
|
||||||
MatTableDataSource } from '@angular/material';
|
MatTableDataSource } from '@angular/material';
|
||||||
|
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
/** Service */
|
/** Service */
|
||||||
import { MastersService } from '../../../../service/masters/masters.service';
|
import { MastersService } from '../../../../service/masters/masters.service';
|
||||||
/** Dialog Component */
|
/** Dialog Component */
|
||||||
@ -39,22 +39,12 @@ export class RegionsListComponent implements OnInit {
|
|||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
ngOnInit() {}
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _regionsService: MastersService) {
|
private _regionsService: MastersService) {
|
||||||
this.getregions();
|
this.getregions();
|
||||||
}
|
}
|
||||||
|
|
||||||
// get regionsList() {
|
|
||||||
// return this._regionsService.getAllregions();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._regionsService);
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
addregions() {
|
addregions() {
|
||||||
this.isPopupOpened = true;
|
this.isPopupOpened = true;
|
||||||
@ -78,31 +68,12 @@ this.getregions();
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getregions();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
|
||||||
isactiveregions(id: number,isactive : number) {
|
|
||||||
|
|
||||||
let ActiveDatas = isactive == 0
|
|
||||||
? { 'region_id':id,'isactive': '1'}
|
|
||||||
: { 'region_id':id,'isactive': '0'}
|
|
||||||
|
|
||||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
|
||||||
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
|
||||||
.subscribe(dataresult=>{
|
|
||||||
if (dataresult.dataStatus == true){
|
|
||||||
//alert("my check");
|
|
||||||
this.getregions();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getregions() {
|
getregions() {
|
||||||
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
||||||
data => {
|
data => {
|
||||||
if(data.dataStatus == true){
|
if(data.dataStatus == true){
|
||||||
@ -122,12 +93,36 @@ this.getregions();
|
|||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
||||||
|
isactiveregions(id: number,isactive : number) {
|
||||||
|
|
||||||
|
let ActiveDatas = isactive == 0
|
||||||
|
? { 'region_id':id,'isactive': '1'}
|
||||||
|
: { 'region_id':id,'isactive': '0'}
|
||||||
|
|
||||||
|
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||||
|
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
||||||
|
.subscribe(dataresult=>{
|
||||||
|
|
||||||
|
|
||||||
|
if (dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
this.getregions();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteregions(id: number) {
|
deleteregions(id: number) {
|
||||||
var PrimaryKeyWithValue ={'region_id':id};
|
var PrimaryKeyWithValue ={'region_id':id};
|
||||||
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { });
|
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { });
|
||||||
this.getregions();
|
this.getregions();
|
||||||
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 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,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addRelationShip()" > + Add Relation ship</button>
|
<button mat-stroked-button [color]="color" (click)="addRelationShip()" > + Add Relation ship</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button color="primary" (click)="addState()" > + Add State</button>
|
<button mat-stroked-button color="primary" (click)="addState()" > + Add State</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button>
|
<button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addTitle()" > + Add Title</button>
|
<button mat-stroked-button [color]="color" (click)="addTitle()" > + Add Title</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addActivity()" > + Add Activity</button>
|
<button mat-stroked-button [color]="color" (click)="addActivity()" > + Add Activity</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addUOM()" > + Add UOM</button>
|
<button mat-stroked-button [color]="color" (click)="addUOM()" > + Add UOM</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -66,7 +66,7 @@ return this._http.post<any>(this.apiUrl+"saveMaster", ArrayData)
|
|||||||
* 2nd argument is "MasterName" :string - Table Name
|
* 2nd argument is "MasterName" :string - Table Name
|
||||||
*/
|
*/
|
||||||
editMasterDetails(Records: any,MasterName:string): Observable<any> {
|
editMasterDetails(Records: any,MasterName:string): Observable<any> {
|
||||||
|
console.log('Service Data',Records);
|
||||||
Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
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
|
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
||||||
|
|
||||||
|
|||||||
@ -144,18 +144,27 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
|
|
||||||
|
|
||||||
/** Get All PD Team Child Data using API call With master Keyword */
|
/** Get All PD Team Child Data using API call With master Keyword */
|
||||||
getAllPdTeamMapList(Primarykey): Observable<any> {
|
getAllPdTeamMapListWithPK(Primarykey): Observable<any> {
|
||||||
var pk = { "primary_key":Primarykey }
|
var pk = { "primary_key":Primarykey }
|
||||||
|
|
||||||
//var Primar = Primarykey
|
//var Primar = Primarykey
|
||||||
//console.log('FromServiceArrayData',ArrayData);
|
//console.log('FromServiceArrayData',ArrayData);
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+'getListOfPDTeamMap',pk)
|
return this._http.post<any>('http://localhost/sparqapi/api/getListOfPDTeamMap',pk)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get All PD Team Child Data using API call With master Keyword */
|
||||||
|
getAllPdTeamMapList(): Observable<any> {
|
||||||
|
|
||||||
|
return this._http.post<any>('http://localhost/sparqapi/api/getListOfPDTeamMap','')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user