mirror of
https://github.com/dyiop/astute.git
synced 2025-04-06 21:30:20 -04:00
minor bug fixes
This commit is contained in:
parent
3a1c9a45e7
commit
90ce18f698
|
@ -18,7 +18,6 @@
|
||||||
(rowDataChanged)="resizeColumns($event)"
|
(rowDataChanged)="resizeColumns($event)"
|
||||||
rowSelection="single"
|
rowSelection="single"
|
||||||
rowDeselection="true"
|
rowDeselection="true"
|
||||||
suppressHorizontalScroll="false"
|
|
||||||
></ag-grid-angular>
|
></ag-grid-angular>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -120,6 +120,7 @@ export class CustomerComponent implements OnInit {
|
||||||
// callback for grid selection
|
// callback for grid selection
|
||||||
setSelectedRow(event) {
|
setSelectedRow(event) {
|
||||||
this.selected = event.data;
|
this.selected = event.data;
|
||||||
|
this.contactsData = this.astuteClientService.getCustomerContacts(this.selected.customerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wrappers for customer service methods
|
// wrappers for customer service methods
|
||||||
|
@ -306,10 +307,13 @@ export class CustomerComponent implements OnInit {
|
||||||
// opening and closing modal-form components
|
// opening and closing modal-form components
|
||||||
open(ref) {
|
open(ref) {
|
||||||
// this.getSelectedRows();
|
// this.getSelectedRows();
|
||||||
if (this.selected) {
|
|
||||||
this.contactsData = this.astuteClientService.getCustomerContacts(this.selected.customerId);
|
|
||||||
}
|
|
||||||
ref.open();
|
ref.open();
|
||||||
|
if (this.gridColumnApi) {
|
||||||
|
this.gridColumnApi.autoSizeAllColumns();
|
||||||
|
}
|
||||||
|
if (this.contactColumnApi) {
|
||||||
|
this.contactColumnApi.autoSizeAllColumns();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
close(ref) {
|
close(ref) {
|
||||||
ref.close();
|
ref.close();
|
||||||
|
@ -325,6 +329,7 @@ export class CustomerComponent implements OnInit {
|
||||||
}
|
}
|
||||||
refreshContactData(customerId) {
|
refreshContactData(customerId) {
|
||||||
this.contactsData = this.astuteClientService.getCustomerContacts(customerId);
|
this.contactsData = this.astuteClientService.getCustomerContacts(customerId);
|
||||||
|
this.contactColumnApi.autoSizeColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
// on each grid ready: sets api's and enable auto-resizing
|
// on each grid ready: sets api's and enable auto-resizing
|
||||||
|
|
|
@ -384,13 +384,13 @@ export class InvoiceComponent implements OnInit {
|
||||||
// open(content, indexPO, indexINV) {
|
// open(content, indexPO, indexINV) {
|
||||||
open(content) {
|
open(content) {
|
||||||
// this.setCorrespondingCustomer();
|
// this.setCorrespondingCustomer();
|
||||||
|
content.open();
|
||||||
if (this.gridColumnApi) {
|
if (this.gridColumnApi) {
|
||||||
this.gridColumnApi.autoSizeAllColumns();
|
this.gridColumnApi.autoSizeAllColumns();
|
||||||
}
|
}
|
||||||
if (this.detailColumnApi) {
|
if (this.detailColumnApi) {
|
||||||
this.detailColumnApi.autoSizeAllColumns();
|
this.detailColumnApi.autoSizeAllColumns();
|
||||||
}
|
}
|
||||||
content.open();
|
|
||||||
// this.detailDescription = ViewChild('detailDescription');
|
// this.detailDescription = ViewChild('detailDescription');
|
||||||
// this.detailAmount = ViewChild('detailAmount');
|
// this.detailAmount = ViewChild('detailAmount');
|
||||||
// this.detailRate = ViewChild('detailRate');
|
// this.detailRate = ViewChild('detailRate');
|
||||||
|
@ -414,10 +414,10 @@ export class InvoiceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrDate() {
|
getCurrDate() {
|
||||||
let d = new Date(),
|
const d = new Date();
|
||||||
month = '' + (d.getMonth() + 1),
|
let month = '' + (d.getMonth() + 1),
|
||||||
day = '' + d.getDate(),
|
day = '' + d.getDate();
|
||||||
year = d.getFullYear();
|
const year = d.getFullYear();
|
||||||
|
|
||||||
if (month.length < 2) month = '0' + month;
|
if (month.length < 2) month = '0' + month;
|
||||||
if (day.length < 2) day = '0' + day;
|
if (day.length < 2) day = '0' + day;
|
||||||
|
@ -428,8 +428,8 @@ export class InvoiceComponent implements OnInit {
|
||||||
|
|
||||||
formatDate(d: Date) {
|
formatDate(d: Date) {
|
||||||
let month = '' + (d.getMonth() + 1),
|
let month = '' + (d.getMonth() + 1),
|
||||||
day = '' + d.getDate(),
|
day = '' + d.getDate();
|
||||||
year = d.getFullYear();
|
const year = d.getFullYear();
|
||||||
|
|
||||||
if (month.length < 2) {
|
if (month.length < 2) {
|
||||||
month = '0' + month;
|
month = '0' + month;
|
||||||
|
|
|
@ -276,13 +276,13 @@ export class SalesOrderComponent implements OnInit {
|
||||||
// open and closing modal-form components
|
// open and closing modal-form components
|
||||||
open(ref) {
|
open(ref) {
|
||||||
// this.getSelectedRows();
|
// this.getSelectedRows();
|
||||||
|
ref.open();
|
||||||
if (this.gridColumnApi) {
|
if (this.gridColumnApi) {
|
||||||
this.gridColumnApi.autoSizeAllColumns();
|
this.gridColumnApi.autoSizeAllColumns();
|
||||||
}
|
}
|
||||||
if (this.detailColumnApi) {
|
if (this.detailColumnApi) {
|
||||||
this.detailColumnApi.autoSizeAllColumns();
|
this.detailColumnApi.autoSizeAllColumns();
|
||||||
}
|
}
|
||||||
ref.open();
|
|
||||||
}
|
}
|
||||||
close(ref) {
|
close(ref) {
|
||||||
// this.newPODetail = [];
|
// this.newPODetail = [];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user