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>

View File

@@ -0,0 +1,89 @@
@component('super-admin.layouts.anonymous')
<div class="flex h-[100vh] flex-col items-center justify-center gap-10">
<div class="flex flex-col items-center gap-5">
<img class="w-max" src="{{ vite()->asset('images/logo.svg') }}" alt="Growup Pro" />
<div class="box-shadow flex min-w-[300px] flex-col rounded-md bg-white dark:bg-gray-900">
<x-admin::form :action="route('super-admin.session.store')">
<p class="p-4 text-xl font-bold text-gray-800 dark:text-white">
Super Admin Login
</p>
<div class="border-y p-4 dark:border-gray-800">
<!-- Email -->
<x-admin::form.control-group>
<x-admin::form.control-group.label class="required">
Email
</x-admin::form.control-group.label>
<x-admin::form.control-group.control
type="email"
class="w-[254px] max-w-full"
id="email"
name="email"
rules="required|email"
label="Email"
placeholder="Email"
/>
<x-admin::form.control-group.error control-name="email" />
</x-admin::form.control-group>
<!-- Password -->
<x-admin::form.control-group class="relative w-full">
<x-admin::form.control-group.label class="required">
Password
</x-admin::form.control-group.label>
<x-admin::form.control-group.control
type="password"
class="w-[254px] max-w-full ltr:pr-10 rtl:pl-10"
id="password"
name="password"
rules="required|min:6"
label="Password"
placeholder="Password"
/>
<span
class="icon-eye-hide absolute top-11 -translate-y-2/4 cursor-pointer text-2xl ltr:right-3 rtl:left-3"
onclick="switchVisibility()"
id="visibilityIcon"
role="presentation"
tabindex="0"
>
</span>
<x-admin::form.control-group.error control-name="password" />
</x-admin::form.control-group>
</div>
<div class="flex items-center justify-end p-4">
<button class="primary-button">
Sign In
</button>
</div>
</x-admin::form>
</div>
</div>
<div class="text-sm font-normal">
Desenvolvido por
<a style="color: #0E90D9;" class="hover:underline" href="https://blyzer.com.br" target="_blank">
Blyzer
</a>
</div>
</div>
@push('scripts')
<script>
function switchVisibility() {
let passwordField = document.getElementById("password");
let visibilityIcon = document.getElementById("visibilityIcon");
passwordField.type = passwordField.type === "password" ? "text" : "password";
visibilityIcon.classList.toggle("icon-eye");
}
</script>
@endpush
@endcomponent

View File

@@ -0,0 +1,42 @@
@extends('super-admin.layouts.master')
@section('content')
<div class="md:flex md:items-center md:justify-between mb-6">
<div class="flex-1 min-w-0">
<h2 class="text-2xl font-bold leading-7 text-gray-900 dark:text-white sm:text-3xl sm:truncate">
Criar Empresa
</h2>
</div>
</div>
<div class="mt-5 md:mt-0 md:col-span-2">
<form action="{{ route('super-admin.tenants.store') }}" method="POST">
@csrf
<div class="shadow overflow-hidden sm:rounded-md">
<div class="px-4 py-5 bg-white dark:bg-gray-900 sm:p-6">
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 sm:col-span-4">
<label for="id" class="block text-sm font-medium text-gray-700 dark:text-gray-300">ID da Empresa</label>
<input type="text" name="id" id="id" autocomplete="off" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-white rounded-md p-2 border" placeholder="ex: empresa1">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">Identificador único para a empresa. Não poderá ser alterado posteriormente.</p>
</div>
<div class="col-span-6 sm:col-span-4">
<label for="domain" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Domínio</label>
<input type="text" name="domain" id="domain" autocomplete="off" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-white rounded-md p-2 border" placeholder="ex: empresa1.growuppro.com.br">
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">Domínio completo da empresa.</p>
</div>
</div>
</div>
<div class="flex items-center justify-end gap-x-2 px-4 py-3 bg-gray-50 dark:bg-gray-800 sm:px-6">
<a href="{{ route('super-admin.tenants.index') }}" class="inline-flex justify-center py-2 px-4 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Cancelar
</a>
<button type="submit" class="primary-button">
Criar
</button>
</div>
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,73 @@
@extends('super-admin.layouts.master')
@section('content')
<div class="flex items-center justify-between gap-4 max-sm:flex-wrap mb-3">
<p class="text-xl font-bold text-gray-800 dark:text-white">
Empresas
</p>
<div class="flex items-center gap-x-2.5">
<a href="{{ route('super-admin.tenants.create') }}" class="primary-button">
Criar Empresa
</a>
</div>
</div>
<div class="mt-7">
<div class="box-shadow relative overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
<table class="w-full text-left text-sm text-gray-500 dark:text-gray-400">
<thead class="bg-gray-50 text-xs uppercase text-gray-700 dark:bg-gray-800 dark:text-gray-300">
<tr>
<th scope="col" class="px-6 py-3">ID</th>
<th scope="col" class="px-6 py-3">Domínios</th>
<th scope="col" class="px-6 py-3">Criado em</th>
<th scope="col" class="px-6 py-3">Última Atualização</th>
<th scope="col" class="px-6 py-3">Atualizado por</th>
<th scope="col" class="px-6 py-3 text-right"></th>
<th scope="col" class="px-6 py-3 text-right"></th>
</tr>
</thead>
<tbody>
@foreach($tenants as $tenant)
<tr class="border-b bg-white hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:hover:bg-gray-800">
<td class="px-6 py-4 font-medium text-gray-900 dark:text-white">
<div class="flex items-center gap-2">
@if($tenant->domains->isNotEmpty())
<a href="http://{{ $tenant->domains->first()->domain }}" target="_blank" class="text-blue-600 hover:text-blue-800 dark:text-blue-500 dark:hover:text-blue-400">
<span class="icon-forward"></span>
</a>
@endif
{{ $tenant->id }}
</div>
</td>
<td class="px-6 py-4">
@foreach($tenant->domains as $domain)
<div>{{ $domain->domain }}</div>
@endforeach
</td>
<td class="px-6 py-4">
{{ $tenant->created_at->format('d/m/Y H:i') }}
</td>
<td class="px-6 py-4">
{{ $tenant->updated_at->format('d/m/Y H:i') }}
</td>
<td class="px-6 py-4">
{{ $tenant->last_updated_by ?? '-' }}
</td>
<td class="px-6 py-4 text-right">
<a href="{{ route('super-admin.tenants.edit', $tenant->id) }}" class="font-medium text-blue-600 hover:underline dark:text-blue-500">Editar</a>
</td>
<td class="px-6 py-4 text-right">
<form action="{{ route('super-admin.tenants.destroy', $tenant->id) }}" method="POST" onsubmit="return confirm('Tem certeza?');" class="inline-block">
@csrf
@method('DELETE')
<button type="submit" class="font-medium text-red-600 hover:underline dark:text-red-500">Excluir</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection