Merge branch 'master' into feat/admin-send-quote

This commit is contained in:
ben committed 2023-10-09 04:44:40 -04:00
commit b2c5473e85
10 files changed
+841 -36

No files matched your search

+3
View File
@@ -6,4 +6,7 @@
</div>
</div>
</div>
@if(auth()->user()->is_admin)
<livewire:pages.admin.send/>
@endif
</x-app-layout>
@@ -1,4 +1,4 @@
<?php
<?php
use Illuminate\Support\Facades\Http;
use Livewire\Attributes\Layout;
@@ -13,9 +13,8 @@ new #[Layout('layouts.app')] class extends Component
public function sendQuote(): void
{
$validated = $this->validate();
$data = ["text" => $validated['quote']];
$response = Http::post(env('SLACK_WEBHOOK_URL'), $data);
$response = Http::post(config('bot.webhook'), ['text' => $validated['quote']]);
$this->quote = '';
}
@@ -31,6 +30,8 @@ new #[Layout('layouts.app')] class extends Component
></x-text-input>
<x-input-error :messages="$errors->get('quote')" class="mt-2"/>
<x-primary-button wire:loading.attr="disabled" wire:loading.class="opacity-50" class="mt-4">{{ __('Request') }}</x-primary-button>
<x-primary-button wire:loading.attr="disabled"
wire:loading.class="opacity-50"
class="mt-4">{{ __('Send') }}</x-primary-button>
</form>
</div>
</div>
@@ -93,6 +93,7 @@ new #[Layout('layouts.guest')] class extends Component
<x-primary-button
wire:loading.attr="disabled"
wire:loading.class="opacity-50"
@click="$dispatch('close')"
class="w-24 ml-3"
>{{ __('Delete') }}</x-primary-button>
</div>
@@ -94,6 +94,7 @@ new #[Layout('layouts.guest')] class extends Component
<x-button
wire:loading.attr="disabled"
wire:loading.class="opacity-50"
@click="$dispatch('close')"
class="bg-nexi-green w-24 ml-3"
>{{ __('Approve') }}</x-button>
</div>
@@ -125,6 +126,7 @@ new #[Layout('layouts.guest')] class extends Component
<x-button
wire:loading.attr="disabled"
wire:loading.class="opacity-50"
@click="$dispatch('close')"
class="bg-nexi-red w-24 ml-3"
>{{ __('Reject') }}</x-button>
</div>