@openmrs/esm-stock-management-app 1.0.1-pre.327

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +39 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +14 -0
  7. package/.turbo.json +18 -0
  8. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  9. package/LICENSE +401 -0
  10. package/README.md +3 -0
  11. package/__mocks__/react-i18next.js +55 -0
  12. package/dist/26.js +2 -0
  13. package/dist/26.js.LICENSE.txt +32 -0
  14. package/dist/26.js.map +1 -0
  15. package/dist/294.js +2 -0
  16. package/dist/294.js.LICENSE.txt +9 -0
  17. package/dist/294.js.map +1 -0
  18. package/dist/375.js +2 -0
  19. package/dist/375.js.LICENSE.txt +40 -0
  20. package/dist/375.js.map +1 -0
  21. package/dist/46.js +1 -0
  22. package/dist/46.js.map +1 -0
  23. package/dist/484.js +1 -0
  24. package/dist/484.js.map +1 -0
  25. package/dist/574.js +1 -0
  26. package/dist/629.js +1 -0
  27. package/dist/629.js.map +1 -0
  28. package/dist/707.js +1 -0
  29. package/dist/707.js.map +1 -0
  30. package/dist/800.js +2 -0
  31. package/dist/800.js.LICENSE.txt +3 -0
  32. package/dist/800.js.map +1 -0
  33. package/dist/935.js +2 -0
  34. package/dist/935.js.LICENSE.txt +19 -0
  35. package/dist/935.js.map +1 -0
  36. package/dist/979.js +1 -0
  37. package/dist/979.js.map +1 -0
  38. package/dist/main.js +2 -0
  39. package/dist/main.js.LICENSE.txt +60 -0
  40. package/dist/main.js.map +1 -0
  41. package/dist/openmrs-esm-stock-management-app.js +1 -0
  42. package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +356 -0
  43. package/dist/openmrs-esm-stock-management-app.js.map +1 -0
  44. package/dist/routes.json +1 -0
  45. package/i18next-parser.config.js +89 -0
  46. package/jest.config.js +25 -0
  47. package/package.json +116 -0
  48. package/src/config-schema.ts +18 -0
  49. package/src/constants.ts +214 -0
  50. package/src/core/api/api.ts +34 -0
  51. package/src/core/api/types/Auditable.ts +9 -0
  52. package/src/core/api/types/BaseOpenmrsData.ts +4 -0
  53. package/src/core/api/types/BaseOpenmrsMetadata.ts +6 -0
  54. package/src/core/api/types/BaseOpenmrsObject.ts +3 -0
  55. package/src/core/api/types/BatchJob.ts +121 -0
  56. package/src/core/api/types/DashboardExtension.ts +8 -0
  57. package/src/core/api/types/Location.ts +16 -0
  58. package/src/core/api/types/LocationTree.ts +7 -0
  59. package/src/core/api/types/OpenmrsData.ts +5 -0
  60. package/src/core/api/types/OpenmrsMetadata.ts +8 -0
  61. package/src/core/api/types/OpenmrsObject.ts +3 -0
  62. package/src/core/api/types/PageableResult.ts +15 -0
  63. package/src/core/api/types/Party.ts +8 -0
  64. package/src/core/api/types/RecordPermission.ts +9 -0
  65. package/src/core/api/types/Retireable.ts +9 -0
  66. package/src/core/api/types/Voidable.ts +9 -0
  67. package/src/core/api/types/concept/Concept.ts +24 -0
  68. package/src/core/api/types/concept/ConceptName.ts +14 -0
  69. package/src/core/api/types/concept/Drug.ts +14 -0
  70. package/src/core/api/types/identity/Credentials.ts +4 -0
  71. package/src/core/api/types/identity/Patient.ts +3 -0
  72. package/src/core/api/types/identity/Person.ts +4 -0
  73. package/src/core/api/types/identity/PriviledgeScope.ts +9 -0
  74. package/src/core/api/types/identity/Privilege.ts +5 -0
  75. package/src/core/api/types/identity/Role.ts +5 -0
  76. package/src/core/api/types/identity/Session.ts +16 -0
  77. package/src/core/api/types/identity/User.ts +19 -0
  78. package/src/core/api/types/identity/UserRoleScope.ts +17 -0
  79. package/src/core/api/types/identity/UserRoleScopeLocation.ts +7 -0
  80. package/src/core/api/types/identity/UserRoleScopeOperationType.ts +6 -0
  81. package/src/core/api/types/stockItem/ImportResult.ts +9 -0
  82. package/src/core/api/types/stockItem/StockBatch.ts +8 -0
  83. package/src/core/api/types/stockItem/StockBatchDTO.ts +8 -0
  84. package/src/core/api/types/stockItem/StockItem.ts +63 -0
  85. package/src/core/api/types/stockItem/StockItemInventory.ts +10 -0
  86. package/src/core/api/types/stockItem/StockItemPackagingUOM.ts +20 -0
  87. package/src/core/api/types/stockItem/StockItemTransaction.ts +22 -0
  88. package/src/core/api/types/stockItem/StockRule.ts +28 -0
  89. package/src/core/api/types/stockOperation/LocationType.ts +4 -0
  90. package/src/core/api/types/stockOperation/StockOperation.ts +36 -0
  91. package/src/core/api/types/stockOperation/StockOperationAction.ts +24 -0
  92. package/src/core/api/types/stockOperation/StockOperationDTO.ts +64 -0
  93. package/src/core/api/types/stockOperation/StockOperationItem.ts +13 -0
  94. package/src/core/api/types/stockOperation/StockOperationItemCost.ts +14 -0
  95. package/src/core/api/types/stockOperation/StockOperationItemDTO.ts +29 -0
  96. package/src/core/api/types/stockOperation/StockOperationLinkDTO.ts +13 -0
  97. package/src/core/api/types/stockOperation/StockOperationStatus.ts +18 -0
  98. package/src/core/api/types/stockOperation/StockOperationType.ts +162 -0
  99. package/src/core/api/types/stockOperation/StockSource.ts +8 -0
  100. package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.component.tsx +37 -0
  101. package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.resource.tsx +0 -0
  102. package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.scss +0 -0
  103. package/src/core/components/carbon/controlled-combo-box/controlled-combo-box.test.tsx +8 -0
  104. package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.component.tsx +40 -0
  105. package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.resource.tsx +0 -0
  106. package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.scss +0 -0
  107. package/src/core/components/carbon/controlled-dropdown/controlled-dropdown.test.tsx +8 -0
  108. package/src/core/components/carbon/controlled-number-input/controlled-number-input.component.tsx +44 -0
  109. package/src/core/components/carbon/controlled-number-input/controlled-number-input.resource.tsx +0 -0
  110. package/src/core/components/carbon/controlled-number-input/controlled-number-input.scss +0 -0
  111. package/src/core/components/carbon/controlled-number-input/controlled-number-input.test.tsx +8 -0
  112. package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.component.tsx +54 -0
  113. package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.resource.tsx +0 -0
  114. package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.scss +0 -0
  115. package/src/core/components/carbon/controlled-radio-button-group/controlled-radio-button-group.test.tsx +8 -0
  116. package/src/core/components/carbon/controlled-text-area/controlled-text-area.component.tsx +37 -0
  117. package/src/core/components/carbon/controlled-text-area/controlled-text-area.resource.tsx +0 -0
  118. package/src/core/components/carbon/controlled-text-area/controlled-text-area.scss +0 -0
  119. package/src/core/components/carbon/controlled-text-area/controlled-text-area.test.tsx +11 -0
  120. package/src/core/components/carbon/controlled-text-input/controlled-text-input.component.tsx +37 -0
  121. package/src/core/components/carbon/controlled-text-input/controlled-text-input.resource.tsx +0 -0
  122. package/src/core/components/carbon/controlled-text-input/controlled-text-input.scss +0 -0
  123. package/src/core/components/carbon/controlled-text-input/controlled-text-input.test.tsx +8 -0
  124. package/src/core/components/carbon/types.ts +7 -0
  125. package/src/core/components/card/metrics-card-component.tsx +102 -0
  126. package/src/core/components/card/metrics-card.scss +78 -0
  127. package/src/core/components/overlay/hook.ts +47 -0
  128. package/src/core/components/overlay/overlay.component.tsx +52 -0
  129. package/src/core/components/overlay/overlay.scss +97 -0
  130. package/src/core/components/side-nav/side-nav.component.tsx +62 -0
  131. package/src/core/components/side-nav/side-nav.scss +126 -0
  132. package/src/core/components/side-nav/types.ts +6 -0
  133. package/src/core/components/table/table.component.tsx +239 -0
  134. package/src/core/components/table/table.scss +173 -0
  135. package/src/core/components/table/types.ts +8 -0
  136. package/src/core/components/tabs/types.ts +7 -0
  137. package/src/core/components/tabs/vertical-tabs.component.tsx +53 -0
  138. package/src/core/components/tabs/vertical-tabs.scss +126 -0
  139. package/src/core/hooks/debounce-hook.ts +35 -0
  140. package/src/core/print/PrintStyles.ts +774 -0
  141. package/src/core/print/PrintTemplate.ts +65 -0
  142. package/src/core/print/printUtils.ts +19 -0
  143. package/src/core/utils/alert.ts +10 -0
  144. package/src/core/utils/datetimeUtils.ts +84 -0
  145. package/src/core/utils/debounce.ts +21 -0
  146. package/src/core/utils/imageUtils.ts +82 -0
  147. package/src/core/utils/stringUtils.ts +27 -0
  148. package/src/core/utils/utils.ts +70 -0
  149. package/src/createDashboardLink.tsx +43 -0
  150. package/src/dashboard/stock-management-dashboard-side-nav.component.tsx +50 -0
  151. package/src/dashboard/stock-management-dashboard.component.tsx +41 -0
  152. package/src/dashboard/stock-management-dashboard.scss +8 -0
  153. package/src/dashboard.meta.ts +5 -0
  154. package/src/declarations.d.ts +6 -0
  155. package/src/index.ts +64 -0
  156. package/src/root.component.tsx +12 -0
  157. package/src/root.scss +174 -0
  158. package/src/routes.json +53 -0
  159. package/src/setup-tests.ts +1 -0
  160. package/src/stock-app-menu-item/item.component.tsx +21 -0
  161. package/src/stock-app-menu-item/item.resource.ts +0 -0
  162. package/src/stock-app-menu-item/item.scss +17 -0
  163. package/src/stock-batch/stock-batch.resource.ts +79 -0
  164. package/src/stock-home/stock-home-detail-card.scss +211 -0
  165. package/src/stock-home/stock-home-detail-cards.component.tsx +62 -0
  166. package/src/stock-home/stock-home-inventory-card.component.tsx +80 -0
  167. package/src/stock-home/stock-home-inventory-expiry.resource.tsx +32 -0
  168. package/src/stock-home/stock-home-inventory-items.resource.tsx +28 -0
  169. package/src/stock-home/stock-home-issuing-card.component.tsx +84 -0
  170. package/src/stock-home/stock-home-issuing.resource.tsx +18 -0
  171. package/src/stock-home/stock-home-landing-page-component.tsx +14 -0
  172. package/src/stock-home/stock-home-metrics.tsx +112 -0
  173. package/src/stock-home/stock-home-receiving-card.component.tsx +66 -0
  174. package/src/stock-home/stock-home-receiving.resource.tsx +17 -0
  175. package/src/stock-home/stock-home.scss +13 -0
  176. package/src/stock-home/useDisposalList.tsx +18 -0
  177. package/src/stock-home/useStockList.tsx +36 -0
  178. package/src/stock-items/add-bulk-stock-item/add-stock-items-bulk-import-action-button.component.tsx +26 -0
  179. package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.component.tsx +109 -0
  180. package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.resource.ts +14 -0
  181. package/src/stock-items/add-bulk-stock-item/stock-items-bulk-import.scss +0 -0
  182. package/src/stock-items/add-stock-item/add-stock-action-button.component.tsx +21 -0
  183. package/src/stock-items/add-stock-item/add-stock-item.component.tsx +84 -0
  184. package/src/stock-items/add-stock-item/add-stock-item.resource.tsx +36 -0
  185. package/src/stock-items/add-stock-item/add-stock-item.scss +5 -0
  186. package/src/stock-items/add-stock-item/batch-information/batch-information.component.tsx +98 -0
  187. package/src/stock-items/add-stock-item/batch-information/batch-information.resource.tsx +71 -0
  188. package/src/stock-items/add-stock-item/batch-information/batch-information.scss +0 -0
  189. package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.component.tsx +79 -0
  190. package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.resource.tsx +0 -0
  191. package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.scss +0 -0
  192. package/src/stock-items/add-stock-item/concepts-selector/concepts-selector.test.tsx +8 -0
  193. package/src/stock-items/add-stock-item/dispensing-package-measurement/dispensing-package-measurement.component.tsx +76 -0
  194. package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.component.tsx +66 -0
  195. package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.resource.tsx +0 -0
  196. package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.scss +0 -0
  197. package/src/stock-items/add-stock-item/dispensing-unit-selector/dispensing-unit-selector.test.tsx +8 -0
  198. package/src/stock-items/add-stock-item/drug-selector/drug-selector.component.tsx +83 -0
  199. package/src/stock-items/add-stock-item/drug-selector/drug-selector.resource.tsx +50 -0
  200. package/src/stock-items/add-stock-item/drug-selector/drug-selector.scss +0 -0
  201. package/src/stock-items/add-stock-item/packaging-units/packaging-units.component.tsx +255 -0
  202. package/src/stock-items/add-stock-item/packaging-units/packaging-units.resource.tsx +38 -0
  203. package/src/stock-items/add-stock-item/packaging-units/packaging-units.scss +21 -0
  204. package/src/stock-items/add-stock-item/packaging-units/validationSchema.ts +14 -0
  205. package/src/stock-items/add-stock-item/packaging-units-concept-selector/packaging-units-concept-selector.component.tsx +95 -0
  206. package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.component.tsx +70 -0
  207. package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.resource.tsx +0 -0
  208. package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.scss +0 -0
  209. package/src/stock-items/add-stock-item/preferred-vendor-selector/preferred-vendor-selector.test.tsx +8 -0
  210. package/src/stock-items/add-stock-item/quantities/quantities.component.tsx +83 -0
  211. package/src/stock-items/add-stock-item/quantities/quantities.resource.tsx +69 -0
  212. package/src/stock-items/add-stock-item/quantities/quantities.scss +0 -0
  213. package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.component.tsx +67 -0
  214. package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.resource.tsx +0 -0
  215. package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.scss +0 -0
  216. package/src/stock-items/add-stock-item/stock-item-category-selector/stock-item-category-selector.test.tsx +8 -0
  217. package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.component.tsx +239 -0
  218. package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.resource.tsx +14 -0
  219. package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.scss +13 -0
  220. package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rule-button.component.tsx +30 -0
  221. package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.component.tsx +424 -0
  222. package/src/stock-items/add-stock-item/stock-item-rules/add-stock-rules.scss +18 -0
  223. package/src/stock-items/add-stock-item/stock-item-rules/delete-stock-rule-modal.component.tsx +47 -0
  224. package/src/stock-items/add-stock-item/stock-item-rules/edit-stock-rule.component.tsx +37 -0
  225. package/src/stock-items/add-stock-item/stock-item-rules/edit-stock-rule.scss +0 -0
  226. package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.component.tsx +222 -0
  227. package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.resource.tsx +72 -0
  228. package/src/stock-items/add-stock-item/stock-item-rules/stock-item-rules.scss +13 -0
  229. package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-delete.component.tsx +67 -0
  230. package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-delete.scss +0 -0
  231. package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-filter.component.tsx +38 -0
  232. package/src/stock-items/add-stock-item/stock-item-rules/stock-rules-filter.scss +13 -0
  233. package/src/stock-items/add-stock-item/stock-item-rules/stock-rules.resource.ts +79 -0
  234. package/src/stock-items/add-stock-item/stock-item-units-edit/stock-item-units-edit.component.tsx +132 -0
  235. package/src/stock-items/add-stock-item/stock-rules/stock-rules.component.tsx +16 -0
  236. package/src/stock-items/add-stock-item/stock-rules/stock-rules.resource.tsx +0 -0
  237. package/src/stock-items/add-stock-item/stock-rules/stock-rules.scss +0 -0
  238. package/src/stock-items/add-stock-item/transactions/transactions.component.tsx +151 -0
  239. package/src/stock-items/add-stock-item/transactions/transactions.resource.tsx +109 -0
  240. package/src/stock-items/add-stock-item/transactions/transactions.scss +0 -0
  241. package/src/stock-items/components/filter-stock-items/filter-stock-items.component.tsx +28 -0
  242. package/src/stock-items/components/filter-stock-items/filter-stock-items.resource.tsx +0 -0
  243. package/src/stock-items/components/filter-stock-items/filter-stock-items.scss +3 -0
  244. package/src/stock-items/edit-stock-item/edit-stock-item-action-menu.component.tsx +30 -0
  245. package/src/stock-items/stock-item.utils.tsx +62 -0
  246. package/src/stock-items/stock-items-table.component.tsx +266 -0
  247. package/src/stock-items/stock-items-table.resource.ts +58 -0
  248. package/src/stock-items/stock-items-table.scss +66 -0
  249. package/src/stock-items/stock-items.component.tsx +12 -0
  250. package/src/stock-items/stock-items.resource.ts +365 -0
  251. package/src/stock-items/types.ts +8 -0
  252. package/src/stock-items/validationSchema.ts +67 -0
  253. package/src/stock-locations/stock-locations-table.component.tsx +69 -0
  254. package/src/stock-locations/stock-locations-table.resource.tsx +73 -0
  255. package/src/stock-locations/stock-locations-table.scss +0 -0
  256. package/src/stock-locations/stock-locations.component.tsx +12 -0
  257. package/src/stock-locations/stock-locations.resource.ts +0 -0
  258. package/src/stock-lookups/stock-lookups.resource.ts +306 -0
  259. package/src/stock-management-admin-card-link.component.tsx +29 -0
  260. package/src/stock-management-header/stock-management-Illustration.tsx +35 -0
  261. package/src/stock-management-header/stock-management-header.component.tsx +37 -0
  262. package/src/stock-management-header/stock-management-header.scss +58 -0
  263. package/src/stock-management.component.tsx +6 -0
  264. package/src/stock-operations/add-stock-operation/add-stock-operation.component.tsx +491 -0
  265. package/src/stock-operations/add-stock-operation/add-stock-operation.resource.tsx +33 -0
  266. package/src/stock-operations/add-stock-operation/add-stock-operation.scss +44 -0
  267. package/src/stock-operations/add-stock-operation/add-stock-operation.utils.tsx +241 -0
  268. package/src/stock-operations/add-stock-operation/add-stock-utils.ts +110 -0
  269. package/src/stock-operations/add-stock-operation/base-operation-details.component.tsx +352 -0
  270. package/src/stock-operations/add-stock-operation/stock-items-addition-row.component.tsx +347 -0
  271. package/src/stock-operations/add-stock-operation/stock-items-addition-row.resource.tsx +0 -0
  272. package/src/stock-operations/add-stock-operation/stock-items-addition-row.scss +0 -0
  273. package/src/stock-operations/add-stock-operation/stock-items-addition-row.test.tsx +11 -0
  274. package/src/stock-operations/add-stock-operation/stock-items-addition.component.scss +5 -0
  275. package/src/stock-operations/add-stock-operation/stock-items-addition.component.tsx +272 -0
  276. package/src/stock-operations/add-stock-operation/stock-operation-context/useStockOperationContext.tsx +22 -0
  277. package/src/stock-operations/add-stock-operation/stock-operation-submission.component.tsx +188 -0
  278. package/src/stock-operations/add-stock-operation/types.ts +55 -0
  279. package/src/stock-operations/add-stock-operation/validationSchema.ts +45 -0
  280. package/src/stock-operations/batch-no-selector/batch-no-selector.component.tsx +100 -0
  281. package/src/stock-operations/batch-no-selector/batch-no-selector.resource.tsx +46 -0
  282. package/src/stock-operations/batch-no-selector/batch-no-selector.scss +0 -0
  283. package/src/stock-operations/batch-no-selector/batch-no-selector.test.tsx +11 -0
  284. package/src/stock-operations/edit-stock-operation/edit-stock-operation-action-menu.component.tsx +73 -0
  285. package/src/stock-operations/party-selector/party-selector.component.tsx +58 -0
  286. package/src/stock-operations/qty-uom-selector/qty-uom-selector.component.tsx +65 -0
  287. package/src/stock-operations/qty-uom-selector/qty-uom-selector.resource.tsx +0 -0
  288. package/src/stock-operations/qty-uom-selector/qty-uom-selector.scss +0 -0
  289. package/src/stock-operations/qty-uom-selector/qty-uom-selector.test.tsx +11 -0
  290. package/src/stock-operations/stock-item-selector/stock-item-selector.component.tsx +74 -0
  291. package/src/stock-operations/stock-item-selector/stock-item-selector.resource.tsx +47 -0
  292. package/src/stock-operations/stock-item-selector/stock-item-selector.scss +0 -0
  293. package/src/stock-operations/stock-item-selector/stock-item-selector.test.tsx +11 -0
  294. package/src/stock-operations/stock-operation-operations-filter/stock-operation-operations-filter.component.tsx +27 -0
  295. package/src/stock-operations/stock-operation-operations-filter/stock-operation-operations-filter.scss +13 -0
  296. package/src/stock-operations/stock-operation-reason-selector/stock-operation-reason-selector.component.tsx +65 -0
  297. package/src/stock-operations/stock-operation-sources-filter/stock-operation-sources-filter.component.tsx +30 -0
  298. package/src/stock-operations/stock-operation-sources-filter/stock-operation-sources-filter.scss +13 -0
  299. package/src/stock-operations/stock-operation-statuses-filter/stock-operation-statuses-filter.component.tsx +32 -0
  300. package/src/stock-operations/stock-operation-statuses-filter/stock-operation-statuses-filter.scss +13 -0
  301. package/src/stock-operations/stock-operation-types-selector/stock-operation-types-selector.component.tsx +80 -0
  302. package/src/stock-operations/stock-operation.utils.tsx +106 -0
  303. package/src/stock-operations/stock-operations-dialog/stock-operations-approve-button.component.tsx +36 -0
  304. package/src/stock-operations/stock-operations-dialog/stock-operations-approve-dispatch-button.component.tsx +36 -0
  305. package/src/stock-operations/stock-operations-dialog/stock-operations-cancel-button.component.tsx +37 -0
  306. package/src/stock-operations/stock-operations-dialog/stock-operations-complete-button.component.tsx +36 -0
  307. package/src/stock-operations/stock-operations-dialog/stock-operations-completed-dispatch-button.component.tsx +36 -0
  308. package/src/stock-operations/stock-operations-dialog/stock-operations-dialog.component.tsx +167 -0
  309. package/src/stock-operations/stock-operations-dialog/stock-operations-dialog.scss +14 -0
  310. package/src/stock-operations/stock-operations-dialog/stock-operations-issue-stock-button.component.tsx +58 -0
  311. package/src/stock-operations/stock-operations-dialog/stock-operations-print-button.component.tsx +160 -0
  312. package/src/stock-operations/stock-operations-dialog/stock-operations-reject-button.component.tsx +37 -0
  313. package/src/stock-operations/stock-operations-dialog/stock-operations-return-button.component.tsx +37 -0
  314. package/src/stock-operations/stock-operations-table.component.tsx +524 -0
  315. package/src/stock-operations/stock-operations-table.resource.tsx +77 -0
  316. package/src/stock-operations/stock-operations-table.scss +0 -0
  317. package/src/stock-operations/stock-operations.component.tsx +12 -0
  318. package/src/stock-operations/stock-operations.resource.ts +238 -0
  319. package/src/stock-operations/stock-print-reports/GoodsReceivedNote.tsx +147 -0
  320. package/src/stock-operations/stock-print-reports/RequisitionDocument.tsx +153 -0
  321. package/src/stock-operations/stock-print-reports/StockOperationReport.tsx +133 -0
  322. package/src/stock-operations/stock-print-reports/StockTransferDocument.tsx +161 -0
  323. package/src/stock-operations/swr-revalidation.ts +7 -0
  324. package/src/stock-operations/users-selector/users-selector.component.tsx +77 -0
  325. package/src/stock-operations/users-selector/users-selector.resource.tsx +47 -0
  326. package/src/stock-operations/validation-schema.ts +195 -0
  327. package/src/stock-reports/ReportType.ts +63 -0
  328. package/src/stock-reports/stock-reports.component.tsx +0 -0
  329. package/src/stock-reports/stock-reports.resource.ts +0 -0
  330. package/src/stock-settings/stock-settings.component.tsx +11 -0
  331. package/src/stock-settings/stock-settings.resource.ts +0 -0
  332. package/src/stock-sources/add-stock-source-button.component.tsx +21 -0
  333. package/src/stock-sources/add-stock-sources/add-stock-sources.component.tsx +152 -0
  334. package/src/stock-sources/add-stock-sources/add-stock-sources.scss +18 -0
  335. package/src/stock-sources/delete-stock-modal.component.tsx +47 -0
  336. package/src/stock-sources/edit-stock-source/edit-stock-source.component.tsx +35 -0
  337. package/src/stock-sources/edit-stock-source/edit-stock-source.scss +0 -0
  338. package/src/stock-sources/stock-sources-delete/stock-sources-delate.scss +0 -0
  339. package/src/stock-sources/stock-sources-delete/stock-sources-delete.component.tsx +72 -0
  340. package/src/stock-sources/stock-sources-filter/stock-sources-filter.component.tsx +35 -0
  341. package/src/stock-sources/stock-sources-filter/stock-sources-filter.scss +13 -0
  342. package/src/stock-sources/stock-sources-items-table.component.tsx +213 -0
  343. package/src/stock-sources/stock-sources-items-table.resource.ts +56 -0
  344. package/src/stock-sources/stock-sources.component.tsx +12 -0
  345. package/src/stock-sources/stock-sources.resource.ts +80 -0
  346. package/src/stock-sources/stock-sources.scss +220 -0
  347. package/src/stock-sources/swr-revalidation.ts +7 -0
  348. package/src/stock-tabs/commodity-tabs.component.tsx +43 -0
  349. package/src/stock-tabs/commodity-tabs.scss +0 -0
  350. package/src/stock-user-role-scopes/add-stock-user-role-scope-button.component.tsx +21 -0
  351. package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.component.tsx +525 -0
  352. package/src/stock-user-role-scopes/add-stock-user-scope/add-stock-user-role-scope.scss +37 -0
  353. package/src/stock-user-role-scopes/delete-stock-user-scope/delete-stock-user-scope.component.tsx +73 -0
  354. package/src/stock-user-role-scopes/delete-stock-user-scope/delete-stock-user-scope.scss +0 -0
  355. package/src/stock-user-role-scopes/delete-stock-user-scope-modal.component.tsx +47 -0
  356. package/src/stock-user-role-scopes/edit-stock-user-scope/edit-stock-user-scope-action-menu.component.tsx +35 -0
  357. package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx +284 -0
  358. package/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts +31 -0
  359. package/src/stock-user-role-scopes/stock-user-role-scopes.component.tsx +12 -0
  360. package/src/stock-user-role-scopes/stock-user-role-scopes.resource.ts +76 -0
  361. package/src/stock-user-role-scopes/stock-user-role-scopes.scss +61 -0
  362. package/src/stock-user-role-scopes/swr-revalidation.ts +7 -0
  363. package/src/utils.ts +10 -0
  364. package/translations/en.json +24 -0
  365. package/tsconfig.json +23 -0
  366. package/webpack.config.js +1 -0
@@ -0,0 +1,35 @@
1
+ import { Button } from "@carbon/react";
2
+ import { Edit } from "@carbon/react/icons";
3
+
4
+ import React, { useCallback } from "react";
5
+ import { useTranslation } from "react-i18next";
6
+ import { launchOverlay } from "../../core/components/overlay/hook";
7
+ import AddStockUserRoleScope from "../add-stock-user-scope/add-stock-user-role-scope.component";
8
+ import { UserRoleScope } from "../../core/api/types/identity/UserRoleScope";
9
+
10
+ interface EditStockUserRoleActionsMenuProps {
11
+ data: UserRoleScope;
12
+ }
13
+
14
+ const EditStockUserRoleActionsMenu: React.FC<
15
+ EditStockUserRoleActionsMenuProps
16
+ > = ({ data }) => {
17
+ const { t } = useTranslation();
18
+
19
+ const handleClick = useCallback(() => {
20
+ launchOverlay(
21
+ "Edit Stock User Role",
22
+ <AddStockUserRoleScope model={data} />
23
+ );
24
+ }, [data]);
25
+
26
+ return (
27
+ <Button
28
+ kind="ghost"
29
+ onClick={handleClick}
30
+ iconDescription={t("editUserScope", "Edit UserScope")}
31
+ renderIcon={(props) => <Edit size={16} {...props} />}
32
+ />
33
+ );
34
+ };
35
+ export default EditStockUserRoleActionsMenu;
@@ -0,0 +1,284 @@
1
+ import React, { useMemo } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import {
4
+ DataTable,
5
+ DataTableSkeleton,
6
+ Link,
7
+ TabPanel,
8
+ Pagination,
9
+ Table,
10
+ TableBody,
11
+ TableCell,
12
+ TableContainer,
13
+ TableHead,
14
+ TableHeader,
15
+ TableRow,
16
+ TableToolbar,
17
+ TableToolbarContent,
18
+ TableToolbarSearch,
19
+ Tile,
20
+ } from "@carbon/react";
21
+ import styles from "./stock-user-role-scopes.scss";
22
+ import { ArrowDownLeft, ArrowLeft } from "@carbon/react/icons";
23
+ import { isDesktop, useSession } from "@openmrs/esm-framework";
24
+ import { ResourceRepresentation } from "../core/api/api";
25
+ import useStockUserRoleScopesPage from "./stock-user-role-scopes-items-table.resource";
26
+ import AddStockUserRoleScopeActionButton from "./add-stock-user-role-scope-button.component";
27
+ import { formatDisplayDate } from "../core/utils/datetimeUtils";
28
+ import EditStockUserRoleActionsMenu from "./edit-stock-user-scope/edit-stock-user-scope-action-menu.component";
29
+ import StockUserScopeDeleteActionMenu from "./delete-stock-user-scope/delete-stock-user-scope.component";
30
+ import { URL_USER_ROLE_SCOPE } from "../constants";
31
+
32
+ function StockUserRoleScopesItems() {
33
+ const { t } = useTranslation();
34
+
35
+ const currentUser = useSession();
36
+
37
+ // get user scopes
38
+ const {
39
+ items,
40
+ totalItems,
41
+ currentPage,
42
+ pageSizes,
43
+ goTo,
44
+ currentPageSize,
45
+ setPageSize,
46
+ isLoading,
47
+ } = useStockUserRoleScopesPage({
48
+ v: ResourceRepresentation.Default,
49
+ totalCount: true,
50
+ });
51
+ const tableHeaders = useMemo(
52
+ () => [
53
+ {
54
+ id: 0,
55
+ header: t("user", "User"),
56
+ key: "user",
57
+ },
58
+
59
+ {
60
+ id: 1,
61
+ header: t("role", "Role"),
62
+ key: "role",
63
+ },
64
+ {
65
+ id: 2,
66
+ header: t("location", "Location(s)"),
67
+ key: "locations",
68
+ },
69
+ {
70
+ id: 3,
71
+ header: t("stockOperations", "Stock Operations"),
72
+ key: "stockOperations",
73
+ },
74
+ {
75
+ id: 4,
76
+ header: t("permanent", "Permanent ?"),
77
+ key: "permanent",
78
+ },
79
+ {
80
+ id: 5,
81
+ header: t("ActiveFrom", "Active From "),
82
+ key: "activeFrom",
83
+ },
84
+ {
85
+ id: 6,
86
+ header: t("activeTo", "Active To"),
87
+ key: "activeTo",
88
+ },
89
+ {
90
+ id: 7,
91
+ header: t("enabled", "Enabled ?"),
92
+ key: "enabled",
93
+ },
94
+ {
95
+ id: 8,
96
+ header: t("actions", "Actions"),
97
+ key: "actions",
98
+ },
99
+ ],
100
+ []
101
+ );
102
+
103
+ const tableRows = useMemo(() => {
104
+ return items?.map((userRoleScope, index) => {
105
+ return {
106
+ ...userRoleScope,
107
+ id: userRoleScope?.uuid,
108
+ key: `key-${userRoleScope?.uuid}`,
109
+ uuid: `${userRoleScope?.uuid}`,
110
+ user:
111
+ currentUser.user.uuid === userRoleScope.userUuid ? (
112
+ `${userRoleScope?.userFamilyName} ${userRoleScope.userGivenName}`
113
+ ) : (
114
+ <Link
115
+ to={URL_USER_ROLE_SCOPE(userRoleScope?.uuid)}
116
+ >{`${userRoleScope?.userFamilyName} ${userRoleScope.userGivenName}`}</Link>
117
+ ),
118
+
119
+ roleName: userRoleScope?.role,
120
+ locations: userRoleScope?.locations?.map((location) => {
121
+ const key = `loc-${userRoleScope?.uuid}-${location.locationUuid}`;
122
+ return (
123
+ <span key={key}>
124
+ {location?.locationName}
125
+ {location?.enableDescendants ? (
126
+ <ArrowDownLeft key={`${key}-${index}-0`} />
127
+ ) : (
128
+ <ArrowLeft key={`${key}-${index}-1`} />
129
+ )}{" "}
130
+ </span>
131
+ ); //return
132
+ }),
133
+ stockOperations: userRoleScope?.operationTypes
134
+ ?.map((operation) => {
135
+ return operation?.operationTypeName;
136
+ })
137
+ ?.join(", "),
138
+ permanent: userRoleScope?.permanent
139
+ ? t("stockmanagement.yes", "Yes")
140
+ : t("stockmanagement.no", "No"),
141
+ activeFrom: formatDisplayDate(userRoleScope?.activeFrom) ?? "Not Set",
142
+ activeTo: formatDisplayDate(userRoleScope?.activeTo) ?? "Not Set",
143
+ enabled: userRoleScope?.enabled
144
+ ? t("stockmanagement.yes", "Yes")
145
+ : t("stockmanagement.no", "No"),
146
+ actions: (
147
+ <div style={{ display: "flex" }}>
148
+ <EditStockUserRoleActionsMenu data={items[index]} />
149
+ <StockUserScopeDeleteActionMenu uuid={items[index].uuid} />
150
+ </div>
151
+ ),
152
+ };
153
+ });
154
+ }, [currentUser.user.uuid, items, t]);
155
+
156
+ if (isLoading) {
157
+ return <DataTableSkeleton role="progressbar" />;
158
+ }
159
+
160
+ return (
161
+ <div className={styles.tableOverride}>
162
+ <TabPanel>
163
+ {t(
164
+ "panelDescription",
165
+ "To access stock management features, users must have assigned roles specifying location and stock operation type scopes."
166
+ )}
167
+ </TabPanel>
168
+ <div id="table-tool-bar">
169
+ <div></div>
170
+ <div className="right-filters"></div>
171
+ </div>
172
+ <DataTable
173
+ rows={tableRows ?? []}
174
+ headers={tableHeaders}
175
+ isSortable={true}
176
+ useZebraStyles={true}
177
+ render={({
178
+ rows,
179
+ headers,
180
+ getHeaderProps,
181
+ getTableProps,
182
+ getRowProps,
183
+ onInputChange,
184
+ }) => (
185
+ <TableContainer>
186
+ <TableToolbar
187
+ style={{
188
+ position: "static",
189
+ overflow: "visible",
190
+ backgroundColor: "color",
191
+ }}
192
+ >
193
+ <TableToolbarContent className={styles.toolbarContent}>
194
+ <TableToolbarSearch persistent onChange={onInputChange} />
195
+ <AddStockUserRoleScopeActionButton />
196
+ </TableToolbarContent>
197
+ </TableToolbar>
198
+ <Table {...getTableProps()}>
199
+ <TableHead>
200
+ <TableRow>
201
+ {headers.map(
202
+ (header: any) =>
203
+ header.key !== "details" && (
204
+ <TableHeader
205
+ {...getHeaderProps({
206
+ header,
207
+ isSortable: header.isSortable,
208
+ })}
209
+ className={
210
+ isDesktop
211
+ ? styles.desktopHeader
212
+ : styles.tabletHeader
213
+ }
214
+ key={`${header.key}`}
215
+ >
216
+ {header.header?.content ?? header.header}
217
+ </TableHeader>
218
+ )
219
+ )}
220
+ <TableHeader></TableHeader>
221
+ </TableRow>
222
+ </TableHead>
223
+ <TableBody>
224
+ {rows.map((row: any) => {
225
+ return (
226
+ <React.Fragment key={row.id}>
227
+ <TableRow
228
+ className={
229
+ isDesktop ? styles.desktopRow : styles.tabletRow
230
+ }
231
+ {...getRowProps({ row })}
232
+ >
233
+ {row.cells.map(
234
+ (cell: any) =>
235
+ cell?.info?.header !== "details" && (
236
+ <TableCell key={cell.id}>{cell.value}</TableCell>
237
+ )
238
+ )}
239
+ </TableRow>
240
+ </React.Fragment>
241
+ );
242
+ })}
243
+ </TableBody>
244
+ </Table>
245
+ {rows.length === 0 ? (
246
+ <div className={styles.tileContainer}>
247
+ <Tile className={styles.tile}>
248
+ <div className={styles.tileContent}>
249
+ <p className={styles.content}>
250
+ {t(
251
+ "noOperationsToDisplay",
252
+ "No Stock User scopes to display"
253
+ )}
254
+ </p>
255
+ <p className={styles.helper}>
256
+ {t("checkFilters", "Check the filters above")}
257
+ </p>
258
+ </div>
259
+ </Tile>
260
+ </div>
261
+ ) : null}
262
+ </TableContainer>
263
+ )}
264
+ ></DataTable>
265
+ <Pagination
266
+ page={currentPage}
267
+ pageSize={currentPageSize}
268
+ pageSizes={pageSizes}
269
+ totalItems={totalItems}
270
+ onChange={({ pageSize, page }) => {
271
+ if (pageSize !== currentPageSize) {
272
+ setPageSize(pageSize);
273
+ }
274
+ if (page !== currentPage) {
275
+ goTo(page);
276
+ }
277
+ }}
278
+ className={styles.paginationOverride}
279
+ />
280
+ </div>
281
+ );
282
+ }
283
+
284
+ export default StockUserRoleScopesItems;
@@ -0,0 +1,31 @@
1
+ import { StockOperationFilter } from "../stock-operations/stock-operations.resource";
2
+ import { useUserRoleScopes } from "./stock-user-role-scopes.resource";
3
+ import { useState } from "react";
4
+ import { usePagination } from "@openmrs/esm-framework";
5
+
6
+ export default function useStockUserRoleScopesPage(
7
+ filter: StockOperationFilter
8
+ ) {
9
+ const { items, isLoading, isError } = useUserRoleScopes(filter);
10
+
11
+ const pageSizes = [10, 20, 30, 40, 50];
12
+ const [currentPageSize, setPageSize] = useState(10);
13
+ const {
14
+ goTo,
15
+ results: paginatedItems,
16
+ currentPage,
17
+ } = usePagination(items.results, currentPageSize);
18
+
19
+ return {
20
+ items: paginatedItems,
21
+ totalItems: items?.totalCount,
22
+ currentPage,
23
+ currentPageSize,
24
+ paginatedItems,
25
+ goTo,
26
+ pageSizes,
27
+ isLoading,
28
+ isError,
29
+ setPageSize,
30
+ };
31
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import StockUserRoleScopesItems from "./stock-user-role-scopes-items-table.component";
3
+
4
+ function StockUserScopes() {
5
+ return (
6
+ <div style={{ margin: "5px" }}>
7
+ <StockUserRoleScopesItems />
8
+ </div>
9
+ );
10
+ }
11
+
12
+ export default StockUserScopes;
@@ -0,0 +1,76 @@
1
+ import useSWR from "swr";
2
+ import { ResourceFilterCriteria, toQueryParams } from "../core/api/api";
3
+ import { PageableResult } from "../core/api/types/PageableResult";
4
+ import { UserRoleScope } from "../core/api/types/identity/UserRoleScope";
5
+ import { openmrsFetch } from "@openmrs/esm-framework";
6
+
7
+ export type UserRoleScopeFilter = ResourceFilterCriteria;
8
+
9
+ // getUserRoleScopes
10
+ export function useUserRoleScopes(filter: UserRoleScopeFilter) {
11
+ const apiUrl = `ws/rest/v1/stockmanagement/userrolescope${toQueryParams(
12
+ filter
13
+ )}`;
14
+ const { data, error, isLoading } = useSWR<
15
+ { data: PageableResult<UserRoleScope> },
16
+ Error
17
+ >(apiUrl, openmrsFetch);
18
+ return {
19
+ items: data?.data || <PageableResult<UserRoleScope>>{},
20
+ isLoading,
21
+ isError: error,
22
+ };
23
+ }
24
+
25
+ // getUserRoleScope
26
+ export function useUserRoleScope(id: string) {
27
+ const apiUrl = `ws/rest/v1/stockmanagement/userrolescope/${id}`;
28
+ const { data, error, isLoading } = useSWR<{ data: UserRoleScope }, Error>(
29
+ apiUrl,
30
+ openmrsFetch
31
+ );
32
+ return {
33
+ items: data.data ? data.data : {},
34
+ isLoading,
35
+ isError: error,
36
+ };
37
+ }
38
+
39
+ // deleteUserRoleScopes
40
+ export function deleteUserRoleScopes(ids: string[]) {
41
+ let otherIds = ids.reduce((p, c, i) => {
42
+ if (i === 0) return p;
43
+ p += (p.length > 0 ? "," : "") + encodeURIComponent(c);
44
+ return p;
45
+ }, "");
46
+ if (otherIds.length > 0) {
47
+ otherIds = "?ids=" + otherIds;
48
+ }
49
+ const apiUrl = `ws/rest/v1/stockmanagement/userrolescope/${ids[0]}${otherIds}`;
50
+ const abortController = new AbortController();
51
+
52
+ return openmrsFetch(apiUrl, {
53
+ method: "DELETE",
54
+ headers: {
55
+ "Content-Type": "application/json",
56
+ },
57
+ signal: abortController.signal,
58
+ });
59
+ }
60
+
61
+ // createOrUpdateUserRoleScope
62
+ export function createOrUpdateUserRoleScope(item: UserRoleScope) {
63
+ const abortController = new AbortController();
64
+ const isNew = item.uuid != null;
65
+ const apiUrl = `ws/rest/v1/stockmanagement/userrolescope${
66
+ isNew ? "/" + item.uuid : ""
67
+ }`;
68
+ return openmrsFetch(apiUrl, {
69
+ method: "POST",
70
+ headers: {
71
+ "Content-Type": "application/json",
72
+ },
73
+ signal: abortController.signal,
74
+ body: item,
75
+ });
76
+ }
@@ -0,0 +1,61 @@
1
+ @use '@carbon/styles/scss/colors';
2
+ @use '@carbon/styles/scss/type';
3
+ @import '~@openmrs/esm-styleguide/src/vars';
4
+
5
+ .content {
6
+ @include type.type-style('heading-compact-02');
7
+ color: $text-02;
8
+ margin-bottom: 0.5rem;
9
+ }
10
+
11
+ .helper {
12
+ @include type.type-style('body-compact-01');
13
+ color: $text-02;
14
+ }
15
+
16
+ .separator {
17
+ @include type.type-style('body-compact-02');
18
+ color: $text-02;
19
+ width: 80%;
20
+ margin: 1.5rem auto;
21
+ overflow: hidden;
22
+ text-align: center;
23
+
24
+ &::before,
25
+ &::after {
26
+ background-color: $text-03;
27
+ content: '';
28
+ display: inline-block;
29
+ height: 1px;
30
+ position: relative;
31
+ vertical-align: middle;
32
+ width: 50%;
33
+ }
34
+
35
+ &::before {
36
+ right: 0.5rem;
37
+ margin-left: -50%;
38
+ }
39
+
40
+ &::after {
41
+ left: 0.5rem;
42
+ margin-right: -50%;
43
+ }
44
+ }
45
+
46
+ .tileContainer {
47
+ background-color: $ui-02;
48
+ border-top: 1px solid $ui-03;
49
+ padding: 5rem 0;
50
+ }
51
+
52
+ .tile {
53
+ margin: auto;
54
+ width: fit-content;
55
+ }
56
+
57
+ .tileContent {
58
+ display: flex;
59
+ flex-direction: column;
60
+ align-items: center;
61
+ }
@@ -0,0 +1,7 @@
1
+ import { mutate } from "swr";
2
+
3
+ export const handleMutate = (url: string) => {
4
+ mutate((key) => typeof key === "string" && key.startsWith(url), undefined, {
5
+ revalidate: true,
6
+ });
7
+ };
package/src/utils.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { showNotification } from "@openmrs/esm-framework";
2
+
3
+ export function errorAlert(msg: string, error?: Error) {
4
+ showNotification({
5
+ title: msg,
6
+ kind: "error",
7
+ critical: true,
8
+ description: error?.message,
9
+ });
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "casualGreeting": "hey",
3
+ "configSystem": "Configuration system",
4
+ "configSystemExplainer": "The greeting shown below is driven by the configuration system. To change the configuration properties, click the spanner icon in the navbar to pull up the Implementer Tools panel. Then, type <2>template</2> into the <4>Search configuration</4> input. This should filter the configuration properties to show only those that are relevant to this module. You can change the values of these properties and click <6>Save</6> to see the changes reflected in the UI",
5
+ "connect": "Connect",
6
+ "connectExplainer": "Get in touch with the community",
7
+ "dataFetching": "Data fetching",
8
+ "designDocs": "Design docs",
9
+ "designDocsExplainer": "Read the O3 design documentation",
10
+ "explainer": "The following examples demonstrate some key features of the O3 framework",
11
+ "extensionExplainer": "Here are some colored boxes. Because they are attached as extensions within a slot, an admin can change what boxes are shown using configuration. These boxes happen to be defined in this module, but they could attach to this slot even if they were in a different module",
12
+ "extensionSystem": "Extension system",
13
+ "formalGreeting": "hello",
14
+ "frontendDocs": "Frontend docs",
15
+ "getPatient": "Get a patient named",
16
+ "getStarted": "Get started",
17
+ "getStartedExplainer": "Create a frontend module from this template",
18
+ "learnExplainer": "Learn how to use the O3 framework",
19
+ "loading": "Loading",
20
+ "patientGetterExplainer": "Try clicking the button below to fetch a patient from the backend",
21
+ "resources": "Resources",
22
+ "usefulLinks": "Below are some links to useful resources",
23
+ "welcomeText": "Welcome to the O3 Template app"
24
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "esModuleInterop": true,
4
+ "module": "esnext",
5
+ "allowSyntheticDefaultImports": true,
6
+ "jsx": "react",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "node",
9
+ "lib": [
10
+ "dom",
11
+ "es5",
12
+ "scripthost",
13
+ "es2015",
14
+ "es2015.promise",
15
+ "es2016.array.include",
16
+ "es2018",
17
+ "es2020"
18
+ ],
19
+ "resolveJsonModule": true,
20
+ "noEmit": true,
21
+ "target": "esnext"
22
+ }
23
+ }
@@ -0,0 +1 @@
1
+ module.exports = require("openmrs/default-webpack-config");