@openmrs/esm-stock-management-app 1.0.1-pre.420 → 1.0.1-pre.435

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/dist/699.js +1 -0
  2. package/dist/699.js.map +1 -0
  3. package/dist/main.js +1 -1
  4. package/dist/main.js.map +1 -1
  5. package/dist/openmrs-esm-stock-management-app.js +1 -1
  6. package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +28 -28
  7. package/dist/openmrs-esm-stock-management-app.js.map +1 -1
  8. package/dist/routes.json +1 -1
  9. package/package.json +1 -1
  10. package/src/core/api/types/stockItem/StockItemInventory.ts +1 -0
  11. package/src/core/api/types/stockItem/StockItemTransaction.ts +1 -0
  12. package/src/core/components/carbon/controlled-number-input/controlled-number-input.component.tsx +2 -0
  13. package/src/core/components/table/table.component.tsx +1 -1
  14. package/src/core/components/table/table.scss +2 -2
  15. package/src/stock-items/add-stock-item/add-stock-item.component.tsx +1 -1
  16. package/src/stock-items/add-stock-item/batch-information/batch-information-locations/batch-information-locations-filter.component.tsx +58 -0
  17. package/src/stock-items/add-stock-item/batch-information/batch-information.component.tsx +36 -25
  18. package/src/stock-items/add-stock-item/batch-information/batch-information.resource.tsx +15 -7
  19. package/src/stock-items/add-stock-item/dispensing-package-measurement/dispensing-package-measurement.component.tsx +10 -3
  20. package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +27 -7
  21. package/src/stock-items/add-stock-item/quantities/quantities.component.tsx +8 -21
  22. package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.component.tsx +5 -2
  23. package/src/stock-items/add-stock-item/stock-item-units-edit/stock-item-units-edit.component.tsx +4 -0
  24. package/src/stock-items/add-stock-item/transactions/transaction-filters/transaction-locations-filter.component.tsx +57 -0
  25. package/src/stock-items/add-stock-item/transactions/transactions.component.tsx +64 -24
  26. package/src/stock-items/add-stock-item/transactions/transactions.resource.tsx +13 -7
  27. package/src/stock-items/stock-items-table.component.tsx +13 -1
  28. package/src/stock-items/stock-items-table.scss +85 -76
  29. package/src/stock-items/stock-items.resource.ts +0 -6
  30. package/src/stock-locations/stock-locations-table.component.tsx +3 -1
  31. package/src/stock-operations/batch-no-selector/batch-no-selector.component.tsx +2 -3
  32. package/src/stock-operations/stock-operations-table.component.tsx +10 -0
  33. package/src/stock-reports/report-list/stock-reports.component.tsx +13 -1
  34. package/src/stock-sources/stock-sources-items-table.component.tsx +13 -1
  35. package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx +12 -1
  36. package/dist/314.js +0 -1
  37. package/dist/314.js.map +0 -1
@@ -15,8 +15,10 @@ import {
15
15
  Tile,
16
16
  DataTableSkeleton,
17
17
  TableToolbarSearch,
18
+ TableToolbarMenu,
19
+ TableToolbarAction,
18
20
  } from "@carbon/react";
19
- import { isDesktop } from "@openmrs/esm-framework";
21
+ import { isDesktop, restBaseUrl } from "@openmrs/esm-framework";
20
22
  import useStockSourcesPage from "./stock-sources-items-table.resource";
21
23
  import { ResourceRepresentation } from "../core/api/api";
22
24
  import AddStockSourceActionButton from "./add-stock-source-button.component";
@@ -25,11 +27,16 @@ import styles from "./stock-sources.scss";
25
27
  import { useTranslation } from "react-i18next";
26
28
  import StockSourcesDeleteActionMenu from "./stock-sources-delete/stock-sources-delete.component";
27
29
  import EditStockSourceActionsMenu from "./edit-stock-source/edit-stock-source.component";
30
+ import { handleMutate } from "../utils";
28
31
 
29
32
  const StockSourcesItems: React.FC = () => {
30
33
  const { t } = useTranslation();
31
34
  const [selectedSourceType, setSelectedSourceType] = React.useState("");
32
35
 
36
+ const handleRefresh = () => {
37
+ handleMutate(`${restBaseUrl}/stockmanagement/stocksource`);
38
+ };
39
+
33
40
  // get sourcess
34
41
  const {
35
42
  items,
@@ -123,6 +130,11 @@ const StockSourcesItems: React.FC = () => {
123
130
  >
124
131
  <StockSourcesFilter onFilterChange={handleFilterChange} />
125
132
  </div>
133
+ <TableToolbarMenu>
134
+ <TableToolbarAction onClick={handleRefresh}>
135
+ Refresh
136
+ </TableToolbarAction>
137
+ </TableToolbarMenu>
126
138
 
127
139
  <AddStockSourceActionButton />
128
140
  </TableToolbarContent>
@@ -17,10 +17,12 @@ import {
17
17
  TableToolbarContent,
18
18
  TableToolbarSearch,
19
19
  Tile,
20
+ TableToolbarMenu,
21
+ TableToolbarAction,
20
22
  } from "@carbon/react";
21
23
  import styles from "./stock-user-role-scopes.scss";
22
24
  import { ArrowDownLeft, ArrowLeft } from "@carbon/react/icons";
23
- import { isDesktop, useSession } from "@openmrs/esm-framework";
25
+ import { isDesktop, restBaseUrl, useSession } from "@openmrs/esm-framework";
24
26
  import { ResourceRepresentation } from "../core/api/api";
25
27
  import useStockUserRoleScopesPage from "./stock-user-role-scopes-items-table.resource";
26
28
  import AddStockUserRoleScopeActionButton from "./add-stock-user-role-scope-button.component";
@@ -28,11 +30,15 @@ import { formatDisplayDate } from "../core/utils/datetimeUtils";
28
30
  import EditStockUserRoleActionsMenu from "./edit-stock-user-scope/edit-stock-user-scope-action-menu.component";
29
31
  import StockUserScopeDeleteActionMenu from "./delete-stock-user-scope/delete-stock-user-scope.component";
30
32
  import { URL_USER_ROLE_SCOPE } from "../constants";
33
+ import { handleMutate } from "../utils";
31
34
 
32
35
  function StockUserRoleScopesItems() {
33
36
  const { t } = useTranslation();
34
37
 
35
38
  const currentUser = useSession();
39
+ const handleRefresh = () => {
40
+ handleMutate(`${restBaseUrl}/stockmanagement/userrolescope`);
41
+ };
36
42
 
37
43
  // get user scopes
38
44
  const {
@@ -192,6 +198,11 @@ function StockUserRoleScopesItems() {
192
198
  >
193
199
  <TableToolbarContent className={styles.toolbarContent}>
194
200
  <TableToolbarSearch persistent onChange={onInputChange} />
201
+ <TableToolbarMenu>
202
+ <TableToolbarAction onClick={handleRefresh}>
203
+ Refresh
204
+ </TableToolbarAction>
205
+ </TableToolbarMenu>
195
206
  <AddStockUserRoleScopeActionButton />
196
207
  </TableToolbarContent>
197
208
  </TableToolbar>