Skip to content

Commit

Permalink
Feedback program banner, disable email change
Browse files Browse the repository at this point in the history
  • Loading branch information
cholladay0816 committed Aug 29, 2023
1 parent d0147f4 commit 78256d9
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 18 deletions.
20 changes: 20 additions & 0 deletions app/Http/Livewire/FeedbackProgram.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Http\Livewire;

use Illuminate\Support\Facades\Session;
use Livewire\Component;

class FeedbackProgram extends Component
{

public function dismiss()
{
Session::put('feedback_dismissed', true);
}

public function render()
{
return view('livewire.feedback-program');
}
}
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=3d469df22627ccbbda9db7b95ac626e2",
"/css/app.css": "/css/app.css?id=b01a839568deef262be6687a4408ba99"
"/css/app.css": "/css/app.css?id=c2044c8f905812374efd1a1bcc4692a6"
}
7 changes: 6 additions & 1 deletion resources/views/layouts/agnostic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function gtag(){dataLayer.push(arguments);}
</div>
</div>
</div>
</div>
@endif
@if(session()->has('error'))
<div x-data="{error:true}">
Expand Down Expand Up @@ -117,6 +118,10 @@ function gtag(){dataLayer.push(arguments);}
@endif
</div>
</div>

@auth
@if(!\Illuminate\Support\Facades\Session::has('feedback_dismissed'))
<livewire:feedback-program/>
@endif
@endauth
</body>
</html>
1 change: 0 additions & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ function gtag(){dataLayer.push(arguments);}
<x-agnostic-layout>
{{ $slot }}
</x-agnostic-layout>

</div>
</div>

Expand Down
18 changes: 18 additions & 0 deletions resources/views/livewire/feedback-program.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div x-data="{visible:true}">
<div class="pointer-events-none fixed inset-x-0 bottom-0 sm:px-6 sm:pb-5 lg:px-8" x-show="visible">
<div class="pointer-events-auto flex items-center justify-between gap-x-6 bg-gray-900 px-6 py-2.5 sm:rounded-xl sm:py-3 sm:pl-4 sm:pr-3.5">
<p class="text-sm leading-6 text-white">
<a href="{{route('tickets.index')}}">
<strong class="font-semibold">Feedback Incentive Program Active</strong><svg viewBox="0 0 2 2" class="mx-2 inline h-0.5 w-0.5 fill-current" aria-hidden="true"><circle cx="1" cy="1" r="1" /></svg>
Thank you for your early support! Quality feedback will occasionally be rewarded with cash payouts via Stripe!
</a>
</p>
<button wire:click="dismiss" @click="visible = false" type="button" class="-m-3 flex-none p-3 focus-visible:outline-offset-[-4px]">
<span class="sr-only">Dismiss</span>
<svg class="h-5 w-5 text-white" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
</svg>
</button>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/livewire/onboarding/buyer-stripe.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="divide-y divide-gray-200 overflow-hidden rounded-lg bg-white shadow">
<div class="px-4 py-5 sm:px-6">
<span class="flex justify-between">
Buyer Stripe Information
Buyer Stripe Information (Optional)
@if($buyer_verified)
@include('livewire.onboarding.complete-marker')
@endif
Expand Down
6 changes: 5 additions & 1 deletion resources/views/livewire/onboarding/creator-finish.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
<span>Please verify that this profile looks correct. You can change this information any time
by visiting your account profile.</span>
<hr class="mt-2 pb-2">
<button class="bg-indigo-500 text-white px-5 py-3 rounded-lg font-bold" wire:click="onboard">Looks Good!</button>
<button
@if(!$creator_verified || !$creator->title)
disabled
@endif
class="disabled:bg-gray-400 disabled:cursor-not-allowed bg-indigo-500 text-white px-5 py-3 rounded-lg font-bold" wire:click="onboard">Looks Good!</button>
</div>
</div>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
@endif
</span>
</div>
<div class="px-4 py-5 sm:p-6">
<div class="grid grid-cols-1 px-4 py-5 sm:p-6 gap-y-2">
@livewire('profile.update-profile-information-form')
@livewire('profile.creator')
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions resources/views/livewire/onboarding/creator-skip.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div>
<div>
<button class="border border-indigo-500 hover:bg-indigo-400 hover:text-white focus:bg-indigo-500 text-gray-700 px-4 py-2 rounded-lg font-italic" wire:click="skip">Skip</button>
</div>
</div>
17 changes: 7 additions & 10 deletions resources/views/livewire/onboarding/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<div class="grid grid-cols-1 gap-y-4 py-4" wire:poll.5s="refresh">
<div class="grid grid-cols-1 gap-y-4 py-4" wire:poll.4s="refresh">
@include('livewire.onboarding.buyer-or-creator')
@if($form['account_type'] == 'buyer')
@include('livewire.onboarding.buyer-stripe')
@if($buyer_verified)
@include('livewire.onboarding.buyer-finish')
@endif
@include('livewire.onboarding.buyer-finish')
@elseif($form['account_type'] == 'creator')
@include('livewire.onboarding.creator-stripe')
@if($creator_verified)
@include('livewire.onboarding.creator-profile')
@if($creator->title)
@include('livewire.onboarding.creator-finish')
@endif
@include('livewire.onboarding.creator-profile')
@if($creator->title)
@include('livewire.onboarding.creator-stripe')
@endif
@include('livewire.onboarding.creator-finish')
@include('livewire.onboarding.creator-skip')
@endif
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<!-- Email -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="email" value="{{ __('Email') }}" />
<x-jet-input id="email" type="email" class="mt-1 block w-full" wire:model.defer="state.email" />
<x-jet-input disabled readonly id="email" type="email" class="mt-1 block w-full" wire:model.defer="state.email" />
<x-jet-input-error for="email" class="mt-2" />
</div>
</x-slot>
Expand Down

0 comments on commit 78256d9

Please sign in to comment.