@uxland/primary-shell 4.1.0-rc.2 → 4.1.0-rc.4

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.
@@ -18,6 +18,7 @@ export declare class ActivityHistoryMain extends ActivityHistoryMain_base {
18
18
  searchQuery: string;
19
19
  _handleSelectDate(date: string): void;
20
20
  _handleSearchChange(event: CustomEvent): void;
21
+ _raiseEcapCronogramEvent(): Promise<void>;
21
22
  scrollToClosestDate(date: Date): void;
22
23
  }
23
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "4.1.0-rc.2",
3
+ "version": "4.1.0-rc.4",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -881,7 +881,7 @@ button.ql-indent {
881
881
  background-color: #000;
882
882
  }
883
883
  .ql-toolbar.ql-snow {
884
- border: 1px solid #ccc;
884
+ border-bottom: 1px solid #ccc;
885
885
  box-sizing: border-box;
886
886
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
887
887
  padding: 8px;
@@ -7,6 +7,15 @@ import { PocEventsEcap } from "./UI/components/poc-events-ecap/poc-events-ecap";
7
7
  import { PrimariaNavItem } from "./UI/shared-components/primaria-nav-item/primaria-nav-item";
8
8
  import { PrimariaNavTreeMenu } from "./UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu";
9
9
 
10
+ const getPatientCip = async (): Promise<string> => {
11
+ return (await shellApi.broker.send("get_patient_cip")) as string;
12
+ };
13
+
14
+ const publishEcapNoCloseWithCip = async (eventName: string) => {
15
+ const CIP = await getPatientCip();
16
+ shellApi.ecapEventManager.publish(eventName, "NO_TANCAR", { CIP });
17
+ };
18
+
10
19
  const registerUpperNavMenuViews = () => {
11
20
  shellApi.regionManager.registerView(shellRegions.navigationMenu, {
12
21
  id: pocTestEventsId,
@@ -34,7 +43,13 @@ const registerUpperNavMenuViews = () => {
34
43
  {
35
44
  icon: "open_in_new",
36
45
  label: "SMS",
37
- callbackFn: () => {},
46
+ callbackFn: async (): Promise<void> => {
47
+ const CIP = await getPatientCip();
48
+ shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
49
+ CIP: CIP || "",
50
+ TipusMissatge: "SMS",
51
+ });
52
+ },
38
53
  },
39
54
  {
40
55
  icon: "open_in_new",
@@ -49,7 +64,9 @@ const registerUpperNavMenuViews = () => {
49
64
  {
50
65
  icon: "open_in_new",
51
66
  label: "Veu IP",
52
- callbackFn: (): void => {},
67
+ callbackFn: async (): Promise<void> => {
68
+ publishEcapNoCloseWithCip("VOIP");
69
+ },
53
70
  },
54
71
  {
55
72
  icon: "open_in_new",
@@ -67,8 +84,8 @@ const registerUpperNavMenuViews = () => {
67
84
  const menuItem = new PrimariaNavItem({
68
85
  icon: "add_box",
69
86
  label: "Visites",
70
- callbackFn: () => {
71
- // shellApi.regionManager.activateView(shellRegions.main, "");
87
+ callbackFn: async (): Promise<void> => {
88
+ publishEcapNoCloseWithCip("CONSULTA_VISITES");
72
89
  },
73
90
  });
74
91
  return Promise.resolve(menuItem);
@@ -81,10 +98,7 @@ const registerUpperNavMenuViews = () => {
81
98
  icon: "add_box",
82
99
  label: "IT",
83
100
  callbackFn: async (): Promise<void> => {
84
- const CIP = (await shellApi.broker.send("get_patient_cip")) as string;
85
- shellApi.ecapEventManager.publish("CRIDA_DOCS_USU", "NO_TANCAR", {
86
- CIP: CIP || "",
87
- });
101
+ publishEcapNoCloseWithCip("REV_IT");
88
102
  },
89
103
  });
90
104
  return Promise.resolve(menuItem);
@@ -100,22 +114,33 @@ const registerUpperNavMenuViews = () => {
100
114
  {
101
115
  icon: "open_in_new",
102
116
  label: "Analítiques",
103
- callbackFn: (): void => {},
117
+ callbackFn: async (): Promise<void> => {
118
+ publishEcapNoCloseWithCip("LABORATORI");
119
+ },
104
120
  },
105
121
  {
106
122
  icon: "open_in_new",
107
123
  label: "OC",
108
- callbackFn: (): void => {},
124
+ callbackFn: async (): Promise<void> => {
125
+ const CIP = await getPatientCip();
126
+ publishEcapNoCloseWithCip("RESULT_OC");
127
+ },
109
128
  },
110
129
  {
111
130
  icon: "open_in_new",
112
131
  label: "OC Exprés",
113
- callbackFn: (): void => {},
132
+ callbackFn: async (): Promise<void> => {
133
+ const CIP = await getPatientCip();
134
+ publishEcapNoCloseWithCip("OC_EXPRES");
135
+ },
114
136
  },
115
137
  {
116
138
  icon: "open_in_new",
117
139
  label: "Sol·licitud de trasllat",
118
- callbackFn: (): void => {},
140
+ callbackFn: async (): Promise<void> => {
141
+ const CIP = await getPatientCip();
142
+ publishEcapNoCloseWithCip("TRANSPORT");
143
+ },
119
144
  },
120
145
  ],
121
146
  });
@@ -138,12 +163,9 @@ const registerUpperNavMenuViews = () => {
138
163
  icon: "open_in_new",
139
164
  label: "Documents usuari",
140
165
  callbackFn: async (): Promise<void> => {
141
- const CIP = (await shellApi.broker.send("get_patient_cip")) as string;
142
-
166
+ const CIP = await getPatientCip();
143
167
  setTimeout(() => {
144
- shellApi.ecapEventManager.publish("CRIDA_DOCS_USU", "NO_TANCAR", {
145
- CIP: CIP || "",
146
- });
168
+ publishEcapNoCloseWithCip("CRIDA_DOCS_USU");
147
169
  }, 0);
148
170
  },
149
171
  },
@@ -162,12 +184,18 @@ const registerUpperNavMenuViews = () => {
162
184
  {
163
185
  icon: "open_in_new",
164
186
  label: "ARES",
165
- callbackFn: (): void => {},
187
+ callbackFn: async () => {
188
+ const CIP = await getPatientCip();
189
+ publishEcapNoCloseWithCip("PROCES_ATENCIO");
190
+ },
166
191
  },
167
192
  {
168
193
  icon: "open_in_new",
169
194
  label: "Nen sa",
170
- callbackFn: (): void => {},
195
+ callbackFn: async () => {
196
+ const CIP = await getPatientCip();
197
+ publishEcapNoCloseWithCip("NEN_SA");
198
+ },
171
199
  },
172
200
  {
173
201
  icon: "open_in_new",
@@ -177,12 +205,18 @@ const registerUpperNavMenuViews = () => {
177
205
  {
178
206
  icon: "open_in_new",
179
207
  label: "Odontologia",
180
- callbackFn: (): void => {},
208
+ callbackFn: async () => {
209
+ const CIP = await getPatientCip();
210
+ publishEcapNoCloseWithCip("ODONTOLOGO");
211
+ },
181
212
  },
182
213
  {
183
214
  icon: "open_in_new",
184
215
  label: "Situació d'especial cura",
185
- callbackFn: (): void => {},
216
+ callbackFn: async () => {
217
+ const CIP = await getPatientCip();
218
+ publishEcapNoCloseWithCip("SIT_ESPEC_CURA_DEV");
219
+ },
186
220
  },
187
221
  ],
188
222
  });
@@ -196,10 +230,8 @@ const registerUpperNavMenuViews = () => {
196
230
  icon: "add_box",
197
231
  label: "Activitats variables",
198
232
  callbackFn: async () => {
199
- const CIP = (await shellApi.broker.send("get_patient_cip")) as string;
200
- shellApi.ecapEventManager.publish("IA_DEV", "NO_TANCAR", {
201
- CIP: CIP || "",
202
- });
233
+ const CIP = await getPatientCip();
234
+ publishEcapNoCloseWithCip("SIA_DEV");
203
235
  },
204
236
  });
205
237
  return Promise.resolve(menuItem);
@@ -81,6 +81,11 @@ export class ActivityHistoryMain extends PrimariaRegionHost(LitElement) {
81
81
  this.api.broker.send(new SearchActivityHistoryItems(this.searchQuery));
82
82
  }
83
83
 
84
+ async _raiseEcapCronogramEvent() {
85
+ const CIP = (await this.api.broker.send("get_patient_cip")) as string;
86
+ this.api.ecapEventManager.publish("CRONOGRAMA", "NO_TANCAR", { CIP });
87
+ }
88
+
84
89
  scrollToClosestDate(date: Date) {
85
90
  const selectedDate = date.getTime();
86
91
  const timeline = this.shadowRoot.querySelector(
@@ -23,7 +23,7 @@ export const template = (props: ActivityHistoryMain) =>
23
23
  <div>|</div>
24
24
  <dss-icon-button size="md" variant="primary" icon="more_vert" label=${translate("actions.menuButton")}></dss-icon-button>
25
25
  <dss-action-menu position="bottom-start">
26
- <dss-action-menu-item lefticon="view_timeline" label=${translate("actions.cronogram")}></dss-action-menu-item>
26
+ <dss-action-menu-item lefticon="view_timeline" label=${translate("actions.cronogram")} @click=${props._raiseEcapCronogramEvent}></dss-action-menu-item>
27
27
  <dss-action-menu-item lefticon="file_download" label=${translate("actions.exportPdf")} @click=${() => props.api.broker.send(new ExportPdf())}></dss-action-menu-item>
28
28
  <dss-action-menu-item label=${translate("actions.noteLegend")}></dss-action-menu-item>
29
29
  </dss-action-menu>
@@ -52,12 +52,14 @@ export const headerMaximizedTemplate = (props: ActivityHistoryMain) => html`
52
52
  </dss-datepicker>
53
53
  </div>
54
54
  <div class="header__maximized__right">
55
- <dss-button variant="subtle" size="md" label="${translate("actions.moreOptions")}" icon="more_horiz" iconposition="left"></dss-button>
56
- <dss-action-menu position="bottom-start">
55
+ <div>
56
+ <dss-button variant="subtle" size="md" label="${translate("actions.moreOptions")}" icon="more_horiz" iconposition="left"></dss-button>
57
+ <dss-action-menu position="bottom-start">
57
58
  <dss-action-menu-item @click=${() => props.api.broker.send(new ExportPdf())} lefticon="file_download" label=${translate("actions.exportPdf")}></dss-action-menu-item>
58
- </dss-action-menu>
59
+ </dss-action-menu>
60
+ </div>
59
61
  <dss-button label="${translate("actions.entryLegend")}" size="md" variant="secondary" icon="info"></dss-button>
60
- <dss-button label="${translate("actions.cronogram")}" size="md" variant="primary" icon="view_timeline"></dss-button>
62
+ <dss-button label="${translate("actions.cronogram")}" size="md" variant="primary" icon="view_timeline" @click=${props._raiseEcapCronogramEvent}></dss-button>
61
63
  </div>
62
64
  </div>
63
65
  </div>