Skip to content

Commit

Permalink
marketing event crud completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Nov 4, 2024
1 parent 779974d commit 9eb9687
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,18 @@ class="{{ request()->cookie('dark_mode') ? 'icon-light' : 'icon-dark' }} p-1.5 r
<!-- Admin profile -->
<x-admin::dropdown position="bottom-{{ in_array(app()->getLocale(), ['fa', 'ar']) ? 'left' : 'right' }}">
<x-slot:toggle>
@if (auth()->guard('user')->user()->image)
@php($user = auth()->guard('user')->user())

@if ($user->image)
<button class="flex h-9 w-9 cursor-pointer overflow-hidden rounded-full hover:opacity-80 focus:opacity-80">
<img
src="{{ auth()->guard('user')->user()->image_url }}"
class="w-full"
src="{{ $user->image_url }}"
class="h-full w-full object-cover"
/>
</button>
@else
<button class="flex h-9 w-9 cursor-pointer items-center justify-center rounded-full bg-pink-400 font-semibold leading-6 text-white">
{{ substr(auth()->guard('user')->user()->name, 0, 1) }}
{{ substr($user->name, 0, 1) }}
</button>
@endif
</x-slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
</div>

<div class="flex items-center gap-x-2.5">
<!-- Create button for Group -->
<!-- Create button for Marketing Event -->
<div class="flex items-center gap-x-2.5">
{!! view_render_event('admin.settings.marketing-events.index.breadcrumbs.after') !!}

<button
type="button"
class="primary-button"
@click="$refs.marketingEvent.toggleModal()"
@click="$refs.marketingEvent.actionType = 'create';$refs.marketingEvent.toggleModal()"
>
@lang('admin::app.settings.marketing-events.index.create-btn')
</button>
Expand Down Expand Up @@ -105,7 +105,7 @@ class="icon-checkbox-outline peer-checked:icon-checkbox-select cursor-pointer ro
<!-- Actions -->
<div class="flex justify-end">
<a @click.prevent="edit(record)">
<a @click.prevent="actionType = 'edit';edit(record)">
<span
:class="record.actions.find(action => action.index === 'edit')?.icon"
class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200 dark:hover:bg-gray-800 max-sm:place-self-center"
Expand Down Expand Up @@ -143,7 +143,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
<p class="text-lg font-bold text-gray-800 dark:text-white">
@{{
selectedType == 'create'
actionType == 'create'
? "@lang('admin::app.settings.marketing-events.index.create.title')"
: "@lang('admin::app.settings.marketing-events.index.edit.title')"
}}
Expand Down Expand Up @@ -245,9 +245,7 @@ class="primary-button"
return {
isStoring: false,
selectedType: 'create',
events: {},
actionType: 'create',
};
},
Expand Down

0 comments on commit 9eb9687

Please sign in to comment.