Skip to content

Commit

Permalink
Remet en place le lien d'abonnement au calendrier des congés
Browse files Browse the repository at this point in the history
  • Loading branch information
florimondmanca committed Sep 27, 2024
1 parent 0daa72d commit 12d8cba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ export class ListLeaveRequestsController {
userId
);

const calendarToken = process.env.CALENDAR_TOKEN;

return {
table,
overviewTable,
pagination,
currentPage: dto.page
currentPage: dto.page,
calendarToken,
};
}
}
10 changes: 10 additions & 0 deletions src/templates/pages/leave_requests/list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
{{ links.add(path('people_leave_requests_add'), text='leave-requests-add-title'|trans) }}
</div>

<div class="pc-cluster pc-gap" style="--cluster-align: center">
<label for="calendarUrl">{{ 'leaves-calendar-url-title'|trans }}</label>
<input id="calendarUrl" class="pc-input" style="--input-width: fit-content" type="text" readonly value="{{ url('people_leaves_calendar') }}?token={{ calendarToken }}">
<pc-clipboard-button class="pc-js-only" data-source="#calendarUrl">
<button class="pc-btn pc-btn--muted" title="{{ 'clipboard-copy'|trans }}">
{{ icons.clipboard() }}
</button>
</pc-clipboard-button>
</div>

<div class="pc-cluster" style="--cluster-gap: calc(3 * var(--w))">
<div class="pc-stack">
<h2>{{ 'leaves-summary-title'|trans }}</h2>
Expand Down

0 comments on commit 12d8cba

Please sign in to comment.