aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx')
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx
new file mode 100644
index 000000000..5673d1778
--- /dev/null
+++ b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.tsx
@@ -0,0 +1,19 @@
+import { createExternal,IExternalTableState } from '../../../../framework/src/components/material-table/utilities';
+import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch';
+
+import { InventoryType } from '../models/inventory';
+
+export interface IInventoryElementsState extends IExternalTableState<InventoryType> { }
+
+// create eleactic search material data fetch handler
+const inventoryElementsSearchHandler = createSearchDataHandler<InventoryType>("sdnevents/inventoryequipment");
+
+export const {
+ actionHandler: inventoryElementsActionHandler,
+ createActions: createInventoryElementsActions,
+ createProperties: createInventoryElementsProperties,
+ reloadAction: inventoryElementsReloadAction,
+
+ // set value action, to change a value
+} = createExternal<InventoryType>(inventoryElementsSearchHandler, appState => appState.inventory.inventoryElements);
+