Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1455 from omu/develop
Browse files Browse the repository at this point in the history
Merge branch develop into master
  • Loading branch information
huseyin authored Jan 28, 2020
2 parents e5dedc9 + 0f64e7a commit 86f87cc
Show file tree
Hide file tree
Showing 109 changed files with 1,619 additions and 349 deletions.
6 changes: 6 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
engines:
eslint:
exclude_paths:
- app/assets/javascripts/highcharts-maps/tr.js
- plugins/tenant/omu/test/dummy/app/assets/javascripts/*
- plugins/tenant/acme/test/dummy/app/assets/javascripts/*
exclude_paths:
- '**.md'
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "standard"
}
"extends": "standard",
"parser": "babel-eslint"
}
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ GEM
authy (2.7.5)
httpclient (>= 2.5.3.3)
aws-eventstream (1.0.3)
aws-partitions (1.266.0)
aws-sdk-core (3.88.0)
aws-partitions (1.269.0)
aws-sdk-core (3.89.1)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.27.0)
aws-sdk-kms (1.28.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.60.1)
Expand Down Expand Up @@ -130,7 +130,7 @@ GEM
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
byebug (11.1.0)
byebug (11.1.1)
capybara (3.30.0)
addressable
mini_mime (>= 0.1.3)
Expand Down Expand Up @@ -161,12 +161,12 @@ GEM
dotenv-rails (2.7.5)
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
erb_lint (0.0.30)
erb_lint (0.0.31)
activesupport
better_html (~> 1.0.7)
html_tokenizer
rainbow
rubocop (~> 0.51)
rubocop (~> 0.79.0)
smart_properties
erubi (1.9.0)
execjs (2.7.0)
Expand Down Expand Up @@ -264,7 +264,7 @@ GEM
parallel (1.19.1)
parser (2.7.0.2)
ast (~> 2.4.0)
pg (1.2.1)
pg (1.2.2)
pg_search (2.3.2)
activerecord (>= 5.2)
activesupport (>= 5.2)
Expand All @@ -281,7 +281,7 @@ GEM
pundit (2.1.0)
activesupport (>= 3.0.0)
pwned (2.0.1)
rack (2.0.8)
rack (2.1.1)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-mini-profiler (1.1.4)
Expand Down Expand Up @@ -351,13 +351,13 @@ GEM
rubocop (>= 0.74)
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
rubocop-rails (2.4.1)
rubocop-rails (2.4.2)
rack (>= 1.1)
rubocop (>= 0.72.0)
ruby-progressbar (1.10.1)
ruby-vips (2.0.17)
ffi (~> 1.9)
rubyzip (2.0.0)
rubyzip (2.1.0)
safe_yaml (1.0.5)
sassc (2.2.1)
ffi (~> 1.9)
Expand Down Expand Up @@ -402,11 +402,11 @@ GEM
attr_required (>= 0.0.5)
httpclient (>= 2.4)
swearjar (1.3.1)
telephone_number (1.4.5)
telephone_number (1.4.6)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.10)
twilio-ruby (5.31.2)
twilio-ruby (5.31.3)
faraday (~> 1.0.0)
jwt (>= 1.5, <= 2.5)
nokogiri (>= 1.6, < 2.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services, 50K students and 4K employees as a case.
Installation
------------

See [installation guide](/doc/development/installation.md) for details.
See [installation guide](/doc/operations/installation.md) for details.

Documentation
-------------
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"rails"
],
"repository": "https://github.com/omu/nokul",
"version": "0.7.4",
"version": "0.7.5",
"scripts": {
"dokku": {
"predeploy": "bin/plugdo bundle install -j4 --path /app/vendor/bundle --without development:test && bundle exec rails assets:precompile && bundle exec rails db:migrate"
Expand Down
2 changes: 2 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
//= link_directory ../stylesheets .css

//= link application.js
//= link chart.js
//= link highcharts-langs/tr.js
2 changes: 0 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Manifest file for common assets being used in panel

//= require rails-ujs
//= require activestorage
//= require coreui
//= require helpers/dynamic_select
//= require toastr/build/toastr.min
Expand Down
5 changes: 5 additions & 0 deletions app/assets/javascripts/chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//= require echarts/dist/echarts.min
//= require highcharts/highcharts
//= require highcharts/modules/exporting
//= require highcharts/modules/map
//= require highcharts-maps/tr
26 changes: 26 additions & 0 deletions app/assets/javascripts/highcharts-langs/tr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable no-undef */

Highcharts.setOptions({
lang: {
contextButtonTitle: 'Grafik İşlem Menüsü',
decimalPoint: ',',
downloadJPEG: 'JPEG olarak indir',
downloadPDF: 'PDF olarak indir',
downloadPNG: 'PNG olarak indir',
downloadSVG: 'SVG olarak indir',
exportButtonTitle: 'Dışarı Aktar',
loading: 'Yükleniyor...',
months: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'],
printButtonTitle: 'Yazdır',
printChart: 'Yazdır',
rangeSelectorFrom: 'Başlangış',
rangeSelectorTo: 'Bitiş',
rangeSelectorZoom: 'Aralık seç',
resetZoom: 'Yakınlaşmayı Sıfırla',
resetZoomTitle: 'Yakınlaşmayı Sıfırla',
shortMonths: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'],
thousandsSep: '.',
viewFullscreen: 'Tam Ekran Görüntüle',
weekdays: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi']
}
})
14 changes: 14 additions & 0 deletions app/assets/javascripts/highcharts-maps/tr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*= require toastr/build/toastr.min
*= require select2/dist/css/select2.min
*= require custom/select2
*= require custom/loading
*= require custom/content_loader
*= require intl-tel-input/build/css/intlTelInput.min
*= require custom/intl_tel_input
*= require flatpickr/dist/flatpickr.min
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@


.loading {
position: fixed;
position: absolute;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
background: #d3d3d37a;
display: flex;
justify-content: center;
align-items: center;
}

.loading>.loading-content {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #707070;
text-align: center;
}

.snipper-large {
width: 3em;
height: 3em;
.custom-card-header {
padding: .25rem .75rem;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Studies
module Detsis
class DashboardController < ApplicationController
def index; end
end
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/detsis/sdp_codes_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Detsis
class SdpCodesController < ApplicationController
include SearchableModule

def index
@sdp_codes = pagy_by_search(SdpCode.order(:main))
end
end
end
7 changes: 7 additions & 0 deletions app/controllers/manager/dashboard_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

module Manager
class DashboardController < ApplicationController
def stats; end
end
end
11 changes: 11 additions & 0 deletions app/controllers/manager/stats/articles_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Manager
module Stats
class ArticlesController < ApplicationController
layout false

def index; end
end
end
end
15 changes: 15 additions & 0 deletions app/controllers/manager/stats/employees_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Manager
module Stats
class EmployeesController < ApplicationController
layout false

def index; end

def academic
@series = Employee.active.academic.group('titles.name').count
end
end
end
end
64 changes: 64 additions & 0 deletions app/controllers/manager/stats/students_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# frozen_string_literal: true

module Manager
module Stats
class StudentsController < ApplicationController
layout false

def index; end

def cities
@series = Xokul::Ubs::Statistic::Student.by_cities(
schema: {
city: :name,
total: :value
}
).each { |item| item[:name] = item[:name].capitalize_turkish }.to_json
end

def double_major_and_minor
@series = Xokul::Ubs::Statistic::Student.double_major_and_minor(
schema: {
category: :name,
number_of_students: :y
}
).to_json
end

def genders
@series = Xokul::Ubs::Statistic::Student.by_genders(
schema: {
gender: :name,
number_of_students: :y
}
).to_json
end

def genders_and_degrees
data = Xokul::Ubs::Statistic::Student.by_genders_and_degree
@degrees = data.map { |item| item[:degree] }.uniq
@series = data.group_by { |item| item[:gender] }.map do |gender, values|
{
name: gender,
data: @degrees.map do |degree|
values.find { |v| v[:degree] == degree }&.fetch(:number_of_students, 0)
end
}
end.to_json
end

def non_graduates
data = Xokul::Ubs::Statistic::Student.non_graduates
@degrees = data.map { |item| item[:degree] }.uniq
@series = data.group_by { |item| item[:status] }.map do |status, values|
{
name: status,
data: @degrees.map do |degree|
values.find { |v| v[:degree] == degree }&.fetch(:number_of_students, 0)
end
}
end.to_json
end
end
end
end
12 changes: 5 additions & 7 deletions app/controllers/studentship/course_enrollments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ def destroy
end

def save
if @service.course_enrollments.any?
message = @service.save ? t('.success') : t('.error')
redirect_to(list_student_course_enrollments_path(@student), flash: { info: message })
else
redirect_with(t('.errors.empty_selected_courses_list'))
end
return redirect_with(t('.errors.empty_selected_courses_list')) if @service.course_enrollments.empty?
return redirect_with(t('.error')) unless @service.save

redirect_to(list_student_course_enrollments_path(@student), flash: { info: t('.success') })
end

private
Expand Down Expand Up @@ -73,7 +71,7 @@ def check_registration_status
end

def course_enrollment_params
params.require(:course_enrollment).permit(:available_course_id)
params.require(:course_enrollment).permit(:available_course_id, :available_course_group_id)
end
end
end
7 changes: 0 additions & 7 deletions app/controllers/studies/articles_controller.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/controllers/studies/certifications_controller.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/controllers/studies/projects_controller.rb

This file was deleted.

Loading

0 comments on commit 86f87cc

Please sign in to comment.