@asaleh37/ui-base 25.9.6-5 → 25.9.15

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": "25.9.6-5",
3
+ "version": "25.9.15",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -127,6 +127,7 @@ export type TemplateGridProps = {
127
127
  enableExport?: boolean;
128
128
  enableDensitySelector?: boolean;
129
129
  hideInfoBar?: boolean;
130
+ hideCreateBtn?: boolean;
130
131
  hideBackButton?: boolean;
131
132
  apiActions: ApiActions;
132
133
  rowSelectionModel?: GridRowSelectionModel;
@@ -83,13 +83,18 @@ const TemplateGridTopBar: React.FC<TemplateGridTopBarProps> = (
83
83
  {isCreationEnabled &&
84
84
  isCreationAuthorized &&
85
85
  props?.templateProps?.editMode?.editMode != "none" ? (
86
- <Button onClick={props?.handleCreateNewRecord}>
87
- <FontAwesomeIcon
88
- icon="add"
89
- style={{ marginRight: 5, marginLeft: 5 }}
90
- />
91
- {t("ADD_BTN_LABEL")}
92
- </Button>
86
+ props?.templateProps?.hideCreateBtn === undefined ||
87
+ props?.templateProps?.hideCreateBtn === false ? (
88
+ <Button onClick={props?.handleCreateNewRecord}>
89
+ <FontAwesomeIcon
90
+ icon="add"
91
+ style={{ marginRight: 5, marginLeft: 5 }}
92
+ />
93
+ {t("ADD_BTN_LABEL")}
94
+ </Button>
95
+ ) : (
96
+ <></>
97
+ )
93
98
  ) : (
94
99
  <></>
95
100
  )}