Add UI for anomaly detection flag
This commit is contained in:
@ -47,6 +47,6 @@ class ExerciseCollectionsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def exercise_collection_params
|
def exercise_collection_params
|
||||||
params[:exercise_collection].permit(:name, :user_id, :user_type, :exercise_ids => [])
|
params[:exercise_collection].permit(:name, :use_anomaly_detection, :user_id, :user_type, :exercise_ids => [])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
.form-group
|
.form-group
|
||||||
= f.label(t('activerecord.attributes.exercise_collections.name'))
|
= f.label(t('activerecord.attributes.exercise_collections.name'))
|
||||||
= f.text_field(:name, class: 'form-control', required: true)
|
= f.text_field(:name, class: 'form-control', required: true)
|
||||||
|
.form-group
|
||||||
|
= f.label(t('activerecord.attributes.exercise_collections.use_anomaly_detection'))
|
||||||
|
= f.check_box(:use_anomaly_detection, {class: 'form-control'})
|
||||||
.form-group
|
.form-group
|
||||||
= f.label(t('activerecord.attributes.exercise_collections.user'))
|
= f.label(t('activerecord.attributes.exercise_collections.user'))
|
||||||
= f.collection_select(:user_id, users, :id, :name, {}, {class: 'form-control'})
|
= f.collection_select(:user_id, users, :id, :name, {}, {class: 'form-control'})
|
||||||
|
@ -4,6 +4,7 @@ h1
|
|||||||
|
|
||||||
= row(label: 'exercise_collections.name', value: @exercise_collection.name)
|
= row(label: 'exercise_collections.name', value: @exercise_collection.name)
|
||||||
= row(label: 'exercise_collections.user', value: link_to(@exercise_collection.user.name, @exercise_collection.user))
|
= row(label: 'exercise_collections.user', value: link_to(@exercise_collection.user.name, @exercise_collection.user))
|
||||||
|
= row(label: 'exercise_collections.use_anomaly_detection', value: @exercise_collection.use_anomaly_detection)
|
||||||
= row(label: 'exercise_collections.updated_at', value: @exercise_collection.updated_at)
|
= row(label: 'exercise_collections.updated_at', value: @exercise_collection.updated_at)
|
||||||
|
|
||||||
h4 = t('activerecord.attributes.exercise_collections.exercises')
|
h4 = t('activerecord.attributes.exercise_collections.exercises')
|
||||||
|
@ -125,6 +125,7 @@ de:
|
|||||||
id: "ID"
|
id: "ID"
|
||||||
name: "Name"
|
name: "Name"
|
||||||
user: "Verantwortlicher"
|
user: "Verantwortlicher"
|
||||||
|
use_anomaly_detection: "Abweichungen in der Arbeitszeit erkennen"
|
||||||
updated_at: "Letzte Änderung"
|
updated_at: "Letzte Änderung"
|
||||||
exercises: "Aufgaben"
|
exercises: "Aufgaben"
|
||||||
models:
|
models:
|
||||||
|
@ -125,6 +125,7 @@ en:
|
|||||||
id: "ID"
|
id: "ID"
|
||||||
name: "Name"
|
name: "Name"
|
||||||
user: "Associated User"
|
user: "Associated User"
|
||||||
|
use_anomaly_detection: "Enable Worktime Anomaly Detection"
|
||||||
updated_at: "Last Update"
|
updated_at: "Last Update"
|
||||||
exercises: "Exercises"
|
exercises: "Exercises"
|
||||||
models:
|
models:
|
||||||
|
Reference in New Issue
Block a user