Fix: Force add super-admin views to git
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m52s

The resources/views directory is ignored by .gitignore, so the custom super-admin
views were not being tracked or deployed, causing 'View [super-admin.session.login] not found'
errors in production. This commit forces them to be tracked.
This commit is contained in:
Cauê Faleiros
2026-02-05 10:54:43 -03:00
parent 16a39a2583
commit 151083ed22
7 changed files with 396 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}" dir="{{ in_array(app()->getLocale(), ['fa', 'ar']) ? 'rtl' : 'ltr' }}">
<head>
<title>Super Admin Login</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="base-url" content="{{ url()->to('/') }}">
{{ vite()->set(['src/Resources/assets/css/app.css', 'src/Resources/assets/js/app.js']) }}
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap" rel="stylesheet" />
<link type="image/x-icon" href="{{ vite()->asset('images/favicon.ico') }}" rel="shortcut icon" sizes="16x16" />
<style>
:root { --brand-color: #0E90D9; }
</style>
</head>
<body class="font-inter">
<div id="app">
<x-admin::flash-group />
{{ $slot }}
</div>
<script>
window.addEventListener("load", function(event) {
app.mount("#app");
});
</script>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Super Admin - Growup Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<nav class="bg-white shadow mb-8">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<div class="flex-shrink-0 flex items-center">
<span class="font-bold text-xl text-blue-600">Growup Pro SA</span>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="{{ route('super-admin.tenants.index') }}" class="border-blue-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Tenants
</a>
</div>
</div>
</div>
</div>
</nav>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
@if(session('success'))
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative mb-4" role="alert">
<span class="block sm:inline">{{ session('success') }}</span>
</div>
@endif
@if($errors->any())
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4" role="alert">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@yield('content')
</div>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<header class="sticky top-0 z-[10001] flex items-center justify-between gap-1 border-b border-gray-200 bg-white px-4 py-2.5 transition-all dark:border-gray-800 dark:bg-gray-900">
<div class="flex items-center gap-1.5">
<a href="{{ route('super-admin.tenants.index') }}">
<img class="h-7 max-sm:hidden" src="{{ request()->cookie('dark_mode') ? vite()->asset('images/dark-logo.svg') : vite()->asset('images/logo.svg') }}" id="logo-image" alt="Growup Pro" />
<img class="h-7 sm:hidden" src="{{ request()->cookie('dark_mode') ? vite()->asset('images/mobile-dark-logo.svg') : vite()->asset('images/mobile-light-logo.svg') }}" id="logo-image-mobile" alt="Growup Pro" />
</a>
</div>
<div class="flex items-center gap-2.5">
<!-- Dark mode -->
<v-dark>
<div class="flex">
<span class="{{ request()->cookie('dark_mode') ? 'icon-light' : 'icon-dark' }} p-1.5 rounded-md text-2xl cursor-pointer transition-all hover:bg-gray-100 dark:hover:bg-gray-950"></span>
</div>
</v-dark>
<!-- Admin profile -->
<x-admin::dropdown position="bottom-right">
<x-slot:toggle>
@php($user = auth()->user())
@if ($user && $user->image)
<button class="flex h-9 w-9 cursor-pointer overflow-hidden rounded-full hover:opacity-80 focus:opacity-80">
<img 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($user->name ?? 'S', 0, 1) }}
</button>
@endif
</x-slot>
<x-slot:content class="mt-2 border-t-0 !p-0">
<div class="flex items-center gap-1.5 border border-x-0 border-b-gray-300 px-5 py-2.5 dark:border-gray-800">
<img src="{{ asset('favicon.ico') }}" width="24" height="24" class="object-contain" />
<p class="text-gray-400">
Versão {{ core()->version() }}
</p>
</div>
<div class="grid gap-1 pb-2.5 pt-1">
<a class="cursor-pointer px-5 py-2 text-base text-gray-800 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-950" href="{{ route('admin.user.account.edit') }}">
Minha Conta
</a>
<!--Admin logout-->
<x-admin::form method="DELETE" action="{{ route('super-admin.session.destroy') }}" id="adminLogout"></x-admin::form>
<a class="cursor-pointer px-5 py-2 text-base text-gray-800 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-950" href="#" onclick="event.preventDefault(); document.getElementById('adminLogout').submit();">
Sair
</a>
</div>
</x-slot>
</x-admin::dropdown>
</div>
</header>
@pushOnce('scripts')
<script type="text/x-template" id="v-dark-template">
<div class="flex">
<span class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-100 dark:hover:bg-gray-950" :class="[isDarkMode ? 'icon-light' : 'icon-dark']" @click="toggle"></span>
</div>
</script>
<script type="module">
app.component('v-dark', {
template: '#v-dark-template',
data() {
return {
isDarkMode: {{ request()->cookie('dark_mode') ?? 0 }},
logo: "{{ vite()->asset('images/logo.svg') }}",
dark_logo: "{{ vite()->asset('images/dark-logo.svg') }}",
};
},
methods: {
toggle() {
this.isDarkMode = parseInt(this.isDarkModeCookie()) ? 0 : 1;
var expiryDate = new Date();
expiryDate.setMonth(expiryDate.getMonth() + 1);
document.cookie = 'dark_mode=' + this.isDarkMode + '; path=/; expires=' + expiryDate.toGMTString();
document.documentElement.classList.toggle('dark', this.isDarkMode === 1);
if (this.isDarkMode) {
this.$emitter.emit('change-theme', 'dark');
if(document.getElementById('logo-image')) document.getElementById('logo-image').src = this.dark_logo;
} else {
this.$emitter.emit('change-theme', 'light');
if(document.getElementById('logo-image')) document.getElementById('logo-image').src = this.logo;
}
},
isDarkModeCookie() {
const cookies = document.cookie.split(';');
for (const cookie of cookies) {
const [name, value] = cookie.trim().split('=');
if (name === 'dark_mode') return value;
}
return 0;
},
},
});
</script>
@endPushOnce

View File

@@ -0,0 +1,11 @@
<div class="h-full w-[270px] flex-shrink-0 border-r bg-white dark:border-gray-800 dark:bg-gray-900 pt-4 hidden lg:block">
<div class="px-4">
<nav class="space-y-1">
<a href="{{ route('super-admin.tenants.index') }}"
class="flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md {{ request()->routeIs('super-admin.tenants.*') ? 'bg-blue-50 text-blue-700 dark:bg-gray-800 dark:text-blue-400' : 'text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800' }}">
<span class="icon-dashboard text-2xl"></span>
Tenants
</a>
</nav>
</div>
</div>