fix: hotkeys storage between studies and truncated patient names (#2516)
* fix: PatientName truncation in the worklist * fix: hotkeys preferences
This commit is contained in:
parent
eff70ae22c
commit
ca900f80e1
@ -63,6 +63,7 @@ export class HotkeysManager {
|
|||||||
try {
|
try {
|
||||||
const definitions = this.getValidDefinitions(hotkeyDefinitions);
|
const definitions = this.getValidDefinitions(hotkeyDefinitions);
|
||||||
definitions.forEach(definition => this.registerHotkeys(definition));
|
definitions.forEach(definition => this.registerHotkeys(definition));
|
||||||
|
localStorage.setItem('hotkey-definitions', JSON.stringify(definitions));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const { UINotificationService } = this._servicesManager.services;
|
const { UINotificationService } = this._servicesManager.services;
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
|
|||||||
@ -50,13 +50,22 @@ const StudyListTableRow = props => {
|
|||||||
}}
|
}}
|
||||||
title={title}
|
title={title}
|
||||||
>
|
>
|
||||||
{index === 0 && (
|
<div className="flex">
|
||||||
<Icon
|
{index === 0 && (
|
||||||
name={isExpanded ? 'chevron-down' : 'chevron-right'}
|
<div>
|
||||||
className="mr-4 inline-flex"
|
<Icon
|
||||||
/>
|
name={isExpanded ? 'chevron-down' : 'chevron-right'}
|
||||||
)}
|
className="mr-4 inline-flex"
|
||||||
{content}
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className={classnames(
|
||||||
|
{ 'overflow-hidden': true },
|
||||||
|
{ 'truncate': true }
|
||||||
|
)}>
|
||||||
|
{content}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@ -5,30 +5,30 @@
|
|||||||
// https://tailwindcss.com/docs/optimizing-for-production
|
// https://tailwindcss.com/docs/optimizing-for-production
|
||||||
export default function getGridWidthClass(gridCol) {
|
export default function getGridWidthClass(gridCol) {
|
||||||
const widthClasses = {
|
const widthClasses = {
|
||||||
1: 'w-1-24',
|
1: 'w-1/24',
|
||||||
2: 'w-2-24',
|
2: 'w-2/24',
|
||||||
3: 'w-3-24',
|
3: 'w-3/24',
|
||||||
4: 'w-4-24',
|
4: 'w-4/24',
|
||||||
5: 'w-5-24',
|
5: 'w-5/24',
|
||||||
6: 'w-6-24',
|
6: 'w-6/24',
|
||||||
7: 'w-7-24',
|
7: 'w-7/24',
|
||||||
8: 'w-8-24',
|
8: 'w-8/24',
|
||||||
9: 'w-9-24',
|
9: 'w-9/24',
|
||||||
10: 'w-10-24',
|
10: 'w-10/24',
|
||||||
11: 'w-11-24',
|
11: 'w-11/24',
|
||||||
12: 'w-12-24',
|
12: 'w-12/24',
|
||||||
13: 'w-13-24',
|
13: 'w-13/24',
|
||||||
14: 'w-14-24',
|
14: 'w-14/24',
|
||||||
15: 'w-15-24',
|
15: 'w-15/24',
|
||||||
16: 'w-16-24',
|
16: 'w-16/24',
|
||||||
17: 'w-17-24',
|
17: 'w-17/24',
|
||||||
18: 'w-18-24',
|
18: 'w-18/24',
|
||||||
19: 'w-19-24',
|
19: 'w-19/24',
|
||||||
20: 'w-20-24',
|
20: 'w-20/24',
|
||||||
21: 'w-21-24',
|
21: 'w-21/24',
|
||||||
22: 'w-22-24',
|
22: 'w-22/24',
|
||||||
23: 'w-23-24',
|
23: 'w-23/24',
|
||||||
24: 'w-24-24',
|
24: 'w-24/24',
|
||||||
};
|
};
|
||||||
|
|
||||||
return widthClasses[gridCol];
|
return widthClasses[gridCol];
|
||||||
|
|||||||
@ -181,7 +181,16 @@ export default function ModeRoute({
|
|||||||
}
|
}
|
||||||
|
|
||||||
hotkeysManager.setDefaultHotKeys(hotkeys);
|
hotkeysManager.setDefaultHotKeys(hotkeys);
|
||||||
hotkeysManager.setHotkeys(hotkeys);
|
|
||||||
|
const userPreferredHotkeys = JSON.parse(
|
||||||
|
localStorage.getItem('hotkey-definitions')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (userPreferredHotkeys?.length) {
|
||||||
|
hotkeysManager.setHotkeys(userPreferredHotkeys);
|
||||||
|
} else {
|
||||||
|
hotkeysManager.setHotkeys(hotkeys);
|
||||||
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
hotkeysManager.destroy();
|
hotkeysManager.destroy();
|
||||||
|
|||||||
@ -270,10 +270,10 @@ function WorkList({
|
|||||||
{
|
{
|
||||||
key: 'studyDate',
|
key: 'studyDate',
|
||||||
content: (
|
content: (
|
||||||
<div>
|
<>
|
||||||
{studyDate && <span className="mr-4">{studyDate}</span>}
|
{studyDate && <span className="mr-4">{studyDate}</span>}
|
||||||
{studyTime && <span>{studyTime}</span>}
|
{studyTime && <span>{studyTime}</span>}
|
||||||
</div>
|
</>
|
||||||
),
|
),
|
||||||
title: `${studyDate || ''} ${studyTime || ''}`,
|
title: `${studyDate || ''} ${studyTime || ''}`,
|
||||||
gridCol: 5,
|
gridCol: 5,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user