Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Setttings #36

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require": {
"php": "^8.1",
"anisaronno/laravel-media-gallery": "0.4.1",
"anisaronno/laravel-settings": "1.1.0",
"anisaronno/laravel-settings": "^1.1",
"guzzlehttp/guzzle": "^7.2",
"itsgoingd/clockwork": "^5.1",
"laravel/framework": "^10.10",
Expand Down
276 changes: 137 additions & 139 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/vendor/horizon/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/vendor/horizon/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/app.js": "/app.js?id=79bae40dcb18de9ca1b5d0008c577471",
"/app.js": "/app.js?id=b4f3f08e60211bd6948ec35e5e9de9a1",
"/app-dark.css": "/app-dark.css?id=15c72df05e2b1147fa3e4b0670cfb435",
"/app.css": "/app.css?id=4d6a1a7fe095eedc2cb2a4ce822ea8a5",
"/img/favicon.png": "/img/favicon.png?id=1542bfe8a0010dcbee710da13cce367f",
Expand Down
1 change: 1 addition & 0 deletions public/vendor/log-viewer/app.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions public/vendor/log-viewer/app.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions public/vendor/log-viewer/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/

/*! #__NO_SIDE_EFFECTS__ */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
Binary file added public/vendor/log-viewer/img/log-viewer-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/vendor/log-viewer/img/log-viewer-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/vendor/log-viewer/img/log-viewer-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions public/vendor/log-viewer/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"/app.js": "/app.js?id=fc139aeb14d759b4a2906fc46d6c8150",
"/app.css": "/app.css?id=8e28997d012793c246fb3c0743b54545",
"/img/log-viewer-128.png": "/img/log-viewer-128.png?id=d576c6d2e16074d3f064e60fe4f35166",
"/img/log-viewer-32.png": "/img/log-viewer-32.png?id=f8ec67d10f996aa8baf00df3b61eea6d",
"/img/log-viewer-64.png": "/img/log-viewer-64.png?id=8902d596fc883ca9eb8105bb683568c6"
}
71 changes: 34 additions & 37 deletions resources/views/components/profile.blade.php
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
<div class="dropdown" data-strategy="absolute">
<div class="dropdown-toggle pl-3">
<button class="group relative flex items-center gap-x-1.5" type="button">
<div class="avatar avatar-circle avatar-indicator avatar-indicator-online">
<img
class="avatar-img group-focus-within:ring group-focus-within:ring-primary-500"
src="{{ Auth::user()->avatar }}"
alt="Avatar 1"
/>
</div>
</button>
<button class="group relative flex items-center gap-x-1.5" type="button">
<div class="avatar avatar-circle avatar-indicator avatar-indicator-online">
<img class="avatar-img group-focus-within:ring group-focus-within:ring-primary-500"
src="{{ Auth::user()->avatar }}" alt="Avatar 1" />
</div>
</button>
</div>

<div class="dropdown-content mt-1 w-56 divide-y dark:divide-slate-600">
<div class="px-4 py-3">
<p class="text-sm">Signed in as</p>
<p class="truncate text-sm font-medium">{{ Auth::user()->email }}</p>
</div>
<div class="py-1">
<a href="{{route('profile.edit')}}" class="dropdown-link">
<i width="18" height="18" data-feather="user" class="text-slate-500"></i>
<span>Profile</span>
</a>
<a href="javascript:void(0)" class="dropdown-link">
<i width="18" height="18" data-feather="settings" class="text-slate-500"></i>
<span>Settings</span>
</a>
<a href="javascript:void(0)" class="dropdown-link">
<i width="18" height="18" data-feather="help-circle" class="text-slate-500"></i>
<span>Support</span>
</a>
</div>
<div class="py-1">
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="dropdown-btn">
<i width="18" height="18" data-feather="log-out" class="text-slate-500"></i>
<span> {{ __('Log Out') }} </span>
</button>
</form>
</div>
<div class="px-4 py-3">
<p class="text-sm">Signed in as</p>
<p class="truncate text-sm font-medium">{{ Auth::user()->email }}</p>
</div>
<div class="py-1">
<a href="{{ route('profile.edit') }}" class="dropdown-link">
<i width="18" height="18" data-feather="user" class="text-slate-500"></i>
<span>Profile</span>
</a>
<a href="{{ route('admin.settings.index') }}" class="dropdown-link">
<i width="18" height="18" data-feather="settings" class="text-slate-500"></i>
<span>Settings</span>
</a>
<a href="javascript:void(0)" class="dropdown-link">
<i width="18" height="18" data-feather="help-circle" class="text-slate-500"></i>
<span>Support</span>
</a>
</div>
<div class="py-1">
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="dropdown-btn">
<i width="18" height="18" data-feather="log-out" class="text-slate-500"></i>
<span> {{ __('Log Out') }} </span>
</button>
</form>
</div>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions resources/views/components/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class="sidebar-submenu-item {{ request()->routeIs('admin.customer.index') ? 'act
@can('user.view')
<li>
<a href="javascript:void(0);"
class="sidebar-menu {{ request()->routeIs(['admin.user.index', 'admin.roles.index']) ? 'active' : '' }}">
class="sidebar-menu {{ request()->routeIs(['admin.user.index', 'admin.user.create', 'admin.user.show', 'admin.user.edit', 'admin.roles.index', 'admin.roles.create', 'admin.roles.show', 'admin.roles.edit']) ? 'active' : '' }}">

<span class="sidebar-menu-icon">
<i data-feather="users"></i>
Expand All @@ -237,7 +237,7 @@ class="sidebar-menu {{ request()->routeIs(['admin.user.index', 'admin.roles.inde
<li>
<a href="{{ route('admin.user.index') }}"
class="sidebar-submenu-item {{ request()->routeIs('admin.user.index') ? 'active' : '' }}">
User</a>
Users</a>
</li>
@endcan
@can('role.view')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard/roles/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use('App\Models\User');
@use('App\Models\User')
@can('role.edit')
<x-app-layout>
<section class="bg-gray-50 dark:bg-gray-900 p-3 sm:p-5">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/dashboard/roles/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use('App\Models\User');
@use('App\Models\User')
@can('role.edit')
<x-app-layout>
<section class="bg-gray-50 dark:bg-gray-900 p-3 sm:p-5">
Expand Down
79 changes: 79 additions & 0 deletions resources/views/dashboard/settings/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@can('settings.view')
<x-app-layout>
<!-- Page Title Starts -->

<x-page-title page="Settings" header="Settings" />

<!-- Page Title Ends -->

<div class="space-y-4">
@php
$allSettings = getAllSettings();
@endphp
<!-- Settings Table Starts -->
<div class="table-responsive whitespace-nowrap rounded-primary">
<table class="table custom-data-table">
<thead>
<tr>
<th class="uppercase">Settings Name</th>
<th class="uppercase">Settings Value</th>
<th class="!text-right uppercase">Actions</th>
</tr>
</thead>
<tbody>
@foreach ($allSettings as $key => $settings)
<tr>
<td>
<span class="font-normal text-md text-gray-700 dark:text-gray-100 capitalize">
{{ $key }}
</span>
</td>
<td>
<span class="font-normal text-md text-gray-700 dark:text-gray-100 capitalize">
<input class="input" type="text" value="{{ $settings }}">
</span>
</td>
<td>
<div class="flex justify-end">
<button class="btn btn-primary" role="button" >
<i class="w-4" data-feather="upload"></i>
Update
</button>
</div>
</td>
</tr>
@endforeach

</tbody>
</table>
<div class="sm:hidden">
@foreach ($allSettings as $key => $settings)
<div class="card my-4 overflow-x-auto shadow-sm shadow-gray-300 dark:shadow-gray-700">
<div class="card-header flex justify-center">
<div class="card-title capitalize ">
<p>{{ $key }}</p>
</div>
</div>
<div class="card-body">
<div class="card-content ">
<div class="px-4 py-4">
<input class="input" type="text" value="{{ $settings }}">
</div>
<p class="card-title flex justify-center mt-5">
<button class="btn btn-primary btn-sm" role="button">
<i class="w-4" data-feather="upload"></i>
Update
</button>
</p>
</div>
</div>
</div>
@endforeach
</div>
</div>
<!-- Settings Table Ends -->

</div>

</x-app-layout>
@endcan
Loading
Loading