Shivam Mishra
2024-10-02 13:06:30 +05:30
committed by GitHub
parent e0bf2bd9d4
commit 42f6621afb
661 changed files with 15939 additions and 31194 deletions

View File

@@ -2,8 +2,8 @@
<html>
<head>
<title>SuperAdmin | Chatwoot</title>
<%= javascript_pack_tag 'superadmin' %>
<%= stylesheet_pack_tag 'superadmin' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'superadmin' %>
</head>
<body>
<div class="h-full w-full antialiased">

View File

@@ -20,8 +20,9 @@ By default, it renders:
<meta name="viewport" content="initial-scale=1">
<meta name= "turbolinks-cache-control" content= "no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<%= javascript_pack_tag 'portal' %>
<%= stylesheet_pack_tag 'portal' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'portal' %>
<style>
#appearance-dropdown[data-current-theme="system"] .check-mark-icon.light-theme,
#appearance-dropdown[data-current-theme="system"] .check-mark-icon.dark-theme,

View File

@@ -22,8 +22,8 @@ By default, it renders:
<%= content_for(:title) %> - <%= application_title %>
</title>
<%= render "stylesheet" %>
<%= javascript_pack_tag 'superadmin' %>
<%= stylesheet_pack_tag 'superadmin' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'superadmin' %>
<%= csrf_meta_tags %>
</head>
<body class="antialiased w-full h-full">

View File

@@ -63,14 +63,14 @@
}
</script>
<% end %>
<%= javascript_pack_tag @application_pack %>
<%= stylesheet_pack_tag @application_pack %>
<%= vite_client_tag %>
<%= vite_javascript_tag @application_pack %>
</head>
<body class="text-slate-600">
<div id="app"></div>
<noscript id="noscript">This app works best with JavaScript enabled.</noscript>
<%= yield %>
<% if @dashboard_scripts.present? %>
<% if @dashboard_scripts.present? %>
<%= @dashboard_scripts.html_safe %>
<% end %>
</body>

View File

@@ -6,7 +6,7 @@
<%= portal.header_text %>
</h1>
<p class="text-slate-600 dark:text-slate-200 text-center text-lg leading-normal pt-4 pb-4"><%= I18n.t('public_portal.hero.sub_title') %></p>
<div id="search-wrap"></div>
<div id="search-wrap" class="w-full"></div>
</div>
</div>
</section>

View File

@@ -6,8 +6,9 @@ By default, the navigation contains navigation links
for all resources in the admin dashboard,
as defined by the routes in the `admin/` namespace
%>
<%= javascript_pack_tag 'superadmin_pages' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'superadmin_pages' %>
<%
sidebar_icons = {

View File

@@ -1,65 +1,11 @@
<%#
# Index
This view is the template for the index page.
It is responsible for rendering the search bar, header and pagination.
It renders the `_table` partial to display details about the resources.
## Local variables:
- `page`:
An instance of [Administrate::Page::Collection][1].
Contains helper methods to help display a table,
and knows which attributes should be displayed in the resource's table.
- `resources`:
An instance of `ActiveRecord::Relation` containing the resources
that match the user's search criteria.
By default, these resources are passed to the table partial to be displayed.
- `search_term`:
A string containing the term the user has searched for, if any.
- `show_search_bar`:
A boolean that determines if the search bar should be shown.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Collection
%>
<%= javascript_include_tag "dashboardChart" %>
<% content_for(:title) do %>
Admin Dashboard
<% end %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title" id="page-title">
<%= content_for(:title) %>
</h1>
</header>
<section class="main-content__body main-content__body--flush">
<div class="report--list">
<div class="report-card">
<div class="metric"><%= @accounts_count %></div>
<div>Accounts</div>
</div>
<div class="report-card">
<div class="metric"><%= @users_count %></div>
<div>Users</div>
</div>
<div class="report-card">
<div class="metric"><%= @inboxes_count %></div>
<div>Inboxes</div>
</div>
<div class="report-card">
<div class="metric"><%= @conversations_count %></div>
<div>Conversations</div>
</div>
</div>
<div class="chart--container" style="height:500px">
<canvas id="dashboard-chart" width="500" height="250"></canvas>
</div>
<%= javascript_tag do -%>
drawSuperAdminDashboard(<%= @data.to_json.html_safe -%>)
<% end -%>
</section>
<%= render_vue_component('DashboardIndex', {
accountsCount: @accounts_count,
usersCount: @users_count,
inboxesCount: @inboxes_count,
conversationsCount: @conversations_count,
chartData: @data
}) %>

View File

@@ -2,8 +2,8 @@
<html>
<head>
<title>SuperAdmin | Chatwoot</title>
<%= javascript_pack_tag 'superadmin' %>
<%= stylesheet_pack_tag 'superadmin' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'superadmin' %>
</head>
<body>
<div class="h-full w-full antialiased">

View File

@@ -7,8 +7,8 @@
<script>
window.globalConfig = <%= raw @global_config.to_json %>
</script>
<%= javascript_pack_tag 'survey' %>
<%= stylesheet_pack_tag 'survey' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'survey' %>
</head>
<body>
<div id="app"></div>

View File

@@ -33,11 +33,11 @@
window.authToken = '<%= @token %>'
window.globalConfig = <%= raw @global_config.to_json %>
</script>
<%= javascript_pack_tag 'widget' %>
<%= stylesheet_pack_tag 'widget' %>
<%= vite_client_tag %>
<%= vite_javascript_tag 'widget' %>
</head>
<body>
<div id="app"></div>
<div id="app" class="h-full"></div>
<%= yield %>
</body>
</html>