Skip to content
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
8 changes: 4 additions & 4 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/app.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/app-dark.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/iconly.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/simple-datatables/style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/scss/pages/simple-datatables.scss">

<style>
#app {
Expand Down Expand Up @@ -90,9 +92,7 @@
</div>
</div>

<!-- Need: Apexcharts -->
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/apexcharts/apexcharts.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/pages/dashboard.js"></script>

<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/simple-datatables/umd/simple-datatables.js"></script>
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/pages/simple-datatables.js"></script>
</body>
</html>
47 changes: 0 additions & 47 deletions app/views/layouts/mazer.html.erb

This file was deleted.

4 changes: 2 additions & 2 deletions app/views/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<section class="section">
<div class="card">
<div class="card-body">
<%= link_to new_region_path, class: "btn btn-primary" do %>
<%= link_to new_region_path, class: "btn btn-primary m-2" do %>
<i class="bi bi-plus"></i> Add New User
<% end %>
<table class="table table-striped" id="table1">
<thead>
<tr>
<th>Email</th>
<th>Administrator</th>
<th>User actions</th>
<th class="text-end">User Actions</th>
</tr>
</thead>
<tbody>
Expand Down
29 changes: 29 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end
puts "Destroying current records..."

Topic.destroy_all
Provider.destroy_all
Language.destroy_all
User.destroy_all

puts "Creating languages..."

[
{ name: "english", file_share_folder: "languages/english" },
Expand All @@ -15,12 +23,18 @@
Language.find_or_create_by!(language)
end

puts "Languages created!"
puts "Creating providers..."

[
{ name: "Provided by the government", provider_type: "government" },
].each do |provider|
Provider.find_or_create_by!(provider)
end

puts "Providers created!"
puts "Creating topics..."

[
{
title: "Introduction to English",
Expand All @@ -41,3 +55,18 @@
].each do |topic|
Topic.find_or_create_by!(topic)
end

puts "Topics created!"
puts "Creating users..."

User.create(email: "[email protected]", password: "test123")

10.times do
User.create(
email: Faker::Internet.email,
password: "password",
is_admin: false,
)
end

puts "Users created!"