diff --git a/nomad-front-end/src/components/AccountsComponents/AccountsForm.jsx b/nomad-front-end/src/components/AccountsComponents/AccountsForm.jsx index da916ac..9a4fb43 100644 --- a/nomad-front-end/src/components/AccountsComponents/AccountsForm.jsx +++ b/nomad-front-end/src/components/AccountsComponents/AccountsForm.jsx @@ -1,6 +1,7 @@ import React, { useEffect } from 'react' import { Form, DatePicker, Button, Select, Tooltip, Radio, Modal, Space } from 'antd' import { CloseOutlined, QuestionOutlined } from '@ant-design/icons' +import infoModalConfig from './infoModalCosting' const { Option } = Select const { RangePicker } = DatePicker @@ -17,7 +18,12 @@ const AccountsForm = props => { )) - grpOptions = [ , ...grpOptions ] + grpOptions = [ + , + ...grpOptions + ] const radioOptions = ['Grants', 'Groups', 'Users'] @@ -31,29 +37,30 @@ const AccountsForm = props => { }) } - if (dateRange) { - values.dateRange = dateRange.map(date => date.format('YYYY-MM-DD')) - } + if (!dateRange) { + return Modal.confirm({ + title: 'Date range not defined', + content: ( +
If date range is not defined, the calculation can take very long time
+Do you want to proceed?
++ This calculation will work only if grants have been preset. In "Set Grants" table you can + assign either individual users or whole group to a grant. If you assign individual user and + his own group to two different grants, the experiments that were originated by the user will + be charged to the grant corresponding to the user and not to the one corresponding to the + whole group. +
+
+ Groups calculation provides total sums of total experimental times (including overhead
+ times) and corresponding costs for groups. Costs are calculated using instrument costings
+ that are set in the costing table in the time of calculation.
+
+ Users calculation is similar to the previous one. A group can be selected from drop down + menu and total experimental times and costs are listed for individual users who were in the + group in the time of archiving of the experiments. If "--all--" option is selected the + calculation will be performed for all users who archived an experiment in the given period + of time. +
+