@uxland/primary-shell 7.29.7 → 7.29.13

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.
Files changed (25) hide show
  1. package/dist/{component-DVZj1pQR.js → component-D-_nJ0GB.js} +2 -2
  2. package/dist/{component-DVZj1pQR.js.map → component-D-_nJ0GB.js.map} +1 -1
  3. package/dist/{index-CbiH0JOX.js → index-Bij-Dh9n.js} +503 -462
  4. package/dist/index-Bij-Dh9n.js.map +1 -0
  5. package/dist/index.js +1 -1
  6. package/dist/index.umd.cjs +65 -65
  7. package/dist/index.umd.cjs.map +1 -1
  8. package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.d.ts +1 -1
  9. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.d.ts +11 -5
  10. package/package.json +2 -2
  11. package/src/UI/components/clinical-pathways-action-menu/styles.css +4 -0
  12. package/src/UI/components/communication-action-menu/styles.css +4 -0
  13. package/src/UI/components/navigation-tooltip/navigation-tooltip.ts +3 -3
  14. package/src/UI/components/poc-events-ecap/poc-events-ecap.ts +7 -3
  15. package/src/UI/components/primaria-accordion/primaria-accordion.ts +0 -1
  16. package/src/UI/shared-components/primaria-nav-item/styles.css +4 -0
  17. package/src/UI/shared-components/primaria-nav-item/template.ts +3 -4
  18. package/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.ts +6 -5
  19. package/src/UI/shared-components/primaria-nav-tree-menu/template.ts +35 -39
  20. package/src/api/pdf-viewer-manager/pdf-viewer-manager.test.ts +15 -15
  21. package/src/api/pdf-viewer-manager/pdf-viewer-manager.ts +34 -14
  22. package/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/styles.css +26 -5
  23. package/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/template.ts +6 -9
  24. package/src/features/visit/finalize-visit/component/template.ts +2 -2
  25. package/dist/index-CbiH0JOX.js.map +0 -1
@@ -3,9 +3,9 @@ import { PrimariaNavItemConfig, PrimariaNavTreeMenuConfig } from '../typings';
3
3
  export declare class PrimariaNavTreeMenu extends LitElement {
4
4
  static styles: import('lit').CSSResult;
5
5
  config: PrimariaNavTreeMenuConfig;
6
- primariaNavItemConfig: PrimariaNavItemConfig;
7
6
  showActionMenu: boolean;
8
7
  constructor(config: PrimariaNavTreeMenuConfig);
8
+ get primariaNavItemConfig(): PrimariaNavItemConfig;
9
9
  handleItemClick: () => void;
10
10
  handleCloseMenu: () => void;
11
11
  render(): import('lit').TemplateResult<1>;
@@ -1,13 +1,19 @@
1
1
  import { PrimariaBroker } from '../broker/primaria-broker';
2
2
  import { PrimariaNotificationService } from '../notification-service/notification-service';
3
+ export interface PdfData {
4
+ id: string;
5
+ name: string;
6
+ date: string;
7
+ url?: string;
8
+ b64?: string;
9
+ }
3
10
  export interface IPdfDocument {
4
- pdfName: string;
5
11
  id: string;
12
+ pdfName: string;
6
13
  data: PdfData;
7
14
  }
8
- export interface PdfData {
9
- url?: string;
10
- b64?: string;
15
+ export interface PdfViewerOptions {
16
+ autoNavigate?: boolean;
11
17
  }
12
18
  export declare class PdfViewerManager {
13
19
  private broker;
@@ -15,7 +21,7 @@ export declare class PdfViewerManager {
15
21
  constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService);
16
22
  private pdfs;
17
23
  private activePdf;
18
- add(pdfName: string, data: PdfData): void;
24
+ add(data: PdfData, options?: PdfViewerOptions): IPdfDocument | undefined;
19
25
  delete(pdfId: string): void;
20
26
  getPdfs(): IPdfDocument[];
21
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.29.7",
3
+ "version": "7.29.13",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -25,7 +25,7 @@
25
25
  "url": "https://github.com/uxland/harmonix/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@uxland/harmonix": "^1.1.2",
28
+ "@uxland/harmonix": "^1.1.3",
29
29
  "@uxland/harmonix-adapters": "^1.2.2"
30
30
  },
31
31
  "devDependencies": {
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css, unsafeCSS } from "lit";
1
+ import { LitElement, css, html, unsafeCSS } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
3
  import styles from "./styles.css?inline";
4
4
 
@@ -12,11 +12,11 @@ export class NavigationTooltip extends LitElement {
12
12
 
13
13
  render() {
14
14
  const itemHeight = 51;
15
- const centerY = this.itemAbsoluteY + itemHeight / 2;
15
+ const centerY = this.itemAbsoluteY + itemHeight / 2 - 5;
16
16
 
17
17
  return html`
18
18
  <div class="tooltip-overlay">
19
- <div class="navigation-tooltip" style="left: 73px; top: ${centerY}px">
19
+ <div class="navigation-tooltip" style="left: 88px; top: ${centerY}px">
20
20
  <dss-icon icon="info" size="md"></dss-icon>
21
21
  ${this.text}
22
22
  <div class="arrow"></div>
@@ -22,8 +22,12 @@ export class PocEventsEcap extends LitElement {
22
22
  </div>
23
23
 
24
24
  <form>
25
+ <label for="pdfId">PDF ID</label>
26
+ <input type="text" id="pdfId" name="pdfId" placeholder="unique-id">
25
27
  <label for="pdfName">PDF Name</label>
26
28
  <input type="text" id="pdfName" name="pdfName" placeholder="pdfName">
29
+ <label for="pdfDate">PDF Date</label>
30
+ <input type="text" id="pdfDate" name="pdfDate" placeholder="2024-01-15">
27
31
  <label for="url">URL</label>
28
32
  <input type="text" id="url" name="url" placeholder="url">
29
33
 
@@ -37,12 +41,12 @@ export class PocEventsEcap extends LitElement {
37
41
  }
38
42
 
39
43
  sendPdfToViewer() {
44
+ const pdfId = (this as any).shadowRoot?.getElementById("pdfId")?.value as string;
40
45
  const pdfName = (this as any).shadowRoot?.getElementById("pdfName")?.value as string;
46
+ const pdfDate = (this as any).shadowRoot?.getElementById("pdfDate")?.value as string;
41
47
  const fileName = (this as any).shadowRoot?.getElementById("url")?.value as string;
42
48
 
43
- const data = { url: fileName };
44
-
45
- shellApi.pdfViewerManager.add(pdfName, data);
49
+ shellApi.pdfViewerManager.add({ id: pdfId, name: pdfName, date: pdfDate, url: fileName });
46
50
  }
47
51
 
48
52
  getPDFS() {
@@ -1,6 +1,5 @@
1
1
  import { LitElement, html, css } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
-
4
3
  export class PrimariaAccordion extends LitElement {
5
4
  @property({ type: Boolean })
6
5
  isOpen;
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -4,12 +4,11 @@ import { classMap } from "lit/directives/class-map.js";
4
4
 
5
5
  export const template = (props: PrimariaNavItem) => {
6
6
  return html`
7
- <div
8
- class=${classMap({ item: true, active: props.isActive })}
9
- @click=${props.config.callbackFn}
7
+ <div
8
+ class=${classMap({ item: true, active: props.isActive })}
10
9
  ?expanded=${props.showText}
11
10
  >
12
- <div class="icon-label">
11
+ <div class="icon-label" @click=${props.config.callbackFn}>
13
12
  <dss-icon icon=${props.config.icon} size="md" ?fill=${props.config.fill} style=${props.config.rotateIcon ? "transform: rotate(180deg);" : ""}></dss-icon>
14
13
  ${props.showText ? html`<span>${props.config.label}</span>` : ""}
15
14
  </div>
@@ -10,16 +10,18 @@ export class PrimariaNavTreeMenu extends LitElement {
10
10
  `;
11
11
 
12
12
  @property({ type: Object }) config: PrimariaNavTreeMenuConfig;
13
- @state() primariaNavItemConfig: PrimariaNavItemConfig;
14
13
 
15
14
  @state() showActionMenu = false;
16
15
 
17
16
  constructor(config: PrimariaNavTreeMenuConfig) {
18
17
  super();
19
18
  this.config = config;
20
- this.primariaNavItemConfig = {
21
- icon: config.icon,
22
- label: config.label,
19
+ }
20
+
21
+ get primariaNavItemConfig(): PrimariaNavItemConfig {
22
+ return {
23
+ icon: this.config.icon,
24
+ label: this.config.label,
23
25
  showArrow: true,
24
26
  callbackFn: this.handleItemClick,
25
27
  };
@@ -27,7 +29,6 @@ export class PrimariaNavTreeMenu extends LitElement {
27
29
 
28
30
  handleItemClick = () => {
29
31
  this.showActionMenu = true;
30
- this.requestUpdate();
31
32
  };
32
33
 
33
34
  handleCloseMenu = () => {
@@ -1,4 +1,4 @@
1
- import { html, nothing } from "lit";
1
+ import { html } from "lit";
2
2
  import { PrimariaNavTreeMenu } from "./primaria-nav-tree-menu";
3
3
  import { classMap } from "lit/directives/class-map.js";
4
4
 
@@ -6,45 +6,41 @@ export const template = (props: PrimariaNavTreeMenu) => html`
6
6
  <div class="wrapper">
7
7
  <primaria-nav-item
8
8
  .config=${props.primariaNavItemConfig}
9
- @click=${props.handleItemClick}
10
9
  class="${classMap({ "menu-active": props.showActionMenu })}"
11
10
  ></primaria-nav-item>
12
- ${
13
- props.showActionMenu
14
- ? html`
15
- <dss-action-menu @onCloseActionMenu=${props.handleCloseMenu}>
16
- ${props.config.actionMenuItems?.map(
17
- (item) => item.hasNestedMenu
18
- ? html`
19
- <dss-action-menu-item
20
- righticon=${item.icon}
21
- .label=${item.label}
22
- hasnestedmenu
23
- >
24
- <dss-action-menu>
25
- ${item.nestedMenuItems?.map(
26
- (nestedItem) => html`
27
- <dss-action-menu-item
28
- righticon=${nestedItem.icon}
29
- .label=${nestedItem.label}
30
- @click=${nestedItem.callbackFn}
31
- ></dss-action-menu-item>
32
- `,
33
- )}
34
- </dss-action-menu>
35
- </dss-action-menu-item>
36
- `
37
- : html`
38
- <dss-action-menu-item
39
- righticon=${item.icon}
40
- .label=${item.label}
41
- @click=${item.callbackFn}
42
- ></dss-action-menu-item>
43
- `,
44
- )}
45
- </dss-action-menu>
46
- `
47
- : nothing
48
- }
11
+ <dss-action-menu
12
+ @onCloseActionMenu=${props.handleCloseMenu}
13
+ ?hidden=${!props.showActionMenu}
14
+ >
15
+ ${props.config.actionMenuItems?.map((item) =>
16
+ item.hasNestedMenu
17
+ ? html`
18
+ <dss-action-menu-item
19
+ righticon=${item.icon}
20
+ .label=${item.label}
21
+ hasnestedmenu
22
+ >
23
+ <dss-action-menu>
24
+ ${item.nestedMenuItems?.map(
25
+ (nestedItem) => html`
26
+ <dss-action-menu-item
27
+ righticon=${nestedItem.icon}
28
+ .label=${nestedItem.label}
29
+ @click=${nestedItem.callbackFn}
30
+ ></dss-action-menu-item>
31
+ `,
32
+ )}
33
+ </dss-action-menu>
34
+ </dss-action-menu-item>
35
+ `
36
+ : html`
37
+ <dss-action-menu-item
38
+ righticon=${item.icon}
39
+ .label=${item.label}
40
+ @click=${item.callbackFn}
41
+ ></dss-action-menu-item>
42
+ `,
43
+ )}
44
+ </dss-action-menu>
49
45
  </div>
50
46
  `;
@@ -42,32 +42,32 @@ describe("PdfViewerManager", () => {
42
42
  });
43
43
 
44
44
  it("should show error if neither url nor b64 is provided", () => {
45
- manager.add("Doc1", {});
45
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00" });
46
46
  expect(notificationService.error).toHaveBeenCalledWith("pdfManager.missingData");
47
47
  expect(manager.getPdfs()).toHaveLength(0);
48
48
  });
49
49
 
50
50
  it("should show error if both url and b64 are provided", () => {
51
- manager.add("Doc1", { url: "url", b64: "b64" });
51
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "url", b64: "b64" });
52
52
  expect(notificationService.error).toHaveBeenCalledWith("pdfManager.duplicatedSource");
53
53
  expect(manager.getPdfs()).toHaveLength(0);
54
54
  });
55
55
 
56
56
  it("should add a valid pdf and publish event", () => {
57
- manager.add("Doc1", { url: "https://test.com/doc1.pdf" });
57
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "https://test.com/doc1.pdf" });
58
58
 
59
59
  expect(manager.getPdfs()).toHaveLength(1);
60
60
  expect(broker.publish).toHaveBeenCalledWith(pdfViwerEvents.added, {
61
- id: "generated-id",
61
+ id: "doc-1",
62
62
  pdfName: "Doc1",
63
- data: { url: "https://test.com/doc1.pdf" },
63
+ data: { id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "https://test.com/doc1.pdf" },
64
64
  });
65
65
  });
66
66
 
67
67
  it("should show tooltip when adding a valid pdf", async () => {
68
68
  vi.useFakeTimers();
69
69
 
70
- manager.add("Doc1", { url: "https://test.com/doc1.pdf" });
70
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "https://test.com/doc1.pdf" });
71
71
 
72
72
  // Fast-forward the setTimeout(100ms)
73
73
  vi.advanceTimersByTime(100);
@@ -81,8 +81,8 @@ describe("PdfViewerManager", () => {
81
81
  });
82
82
 
83
83
  it("should warn if pdf with same name already exists", () => {
84
- manager.add("Doc1", { b64: "xxx" });
85
- manager.add("Doc1", { b64: "xxx" });
84
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", b64: "xxx" });
85
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", b64: "xxx" });
86
86
 
87
87
  expect(notificationService.warning).toHaveBeenCalledWith("pdfManager.alreadyUploaded");
88
88
  expect(manager.getPdfs()).toHaveLength(1); // solo el primero
@@ -92,14 +92,14 @@ describe("PdfViewerManager", () => {
92
92
  vi.useFakeTimers();
93
93
 
94
94
  // First add succeeds and shows tooltip
95
- manager.add("Doc1", { b64: "xxx" });
95
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", b64: "xxx" });
96
96
  vi.advanceTimersByTime(100);
97
97
 
98
98
  // Clear mocks after first add
99
99
  vi.clearAllMocks();
100
100
 
101
101
  // Second add with same name should show warning but NOT tooltip
102
- manager.add("Doc1", { b64: "xxx" });
102
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", b64: "xxx" });
103
103
  vi.advanceTimersByTime(100);
104
104
 
105
105
  expect(notificationService.warning).toHaveBeenCalledWith("pdfManager.alreadyUploaded");
@@ -111,7 +111,7 @@ describe("PdfViewerManager", () => {
111
111
  it("should not show tooltip when pdf data is invalid", () => {
112
112
  vi.useFakeTimers();
113
113
 
114
- manager.add("Doc1", {});
114
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00" });
115
115
  vi.advanceTimersByTime(100);
116
116
 
117
117
  expect(notificationService.error).toHaveBeenCalledWith("pdfManager.missingData");
@@ -122,14 +122,14 @@ describe("PdfViewerManager", () => {
122
122
 
123
123
  it("should not call registerNavButton when adding PDFs", () => {
124
124
  // registerPdfViewerNavItem is now called from UI/internal-views, not from the manager
125
- manager.add("Doc1", { url: "u" });
126
- manager.add("Doc2", { url: "u2" });
125
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "u" });
126
+ manager.add({ id: "doc-2", name: "Doc2", date: "2024-01-15 - 10:00", url: "u2" });
127
127
 
128
128
  expect(registerPdfViewerNavItem).not.toHaveBeenCalled();
129
129
  });
130
130
 
131
131
  it("should delete a pdf and publish deletion event", () => {
132
- manager.add("Doc1", { url: "u" });
132
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "u" });
133
133
  const pdfs = manager.getPdfs();
134
134
  expect(pdfs.length).toBeGreaterThan(0);
135
135
  const id = pdfs[0]!.id;
@@ -141,7 +141,7 @@ describe("PdfViewerManager", () => {
141
141
  });
142
142
 
143
143
  it("should clear activePdf if deleted", () => {
144
- manager.add("Doc1", { url: "u" });
144
+ manager.add({ id: "doc-1", name: "Doc1", date: "2024-01-15 - 10:00", url: "u" });
145
145
  const pdfs = manager.getPdfs();
146
146
  expect(pdfs.length).toBeGreaterThan(0);
147
147
  const id = pdfs[0]!.id;
@@ -1,4 +1,3 @@
1
- import { generateId } from "@primaria/plugins-core";
2
1
  import { customElement } from "lit/decorators.js";
3
2
  import { translate } from "../../locales";
4
3
  import { PrimariaBroker } from "../broker/primaria-broker";
@@ -10,15 +9,22 @@ import { showNavItemTooltip } from "../../UI/components/navigation-tooltip";
10
9
  import { pdfViewerId } from "./constants";
11
10
  import { primariaShellId } from "../../constants";
12
11
 
12
+ export interface PdfData {
13
+ id: string;
14
+ name: string;
15
+ date: string;
16
+ url?: string;
17
+ b64?: string;
18
+ }
19
+
13
20
  export interface IPdfDocument {
14
- pdfName: string;
15
21
  id: string;
22
+ pdfName: string;
16
23
  data: PdfData;
17
24
  }
18
25
 
19
- export interface PdfData {
20
- url?: string;
21
- b64?: string;
26
+ export interface PdfViewerOptions {
27
+ autoNavigate?: boolean;
22
28
  }
23
29
 
24
30
  export class PdfViewerManager {
@@ -37,9 +43,12 @@ export class PdfViewerManager {
37
43
  private pdfs: IPdfDocument[] = [];
38
44
  private activePdf: IPdfDocument | null = null;
39
45
 
40
- add(pdfName: string, data: PdfData) {
41
- const id = generateId();
42
- const pdf: IPdfDocument = { id, pdfName, data };
46
+ add(data: PdfData, options?: PdfViewerOptions) {
47
+ const pdf: IPdfDocument = {
48
+ id: data.id,
49
+ pdfName: data.name,
50
+ data
51
+ };
43
52
 
44
53
  if (!data.url && !data.b64) {
45
54
  this.notificationService.error(translate("pdfManager.missingData"));
@@ -49,18 +58,29 @@ export class PdfViewerManager {
49
58
  this.notificationService.error(translate("pdfManager.duplicatedSource"));
50
59
  return;
51
60
  }
52
- if (this.pdfs.some((p) => p.pdfName === pdf.pdfName)) {
61
+ if (this.pdfs.some((p) => p.id === pdf.id)) {
53
62
  this.notificationService.warning(translate("pdfManager.alreadyUploaded"));
54
63
  } else {
55
64
  this.pdfs.push(pdf as IPdfDocument);
56
65
  this.broker.publish(pdfViwerEvents.added, pdf);
57
66
 
58
- // Show tooltip to guide user to the PDF viewer
59
- setTimeout(() => {
60
- const navItemKey = `${primariaShellId}::${pdfViewerId}`;
61
- showNavItemTooltip(navItemKey, translate("pdfManager.tooltipMessage"));
62
- }, 100);
67
+ if (options?.autoNavigate) {
68
+ // Navigate automatically to PDF viewer
69
+ setTimeout(() => {
70
+ import("../api").then(({ shellApi }) => {
71
+ shellApi.regionManager.activateMainView(pdfViewerId);
72
+ });
73
+ }, 150);
74
+ } else {
75
+ // Show tooltip to guide user to the PDF viewer
76
+ setTimeout(() => {
77
+ const navItemKey = `${primariaShellId}::${pdfViewerId}`;
78
+ showNavItemTooltip(navItemKey, translate("pdfManager.tooltipMessage"));
79
+ }, 100);
80
+ }
63
81
  }
82
+
83
+ return pdf;
64
84
  }
65
85
 
66
86
  delete(pdfId: string) {
@@ -6,19 +6,40 @@
6
6
  .pdf-item{
7
7
  display: flex;
8
8
  align-items: flex-start;
9
- padding: 8px;
9
+ padding: 8px;
10
10
  gap:8px;
11
11
  color:black;
12
12
  border-bottom: 1px solid var(--color-neutral-100);
13
13
  }
14
14
 
15
- .header-icons{
15
+ .container{
16
16
  display: flex;
17
- gap: 8px;
17
+ flex-direction: column;
18
+ flex: 1;
19
+ position: relative;
18
20
  }
19
21
 
20
- .container{
21
- gap: 8px;
22
+ .close-button{
23
+ position: absolute;
24
+ top: 0;
25
+ right: 0;
26
+ }
27
+
28
+ .data{
22
29
  display: flex;
23
30
  flex-direction: column;
31
+ gap: 4px;
32
+ padding-right: 40px;
33
+ }
34
+
35
+ .pdf-name{
36
+ font-weight: 500;
37
+ font-size: 14px;
38
+ line-height: 1.4;
39
+ }
40
+
41
+ .pdf-date{
42
+ font-size: 12px;
43
+ color: var(--color-neutral-500);
44
+ line-height: 1.3;
24
45
  }
@@ -8,21 +8,18 @@ export const template = (props: PdfSelector) => {
8
8
  return html`
9
9
  <div class="pdf-item">
10
10
  <dss-checkbox @onChange=${() => props.setActivePdf(pdf.id)}>
11
- <input
12
- slot="input"
13
- type="checkbox"
11
+ <input
12
+ slot="input"
13
+ type="checkbox"
14
14
  aria-label="Label"
15
15
  .checked=${props.activePdfs.some((p) => p.id === pdf.id)}
16
16
  >
17
17
  </dss-checkbox>
18
18
  <div class="container">
19
- <div class="header-icons">
20
- <dss-icon-button size="md" variant="error" icon="picture_as_pdf"></dss-icon-button>
21
- <dss-icon-button size="md" variant="error" icon="close" @click=${() => props.removePdf(pdf.id)}></dss-icon-button>
22
- <!-- <dss-icon-button size="md" icon="open_in_new" @click=${() => props.openInNewWindow(pdf)}></dss-icon-button> -->
23
- </div>
19
+ <dss-icon-button class="close-button" size="md" variant="error" icon="close" @click=${() => props.removePdf(pdf.id)}></dss-icon-button>
24
20
  <div class="data">
25
- ${pdf.pdfName}
21
+ <div class="pdf-name">${pdf.data.name || "Sense nom"}</div>
22
+ <div class="pdf-date">${pdf.data.date || " "}</div>
26
23
  </div>
27
24
  </div>
28
25
  </div>
@@ -4,6 +4,6 @@ import { translate } from "../../../../locales";
4
4
 
5
5
  export const template = (props: FinalizeVisitButton) => {
6
6
  return html`
7
- ${props.visitId ? html`<dss-button @click=${props.finalizeVisitHandler} variant="subtle" size="md" icon="door_front" label=${translate("actions.finalizeVisit")}></dss-button>` : nothing}
8
- `;
7
+ <dss-button @click=${props.finalizeVisitHandler} variant="subtle" size="md" icon="door_front" label=${translate("actions.finalizeVisit")}></dss-button>
8
+ `;
9
9
  };