Skip to content

Commit cd9ffbc

Browse files
932529: Need to change the UI design in super market use case sample
1 parent 8a5a0d1 commit cd9ffbc

File tree

1 file changed

+22
-22
lines changed
  • Inventory Management and Invoice Generating/Inventory Application/src

1 file changed

+22
-22
lines changed

Inventory Management and Invoice Generating/Inventory Application/src/App.tsx

+22-22
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
336336
//Function to Calculate total savings of the bill amount
337337
function computeSavings(dataSource: any): number {
338338
let savings = 0;
339-
dataSource.forEach((item: any) => {
339+
dataSource.forEach((item) => {
340340
const MRP = item.MRP;
341341
const Price = item.Price;
342342
const Qty = parseFloat(item.Quantity) || 0;
@@ -364,7 +364,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
364364
}
365365

366366
//Grid action begin event
367-
const actionBegin = (args: any): void => {
367+
const actionBegin = (args): void => {
368368
if (args.requestType === 'save') {
369369
args.index = (gridInstance.current.pageSettings.currentPage * gridInstance.current.pageSettings.pageSize) - 1;
370370
productSearchGridInstance.current.clearSelection();
@@ -390,16 +390,16 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
390390
? true
391391
: false;
392392
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,
403403
) {
404404
let data = gridInstance.dataSource;
405405
let columnConfig = gridInstance.columns;
@@ -513,9 +513,9 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
513513

514514
// Data rows
515515
printWindow.document.write("<tbody>");
516-
data.forEach((item: any) => {
516+
data.forEach((item) => {
517517
let row = "<tr>";
518-
columnConfig.forEach((column: any) => {
518+
columnConfig.forEach((column) => {
519519
if (
520520
column.headerText !== "" &&
521521
column.headerText !== "Product ID" &&
@@ -662,7 +662,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
662662
};
663663

664664
//Grid command column delete button - Click event.
665-
const commandClick = (args: any): void => {
665+
const commandClick = (arg): void => {
666666
const rowIndex = parseInt(
667667
args.target.closest("tr").getAttribute("data-rowindex"),
668668
10
@@ -694,7 +694,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
694694
);
695695
if (product) {
696696
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
698698
);
699699
if (isProductExists) {
700700
alert("Product has already been added.");
@@ -750,7 +750,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
750750

751751
const destroyProductIDFn = () => {
752752
if (autocompleteIns && productIDInput) {
753-
autocompleteIns.destroy();
753+
// textBoxIns.destroy();
754754
productIDInput.removeEventListener("keyup", handleKeyUp); // Remove event listener
755755
}
756756
};
@@ -759,7 +759,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
759759
return args.value;
760760
};
761761

762-
const writeProductIDFn = (args: any) => {
762+
const writeProductIDFn = (args) => {
763763
autocompleteIns = new AutoComplete({
764764
dataSource: productData.map(product => ({ ProductID: (product as any).ProductID, ProductName: (product as any).ProductName })), // Provide your data source
765765
fields: { value: 'ProductID' },
@@ -809,7 +809,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
809809

810810
const destroyProductNameFn = () => {
811811
if (productNameTextBoxIns && productNameInput) {
812-
productNameTextBoxIns.destroy();
812+
// productNameTextBoxIns.destroy();
813813
productNameInput.removeEventListener("keyup", handleproductNameKeyup); // Remove event listener
814814
}
815815
};
@@ -818,7 +818,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
818818
return args.value;
819819
};
820820

821-
const writeProductNameFn = (args: any) => {
821+
const writeProductNameFn = (args) => {
822822
productNameTextBoxIns = new TextBox({
823823
value: args.rowData[args.column.field],
824824
placeholder: "Enter product name",
@@ -888,7 +888,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
888888
return "";
889889
};
890890

891-
const writeQuantityFn = (args: any) => {
891+
const writeQuantityFn = (args) => {
892892
quantityTextBoxIns = new TextBox({
893893
value: args.rowData[args.column.field],
894894
placeholder: "Enter quantity",
@@ -1018,7 +1018,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
10181018
() => (
10191019
<GridComponent
10201020
ref={gridInstance}
1021-
emptyRecordTemplate={(): any => null}
1021+
emptyRecordTemplate={() => null}
10221022
gridLines="Both"
10231023
height="435px"
10241024
width='100%'

0 commit comments

Comments
 (0)