feat: implement secure multi-tenancy, RBAC, and premium dark mode
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m54s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m54s
- Enforced tenant isolation and Role-Based Access Control across all API routes - Implemented secure profile avatar upload using multer and UUIDs - Redesigned UI with a premium "Onyx & Gold" Charcoal dark mode - Added Funnel Stage and Origin filters to Dashboard and User Detail pages - Replaced "Referral" with "Indicação" across the platform and database - Optimized Dockerfile and local environment setup for reliable deployments - Fixed frontend syntax errors and improved KPI/Chart visualizations
This commit is contained in:
@@ -36,7 +36,7 @@ CREATE TABLE `attendances` (
|
||||
`first_response_time_min` int DEFAULT '0',
|
||||
`handling_time_min` int DEFAULT '0',
|
||||
`funnel_stage` enum('Sem atendimento','Identificação','Negociação','Ganhos','Perdidos') NOT NULL,
|
||||
`origin` enum('WhatsApp','Instagram','Website','LinkedIn','Referral') NOT NULL,
|
||||
`origin` enum('WhatsApp','Instagram','Website','LinkedIn','Indicação') NOT NULL,
|
||||
`product_requested` varchar(255) DEFAULT NULL,
|
||||
`product_sold` varchar(255) DEFAULT NULL,
|
||||
`converted` tinyint(1) DEFAULT '0',
|
||||
@@ -104,6 +104,38 @@ INSERT INTO `tenants` (`id`, `name`, `slug`, `admin_email`, `logo_url`, `status`
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Estrutura da tabela `pending_registrations`
|
||||
--
|
||||
|
||||
CREATE TABLE `pending_registrations` (
|
||||
`email` varchar(255) NOT NULL,
|
||||
`password_hash` varchar(255) NOT NULL,
|
||||
`full_name` varchar(255) NOT NULL,
|
||||
`organization_name` varchar(255) NOT NULL,
|
||||
`verification_code` varchar(10) NOT NULL,
|
||||
`expires_at` timestamp NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Estrutura da tabela `password_resets`
|
||||
--
|
||||
|
||||
CREATE TABLE `password_resets` (
|
||||
`email` varchar(255) NOT NULL,
|
||||
`token` varchar(255) NOT NULL,
|
||||
`expires_at` timestamp NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`token`),
|
||||
KEY `email` (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Estrutura da tabela `users`
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user