@cc-openmrs/cc-esm-active-prescriptions 1.0.35 → 1.0.38

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/dist/477.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[477],{4477(c,e,t){t.r(e),t.d(e,{default:()=>a});var i=t(6072),s=t(2068),n=t(5987),r=t(2076);const a=function(c){var e=c.patientUuid,t=(0,(0,r.useTranslation)().t)("prescriptionsActionButton","Active prescriptions"),a=(0,i.useCallback)(function(){e?(0,n.launchWorkspace)("active-prescriptions-workspace",{patientUuid:e}):(0,n.launchWorkspace)("active-prescriptions-workspace")},[e]);return i.createElement(s.XSD,{itemText:t,onClick:a})}}}]);
1
+ "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[477],{4477(o,n,t){t.r(n),t.d(n,{default:()=>a});var i=t(6072),e=t(2068),c=t(5987),s=t(2076);const a=function(o){var n=o.patientUuid;console.info("[PrescriptionsActionButton] Renderizando componente");var t=(0,(0,s.useTranslation)().t)("prescriptionsActionButton","Active prescriptions");console.info("[PrescriptionsActionButton] Label traduzido:",t);var a=(0,i.useCallback)(function(){console.info("[PrescriptionsActionButton] Botão clicado"),console.info("[PrescriptionsActionButton] patientUuid:",n),n?(console.info("[PrescriptionsActionButton] patientUuid presente, chamando launchWorkspace com patientUuid"),(0,c.launchWorkspace)("active-prescriptions-workspace",{patientUuid:n}),console.info("[PrescriptionsActionButton] launchWorkspace chamado com patientUuid")):(console.info("[PrescriptionsActionButton] patientUuid ausente, chamando launchWorkspace sem patientUuid"),(0,c.launchWorkspace)("active-prescriptions-workspace"),console.info("[PrescriptionsActionButton] launchWorkspace chamado sem patientUuid"))},[n]);return console.info("[PrescriptionsActionButton] Renderizando OverflowMenuItem"),i.createElement(e.XSD,{itemText:t,onClick:a})}}}]);
@@ -435,9 +435,9 @@
435
435
  "initial": false,
436
436
  "entry": false,
437
437
  "recorded": false,
438
- "size": 915,
438
+ "size": 2147,
439
439
  "sizes": {
440
- "javascript": 915
440
+ "javascript": 2147
441
441
  },
442
442
  "names": [],
443
443
  "idHints": [],
@@ -451,7 +451,7 @@
451
451
  "auxiliaryFiles": [
452
452
  "477.js.map"
453
453
  ],
454
- "hash": "a355d58eac14a0c7",
454
+ "hash": "1f39a6125a6fa4cc",
455
455
  "childrenByOrder": {}
456
456
  },
457
457
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"brandBox","slot":"Boxes"},{"name":"prescriptions-action","component":"prescriptionsActionButton","slot":"patient-actions-slot","order":50,"meta":{"label":"Active prescriptions","icon":"certificate","fullWidth":false}}],"pages":[{"component":"root","route":"root"}],"workspaces":[{"name":"active-prescriptions-workspace","title":"activePrescriptionsWorkspaceTitle","component":"root","type":"active-prescriptions","canHide":true,"width":"wider"}],"workspaces2":[{"name":"active-prescriptions-workspace","component":"root","window":"active-prescriptions"}],"workspaceWindows2":[{"name":"active-prescriptions","group":"patient-chart"}],"workspaceGroups2":[{"name":"patient-chart","scopePattern":"/patient/([^/]+)/chart"}],"version":"1.0.35"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"brandBox","slot":"Boxes"},{"name":"prescriptions-action","component":"prescriptionsActionButton","slot":"patient-actions-slot","order":50,"meta":{"label":"Active prescriptions","icon":"certificate","fullWidth":false}}],"pages":[{"component":"root","route":"root"}],"workspaces":[{"name":"active-prescriptions-workspace","title":"activePrescriptionsWorkspaceTitle","component":"root","type":"active-prescriptions","canHide":true,"width":"wider"}],"workspaces2":[{"name":"active-prescriptions-workspace","component":"root","window":"patient-chart"}],"workspaceWindows2":[{"name":"patient-chart","group":"patient-chart"}],"version":"1.0.38"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-openmrs/cc-esm-active-prescriptions",
3
- "version": "1.0.35",
3
+ "version": "1.0.38",
4
4
  "license": "MPL-2.0",
5
5
  "description": "An OpenMRS seed application for building microfrontends",
6
6
  "browser": "dist/openmrs-esm-template-app.js",
@@ -8,17 +8,35 @@ interface PrescriptionsActionButtonProps {
8
8
  }
9
9
 
10
10
  const PrescriptionsActionButton: React.FC<PrescriptionsActionButtonProps> = ({ patientUuid }) => {
11
+ // eslint-disable-next-line no-console
12
+ console.info('[PrescriptionsActionButton] Renderizando componente');
11
13
  const { t } = useTranslation();
12
14
  const label = t('prescriptionsActionButton', 'Active prescriptions');
15
+ // eslint-disable-next-line no-console
16
+ console.info('[PrescriptionsActionButton] Label traduzido:', label);
13
17
 
14
18
  const handleClick = useCallback(() => {
19
+ // eslint-disable-next-line no-console
20
+ console.info('[PrescriptionsActionButton] Botão clicado');
21
+ // eslint-disable-next-line no-console
22
+ console.info('[PrescriptionsActionButton] patientUuid:', patientUuid);
15
23
  if (patientUuid) {
24
+ // eslint-disable-next-line no-console
25
+ console.info('[PrescriptionsActionButton] patientUuid presente, chamando launchWorkspace com patientUuid');
16
26
  launchWorkspace('active-prescriptions-workspace', { patientUuid });
27
+ // eslint-disable-next-line no-console
28
+ console.info('[PrescriptionsActionButton] launchWorkspace chamado com patientUuid');
17
29
  } else {
30
+ // eslint-disable-next-line no-console
31
+ console.info('[PrescriptionsActionButton] patientUuid ausente, chamando launchWorkspace sem patientUuid');
18
32
  launchWorkspace('active-prescriptions-workspace');
33
+ // eslint-disable-next-line no-console
34
+ console.info('[PrescriptionsActionButton] launchWorkspace chamado sem patientUuid');
19
35
  }
20
36
  }, [patientUuid]);
21
37
 
38
+ // eslint-disable-next-line no-console
39
+ console.info('[PrescriptionsActionButton] Renderizando OverflowMenuItem');
22
40
  return <OverflowMenuItem itemText={label} onClick={handleClick} />;
23
41
  };
24
42
 
package/src/routes.json CHANGED
@@ -53,19 +53,13 @@
53
53
  {
54
54
  "name": "active-prescriptions-workspace",
55
55
  "component": "root",
56
- "window": "active-prescriptions"
56
+ "window": "patient-chart"
57
57
  }
58
58
  ],
59
59
  "workspaceWindows2": [
60
- {
61
- "name": "active-prescriptions",
62
- "group": "patient-chart"
63
- }
64
- ],
65
- "workspaceGroups2": [
66
60
  {
67
61
  "name": "patient-chart",
68
- "scopePattern": "/patient/([^/]+)/chart"
62
+ "group": "patient-chart"
69
63
  }
70
64
  ]
71
65
  }