修复日历事件共享bug

This commit is contained in:
2021-07-28 05:09:38 +08:00
parent 7ffb549bc6
commit 566954dfcf
18 changed files with 188 additions and 124 deletions
@@ -58,16 +58,16 @@ class CalendarController extends DefaultController
$url = url('event/index', ['calendar_id'=>$calendar['id']]);
}
$sources[] = [
'url' => $url,
'id' => $calendar['id'],
'userid' => $calendar['userid'],
'url' => $url,
'id' => $calendar['id'],
'userid' => $calendar['userid'],
'backgroundColor' => $calendar['calendarcolor'],
"borderColor" => $calendar['calendarcolor'],
"borderColor" => $calendar['calendarcolor'],
];
}
return $this->json([
'calendars' => $calendars,
'sources' => $sources,
'sources' => $sources,
], true);
}
@@ -44,7 +44,7 @@ class EventController extends DefaultController
}
// 获取共享事件
$shared = ShareService::getItemsSourceBy(['event'], $gets['user_id']);
$shared = ShareService::getItemsSourceBy(['event'], $gets['user_id'], $gets['start'], $gets['end']);
$share_id = Arr::pluck($shared, 'source_id');
if (count($share_id)) {
$share = Arr::pluck($shared, 'name', 'source_id');