-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d07e994
commit 1676e8b
Showing
22 changed files
with
582 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,42 @@ | ||
## **v1.0.0 (20th of August 2021)** - *First Release* | ||
## **v1.0.0 (19th of November 2021)** - *First Release* | ||
|
||
* [feature]Admin user can connect to their google account. | ||
* [feature] Admin user can connect to their google account. | ||
|
||
* [feature] User can fetch all events from selected calendars | ||
|
||
* [feature] Support two-way synchronization for events | ||
|
||
* [feature] Support real time event synchronization | ||
* [feature] Support real time event synchronization | ||
|
||
* [feature] Create google meet directly from activity events | ||
|
||
|
||
* #1 [fixed] - When Admin/User Login to their panel After setup google integration on their project. Then google calendar Icon should be show in sidebar | ||
|
||
* #3 [fixed] - When we are trying to connect with the google calendar. then it should not be redirecting to the dashboard. | ||
|
||
* #4 [fixed] - There should not be an exception when the user trying to edit activity that is created by google calendar | ||
|
||
* #6 [fixed] - Spelling of calendar should not be calender. | ||
|
||
* #7 [fixed] - The blank option should not be present there in Calendar dropdown. | ||
|
||
* #8 [fixed] - The name of google calendar should not be show wrong in side bar. | ||
|
||
* #9 [fixed] - There should be a confirm box before remove google account | ||
|
||
* #10 [fixed] - The task should be visible on admin panel | ||
|
||
* #11 [fixed] - The Activity should be deleted from the admin panel if we are deleting the same activity from google calendar. | ||
|
||
* #12 [fixed] - There should be an option to differentiate activities of google calendar and admin panel | ||
|
||
* #13 [fixed] - The participant's name should be visible on the Activity. | ||
|
||
* #18 [fixed] - There should not be an exception when the user clicking on Save and Sync button without selecting any canendar. | ||
|
||
* #20 [fixed] - The activities should not be repat when the user re-syncing the google calendar. | ||
|
||
* #24 [fixed] - The user should not be able to access google calendar if the user has no permission. | ||
|
||
* #25 [fixed] - There should not be any warning if the user is trying to delete any activity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"/css/admin.css": "/css/admin.css?id=3c9d81644bdce8af07d0", | ||
"/css/admin.css": "/css/admin.css?id=62d249c405dee7b0cda1", | ||
"/images/google-active-icon.svg": "/images/google-active-icon.svg?id=3ad25e75f220357c2c90", | ||
"/images/google-calendar-icon.png": "/images/google-calendar-icon.png?id=f87f54e121dfb7cf8b39", | ||
"/images/google-icon.svg": "/images/google-icon.svg?id=1aca2f0da9adb1442c53" | ||
"/images/google-icon.svg": "/images/google-icon.svg?id=1aca2f0da9adb1442c53", | ||
"/images/google-meet-icon.png": "/images/google-meet-icon.png?id=b2daf7c604b448ab620e" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Database/Migrations/2021_11_17_223640_add_scopes_column_in_google_accounts_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddScopesColumnInGoogleAccountsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('google_accounts', function (Blueprint $table) { | ||
$table->json('scopes')->nullable(); | ||
}); | ||
|
||
DB::table('google_accounts') | ||
->update([ | ||
'google_accounts.scopes' => ['calendar'], | ||
]); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('google_accounts', function (Blueprint $table) { | ||
$table->dropColumn('scopes'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
namespace Webkul\Google\Http\Controllers; | ||
|
||
use Webkul\Google\Repositories\AccountRepository; | ||
|
||
class CalendarController extends Controller | ||
{ | ||
/** | ||
* AccountRepository object | ||
* | ||
* @var \Webkul\Repositories\Services\AccountRepository | ||
*/ | ||
protected $accountRepository; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @param \Webkul\Google\Repositories\AccountRepository $accountRepository | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(AccountRepository $accountRepository) | ||
{ | ||
$this->accountRepository = $accountRepository; | ||
} | ||
|
||
/** | ||
* Synchronize | ||
* | ||
* @param integer $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function sync($id) | ||
{ | ||
$account = $this->accountRepository->findOrFail($id); | ||
|
||
$primaryCalendar = null; | ||
|
||
foreach ($account->calendars as $calendar) { | ||
if ($calendar->id == request('calendar_id')) { | ||
$calendar->update(['is_primary' => 1]); | ||
|
||
$primaryCalendar = $calendar; | ||
} else { | ||
$calendar->update(['is_primary' => 0]); | ||
} | ||
} | ||
|
||
$primaryCalendar->synchronization->ping(); | ||
|
||
session()->flash('success', trans('google::app.sync-success')); | ||
|
||
return redirect()->back(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
|
||
namespace Webkul\Google\Http\Controllers; | ||
|
||
use Carbon\Carbon; | ||
use Webkul\Google\Repositories\AccountRepository; | ||
|
||
class MeetController extends Controller | ||
{ | ||
/** | ||
* AccountRepository object | ||
* | ||
* @var \Webkul\Repositories\Services\AccountRepository | ||
*/ | ||
protected $accountRepository; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @param \Webkul\Google\Repositories\AccountRepository $accountRepository | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(AccountRepository $accountRepository) | ||
{ | ||
$this->accountRepository = $accountRepository; | ||
} | ||
|
||
/** | ||
* Create google meet link | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function createLink() | ||
{ | ||
$account = $this->accountRepository->first(); | ||
|
||
$service = $account->getGoogleService('Calendar'); | ||
|
||
$start = request('schedule_from') | ||
? Carbon::createFromFormat('Y-m-d H:i:s', request('schedule_from')) | ||
: Carbon::now(); | ||
|
||
$end = request('schedule_ro') | ||
? Carbon::createFromFormat('Y-m-d H:i:s', request('schedule_ro')) | ||
: Carbon::now()->addMinutes(30); | ||
|
||
$googleEvent = $service->events->insert( | ||
'primary', | ||
|
||
new \Google_Service_Calendar_Event([ | ||
'summary' => 'Google Meet Link', | ||
|
||
'start' => [ | ||
'dateTime' => $start->toAtomString(), | ||
'timeZone' => $start->timezone->getName(), | ||
], | ||
|
||
'end' => [ | ||
'dateTime' => $end->toAtomString(), | ||
'timeZone' => $end->timezone->getName(), | ||
], | ||
|
||
'conferenceData' => [ | ||
'createRequest' => [ | ||
'conferenceSolutionKey' => [ | ||
'type' => 'hangoutsMeet', | ||
], | ||
|
||
'requestId' => 'meet_' . time(), | ||
], | ||
], | ||
]), | ||
|
||
['conferenceDataVersion' => 1] | ||
); | ||
|
||
$service->events->delete('primary', $googleEvent->id); | ||
|
||
return response()->json([ | ||
'link' => $googleEvent->hangoutLink, | ||
'comment' => '──────────<br/><br/>You are invited to join Google Meet meeting.<br/><br/>Join the Google Meet meeting: <a href="' . $googleEvent->hangoutLink . '" target="_blank">' . $googleEvent->hangoutLink . '</a><br/><br/>──────────' | ||
]); | ||
} | ||
} |
Oops, something went wrong.