diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 576789dc..62014e7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,6 @@ jobs: run: bundle exec rails assets:precompile - name: Set up database schema run: bin/rails db:schema:load - - name: Set up database schema - run: bin/rails db:seed - name: Copy env file run: cp .env.example .env - name: Run tests diff --git a/.rubocop.yml b/.rubocop.yml index cd7849d3..c6eb01f5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -65,3 +65,7 @@ RSpec/ContextWording: RSpec/ExampleLength: Exclude: - 'spec/features/*' + +RSpec/NoExpectationExample: + Exclude: + - 'spec/features/**/*' diff --git a/app/controllers/system_admin/dashboard_controller.rb b/app/controllers/system_admin/dashboard_controller.rb new file mode 100644 index 00000000..2c9e5b42 --- /dev/null +++ b/app/controllers/system_admin/dashboard_controller.rb @@ -0,0 +1,7 @@ +module SystemAdmin + class DashboardController < ApplicationController + def show + @kpis = Kpis.new + end + end +end diff --git a/app/javascript/packs/stylesheets/custom.scss b/app/javascript/packs/stylesheets/custom.scss new file mode 100644 index 00000000..aef3eea0 --- /dev/null +++ b/app/javascript/packs/stylesheets/custom.scss @@ -0,0 +1,27 @@ +.dashboard { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-gap: 20px; /* Adjust this for your desired gap between columns */ +} + +.kpi-widget { + background-color: #1d70b8; + border-radius: 5px; + padding: 15px; + text-align: center; + + .title { + font-size: 25px; + font-weight: bold; + color: #fff; + } + + .value { + font-size: 70px; + font-weight: bold; + color: #fff; + display: block; + padding: 0; + margin: 0; + } +} diff --git a/app/javascript/packs/stylesheets/govuk.scss b/app/javascript/packs/stylesheets/govuk.scss index 6ff0f057..2a697b78 100644 --- a/app/javascript/packs/stylesheets/govuk.scss +++ b/app/javascript/packs/stylesheets/govuk.scss @@ -1,2 +1,3 @@ -$govuk-assets-path: "~govuk-frontend/govuk/assets/"; -@import "govuk-frontend/govuk/all"; \ No newline at end of file +$govuk-assets-path: '~govuk-frontend/govuk/assets/'; +@import 'govuk-frontend/govuk/all'; +@import 'custom'; diff --git a/app/models/kpis.rb b/app/models/kpis.rb new file mode 100644 index 00000000..aa745c56 --- /dev/null +++ b/app/models/kpis.rb @@ -0,0 +1,9 @@ +class Kpis + def initialize + @applications = Applicant.all + end + + def total_applications + @applications.count + end +end diff --git a/app/views/system_admin/dashboard/show.html.erb b/app/views/system_admin/dashboard/show.html.erb new file mode 100644 index 00000000..d8725da5 --- /dev/null +++ b/app/views/system_admin/dashboard/show.html.erb @@ -0,0 +1,6 @@ +