From 3973f157974728ac494a31330a74629e3deddf70 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Mon, 7 Jan 2019 19:48:52 +0530 Subject: [PATCH] entity details updated : kdk --- .../entity-add-tat.component.html | 209 +++++--- .../entity-edit-list-tat.component.html | 111 ++++ .../entity-edit-tat.component.html | 40 +- .../entity-edit-tat.component.scss | 10 +- .../entity-edit-tat.component.ts | 500 +++++++++++++++--- .../src/app/settings/entity/entity.module.ts | 4 +- .../settings/service/entity/entity.service.ts | 16 + 7 files changed, 725 insertions(+), 165 deletions(-) create mode 100644 ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-add-tat.component.html b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-add-tat.component.html index b7de951e7..3ce9a691f 100755 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-add-tat.component.html +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-add-tat.component.html @@ -1,79 +1,146 @@ -
+
- -
-
- - - TAT 1 Value Required.! - - - - TAT 2 Value Required.! - -
-
-
- - - {{pd.name}} - - PD Type Required.! - -
-
    -
  • - {{pdName.name}} -
  • -
-
-
-
- - - {{prdct.name}} - - Product Required.! - -
-
    -
  • - {{prdcName.name}} -
  • -
-
-
-
- - - {{city.name}} - - City Required.! - -
-
    -
  • - {{cityName.name}} -
  • -
-
-
-
+ +
+ + + + +
+ +
+ + + TAT 1 Value Required.! + + + + TAT 2 Value Required.! + +
+
+
+ + + {{pd.type_name}} + + PD Type Required.! + +
+
    +
  • + {{pdName.type_name}} +
  • +
+
+
+
+ + + {{prdct.name}} + + Product Required.! + +
+
    +
  • + {{prdcName.name}} +
  • +
+
+
+
+ + + {{city.name}} + + City Required.! + +
+
    +
  • + {{cityName.name}} +
  • +
+
+
+
+
+ + +
+ +
+
+
+

Before Submit , Pleast Verify your selected values as below.

+ +
+
{{tatValue1}}
+
+
+
{{tatValue2}}
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + Pd Type {{transaction.pd_type.name}} Product {{transaction.product.name}} City {{transaction.city.name}}
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html new file mode 100644 index 000000000..9196daff0 --- /dev/null +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html @@ -0,0 +1,111 @@ +
+
+
+ +
+
+ +
+ + + + + +
+
+ + + TAT 1 Value Required.! + + + + TAT 2 Value Required.! + +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + Pd Type {{transaction.pd_type.name}} Product {{transaction.product.name}} City {{transaction.city.name}}
+ +
+ +
+
+
+
+ + + {{pd.type_name}} + + PD Type Required.! + +
+
+ + + {{prdct.name}} + + Product Required.! + +
+
+ + + {{city.name}} + + City Required.! + +
+
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.html b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.html index ecc31a782..f3271564b 100755 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.html +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.html @@ -1,24 +1,24 @@
-
- -
+
+ +
- -
-
-
-
{{comb.pd.name}} - {{comb.product.name}} - {{comb.city.name}} ,
-
-
-
- {{data.tatVal1}} -
-
- {{data.tatVal2}} -
-
- -
-
+ +
+
+
+
{{comb.pd_type.name}} - {{comb.product.name}} - {{comb.city.name}} ,
+
+
+
+ {{data.tat1}} +
+
+ {{data.tat2}} +
+
+ +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.scss b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.scss index 4a04955c7..a2e30f5d2 100755 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.scss +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.scss @@ -13,4 +13,12 @@ // width: 160px; // height: 1.2em; // white-space: nowrap; -} \ No newline at end of file +} + +table { + width: 100%; +} + +tr.mat-footer-row { + font-weight: bold; +} diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.ts b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.ts index c9dffdecf..63bf789fc 100755 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.ts +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-tat.component.ts @@ -4,12 +4,12 @@ import { FormGroup, FormControl, FormBuilder, Validators, FormArray } from '@ang import { ActivatedRoute, Router } from '@angular/router'; import { DataSource } from '@angular/cdk/table'; import { Observable } from 'rxjs/Observable'; - import { NotifierService } from 'angular-notifier'; - import { MastersService } from './../../../service/masters/masters.service'; import { EntityService } from './../../../service/entity/entity.service'; +import { SelectionModel } from '@angular/cdk/collections'; + @Component({ selector: 'app-entity-edit-tat', templateUrl: './entity-edit-tat.component.html', @@ -17,7 +17,7 @@ import { EntityService } from './../../../service/entity/entity.service'; }) export class EntityEditTatComponent implements OnInit { - + @Input() public entityId: number; /** @@ -25,6 +25,8 @@ export class EntityEditTatComponent implements OnInit { */ private notifier: NotifierService; + listOfTatDetails = []; + constructor(notifier: NotifierService, private entityService: EntityService, private mastersService: MastersService, @@ -32,55 +34,51 @@ export class EntityEditTatComponent implements OnInit { this.notifier = notifier; } ngOnInit() { + this.getListofEntityTATInfo(); } + getListofEntityTATInfo() { + this.entityService.getEntityTATInfoDetails(this.entityId).subscribe(data => { + if (data.dataStatus) { + this.listOfTatDetails = data.records; + } else { + + } + }, err => { + + }) + } + + addNewTatDetails() { const dialogRef = this.dialog.open(DialogEntityAddTatComponent, { - data: {entity_id: this.entityId}, - disableClose: true + data: { entity_id: this.entityId }, + disableClose: true, + maxWidth: '100vw', + maxHeight: '100vh', + height: '100%', + width: '100%' }); dialogRef.afterClosed() .subscribe(dataresult => { + this.getListofEntityTATInfo(); }); } - entityTatListDetails: any = [ { - 'm_id': 1, - 'tatVal1': 3, - 'tatVal2':10, - "tatCombinations" : [ - { - 'c_id': 1, - 'pd': { - 'id': 1, - 'name': 'PD Type 1' - }, - 'product': { - 'id': 2, - 'name': 'Product 2' - }, - 'city' : { - 'id': 3, - 'name': 'City 3' - } - }, - { - 'c_id': 2, - 'pd': { - 'id': 2, - 'name': 'PD Type 2' - }, - 'product': { - 'id': 1, - 'name': 'Product 1' - }, - 'city' : { - 'id': 1, - 'name': 'City 1' - } - } - ] - }] + editTatInfoDetails(details) { + const dialogRef = this.dialog.open(DialogEntityEditListTatComponent, { + data: { entity_id: this.entityId, tat_details: details }, + disableClose: true, + maxWidth: '100vw', + maxHeight: '100vh', + height: '100%', + width: '100%' + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + this.getListofEntityTATInfo(); + }); + } } @@ -96,9 +94,233 @@ export class EntityEditTatComponent implements OnInit { // var exist = result1.filter(a => valueApi.indexOf(a) > -1); // console.log("exit :" + exist); +@Component({ + selector: 'dialog-entity-edit-list-tat', + styles: [` + table { + width: 100%; + } + + tr.mat-footer-row { + font-weight: bold; + } +` + ], + templateUrl: './entity-edit-list-tat.component.html' +}) +export class DialogEntityEditListTatComponent implements OnInit { + + + tatListEditForm: FormGroup; + tatEditAddForm: FormGroup; + submitted: Boolean = false; + /** + * Notifier service + */ + private notifier: NotifierService; + masterDataCombination = []; + + constructor(notifier: NotifierService, + private entityService: EntityService, + private mastersService: MastersService, + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any, + private _formBuilder: FormBuilder) { + this.notifier = notifier; + this.dataSource = this.data.tat_details.child; + this.tatListEditForm = this._formBuilder.group({ + tat1: [this.data.tat_details.tat1, Validators.compose([Validators.required])], + tat2: [this.data.tat_details.tat2, Validators.compose([Validators.required])], + }); + + this.tatEditAddForm = this._formBuilder.group({ + pd_type: ['', Validators.compose([Validators.required])], + product: ['', Validators.compose([Validators.required])], + city: ['', Validators.compose([Validators.required])] + }) + + this.masterDataCombination = this.dataSource.map(data => { + return data.pd_type.id + '' + data.product.id + '' + data.city.id; + }); + } + + m_pdType = []; + m_product = []; + m_city = []; + + // m_pdType = [{ 'id': 1, 'name': 'PD Type 1' }, { 'id': 2, 'name': 'PD Type 2' }]; + // m_product = [{ 'id': 1, 'name': 'Product 1' }, { 'id': 2, 'name': 'Product 2' }, { 'id': 3, 'name': 'Product 3' }]; + // m_city = [{ 'id': 1, 'name': 'City 1' }, { 'id': 2, 'name': 'City 2' }, { 'id': 3, 'name': 'City 3' }]; + + + ngOnInit(): void { + this.getCityMasters(); + this.getProductMasters(); + this.getPdTypeMasters(); + } + + + getCityMasters() { + this.mastersService.getAllMasterData('CITY').subscribe( + data => { + this.m_city = data.records; + }, + error => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + // this.errorMessage = "No Region Master Record Found."; + } + ); + } + + + getProductMasters() { + this.mastersService.getAllMasterData('PRODUCTS').subscribe( + data => { + this.m_product = data.records; + }, + error => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + // this.errorMessage = "No Region Master Record Found."; + } + ); + } + + + + getPdTypeMasters() { + this.mastersService.getAllMasterData('PDTYPE').subscribe( + data => { + this.m_pdType = data.records; + }, + error => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + // this.errorMessage = "No Region Master Record Found."; + } + ); + } + + get f() { return this.tatListEditForm.controls }; + get f1() { return this.tatEditAddForm.controls }; + + onSubmit() { + this.submitted = true; + if (this.tatListEditForm.invalid) { + return; + } else { + } + } + + + onSubmitEditAddForm() { + let finalArr = []; + let data = this.tatEditAddForm.value; + finalArr.push(data.pd_type + '' + data.product + '' + data.city); + if (this.masterDataCombination.length > 0) { + finalArr.map(d => { + // alert(this.masterDataCombination.indexOf(d)); + if(this.masterDataCombination.indexOf(d) > -1){ + + finalArr.splice(this.masterDataCombination.indexOf(d), 1); + } + }); + } + this.selection.clear(); + let record: any = {}; + + record.tat1 = this.data.tat_details.tat1; + record.tat2 = this.data.tat_details.tat2; + record.entity_tat_master_id = this.data.tat_details.entity_tat_master_id; + record.fk_entity_id = this.data.entity_id; + record.child = finalArr; + this.entityService.saveEntityTATInfo(record).subscribe(data=>{ + if(data.dataStatus){ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.dialogRef.close(); + } else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + } + }, err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + }) + } + + onNoClick(): void { + this.dialogRef.close(); + } + + dataSource: Transaction[] = []; + + /** Whether the number of selected elements matches the total number of rows. */ + isAllSelected() { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.length; + return numSelected === numRows; + } + + /** Selects all rows if they are not all selected; otherwise clear selection. */ + masterToggle() { + this.isAllSelected() ? + this.selection.clear() : + this.dataSource.forEach(row => this.selection.select(row)); + } + + + selection = new SelectionModel(true, []); + displayedColumns: string[] = ['select', 'pd', 'product', 'city']; + + onDelete() { + let data = this.selection.selected.map(x => x['entity_tat_child_id']); + + let record: any = {}; + record.entity_tat_master_id = this.data.tat_details.entity_tat_master_id; + record.fk_entity_id = this.data.entity_id; + record.entity_tat_child_id_details = data; + + this.entityService.deleteTATInfoDetails(record).subscribe(data=>{ + if(data.dataStatus){ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.dialogRef.close(); + } else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + } + } , err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + }) + + // alert(JSON.stringify(record)); + + // if(data.length > 0){ + + // } else { + + // } + } + + selectedDetails(e) { + + } +} + @Component({ selector: 'dialog-entity-add-tat', - styles: [`` + styles: [` + table { + width: 100%; + } + + tr.mat-footer-row { + font-weight: bold; + } + + .example-container { + height: 400px; + overflow: auto; + } +` ], templateUrl: './entity-add-tat.component.html' }) @@ -123,9 +345,13 @@ export class DialogEntityAddTatComponent implements OnInit { toppingList1: any[] = [{ 'id': 1, 'name': 'Extra cheese' }, { 'id': 2, 'name': 'Mushroom' }, { 'id': 3, 'name': 'Onion' }]; - m_pdType = [{ 'id': 1, 'name': 'PD Type 1' }, { 'id': 2, 'name': 'PD Type 2' }]; - m_product = [{ 'id': 1, 'name': 'Product 1' }, { 'id': 2, 'name': 'Product 2' }, { 'id': 3, 'name': 'Product 3' }]; - m_city = [{ 'id': 1, 'name': 'City 1' }, { 'id': 2, 'name': 'City 2' }, { 'id': 3, 'name': 'City 3' }]; + m_pdType = []; + m_product = []; + m_city = []; + + // m_pdType = [{ 'id': 1, 'name': 'PD Type 1' }, { 'id': 2, 'name': 'PD Type 2' }]; + // m_product = [{ 'id': 1, 'name': 'Product 1' }, { 'id': 2, 'name': 'Product 2' }, { 'id': 3, 'name': 'Product 3' }]; + // m_city = [{ 'id': 1, 'name': 'City 1' }, { 'id': 2, 'name': 'City 2' }, { 'id': 3, 'name': 'City 3' }]; /** * Notifier service */ @@ -148,7 +374,9 @@ export class DialogEntityAddTatComponent implements OnInit { } ngOnInit() { - + this.getCityMasters(); + this.getProductMasters(); + this.getPdTypeMasters(); } get f() { return this.tatForm.controls }; @@ -157,19 +385,19 @@ export class DialogEntityAddTatComponent implements OnInit { selectedPD(e) { this.selectedArr = [...e.value]; - this.selectedItem = this.m_pdType.filter(val => this.selectedArr.indexOf(val.id) > -1) + this.selectedItem = this.m_pdType.filter(val => this.selectedArr.indexOf(val.pd_type_id) > -1) } selectedProductItem: any; selectedProduct(e) { this.selectedProductArr = [...e.value]; - this.selectedProductItem = this.m_product.filter(val => this.selectedProductArr.indexOf(val.id) > -1) + this.selectedProductItem = this.m_product.filter(val => this.selectedProductArr.indexOf(val.product_id) > -1) } selectedCityItem: any; selectedCity(e) { this.selectedCityArr = [...e.value]; - this.selectedCityItem = this.m_city.filter(val => this.selectedCityArr.indexOf(val.id) > -1) + this.selectedCityItem = this.m_city.filter(val => this.selectedCityArr.indexOf(val.city_id) > -1) } getEntityIdCityDetails() { @@ -201,34 +429,84 @@ export class DialogEntityAddTatComponent implements OnInit { ); } + + getProductMasters() { + this.mastersService.getAllMasterData('PRODUCTS').subscribe( + data => { + this.m_product = data.records; + }, + error => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + // this.errorMessage = "No Region Master Record Found."; + } + ); + } + + + + getPdTypeMasters() { + this.mastersService.getAllMasterData('PDTYPE').subscribe( + data => { + this.m_pdType = data.records; + }, + error => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + // this.errorMessage = "No Region Master Record Found."; + } + ); + } + + resultApi = ['123', '211']; getIdPdName(id) { - let pdF = this.m_pdType.filter(a => a.id == id); - return pdF[0].name; + let pdF = this.m_pdType.filter(a => a.pd_type_id == id); + let data = { + id: id, + name: pdF[0].type_name + } + return data; } - getIdProductName(id) { - let pdF = this.m_product.filter(a => a.id == id); - return pdF[0].name; + getIdProductName(id) { + let pdF = this.m_product.filter(a => a.product_id == id); + let data = { + id: id, + name: pdF[0].name + } + return data; } getIdCityName(id) { - let pdF = this.m_city.filter(a => a.id == id); - return pdF[0].name; + let pdF = this.m_city.filter(a => a.city_id == id); + let data = { + id: id, + name: pdF[0].name + } + return data; } - public existValArray:any = []; + public existValArray: any = []; + // transactions : [] = new MatTableDataSource(this.existValArray); + + listShow: Boolean = false; + transactions: Transaction[] = []; + tatValue1 = ''; + tatValue2 = ''; onSubmit() { this.submitted = true; if (this.tatForm.invalid) { return } else { + this.listShow = true; let arr1 = this.tatForm.controls['toppings1'].value; let arr2 = this.tatForm.controls['toppings2'].value; - let arr3 = this.tatForm.controls['toppings3'].value - + let arr3 = this.tatForm.controls['toppings3'].value; + + this.tatValue1 = this.tatForm.controls['toppings4'].value; + this.tatValue2 = this.tatForm.controls['toppings5'].value; + let array1 = [...arr1]; let array2 = [...arr2]; let array3 = [...arr3]; @@ -236,24 +514,102 @@ export class DialogEntityAddTatComponent implements OnInit { a1.concat(array2.map(w => v1 + "" + w)), []).reduce((a2, v2, i3) => a2.concat(array3.map(u => v2 + "" + u)), []); + let exist = this.resultApi.filter(a => result1.indexOf(a) > -1); - if(exist){ - // alert(result1); - // alert(exist); - this.existValArray = []; - exist.forEach(a=>{ - let pdName = this.getIdPdName(a[0]); - let productName = this.getIdProductName(a[1]); - let cityName = this.getIdCityName(a[2]); - this.existValArray.push(`${pdName}, ${productName}, ${cityName}`); - }); - } else { - // api add new here + if (exist) { + this.existValArray = []; + result1.forEach(a => { + let pdName = this.getIdPdName(a[0]); + let productName = this.getIdProductName(a[1]); + let cityName = this.getIdCityName(a[2]); + let data = { + pd_type: pdName, + product: productName, + city: cityName + } + this.existValArray.push(data); + }); + this.transactions = this.existValArray; + } else { + // api add new here } } } + onDelete() { + this.selection.selected.map(data => { + let inx = this.transactions.indexOf(data); + this.transactions.splice(inx, 1); + }); + let dataTS = JSON.stringify(this.transactions); + this.transactions.length = 0; + this.transactions = JSON.parse(dataTS); + this.selection.clear(); + } + + onDataSubmit() { + let record: any = {}; + record.fk_entity_id = this.data.entity_id; + record.tat1 = this.tatForm.controls['toppings4'].value; + record.tat2 = this.tatForm.controls['toppings5'].value; + record.child = this.transactions.map(data => { + return `${data.pd_type.id}${data.product.id}${data.city.id}` + }); + this.entityService.saveEntityTATInfo(record).subscribe(data => { + if (data.dataStatus) { + this.dialogRef.close(); + this.notifier.notify('success', 'Your Changes Updated.!'); + } else { + this.notifier.notify('warning', 'No City Master Records Found.!'); + } + }, err => { + this.notifier.notify('warning', 'No City Master Records Found.!'); + }) + } + onNoClick(): void { this.dialogRef.close(); } + + /** Whether the number of selected elements matches the total number of rows. */ + isAllSelected() { + const numSelected = this.selection.selected.length; + const numRows = this.transactions.length; + return numSelected === numRows; + } + + /** Selects all rows if they are not all selected; otherwise clear selection. */ + masterToggle() { + this.isAllSelected() ? + this.selection.clear() : + this.transactions.forEach(row => this.selection.select(row)); + } + + + selection = new SelectionModel(true, []); + displayedColumns: string[] = ['select', 'pd', 'product', 'city']; + // transactions: Transaction[] = [ + // {item: { name :'Beach ball'}, cost: 4}, + // // {item: 'Towel', cost: 5}, + // // {item: 'Frisbee', cost: 2}, + // // {item: 'Sunscreen', cost: 4}, + // // {item: 'Cooler', cost: 25}, + // // {item: 'Swim suit', cost: 15}, + // ]; +} + + +export interface Transaction { + pd_type: { + name: string, + id: any + }, + product: { + name: string, + id: any + }, + city: { + name: string, + id: any + } } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity.module.ts b/ng6-seed/src/app/settings/entity/entity.module.ts index 74a14169f..5826adc71 100755 --- a/ng6-seed/src/app/settings/entity/entity.module.ts +++ b/ng6-seed/src/app/settings/entity/entity.module.ts @@ -31,7 +31,7 @@ import { EntityService } from './../service/entity/entity.service'; import { EntityEditRegionComponent } from './entity-edit/entity-edit-region/entity-edit-region.component'; import { EntityEditTatComponent } from './entity-edit/entity-edit-tat/entity-edit-tat.component'; -import { DialogEntityAddTatComponent } from './entity-edit/entity-edit-tat/entity-edit-tat.component'; +import { DialogEntityAddTatComponent, DialogEntityEditListTatComponent } from './entity-edit/entity-edit-tat/entity-edit-tat.component'; import { EntityEditPriceComponent } from './entity-edit/entity-edit-price/entity-edit-price.component'; import { EntityEditBillingInfoComponent } from './entity-edit/entity-edit-billing-info/entity-edit-billing-info.component'; @@ -113,6 +113,7 @@ const customNotifierOptions: NotifierOptions = { EntityEditRegionComponent, EntityEditTatComponent, DialogEntityAddTatComponent, + DialogEntityEditListTatComponent, EntityEditPriceComponent, EntityEditBillingInfoComponent, DialogAddEditBillingInfo, @@ -123,6 +124,7 @@ const customNotifierOptions: NotifierOptions = { EntityEditComponent, DialogAddEditBillingInfo, DialogEntityAddTatComponent, + DialogEntityEditListTatComponent, EntityAddComponent ], providers : [ diff --git a/ng6-seed/src/app/settings/service/entity/entity.service.ts b/ng6-seed/src/app/settings/service/entity/entity.service.ts index 8fb6020ae..18324ce16 100755 --- a/ng6-seed/src/app/settings/service/entity/entity.service.ts +++ b/ng6-seed/src/app/settings/service/entity/entity.service.ts @@ -186,6 +186,22 @@ export class EntityService { return this._http.post(this.apiUrl + "saveLenderBranches", {'records': Records }); } + saveEntityTATInfo(Records: any): Observable{ + Records.fk_updatedby = this._aws.getlocale(); + Records.fk_createdby = this._aws.getlocale(); + console.log(JSON.stringify(Records)); + return this._http.post(this.apiUrl + "saveTATInfo", {'records': Records }); + } + + getEntityTATInfoDetails(entity_id): Observable{ + return this._http.post(this.apiUrl + "getFullTATInfo", {'records': {"fk_entity_id" : entity_id }}); + } + + deleteTATInfoDetails(record): Observable{ + record.fk_updatedby = this._aws.getlocale(); + return this._http.post(this.apiUrl + "deleteTATCombimaion", {'records': record}); + } + /** * TO Handle The Error