2016-03-23 18:39:41 +01:00
|
|
|
<section class="heading b-b">
|
|
|
|
<div class="row no-gutter">
|
|
|
|
<div class="col-xs-2 col-sm-2 col-md-1">
|
|
|
|
<section class="heading-btn">
|
2022-01-11 11:03:27 +01:00
|
|
|
<a ng-click="backPrevLocation($event)"><i class="fas fa-long-arrow-alt-left "></i></a>
|
2016-03-23 18:39:41 +01:00
|
|
|
</section>
|
|
|
|
</div>
|
2020-02-26 15:48:42 +01:00
|
|
|
<div class="col-md-8 b-l b-r-md">
|
2016-03-23 18:39:41 +01:00
|
|
|
<section class="heading-title">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h1 translate>{{ 'app.admin.calendar.calendar_management' }}</h1>
|
2016-03-23 18:39:41 +01:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
2020-02-26 15:48:42 +01:00
|
|
|
<div class="col-md-3">
|
2019-11-27 16:17:32 +01:00
|
|
|
<section class="heading-actions wrapper">
|
2020-02-26 15:48:42 +01:00
|
|
|
<a role="button" ui-sref="app.admin.calendar.icalendar" class="btn btn-lg btn-default rounded m-t-sm text-sm import-ics-button">
|
|
|
|
<i class="fa fa-exchange m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.calendar.external_sync' }}</span>
|
2019-11-27 16:17:32 +01:00
|
|
|
</a>
|
2016-03-23 18:39:41 +01:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
2022-04-12 15:54:12 +02:00
|
|
|
<section class="row no-gutter admin-calendar calendar-admin-section"
|
2020-02-24 10:33:27 +01:00
|
|
|
ui-tour="calendar"
|
|
|
|
ui-tour-backdrop="true"
|
2020-10-05 15:34:41 +02:00
|
|
|
ui-tour-template-url="'/shared/tour-step-template.html'"
|
2020-02-24 10:33:27 +01:00
|
|
|
ui-tour-use-hotkeys="true"
|
2020-02-25 10:11:18 +01:00
|
|
|
ui-tour-scroll-parent-id="content-main"
|
2020-02-24 10:33:27 +01:00
|
|
|
post-render="setupCalendarTour">
|
2016-03-23 18:39:41 +01:00
|
|
|
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="calendar-admin-header">
|
|
|
|
<div class="calendar-legend">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h4 translate>{{ 'app.admin.calendar.legend' }}</h4>
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="calendar-legend-group">
|
|
|
|
<span class="calendar-legend-item text-sm border-formation" translate>{{ 'app.admin.calendar.trainings' }}</span><br>
|
|
|
|
<span class="calendar-legend-item text-sm border-machine" translate>{{ 'app.admin.calendar.machines' }}</span><br>
|
2022-05-11 11:54:00 +02:00
|
|
|
<span class="calendar-legend-item text-sm border-space" translate>{{ 'app.admin.calendar.spaces' }}</span>
|
2022-04-12 15:54:12 +02:00
|
|
|
<span class="calendar-legend-item text-sm border-event" ng-show="eventsInCalendar" translate>{{ 'app.admin.calendar.events' }}</span>
|
2019-11-27 11:52:37 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-16 18:43:38 +01:00
|
|
|
<div class="calendar-actions">
|
|
|
|
<div ng-show="isAuthorized('admin')">
|
|
|
|
<a class="btn btn-default export-xls-button"
|
|
|
|
ng-href="api/availabilities/export_index.xlsx"
|
|
|
|
target="export-frame"
|
|
|
|
ng-click="alertExport('index')"
|
|
|
|
uib-popover="{{ 'app.admin.calendar.availabilities_notice' | translate}}"
|
|
|
|
popover-trigger="mouseenter"
|
|
|
|
popover-placement="bottom-left">
|
|
|
|
<i class="fa fa-file-excel-o"></i> {{ 'app.admin.calendar.availabilities' | translate }}
|
|
|
|
</a>
|
|
|
|
<iframe name="export-frame" height="0" width="0" class="none"></iframe>
|
|
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-default m-l" ng-click="openFilterAside()">
|
|
|
|
<span class="fa fa-filter"></span> {{ 'app.shared.calendar.filter_calendar' | translate }}
|
|
|
|
</button>
|
2017-03-02 12:34:28 +01:00
|
|
|
</div>
|
2022-04-12 15:54:12 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<div ui-calendar="calendarConfig" ng-model="eventSources" calendar="calendar" class="wrapper-lg"></div>
|
|
|
|
</div>
|
2017-09-06 15:01:41 +02:00
|
|
|
|
2022-04-12 17:22:47 +02:00
|
|
|
<label class="calendar-admin-info is-empty">
|
2022-04-12 15:54:12 +02:00
|
|
|
<input type="checkbox">
|
|
|
|
<div class="content">
|
2022-04-12 17:22:47 +02:00
|
|
|
<p class="placeholder" translate>{{ 'app.admin.calendar.select_a_slot' }}</p>
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="widget panel b-a" ng-if="availability" ng-show="(availability.slot_duration || availability.tags.length > 0) && availability.available_type !== 'event'">
|
|
|
|
<div class="panel-heading b-b small">
|
|
|
|
<h3><i class="fa fa-info-circle m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.calendar.info' }}</span></h3>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper">
|
|
|
|
<div translate translate-values="{DURATION: availability.slot_duration}" ng-show="availability.slot_duration">{{ 'app.admin.calendar.slot_duration' }}</div>
|
|
|
|
<div class="m-t-sm" ng-show="availability.tags.length > 0">
|
|
|
|
<span translate>{{ 'app.admin.calendar.tags' }}</span>
|
|
|
|
<ul>
|
|
|
|
<li ng-repeat="tag in availability.tags">{{tag.name}}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-05-05 16:19:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-05-31 17:36:43 +02:00
|
|
|
<div class="widget panel b-a" ng-if="availability" ng-hide="availability.available_type == 'event'">
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="panel-heading b-b small">
|
|
|
|
<h3 translate>{{ 'app.admin.calendar.ongoing_reservations' }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper" ng-class="{'reservations-locked': availability.lock}">
|
|
|
|
<ul class="list-unstyled" ng-if="reservations.length > 0">
|
2022-06-15 13:48:42 +02:00
|
|
|
<li ng-repeat="r in reservations" class="m-b-xs" data-label="{{ 'app.admin.event_reservations.canceled' | translate}}" ng-class="{'reservation-canceled':r.canceled_at}">
|
2022-04-12 15:54:12 +02:00
|
|
|
<span ng-if="r.user.name">{{r.user.name}}</span>
|
|
|
|
<span translate ng-if="!r.user.name">{{ 'app.admin.calendar.deleted_user' }}</span>
|
|
|
|
- <span class="label reservation-time">{{ r.start_at | amDateFormat:'LLL' }} - {{ r.end_at | amDateFormat:'LT' }}</span>
|
|
|
|
- <span class="label label-success text-white">{{r.reservable.name}}</span>
|
|
|
|
<span class="btn btn-warning btn-xs" ng-click="cancelBooking(r)" ng-if="!r.canceled_at"><i class="fa fa-times red"></i></span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div ng-show="reservations.length == 0" translate>{{ 'app.admin.calendar.without_reservation' }}</div>
|
|
|
|
<div class="m-t" ng-show="availability.lock"><i class="fa fa-ban"></i> <span class="m-l-xs" translate>{{ 'app.admin.calendar.reservations_locked' }}</span></div>
|
|
|
|
</div>
|
2017-09-06 15:01:41 +02:00
|
|
|
</div>
|
|
|
|
|
2022-05-31 17:36:43 +02:00
|
|
|
<div class="widget panel b-a" ng-if="availability.machine_ids.length > 0">
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="panel-heading b-b small">
|
|
|
|
<h3 translate>{{ 'app.admin.calendar.machines' }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper">
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
<li ng-repeat="m in machines" class="m-b-xs" ng-show="availability.machine_ids.indexOf(m.id) > -1">
|
|
|
|
{{m.name}}
|
|
|
|
<span class="btn btn-warning btn-xs" ng-click="removeMachine(m)" ng-if="availability.machine_ids.length > 1"><i class="fa fa-times red"></i></span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-03-23 18:39:41 +01:00
|
|
|
</div>
|
|
|
|
|
2022-05-31 17:36:43 +02:00
|
|
|
<div class="widget panel b-a" ng-if="availability.plan_ids.length > 0">
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="panel-heading b-b small">
|
|
|
|
<h3 translate>{{ 'app.admin.calendar.plans' }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper">
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
<li ng-repeat="g in availability.plans" class="m-b-xs">
|
|
|
|
<div class="font-sbold">{{::g.name}}</div>
|
|
|
|
<ul class="m-n" ng-repeat="plan in g.plans">
|
|
|
|
<li>
|
|
|
|
{{::plan.base_name}}
|
|
|
|
<span class="btn btn-warning btn-xs" ng-click="removePlan(plan)" ><i class="fa fa-times red"></i></span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-02-12 12:58:17 +01:00
|
|
|
</div>
|
|
|
|
|
2022-05-31 17:36:43 +02:00
|
|
|
<div class="widget panel b-a" ng-if="availability" >
|
2022-04-12 15:54:12 +02:00
|
|
|
<div class="panel-heading b-b small">
|
|
|
|
<h3 translate>{{ 'app.admin.calendar.actions' }}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper" ng-hide="availability.available_type == 'event'">
|
|
|
|
<button class="btn btn-default" ng-click="toggleLockReservations()">
|
|
|
|
<span ng-hide="availability.lock">
|
|
|
|
<i class="fa fa-stop"></i>
|
|
|
|
<span class="m-l-xs" translate>{{ 'app.admin.calendar.block_reservations' }}</span>
|
|
|
|
</span>
|
|
|
|
<span ng-show="availability.lock">
|
|
|
|
<i class="fa fa-play"></i>
|
|
|
|
<span class="m-l-xs" translate>{{ 'app.admin.calendar.allow_reservations' }}</span>
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-default m-t" ng-click="removeSlot()">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-trash"></i>
|
|
|
|
<span class="m-l-xs" translate>{{ 'app.admin.calendar.delete_slot' }}</span>
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg auto wrapper" ng-show="availability.available_type == 'event'">
|
|
|
|
<a class="btn btn-default pointer" ui-sref="app.admin.events_edit({id: availability.event_id})">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-edit"></i>
|
|
|
|
<span class="m-l-xs" translate>{{ 'app.admin.calendar.edit_event' }}</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-default m-t pointer" ui-sref="app.admin.event_reservations({id: availability.event_id})">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-bookmark"></i>
|
|
|
|
<span class="m-l-xs" translate>{{ 'app.admin.calendar.view_reservations' }}</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-11-25 14:49:39 +01:00
|
|
|
</div>
|
2017-09-06 15:01:41 +02:00
|
|
|
</div>
|
2022-04-12 15:54:12 +02:00
|
|
|
</label>
|
2019-11-27 11:52:37 +01:00
|
|
|
</section>
|