Skip to content

Commit e4c5332

Browse files
feat: krayin version and routes clean up done
1 parent f97cde1 commit e4c5332

32 files changed

+672
-725
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
APP_NAME='Krayin CRM'
22
APP_ENV=local
3-
APP_VERSION=1.3.0
43
APP_KEY=
54
APP_DEBUG=true
65
APP_URL=http://localhost

config/app.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@
4444

4545
'debug' => (bool) env('APP_DEBUG', false),
4646

47-
/*
48-
Application Version
49-
*/
50-
'version' => env('APP_VERSION'),
51-
5247
/*
5348
|--------------------------------------------------------------------------
5449
| Application URL

packages/Webkul/Admin/src/Config/acl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
'name' => 'admin::app.acl.view',
162162
'route' => 'admin.contacts.persons.view',
163163
'sort' => 5,
164-
],[
164+
], [
165165
'key' => 'contacts.organizations',
166166
'name' => 'admin::app.acl.organizations',
167167
'route' => 'admin.contacts.organizations.index',
@@ -201,7 +201,7 @@
201201
'name' => 'admin::app.acl.delete',
202202
'route' => ['admin.products.delete', 'admin.products.mass_delete'],
203203
'sort' => 3,
204-
],[
204+
], [
205205
'key' => 'products.view',
206206
'name' => 'admin::app.acl.view',
207207
'route' => 'admin.products.view',

packages/Webkul/Admin/src/Http/Controllers/Settings/RoleController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ public function update(int $id): RedirectResponse
112112
session()->flash('success', trans('admin::app.settings.roles.index.update-success'));
113113

114114
return redirect()->back();
115-
return redirect()->route('admin.settings.roles.index');
116115
}
117116

118117
/**

packages/Webkul/Admin/src/Providers/AdminServiceProvider.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public function boot(Router $router): void
2626

2727
include __DIR__.'/../Http/helpers.php';
2828

29-
Route::middleware(['web', 'admin_locale'])->group(__DIR__.'/../Routes/web.php');
29+
Route::middleware(['web', 'admin_locale'])
30+
->prefix(config('app.admin_path'))
31+
->group(__DIR__.'/../Routes/Admin/web.php');
32+
33+
Route::middleware(['web', 'admin_locale'])
34+
->group(__DIR__.'/../Routes/Front/web.php');
3035

3136
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations');
3237

packages/Webkul/Admin/src/Resources/views/components/layouts/header/index.blade.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<a href="{{ route('admin.dashboard.index') }}">
77
<img
8-
class="h-10"
8+
class="h-10"
99
src="{{ request()->cookie('dark_mode') ? admin_vite()->asset('images/dark-logo.svg') : admin_vite()->asset('images/logo.svg') }}"
1010
id="logo-image"
1111
alt="{{ config('app.name') }}"
@@ -18,15 +18,15 @@ class="h-10"
1818
<v-mega-search>
1919
<div class="relative flex w-[525px] max-w-[525px] items-center max-lg:w-[400px] ltr:ml-2.5 rtl:mr-2.5">
2020
<i class="icon-search absolute top-1.5 flex items-center text-2xl ltr:left-3 rtl:right-3"></i>
21-
22-
<input
23-
type="text"
21+
22+
<input
23+
type="text"
2424
class="block w-full rounded-3xl border bg-white px-10 py-1.5 leading-6 text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300"
25-
placeholder="@lang('admin::app.components.layouts.header.mega-search.title')"
25+
placeholder="@lang('admin::app.components.layouts.header.mega-search.title')"
2626
>
2727
</div>
2828
</v-mega-search>
29-
29+
3030
<!-- Quick create section -->
3131
<div>
3232
@if (bouncer()->hasPermission('leads.create')
@@ -57,111 +57,111 @@ class="block w-full rounded-3xl border bg-white px-10 py-1.5 leading-6 text-gray
5757
<a href="{{ route('admin.leads.create') }}">
5858
<div class="flex flex-col gap-1">
5959
<i class="icon-leads text-2xl text-gray-600"></i>
60-
60+
6161
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.lead')</span>
6262
</div>
6363
</a>
6464
</div>
6565
@endif
66-
66+
6767
<!-- Link to create new Quotes -->
6868
@if (bouncer()->hasPermission('quotes.create'))
6969
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
7070
<a href="{{ route('admin.quotes.create') }}">
7171
<div class="flex flex-col gap-1">
7272
<i class="icon-quote text-2xl text-gray-600"></i>
73-
73+
7474
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.quote')</span>
7575
</div>
7676
</a>
7777
</div>
7878
@endif
79-
79+
8080
<!-- Link to send new Mail-->
8181
@if (bouncer()->hasPermission('mail.create'))
8282
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
8383
<a href="{{ route('admin.mail.index', ['route' => 'inbox']) }}">
8484
<div class="flex flex-col gap-1">
8585
<i class="icon-mail text-2xl text-gray-600"></i>
86-
86+
8787
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.email')</span>
8888
</div>
8989
</a>
9090
</div>
9191
@endif
92-
92+
9393
<!-- Link to create new Person-->
9494
@if (bouncer()->hasPermission('contacts.persons.create'))
9595
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
9696
<a href="{{ route('admin.contacts.persons.create') }}">
9797
<div class="flex flex-col gap-1">
9898
<i class="icon-settings-user text-2xl text-gray-600"></i>
99-
99+
100100
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.person')</span>
101101
</div>
102102
</a>
103103
</div>
104104
@endif
105-
105+
106106
<!-- Link to create new Organizations -->
107107
@if (bouncer()->hasPermission('contacts.organizations.create'))
108108
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
109109
<a href="{{ route('admin.contacts.organizations.create') }}">
110110
<div class="flex flex-col gap-1">
111111
<i class="icon-organization text-2xl text-gray-600"></i>
112-
112+
113113
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.organization')</span>
114114
</div>
115115
</a>
116116
</div>
117117
@endif
118-
118+
119119
<!-- Link to create new Products -->
120120
@if (bouncer()->hasPermission('products.create'))
121121
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
122122
<a href="{{ route('admin.products.create') }}">
123123
<div class="flex flex-col gap-1">
124124
<i class="icon-product text-2xl text-gray-600"></i>
125-
125+
126126
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.product')</span>
127127
</div>
128128
</a>
129129
</div>
130130
@endif
131-
131+
132132
<!-- Link to create new Attributes -->
133133
@if (bouncer()->hasPermission('settings.automation.attributes.create'))
134134
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
135135
<a href="{{ route('admin.settings.attributes.create') }}">
136136
<div class="flex flex-col gap-1">
137137
<i class="icon-attribute text-2xl text-gray-600"></i>
138-
138+
139139
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.attribute')</span>
140140
</div>
141141
</a>
142142
</div>
143143
@endif
144-
144+
145145
<!-- Link to create new Role -->
146146
@if (bouncer()->hasPermission('settings.user.roles.create'))
147147
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
148148
<a href="{{ route('admin.settings.roles.create') }}">
149149
<div class="flex flex-col gap-1">
150150
<i class="icon-role text-2xl text-gray-600"></i>
151-
151+
152152
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.role')</span>
153153
</div>
154154
</a>
155155
</div>
156156
@endif
157-
157+
158158
<!-- Link to create new User-->
159159
@if (bouncer()->hasPermission('settings.user.users.create'))
160160
<div class="rounded-lg bg-white p-2 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-950">
161161
<a href="{{ route('admin.settings.users.index') }}">
162162
<div class="flex flex-col gap-1">
163163
<i class="icon-user text-2xl text-gray-600"></i>
164-
164+
165165
<span class="font-medium dark:text-gray-300">@lang('admin::app.layouts.user')</span>
166166
</div>
167167
</a>
@@ -184,16 +184,16 @@ class="{{ request()->cookie('dark_mode') ? 'icon-light' : 'icon-dark' }} p-1.5 r
184184
></span>
185185
</div>
186186
</v-dark>
187-
187+
188188
<!-- Notification Component -->
189189
<span class="relative flex">
190-
<span
191-
class="icon-notification cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-100 dark:hover:bg-gray-950"
190+
<span
191+
class="icon-notification cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-100 dark:hover:bg-gray-950"
192192
title="@lang('admin::app.components.layouts.header.notifications')"
193193
>
194194
</span>
195195
</span>
196-
196+
197197
<!-- Admin profile -->
198198
<x-admin::dropdown position="bottom-right">
199199
<x-slot:toggle>
@@ -222,7 +222,7 @@ class="w-full"
222222

223223
<!-- Version -->
224224
<p class="text-gray-400">
225-
Version: v{{ config('app.version') }}
225+
Version: v{{ core()->version() }}
226226
</p>
227227
</div>
228228

@@ -263,11 +263,11 @@ class="cursor-pointer px-5 py-2 text-base text-gray-800 hover:bg-gray-100 dark:t
263263
<div class="relative flex w-[525px] max-w-[525px] items-center max-lg:w-[400px] ltr:ml-2.5 rtl:mr-2.5">
264264
<i class="icon-search absolute top-1.5 flex items-center text-2xl ltr:left-3 rtl:right-3"></i>
265265
266-
<input
266+
<input
267267
type="text"
268268
class="peer block w-full rounded-3xl border bg-white px-10 py-1.5 leading-6 text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400"
269269
:class="{'border-gray-400': isDropdownOpen}"
270-
placeholder="@lang('Search')"
270+
placeholder="@lang('Search')"
271271
v-model.lazy="searchTerm"
272272
@click="searchTerm.length >= 2 ? isDropdownOpen = true : {}"
273273
v-debounce="500"
@@ -309,13 +309,13 @@ class="flex cursor-pointer justify-between gap-2.5 border-b border-slate-300 p-4
309309
<p class="text-base font-semibold text-gray-600 dark:text-gray-300">
310310
@{{ product.name }}
311311
</p>
312-
312+
313313
<p class="text-gray-500">
314314
@{{ "@lang(':sku')".replace(':sku', product.sku) }}
315315
</p>
316316
</div>
317317
</div>
318-
318+
319319
<!-- Right Information -->
320320
<div class="grid place-content-center gap-1 text-right">
321321
<!-- Formatted Price -->
@@ -334,7 +334,7 @@ class="flex cursor-pointer justify-between gap-2.5 border-b border-slate-300 p-4
334334
:href="'{{ route('admin.products.index') }}?search=:query'.replace(':query', searchTerm)"
335335
class="cursor-pointer text-xs font-semibold text-brandColor transition-all hover:underline"
336336
>
337-
337+
338338
@{{ `@lang('admin::app.components.layouts.header.mega-search.explore-all-matching-products')`.replace(':query', searchTerm).replace(':count', searchedResults.products.length) }}
339339
</a>
340340
</template>
@@ -370,13 +370,13 @@ class="flex cursor-pointer justify-between gap-2.5 border-b border-slate-300 p-4
370370
<p class="text-base font-semibold text-gray-600 dark:text-gray-300">
371371
@{{ lead.title }}
372372
</p>
373-
373+
374374
<p class="text-gray-500">
375375
@{{ lead.description }}
376376
</p>
377377
</div>
378378
</div>
379-
379+
380380
<!-- Right Information -->
381381
<div class="grid place-content-center gap-1 text-right">
382382
<!-- Formatted Price -->
@@ -429,7 +429,7 @@ class="flex cursor-pointer justify-between gap-2.5 border-b border-slate-300 p-4
429429
<p class="text-base font-semibold text-gray-600 dark:text-gray-300">
430430
@{{ person.name }}
431431
</p>
432-
432+
433433
<p class="text-gray-500">
434434
@{{ person.emails.map((item) => `${item.value}(${item.label})`).join(', ') }}
435435
</p>
@@ -480,7 +480,7 @@ class="flex cursor-pointer justify-between gap-2.5 border-b border-slate-300 p-4
480480
<p class="text-base font-semibold text-gray-600 dark:text-gray-300">
481481
@{{ quote.subject }}
482482
</p>
483-
483+
484484
<p class="text-gray-500">
485485
@{{ quote.description }}
486486
</p>

packages/Webkul/Admin/src/Resources/views/contacts/persons/view.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
<!-- Tags -->
2323
<x-admin::tags
24-
:attach-endpoint="route('admin.persons.tags.attach', $person->id)"
25-
:detach-endpoint="route('admin.persons.tags.detach', $person->id)"
24+
:attach-endpoint="route('admin.contacts.persons.tags.attach', $person->id)"
25+
:detach-endpoint="route('admin.contacts.persons.tags.detach', $person->id)"
2626
:added-tags="$person->tags"
2727
/>
2828

@@ -64,7 +64,7 @@
6464
/>
6565
</div>
6666
</div>
67-
67+
6868
<!-- Person Attributes -->
6969
@include ('admin::contacts.persons.view.attributes')
7070

@@ -75,11 +75,11 @@
7575
{!! view_render_event('admin.contact.persons.view.left.after', ['person' => $person]) !!}
7676

7777
{!! view_render_event('admin.contact.persons.view.right.before', ['person' => $person]) !!}
78-
78+
7979
<!-- Right Panel -->
8080
<div class="flex w-full flex-col gap-4 rounded-lg">
8181
<!-- Stages Navigation -->
82-
<x-admin::activities :endpoint="route('admin.persons.activities.index', $person->id)" />
82+
<x-admin::activities :endpoint="route('admin.contacts.persons.activities.index', $person->id)" />
8383
</div>
8484

8585
{!! view_render_event('admin.contact.persons.view.right.after', ['person' => $person]) !!}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Route;
4+
use Webkul\Admin\Http\Controllers\Activity\ActivityController;
5+
6+
Route::middleware(['user'])->controller(ActivityController::class)->prefix('activities')->group(function () {
7+
Route::get('', 'index')->name('admin.activities.index');
8+
9+
Route::get('get', 'get')->name('admin.activities.get');
10+
11+
Route::post('create', 'store')->name('admin.activities.store');
12+
13+
Route::get('edit/{id}', 'edit')->name('admin.activities.edit');
14+
15+
Route::put('edit/{id}', 'update')->name('admin.activities.update');
16+
17+
Route::get('download/{id}', 'download')->name('admin.activities.file_download');
18+
19+
Route::delete('{id}', 'destroy')->name('admin.activities.delete');
20+
21+
Route::post('mass-update', 'massUpdate')->name('admin.activities.mass_update');
22+
23+
Route::post('mass-destroy', 'massDestroy')->name('admin.activities.mass_delete');
24+
});

0 commit comments

Comments
 (0)