diff --git a/app/Http/Controllers/EventSurveyController.php b/app/Http/Controllers/EventSurveyController.php index 9872ef03..48865558 100644 --- a/app/Http/Controllers/EventSurveyController.php +++ b/app/Http/Controllers/EventSurveyController.php @@ -237,4 +237,36 @@ class EventSurveyController extends MyBaseController return view('ManageEvent.Modals.ViewAnswers', $data); } + + public function showExportAnswers(Request $request, $event_id, $export_as = 'xlsx') { + + Excel::create('answers-as-of-'.date('d-m-Y-g.i.a'), function ($excel) use ($event_id) { + + $excel->setTitle('Survey Answers'); + + // Chain the setters + $excel->setCreator(config('attendize.app_name')) + ->setCompany(config('attendize.app_name')); + + $excel->sheet('survey_answers_sheet_!', function ($sheet) use ($event_id) { + + $event = Event::scope()->findOrFail($event_id); + + /* + * @todo Build array of question and all its answers + */ + + $sheet->fromArray([]); + + // Set gray background on first row + $sheet->row(1, function ($row) { + $row->setBackground('#f5f5f5'); + }); + }); + })->export($export_as); + + + } + + } diff --git a/app/Http/routes.php b/app/Http/routes.php index bcf5fa4e..daf76692 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -594,6 +594,11 @@ Route::group(['middleware' => ['auth', 'first.run']], function () { 'uses' => 'EventSurveyController@showEventQuestionAnswers', ]); + Route::get('{event_id}/answers/export/{export_as?}', [ + 'as' => 'showExportAnswers', + 'uses' => 'EventSurveyController@showExportAnswers', + ]); + /* * ------- diff --git a/config/attendize.php b/config/attendize.php index 5b02e665..5b58b930 100644 --- a/config/attendize.php +++ b/config/attendize.php @@ -25,7 +25,7 @@ return [ 'event_pdf_tickets_path' => 'user_content/pdf_tickets', 'event_bg_images' => 'assets/images/public/EventPage/backgrounds', - 'fallback_organiser_logo_url' => '/assets/images/logo-dark.png', + 'fallback_organiser_logo_url' => '/assets/images/logo-100x100-lightBg.png', 'cdn_url' => '', 'checkout_timeout_after' => env('CHECKOUT_TIMEOUT_AFTER', 30), #minutes diff --git a/resources/views/ManageAccount/Modals/EditAccount.blade.php b/resources/views/ManageAccount/Modals/EditAccount.blade.php index b4b60050..f32c213b 100644 --- a/resources/views/ManageAccount/Modals/EditAccount.blade.php +++ b/resources/views/ManageAccount/Modals/EditAccount.blade.php @@ -127,7 +127,7 @@ - Added users will receive instructions complete their registration. + Added users will receive further instruction via email. diff --git a/resources/views/ManageEvent/Modals/ViewAnswers.blade.php b/resources/views/ManageEvent/Modals/ViewAnswers.blade.php index df6b0d6c..2cb58a54 100644 --- a/resources/views/ManageEvent/Modals/ViewAnswers.blade.php +++ b/resources/views/ManageEvent/Modals/ViewAnswers.blade.php @@ -52,7 +52,7 @@ @else