event confirmation fixes
This commit is contained in:
@@ -67,7 +67,6 @@ class EventConfirmation implements EntryPoint
|
||||
|
||||
/**
|
||||
* @throws BadRequest
|
||||
* @throws NotFound
|
||||
* @throws Error
|
||||
*/
|
||||
public function run(Request $request, Response $response): void
|
||||
@@ -128,8 +127,17 @@ class EventConfirmation implements EntryPoint
|
||||
return;
|
||||
}
|
||||
|
||||
$isRelated = $this->entityManager
|
||||
->getRDBRepository($eventType)
|
||||
->getRelation($event, $link)
|
||||
->isRelated($invitee);
|
||||
|
||||
$eventStatus = $event->get('status');
|
||||
|
||||
if (!$isRelated) {
|
||||
$eventStatus = Meeting::STATUS_NOT_HELD;
|
||||
}
|
||||
|
||||
if (in_array($eventStatus, [Meeting::STATUS_HELD, Meeting::STATUS_NOT_HELD])) {
|
||||
$actionData = [
|
||||
'eventName' => $event->get('name'),
|
||||
|
||||
@@ -3,15 +3,18 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h4 class="margin-bottom-2x">{{actionData.translatedEntityType}}: {{actionData.eventName}}</h4>
|
||||
{{#if dateStart}}
|
||||
<div class="margin-bottom-2x">
|
||||
{{#if dateStartChanged}}
|
||||
<div style="text-decoration: line-through;">{{sentDateStart}}</div>
|
||||
{{/if}}
|
||||
<div>{{dateStart}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div>
|
||||
<span class="label label-{{style}} label-md">{{actionData.translatedStatus}}</span>
|
||||
<div class="btn-group">
|
||||
{{#if actionDataList}}
|
||||
<a role="button" class="dropdown-toggle text-soft" data-toggle="dropdown">
|
||||
<span class="fas fa-ellipsis-h"></span>
|
||||
</a>
|
||||
@@ -24,6 +27,7 @@
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
define('crm:views/event-confirmation/confirmation', ['view', 'lib!moment'], function (Dep, moment) {
|
||||
define('crm:views/event-confirmation/confirmation', ['view'], function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
@@ -61,10 +61,15 @@ define('crm:views/event-confirmation/confirmation', ['view', 'lib!moment'], func
|
||||
|
||||
let statusList = ['Accepted', 'Tentative', 'Declined'];
|
||||
|
||||
if (!statusList.includes(this.actionData.status)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let url = window.location.href.replace('action=' + actionMap[this.actionData.status], 'action={action}');
|
||||
|
||||
return statusList.map(item => {
|
||||
let active = item === this.actionData.status;
|
||||
|
||||
return {
|
||||
active: active,
|
||||
link: active ? '' : url.replace('{action}', actionMap[item]),
|
||||
|
||||
Reference in New Issue
Block a user