@asaleh37/ui-base 1.2.26 → 1.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -33,10 +33,16 @@ const getGridColumnsFromRecord = (data: Array<any>) => {
33
33
  };
34
34
 
35
35
  const ExcelReportViewer: React.FC<ExcelReportViewerProps> = (props) => {
36
- console.log("reportdata", props.reportData);
36
+ const [data, setData] = useState([]);
37
+ useEffect(() => {
38
+ const newData = props.reportData.map((record, index) => {
39
+ return { ...record, report_record_data_key: index };
40
+ });
41
+ setData(newData);
42
+ }, [props.reportData]);
37
43
  return (
38
44
  <TemplateGrid
39
- data={props.reportData}
45
+ data={data}
40
46
  disableDefaultAction={true}
41
47
  setData={props.setReportData}
42
48
  formElements={getGridColumnsFromRecord(props.reportData)}
@@ -47,6 +53,7 @@ const ExcelReportViewer: React.FC<ExcelReportViewerProps> = (props) => {
47
53
  girdIcon={"file-excel"}
48
54
  gridTitle="Report"
49
55
  autoLoad={true}
56
+ keyColumnName={"report_record_data_key"}
50
57
  hideInfoBar={true}
51
58
  apiActions={{
52
59
  deleteRecordById: async () => {
package/src/main.tsx CHANGED
@@ -1,11 +1,10 @@
1
- import { StrictMode } from "react";
2
1
  import { createRoot } from "react-dom/client";
3
2
  import { BaseApp } from "./components";
4
- // import logo from "./assets/logo.png";
3
+
5
4
 
6
5
  createRoot(document.getElementById("root")!).render(
7
6
  <BaseApp
8
- apiBaseUrl="http://localhost:8080/api-base"
7
+ apiBaseUrl="http://localhost:8080/ezz-residual"
9
8
  appLogo={"/public/logo.png"}
10
9
  appName="UI Base Library"
11
10
  appVersion="0.0"