diff --git a/app/Console/Commands/ReisiparadiisSync.php b/app/Console/Commands/ReisiparadiisSync.php index 9cd96f1a4..5adcc83fb 100644 --- a/app/Console/Commands/ReisiparadiisSync.php +++ b/app/Console/Commands/ReisiparadiisSync.php @@ -26,7 +26,7 @@ class ReisiparadiisSync extends Command 'Sharjah' => 'Dubai', 'Tenerife North' => 'Tenerife', 'Tenerife Sur' => 'Tenerife', - 'Incekum - Alanya' => 'Alanya', + 'Incekum - Alanya' => 'Alanya' ]; protected $startDestination = null; @@ -54,7 +54,10 @@ private function getEndDestinations($data) $hotels = $data['hotels']; $additionalData = $hotels[0]; $city = $this->getCity($additionalData['linn']); - $endDestinations[] = Destination::whereIn('name', [$data['destination'], $city])->get()->pluck('id')->toArray(); + $endDestinations[] = Destination::whereIn('name', [$data['destination'], $city]) + ->get() + ->pluck('id') + ->toArray(); return $endDestinations; } @@ -88,7 +91,7 @@ public function handle() }, collect()) ->toArray(); - while($this->endpage) { + while ($this->endpage) { $endpoint = str_replace('[PAGE]', $this->endpage, $this->endpoint); try { @@ -130,7 +133,7 @@ public function handle() 'name' => $hotel['hotelli_nimi'], 'type' => $hotel['toatuup'], 'rating' => $this->getHotelRatingFromName($hotel['hotelli_nimi']), - 'price' => (String)$hotel['hind'] + 'price' => (string) $hotel['hind'] ]; } @@ -159,9 +162,7 @@ public function handle() ] ]; - $offer = Offer::create( - collect($res)->toArray() - ); + $offer = Offer::create(collect($res)->toArray()); $offer->startDestinations()->attach( collect([$this->startDestination->id])->mapWithKeys(function ($key) { @@ -176,12 +177,11 @@ public function handle() ); } - $this->endpage ++; + $this->endpage++; } else { $this->endpage = null; break; } - } catch (\Exception $exeption) { $this->endpage = null; $this->error($exeption->getMessage()); @@ -196,6 +196,5 @@ public function handle() } $this->info("\nDONE\n"); - } } diff --git a/app/Http/Controllers/Api/PollController.php b/app/Http/Controllers/Api/PollController.php index a5a9d5693..4ffc3f640 100644 --- a/app/Http/Controllers/Api/PollController.php +++ b/app/Http/Controllers/Api/PollController.php @@ -19,11 +19,17 @@ protected function userHasAnswered(Poll $poll, Request $request) { if ($poll->anonymous) { $ip = $request->ip(); - $poll_results = $poll->results()->where('ip_address', $ip)->first(); + $poll_results = $poll + ->results() + ->where('ip_address', $ip) + ->first(); return $poll_results ? true : false; } else { $user_id = Auth::user()->id; - $poll_results = $poll->results()->where('user_id', $user_id)->first(); + $poll_results = $poll + ->results() + ->where('user_id', $user_id) + ->first(); return $poll_results ? true : false; } } @@ -38,9 +44,8 @@ public function getFrontPagePoll(Request $request) $poll = Poll::where('front_page', true) ->where('active', true) ->where('start_date', '<=', $today->format('Y-m-d')) - ->where(function($q) use ($today) { - $q->where('end_date', '>=', $today->format('Y-m-d')) - ->orWhere('end_date', null); + ->where(function ($q) use ($today) { + $q->where('end_date', '>=', $today->format('Y-m-d'))->orWhere('end_date', null); }) ->with('poll_options') ->first(); @@ -77,10 +82,11 @@ public function getPoll(Poll $poll, Request $request) } $today = Carbon::today(); - if ($poll->active - && $poll->start_date <= $today->format('Y-m-d') - && ($poll->end_date >= $today->format('Y-m-d') || $poll->end_date === null)) { - + if ( + $poll->active && + $poll->start_date <= $today->format('Y-m-d') && + ($poll->end_date >= $today->format('Y-m-d') || $poll->end_date === null) + ) { if ($this->userHasAnswered($poll, $request)) { return response()->json([ 'poll' => $poll, @@ -113,13 +119,16 @@ public function answer(Poll $poll, Request $request) return response()->json(null, 403); } - $value = (int)$request->post('value'); + $value = (int) $request->post('value'); if (!$value) { return response()->json(null, 404); } - $poll_option = $poll->poll_options()->where('id', $value)->first(); + $poll_option = $poll + ->poll_options() + ->where('id', $value) + ->first(); if (!$poll_option) { return response()->json(null, 403); } @@ -136,7 +145,7 @@ public function answer(Poll $poll, Request $request) $result->save(); - $poll->answered ++; + $poll->answered++; $poll->save(); $poll->refresh(); @@ -146,4 +155,3 @@ public function answer(Poll $poll, Request $request) ]); } } - diff --git a/app/Http/Controllers/FrontpageController.php b/app/Http/Controllers/FrontpageController.php index 857fa3904..86072bffe 100644 --- a/app/Http/Controllers/FrontpageController.php +++ b/app/Http/Controllers/FrontpageController.php @@ -124,9 +124,7 @@ public function index() ->with('title', trans('content.forum.create.title')) ->with('route', route('forum.create', ['forum'])) ) - ->push(component('Poll') - ->with('front_page', true) - ) + ->push(component('Poll')->with('front_page', true)) ->push(component('Promo')->with('promo', 'sidebar_small')) ->push(component('Promo')->with('promo', 'sidebar_large')) ->push(component('AffHotelscombined')) diff --git a/app/Http/Controllers/InternalController.php b/app/Http/Controllers/InternalController.php index 95528a65b..b8ba9f228 100644 --- a/app/Http/Controllers/InternalController.php +++ b/app/Http/Controllers/InternalController.php @@ -51,11 +51,12 @@ public function index() ->with('route', route('newsletter.index')) ); } - $navBar - ->pushWhen($loggedUser && $loggedUser->hasRole('admin'), component('Link') + $navBar->pushWhen( + $loggedUser && $loggedUser->hasRole('admin'), + component('Link') ->with('title', trans('poll.title')) ->with('route', route('poll.index')) - ); + ); return layout('Two') ->with('background', component('BackgroundMap')) diff --git a/app/Http/Controllers/PollController.php b/app/Http/Controllers/PollController.php index e8cc4317c..378e97d88 100644 --- a/app/Http/Controllers/PollController.php +++ b/app/Http/Controllers/PollController.php @@ -18,25 +18,31 @@ public function index(Request $request) $items = Poll::orderBy('id', 'DESC')->get(); return layout('Two') - ->with('header', region('Header', collect() - ->push(component('Title') - ->is('white') - ->with('title', trans('poll.title')) - ->with('route', route('poll.index')) - ) - )) - ->with('content', collect() - ->push( - component('PollList') - ->with('items', $items) + ->with( + 'header', + region( + 'Header', + collect()->push( + component('Title') + ->is('white') + ->with('title', trans('poll.title')) + ->with('route', route('poll.index')) + ) ) - ->push(region('Paginator', $pollPaginator)) + ) + ->with( + 'content', + collect() + ->push(component('PollList')->with('items', $items)) + ->push(region('Paginator', $pollPaginator)) ) - ->with('sidebar', collect() - ->push(component('Button') - ->with('title', trans('poll.add.new')) - ->with('route', route('poll.create')) + ->with( + 'sidebar', + collect()->push( + component('Button') + ->with('title', trans('poll.add.new')) + ->with('route', route('poll.create')) ) ) @@ -51,68 +57,87 @@ public function index(Request $request) public function create(Request $request) { return layout('Two') - ->with('header', region('Header', collect() - ->push(component('Title') - ->is('white') - ->with('title', trans('poll.title')) - ->with('route', route('poll.index')) - ) - )) - ->with('content', collect() - ->push(component('Title') - ->with('title', trans('poll.add.title')) + ->with( + 'header', + region( + 'Header', + collect()->push( + component('Title') + ->is('white') + ->with('title', trans('poll.title')) + ->with('route', route('poll.index')) + ) ) - ->push(component('Form') - ->with('route', route('poll.store')) - ->with('fields', collect() - ->push(component('FormTextfield') - ->with('title', trans('poll.question')) - ->with('name', 'question') - ->with('value', old('question')) - ) - ->push(component('Grid2') - ->with('gutter', true) - ->with('items', collect() - ->push(component('FormDatepicker') - ->with('title', trans('poll.start_date')) - ->with('name', 'start_date') - ->with('value', old('start_date')) - ) - ->push(component('FormDatepicker') - ->with('title', trans('poll.end_date')) - ->with('name', 'end_date') - ->with('value', old('end_date')) - ) + ) + ->with( + 'content', + collect() + ->push(component('Title')->with('title', trans('poll.add.title'))) + ->push( + component('Form') + ->with('route', route('poll.store')) + ->with( + 'fields', + collect() + ->push( + component('FormTextfield') + ->with('title', trans('poll.question')) + ->with('name', 'question') + ->with('value', old('question')) + ) + ->push( + component('Grid2') + ->with('gutter', true) + ->with( + 'items', + collect() + ->push( + component('FormDatepicker') + ->with('title', trans('poll.start_date')) + ->with('name', 'start_date') + ->with('value', old('start_date')) + ) + ->push( + component('FormDatepicker') + ->with('title', trans('poll.end_date')) + ->with('name', 'end_date') + ->with('value', old('end_date')) + ) + ) + ) + ->push( + component('PollOption') + ->with('label', trans('poll.options')) + ->with('name', 'poll_fields') + ->with('options', old('poll_fields') ? old('poll_fields') : []) + ->with('add_option_label', trans('poll.option.add')) + ->with('option_placeholder', trans('poll.option.title')) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.anonymous')) + ->with('name', 'anonymous') + ->with('value', old('anonymous')) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.show_on_frontpage')) + ->with('name', 'front_page') + ->with('value', old('front_page')) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.active')) + ->with('name', 'active') + ->with('value', old('active')) + ) + ->push( + component('FormButton') + ->is('large') + ->with('title', trans('general.save')) + ) ) - ) - ->push(component('PollOption') - ->with('label', trans('poll.options')) - ->with('name', 'poll_fields') - ->with('options', old('poll_fields') ? old('poll_fields') : []) - ->with('add_option_label', trans('poll.option.add')) - ->with('option_placeholder', trans('poll.option.title')) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.anonymous')) - ->with('name', 'anonymous') - ->with('value', old('anonymous')) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.show_on_frontpage')) - ->with('name', 'front_page') - ->with('value', old('front_page')) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.active')) - ->with('name', 'active') - ->with('value', old('active')) - ) - ->push(component('FormButton') - ->is('large') - ->with('title', trans('general.save')) - ) ) - ) ) ->with('footer', region('FooterLight')) ->render(); @@ -128,72 +153,119 @@ public function edit(Poll $poll, Request $request) $answered = $poll->answered; return layout('Two') - ->with('header', region('Header', collect() - ->push(component('Title') - ->is('white') - ->with('title', trans('poll.title')) - ->with('route', route('poll.index')) - ) - )) - ->with('content', collect() - ->push(component('Title') - ->with('title', trans('poll.edit.title')) + ->with( + 'header', + region( + 'Header', + collect()->push( + component('Title') + ->is('white') + ->with('title', trans('poll.title')) + ->with('route', route('poll.index')) + ) ) - ->push(component('Form') - ->with('route', route('poll.update', ['poll' => $poll->id])) - ->with('fields', collect() - ->push(component('FormTextfield') - ->with('title', trans('poll.question')) - ->with('name', 'question') - ->with('value', $answered ? $poll->question : old('question', $poll->question)) - ->with('disabled', $answered ? true : false) - ) - ->push(component('Grid2') - ->with('gutter', true) - ->with('items', collect() - ->push(component('FormDatepicker') - ->with('title', trans('poll.start_date')) - ->with('name', 'start_date') - ->with('value', $answered ? $poll->start_date->format('Y-m-d') : old('start_date', $poll->start_date->format('Y-m-d'))) - ->with('disabled', $answered ? true : false) - ) - ->push(component('FormDatepicker') - ->with('title', trans('poll.end_date')) - ->with('name', 'end_date') - ->with('value', old('end_date', $poll->end_date ? $poll->end_date->format('Y-m-d') : null)) - ) + ) + ->with( + 'content', + collect() + ->push(component('Title')->with('title', trans('poll.edit.title'))) + ->push( + component('Form') + ->with('route', route('poll.update', ['poll' => $poll->id])) + ->with( + 'fields', + collect() + ->push( + component('FormTextfield') + ->with('title', trans('poll.question')) + ->with('name', 'question') + ->with( + 'value', + $answered ? $poll->question : old('question', $poll->question) + ) + ->with('disabled', $answered ? true : false) + ) + ->push( + component('Grid2') + ->with('gutter', true) + ->with( + 'items', + collect() + ->push( + component('FormDatepicker') + ->with('title', trans('poll.start_date')) + ->with('name', 'start_date') + ->with( + 'value', + $answered + ? $poll->start_date->format('Y-m-d') + : old( + 'start_date', + $poll->start_date->format('Y-m-d') + ) + ) + ->with('disabled', $answered ? true : false) + ) + ->push( + component('FormDatepicker') + ->with('title', trans('poll.end_date')) + ->with('name', 'end_date') + ->with( + 'value', + old( + 'end_date', + $poll->end_date + ? $poll->end_date->format('Y-m-d') + : null + ) + ) + ) + ) + ) + ->push( + component('PollOption') + ->with('label', trans('poll.options')) + ->with('name', 'poll_fields') + ->with( + 'options', + $answered + ? $poll->poll_options->pluck('name')->toArray() + : old('poll_fields') ?? + $poll->poll_options->pluck('name')->toArray() + ) + ->with('add_option_label', trans('poll.option.add')) + ->with('option_placeholder', trans('poll.option.title')) + ->with('disabled', $answered ? true : false) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.anonymous')) + ->with('name', 'anonymous') + ->with( + 'value', + $answered ? $poll->anonymous : old('anonymous', $poll->anonymous) + ) + ->with('disabled', $answered ? true : false) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.show_on_frontpage')) + ->with('name', 'front_page') + ->with('value', old('front_page', $poll->front_page)) + ) + ->push( + component('FormCheckbox') + ->with('title', trans('poll.active')) + ->with('name', 'active') + ->with('value', old('active', $poll->active)) + ) + ->push( + component('FormButton') + ->is('large') + ->with('title', trans('general.save')) + ) ) - ) - ->push(component('PollOption') - ->with('label', trans('poll.options')) - ->with('name', 'poll_fields') - ->with('options', $answered ? $poll->poll_options->pluck('name')->toArray() : old('poll_fields') ?? $poll->poll_options->pluck('name')->toArray()) - ->with('add_option_label', trans('poll.option.add')) - ->with('option_placeholder', trans('poll.option.title')) - ->with('disabled', $answered ? true : false) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.anonymous')) - ->with('name', 'anonymous') - ->with('value', $answered ? $poll->anonymous : old('anonymous', $poll->anonymous)) - ->with('disabled', $answered ? true : false) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.show_on_frontpage')) - ->with('name', 'front_page') - ->with('value', old('front_page', $poll->front_page)) - ) - ->push(component('FormCheckbox') - ->with('title', trans('poll.active')) - ->with('name', 'active') - ->with('value', old('active', $poll->active)) - ) - ->push(component('FormButton') - ->is('large') - ->with('title', trans('general.save')) - ) ) - ) ) ->with('footer', region('FooterLight')) ->render(); @@ -222,13 +294,13 @@ protected function validateSaveRequest(Poll $poll = null) $attribute_names = [ 'question' => trans('poll.question'), 'start_date' => trans('poll.start_date'), - 'end_date' => trans('poll.end_date'), + 'end_date' => trans('poll.end_date') ]; $messages = [ 'poll_fields.required' => trans('poll.validation.options_required'), 'poll_fields.min' => trans('poll.validation.options_required'), - 'end_date.after_or_equal' => trans('poll.validation.end_date_invalid'), + 'end_date.after_or_equal' => trans('poll.validation.end_date_invalid') ]; $validator = Validator::make($postValues, $rules, $messages); @@ -274,8 +346,7 @@ public function store(Request $request) $this->updateFrontPagePoll($poll); - return redirect() - ->route('poll.index'); + return redirect()->route('poll.index'); } /** @@ -314,8 +385,7 @@ public function update(Poll $poll, Request $request) $this->updateFrontPagePoll($poll); - return redirect() - ->route('poll.index'); + return redirect()->route('poll.index'); } /** @@ -326,29 +396,35 @@ public function update(Poll $poll, Request $request) public function show(Poll $poll, Request $request) { $content = collect() - ->push(component('Title') - ->with('title', $poll->question) - ) - ->push(component('Barchart') - ->is('black') - ->with('items', $poll->getFormattedResults()) + ->push(component('Title')->with('title', $poll->question)) + ->push( + component('Barchart') + ->is('black') + ->with('items', $poll->getFormattedResults()) ) - ->push(component('Title') + ->push( + component('Title') ->is('small') ->with('title', trans('poll.answered') . ': ' . $poll->answered) ) - ->push(component('Button') - ->with('title', trans('general.back')) - ->with('route', route('poll.index')) + ->push( + component('Button') + ->with('title', trans('general.back')) + ->with('route', route('poll.index')) ); return layout('One') - ->with('header', region('Header', collect() - ->push(component('Title') - ->is('white') - ->with('title', trans('poll.results')) + ->with( + 'header', + region( + 'Header', + collect()->push( + component('Title') + ->is('white') + ->with('title', trans('poll.results')) + ) ) - )) + ) ->with('content', $content) ->with('footer', region('FooterLight')) ->render(); @@ -364,8 +440,6 @@ public function delete(Poll $poll, Request $request) { $poll->delete(); - return redirect() - ->route('poll.index'); + return redirect()->route('poll.index'); } } - diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 38a84c538..c617af7be 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -48,7 +48,7 @@ class Kernel extends HttpKernel \App\Http\Middleware\VerifyCsrfToken::class, \App\Http\Middleware\XssProtection::class, \App\Http\Middleware\LoggedCookie::class, - 'bindings', + 'bindings' ] ]; diff --git a/app/Offer.php b/app/Offer.php index 82c11ee68..5f5db4f3c 100644 --- a/app/Offer.php +++ b/app/Offer.php @@ -11,7 +11,19 @@ class Offer extends Model { protected $table = 'offers'; - protected $fillable = ['id', 'status', 'style', 'user_id', 'title', 'body', 'data', 'start_at', 'end_at', 'ext_id', 'ext_date_time']; + protected $fillable = [ + 'id', + 'status', + 'style', + 'user_id', + 'title', + 'body', + 'data', + 'start_at', + 'end_at', + 'ext_id', + 'ext_date_time' + ]; protected $dates = ['start_at', 'end_at', 'created_at', 'updated_at', 'ext_date_time']; diff --git a/app/Poll.php b/app/Poll.php index 9bca017a8..eba5e4098 100644 --- a/app/Poll.php +++ b/app/Poll.php @@ -12,10 +12,7 @@ class Poll extends Model public $timestamps = true; - protected $appends = [ - 'start_date_formatted', - 'end_date_formatted' - ]; + protected $appends = ['start_date_formatted', 'end_date_formatted']; public function poll_options() { @@ -49,11 +46,10 @@ public function getFormattedResults() $results = $option->results; $data[] = [ 'title' => $option->name, - 'value' => $total > 0 ? round($results->count() / $total * 100) : 0 + 'value' => $total > 0 ? round(($results->count() / $total) * 100) : 0 ]; } return $data; } - } diff --git a/app/PollOption.php b/app/PollOption.php index 4b4be6c51..9d7ed074c 100644 --- a/app/PollOption.php +++ b/app/PollOption.php @@ -21,5 +21,4 @@ public function results() { return $this->hasMany('App\PollResult', 'poll_option_id', 'id'); } - } diff --git a/app/PollResult.php b/app/PollResult.php index ef8dba780..7538fc7ff 100644 --- a/app/PollResult.php +++ b/app/PollResult.php @@ -14,5 +14,4 @@ public function poll() { return $this->belongsTo('App\Poll', 'poll_id', 'id'); } - } diff --git a/app/Searchable.php b/app/Searchable.php index d7e223136..4ef876e52 100644 --- a/app/Searchable.php +++ b/app/Searchable.php @@ -7,5 +7,4 @@ class Searchable extends Model { protected $table = 'searchables'; - } diff --git a/app/Utils/BodyFormatter.php b/app/Utils/BodyFormatter.php index f4e106b6f..21a306bdf 100644 --- a/app/Utils/BodyFormatter.php +++ b/app/Utils/BodyFormatter.php @@ -106,14 +106,9 @@ public function polls() if (isset($matches[1]) && $matches[1] && is_array($matches[1])) { $id = intval($matches[1][0]); - $component = component('Poll') - ->with('id', $id); + $component = component('Poll')->with('id', $id); - $this->body = str_replace( - "[[poll:{$id}]]", - $component, - $this->body - ); + $this->body = str_replace("[[poll:{$id}]]", $component, $this->body); } } diff --git a/database/migrations/2020_03_15_140554_create_ext_fields_to_offers_table.php b/database/migrations/2020_03_15_140554_create_ext_fields_to_offers_table.php index a08c527f3..41650f3e9 100644 --- a/database/migrations/2020_03_15_140554_create_ext_fields_to_offers_table.php +++ b/database/migrations/2020_03_15_140554_create_ext_fields_to_offers_table.php @@ -14,7 +14,10 @@ class CreateExtFieldsToOffersTable extends Migration public function up() { Schema::table('offers', function (Blueprint $table) { - $table->string('ext_id', 255)->nullable()->index(); + $table + ->string('ext_id', 255) + ->nullable() + ->index(); $table->dateTime('ext_date_time')->nullable(); $table->unique(['ext_id']); diff --git a/database/migrations/2020_05_23_141525_create_polls_table.php b/database/migrations/2020_05_23_141525_create_polls_table.php index bc8c7872f..5499f14f8 100644 --- a/database/migrations/2020_05_23_141525_create_polls_table.php +++ b/database/migrations/2020_05_23_141525_create_polls_table.php @@ -21,7 +21,10 @@ public function up() $table->boolean('active')->default(false); $table->boolean('anonymous')->default(true); $table->boolean('front_page')->default(false); - $table->integer('answered')->default(0)->index(); + $table + ->integer('answered') + ->default(0) + ->index(); $table->timestamps(); }); } diff --git a/package-lock.json b/package-lock.json index ca837d53b..ded071c62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3430,9 +3430,9 @@ } }, "elliptic": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", - "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 08eba9389..9ce104267 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -1,7 +1,6 @@ 'Yes', 'no' => 'No', 'edit' => 'Edit', diff --git a/resources/lang/en/poll.php b/resources/lang/en/poll.php index b02d6eb74..7f8f99637 100644 --- a/resources/lang/en/poll.php +++ b/resources/lang/en/poll.php @@ -1,7 +1,6 @@ 'Polls', 'question' => 'Question', 'start_date' => 'Start date', @@ -25,5 +24,4 @@ 'end_date_invalid' => 'Invalid End date' ], 'results' => 'Results' - ]; diff --git a/resources/lang/et/general.php b/resources/lang/et/general.php index d5060e893..a543e9871 100644 --- a/resources/lang/et/general.php +++ b/resources/lang/et/general.php @@ -1,7 +1,6 @@ 'Jah', 'no' => 'Ei', 'edit' => 'Muuda', diff --git a/resources/lang/et/poll.php b/resources/lang/et/poll.php index 535a6ee2a..b122e6722 100644 --- a/resources/lang/et/poll.php +++ b/resources/lang/et/poll.php @@ -1,7 +1,6 @@ 'Küsitlused', 'question' => 'Küsimus', 'start_date' => 'Algus', @@ -24,6 +23,5 @@ 'options_required' => 'Vähemalt 2 valikut on nõutud', 'end_date_invalid' => 'Lõpp kuupäev peab olema suurem/võrdne algusest' ], - 'results' => 'Tulemused', - + 'results' => 'Tulemused' ]; diff --git a/resources/views/components/Barchart/Barchart.css b/resources/views/components/Barchart/Barchart.css index 551f20a5c..655c9999d 100644 --- a/resources/views/components/Barchart/Barchart.css +++ b/resources/views/components/Barchart/Barchart.css @@ -12,7 +12,7 @@ .Barchart__title { width: 100%; font: $font-text-md; - color: $gray!important; + color: $gray !important; font-weight: 600; display: flex; justify-content: flex-start; @@ -26,7 +26,7 @@ } .Barchart__bar { - background: rgba(55, 160, 235, .3); + background: rgba(55, 160, 235, 0.3); max-width: 500px; width: 100%; position: relative; @@ -49,7 +49,7 @@ .Barchart__percent { font: $font-heading-sm; - color: $white!important; + color: $white !important; font-weight: bold; padding-left: $padding-sm; -} \ No newline at end of file +} diff --git a/resources/views/components/Barchart/Barchart.vue b/resources/views/components/Barchart/Barchart.vue index d5abe4243..045c13d13 100644 --- a/resources/views/components/Barchart/Barchart.vue +++ b/resources/views/components/Barchart/Barchart.vue @@ -1,33 +1,22 @@ \ No newline at end of file +} + diff --git a/resources/views/components/FormDatepicker/FormDatepicker.css b/resources/views/components/FormDatepicker/FormDatepicker.css index 86c21bb8a..1490055a0 100644 --- a/resources/views/components/FormDatepicker/FormDatepicker.css +++ b/resources/views/components/FormDatepicker/FormDatepicker.css @@ -7,7 +7,6 @@ } .vd-wrapper { - border: $border-gray-md; border-radius: $border-radius-md; color: $gray-dark; diff --git a/resources/views/components/FormDatepicker/FormDatepicker.vue b/resources/views/components/FormDatepicker/FormDatepicker.vue index 98d563e6c..b6bdb4a78 100644 --- a/resources/views/components/FormDatepicker/FormDatepicker.vue +++ b/resources/views/components/FormDatepicker/FormDatepicker.vue @@ -12,49 +12,47 @@ :locale="locale" :disabled="disabled" /> - diff --git a/resources/views/components/FormDatepicker/locale/et.js b/resources/views/components/FormDatepicker/locale/et.js index 0d723b4da..d12020cf4 100644 --- a/resources/views/components/FormDatepicker/locale/et.js +++ b/resources/views/components/FormDatepicker/locale/et.js @@ -18,8 +18,8 @@ const locale = { ordinal: n => `${n}º`, buttonValidate: 'Ok', buttonCancel: 'Tühista', - rangeHeaderText: '%d kuni %d', - }, -}; + rangeHeaderText: '%d kuni %d' + } +} -export default locale; \ No newline at end of file +export default locale diff --git a/resources/views/components/Poll/Poll.css b/resources/views/components/Poll/Poll.css index b9dbcacef..3542c3185 100644 --- a/resources/views/components/Poll/Poll.css +++ b/resources/views/components/Poll/Poll.css @@ -13,7 +13,7 @@ } .Poll__submitting { - opacity: .5; + opacity: 0.5; } .Poll__title { @@ -21,7 +21,7 @@ color: $gray-dark; text-align: center; font-weight: bold; - border-bottom: 1px solid rgba(128, 128, 128, .2); + border-bottom: 1px solid rgba(128, 128, 128, 0.2); padding-bottom: $margin-sm; line-height: 135%; } @@ -57,5 +57,5 @@ .Poll__count { font: $font-text-sm; color: $gray; - text-align:center; -} \ No newline at end of file + text-align: center; +} diff --git a/resources/views/components/Poll/Poll.vue b/resources/views/components/Poll/Poll.vue index 57ce913ef..c82ea8831 100644 --- a/resources/views/components/Poll/Poll.vue +++ b/resources/views/components/Poll/Poll.vue @@ -1,111 +1,94 @@ \ No newline at end of file +} + diff --git a/resources/views/components/PollList/PollList.css b/resources/views/components/PollList/PollList.css index b0bd341e3..2b179b8b0 100644 --- a/resources/views/components/PollList/PollList.css +++ b/resources/views/components/PollList/PollList.css @@ -1,23 +1,19 @@ .PollList__question { - color: $blue; } .PollList__font_page { - background-color: $gray-lighter; } .PollList__delete { - cursor: pointer; border-radius: 3px; color: white; border: 0; - background-color: #FF5050; + background-color: #ff5050; } .PollList__delete:hover { - background-color: red; -} \ No newline at end of file +} diff --git a/resources/views/components/PollOption/PollOption.css b/resources/views/components/PollOption/PollOption.css index bcee2ab74..8b688c030 100644 --- a/resources/views/components/PollOption/PollOption.css +++ b/resources/views/components/PollOption/PollOption.css @@ -1,4 +1,3 @@ - .PollOption__label { color: $gray; display: block; @@ -17,4 +16,4 @@ cursor: pointer; margin: 0 $margin-sm 0 $margin-sm; margin: 0 0 $margin-sm 0 ?if $mobile; -} \ No newline at end of file +} diff --git a/resources/views/components/PollOption/PollOption.vue b/resources/views/components/PollOption/PollOption.vue index 0f324c30f..0da007955 100644 --- a/resources/views/components/PollOption/PollOption.vue +++ b/resources/views/components/PollOption/PollOption.vue @@ -1,105 +1,87 @@ \ No newline at end of file +} + diff --git a/resources/views/main.js b/resources/views/main.js index 723de3199..501f7178e 100644 --- a/resources/views/main.js +++ b/resources/views/main.js @@ -2,8 +2,8 @@ import Vue from 'vue' import VueCookie from 'vue-cookie' import axios from 'axios' import moment from 'moment' -import VueDatePicker from '@mathieustan/vue-datepicker'; -import '@mathieustan/vue-datepicker/dist/vue-datepicker.min.css'; +import VueDatePicker from '@mathieustan/vue-datepicker' +import '@mathieustan/vue-datepicker/dist/vue-datepicker.min.css' // Require CSS files @@ -27,7 +27,7 @@ requireComponent.keys().forEach(filePath => { Vue.component(componentName, componentConfig.default || componentConfig) }) -Vue.use(VueDatePicker); +Vue.use(VueDatePicker) // Set up cookies diff --git a/resources/views/vendor/sitemap/html.php b/resources/views/vendor/sitemap/html.php index d6f86d608..d78f4ab0f 100644 --- a/resources/views/vendor/sitemap/html.php +++ b/resources/views/vendor/sitemap/html.php @@ -6,9 +6,9 @@