@uxland/primary-shell 5.3.9 → 5.3.10
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/index.js +492 -499
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +23 -23
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts +21 -12
- package/src/internal-plugins/activity-history/activity-history-item/list/group-history-items/group-history-items.ts +2 -2
package/package.json
CHANGED
package/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IActivityHistoryItem, IActivityHistoryItemWithComponent } from "./model";
|
|
2
2
|
|
|
3
3
|
export function shouldShowRole(item: IActivityHistoryItem): boolean {
|
|
4
|
-
return !item.professional
|
|
4
|
+
return !item.professional?.speciality?.description;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export const hasItemDivider = (
|
package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts
CHANGED
|
@@ -113,21 +113,30 @@ const visitHeaderTemplate = (
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const renderProfessionalValues = (props: ActivityHistoryTimeline, item: IActivityHistoryItem) => {
|
|
116
|
-
if(!item.professional) return nothing;
|
|
116
|
+
if (!item.professional) return nothing;
|
|
117
117
|
const showRole = shouldShowRole(item);
|
|
118
|
-
const professionalItems = [
|
|
119
|
-
props.highlighted(item.professional.name),
|
|
120
|
-
showRole ? props.highlighted(item.professional.role.description) : null,
|
|
121
|
-
props.highlighted(item.up.description),
|
|
122
|
-
props.highlighted(item.professional.speciality.description),
|
|
123
|
-
props.highlighted(item.service.description),
|
|
124
|
-
].filter(Boolean);
|
|
125
118
|
|
|
126
|
-
const
|
|
127
|
-
(item, i) => html`${item}${i < professionalItems.length - 1 ? " | " : ""}`,
|
|
128
|
-
);
|
|
119
|
+
const values: Array<any> = [];
|
|
129
120
|
|
|
130
|
-
|
|
121
|
+
values.push(props.highlighted(item.professional.name));
|
|
122
|
+
|
|
123
|
+
if (showRole && item.professional.role) {
|
|
124
|
+
values.push(props.highlighted(item.professional.role.description));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (item.up) {
|
|
128
|
+
values.push(props.highlighted(item.up.description));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (item.professional.speciality) {
|
|
132
|
+
values.push(props.highlighted(item.professional.speciality.description));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (item.service) {
|
|
136
|
+
values.push(props.highlighted(item.service.description));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return values.map((v, i) => html`${v}${i < values.length - 1 ? " | " : ""}`);
|
|
131
140
|
};
|
|
132
141
|
|
|
133
142
|
const diagnosticHeaderTemplate = (item: IActivityHistoryItem | undefined) =>
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
const isSameVisit = (item1: IActivityHistoryItem, item2: IActivityHistoryItem): boolean => {
|
|
9
9
|
const sameProfessional =
|
|
10
10
|
item1.professional?.id === item2.professional?.id &&
|
|
11
|
-
item1.professional?.role
|
|
12
|
-
item1.professional?.speciality
|
|
11
|
+
item1.professional?.role?.id === item2.professional?.role?.id &&
|
|
12
|
+
item1.professional?.speciality?.id === item2.professional?.speciality?.id;
|
|
13
13
|
const sameLocation =
|
|
14
14
|
item1.ep?.id === item2.ep?.id &&
|
|
15
15
|
item1.up?.id === item2.up?.id &&
|