@@ -336,7 +336,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
336
336
//Function to Calculate total savings of the bill amount
337
337
function computeSavings ( dataSource : any ) : number {
338
338
let savings = 0 ;
339
- dataSource . forEach ( ( item : any ) => {
339
+ dataSource . forEach ( ( item ) => {
340
340
const MRP = item . MRP ;
341
341
const Price = item . Price ;
342
342
const Qty = parseFloat ( item . Quantity ) || 0 ;
@@ -364,7 +364,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
364
364
}
365
365
366
366
//Grid action begin event
367
- const actionBegin = ( args : any ) : void => {
367
+ const actionBegin = ( args ) : void => {
368
368
if ( args . requestType === 'save' ) {
369
369
args . index = ( gridInstance . current . pageSettings . currentPage * gridInstance . current . pageSettings . pageSize ) - 1 ;
370
370
productSearchGridInstance . current . clearSelection ( ) ;
@@ -390,16 +390,16 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
390
390
? true
391
391
: false ;
392
392
function printTable (
393
- gridInstance : any ,
394
- shopName : any ,
395
- billNo : any ,
396
- customerName : any ,
397
- phoneNumber : any ,
398
- address : any ,
399
- formattedDateTime : any ,
400
- totalAmount : any ,
401
- savings : any ,
402
- isDoorDelivery : any ,
393
+ gridInstance ,
394
+ shopName ,
395
+ billNo ,
396
+ customerName ,
397
+ phoneNumber ,
398
+ address ,
399
+ formattedDateTime ,
400
+ totalAmount ,
401
+ savings ,
402
+ isDoorDelivery ,
403
403
) {
404
404
let data = gridInstance . dataSource ;
405
405
let columnConfig = gridInstance . columns ;
@@ -513,9 +513,9 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
513
513
514
514
// Data rows
515
515
printWindow . document . write ( "<tbody>" ) ;
516
- data . forEach ( ( item : any ) => {
516
+ data . forEach ( ( item ) => {
517
517
let row = "<tr>" ;
518
- columnConfig . forEach ( ( column : any ) => {
518
+ columnConfig . forEach ( ( column ) => {
519
519
if (
520
520
column . headerText !== "" &&
521
521
column . headerText !== "Product ID" &&
@@ -662,7 +662,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
662
662
} ;
663
663
664
664
//Grid command column delete button - Click event.
665
- const commandClick = ( args : any ) : void => {
665
+ const commandClick = ( arg ) : void => {
666
666
const rowIndex = parseInt (
667
667
args . target . closest ( "tr" ) . getAttribute ( "data-rowindex" ) ,
668
668
10
@@ -694,7 +694,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
694
694
) ;
695
695
if ( product ) {
696
696
const isProductExists = ( gridInstance . current . dataSource as any ) . some (
697
- ( item : any ) => ( item as any ) . ProductID === ( product as any ) . ProductID
697
+ ( item ) => ( item as any ) . ProductID === ( product as any ) . ProductID
698
698
) ;
699
699
if ( isProductExists ) {
700
700
alert ( "Product has already been added." ) ;
@@ -750,7 +750,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
750
750
751
751
const destroyProductIDFn = ( ) => {
752
752
if ( autocompleteIns && productIDInput ) {
753
- autocompleteIns . destroy ( ) ;
753
+ // textBoxIns .destroy();
754
754
productIDInput . removeEventListener ( "keyup" , handleKeyUp ) ; // Remove event listener
755
755
}
756
756
} ;
@@ -759,7 +759,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
759
759
return args . value ;
760
760
} ;
761
761
762
- const writeProductIDFn = ( args : any ) => {
762
+ const writeProductIDFn = ( args ) => {
763
763
autocompleteIns = new AutoComplete ( {
764
764
dataSource : productData . map ( product => ( { ProductID : ( product as any ) . ProductID , ProductName : ( product as any ) . ProductName } ) ) , // Provide your data source
765
765
fields : { value : 'ProductID' } ,
@@ -809,7 +809,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
809
809
810
810
const destroyProductNameFn = ( ) => {
811
811
if ( productNameTextBoxIns && productNameInput ) {
812
- productNameTextBoxIns . destroy ( ) ;
812
+ // productNameTextBoxIns.destroy();
813
813
productNameInput . removeEventListener ( "keyup" , handleproductNameKeyup ) ; // Remove event listener
814
814
}
815
815
} ;
@@ -818,7 +818,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
818
818
return args . value ;
819
819
} ;
820
820
821
- const writeProductNameFn = ( args : any ) => {
821
+ const writeProductNameFn = ( args ) => {
822
822
productNameTextBoxIns = new TextBox ( {
823
823
value : args . rowData [ args . column . field ] ,
824
824
placeholder : "Enter product name" ,
@@ -888,7 +888,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
888
888
return "" ;
889
889
} ;
890
890
891
- const writeQuantityFn = ( args : any ) => {
891
+ const writeQuantityFn = ( args ) => {
892
892
quantityTextBoxIns = new TextBox ( {
893
893
value : args . rowData [ args . column . field ] ,
894
894
placeholder : "Enter quantity" ,
@@ -1018,7 +1018,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
1018
1018
( ) => (
1019
1019
< GridComponent
1020
1020
ref = { gridInstance }
1021
- emptyRecordTemplate = { ( ) : any => null }
1021
+ emptyRecordTemplate = { ( ) => null }
1022
1022
gridLines = "Both"
1023
1023
height = "435px"
1024
1024
width = '100%'
0 commit comments