added group task description
parent
8af2f09cfa
commit
c5c4e853d1
|
@ -27,6 +27,11 @@ const columns = [
|
||||||
dataIndex: "groupName",
|
dataIndex: "groupName",
|
||||||
key: "groupName",
|
key: "groupName",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "Description",
|
||||||
|
dataIndex: "description",
|
||||||
|
key: "description",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Step",
|
title: "Step",
|
||||||
dataIndex: "step",
|
dataIndex: "step",
|
||||||
|
@ -110,6 +115,7 @@ export default function GroupTaskTableList({
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
groupName: groupTask.GroupName,
|
groupName: groupTask.GroupName,
|
||||||
|
description: groupTask.Description,
|
||||||
step: `${groupTask.CurrentTasksStep} / ${groupTask.NumberOfSteps}`,
|
step: `${groupTask.CurrentTasksStep} / ${groupTask.NumberOfSteps}`,
|
||||||
status: getStatusBadge(groupTask.Status),
|
status: getStatusBadge(groupTask.Status),
|
||||||
startedAt: FormatDatetime(groupTask.StartedAt),
|
startedAt: FormatDatetime(groupTask.StartedAt),
|
||||||
|
|
|
@ -377,6 +377,7 @@ export default function GroupTasksViewModal({ isOpen }) {
|
||||||
style={{
|
style={{
|
||||||
color: Constants.COLORS.PRIMARY,
|
color: Constants.COLORS.PRIMARY,
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
|
marginBottom: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{currentGroupTask.GroupName}{" "}
|
{currentGroupTask.GroupName}{" "}
|
||||||
|
@ -475,7 +476,11 @@ export default function GroupTasksViewModal({ isOpen }) {
|
||||||
allUsers={webSocketContext.AllUsers}
|
allUsers={webSocketContext.AllUsers}
|
||||||
userId={currentGroupTask.CreatorUserId}
|
userId={currentGroupTask.CreatorUserId}
|
||||||
/>
|
/>
|
||||||
|
<br />
|
||||||
</h1>
|
</h1>
|
||||||
|
<div style={{ marginBottom: 16 }}>
|
||||||
|
<span>{currentGroupTask.Description}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Steps direction="vertical" items={stepsItemHandler()} />
|
<Steps direction="vertical" items={stepsItemHandler()} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import { WebSocketContext, SentMessagesCommands } from "../../utils";
|
import { WebSocketContext, SentMessagesCommands } from "../../utils";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
import { InfoCircleOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
export default function GroupTypeSelectionModal({
|
export default function GroupTypeSelectionModal({
|
||||||
isOpen,
|
isOpen,
|
||||||
|
@ -48,14 +49,23 @@ export default function GroupTypeSelectionModal({
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleStartTask = () => {
|
const handleStartTask = () => {
|
||||||
|
let canTaskBeStarted = true;
|
||||||
|
|
||||||
|
const groupTaskDescription = document.getElementById(
|
||||||
|
"fitem-grouptypedescription"
|
||||||
|
).value;
|
||||||
|
|
||||||
|
if (groupTaskDescription === "") {
|
||||||
|
canTaskBeStarted = false;
|
||||||
|
}
|
||||||
|
|
||||||
const userSpecifiedGlobalInputForm = document.getElementById(
|
const userSpecifiedGlobalInputForm = document.getElementById(
|
||||||
"groupTypeSelectionUserSpecifiedGlobalInputForm"
|
"groupTypeSelectionUserSpecifiedGlobalInputForm"
|
||||||
);
|
);
|
||||||
|
|
||||||
let globalInputs = [];
|
let globalInputs = [];
|
||||||
let canTaskBeStarted = true;
|
|
||||||
|
|
||||||
if (userSpecifiedGlobalInputForm !== null) {
|
if (canTaskBeStarted && userSpecifiedGlobalInputForm !== null) {
|
||||||
const userSpecifiedGlobalInputs =
|
const userSpecifiedGlobalInputs =
|
||||||
userSpecifiedGlobalInputForm.getElementsByTagName("input");
|
userSpecifiedGlobalInputForm.getElementsByTagName("input");
|
||||||
|
|
||||||
|
@ -103,6 +113,7 @@ export default function GroupTypeSelectionModal({
|
||||||
category: categoryGroup.category,
|
category: categoryGroup.category,
|
||||||
id: currentSelectedModalGroupType,
|
id: currentSelectedModalGroupType,
|
||||||
groupName: groupName,
|
groupName: groupName,
|
||||||
|
description: groupTaskDescription,
|
||||||
numberOfSteps: parseInt(numberOfSteps),
|
numberOfSteps: parseInt(numberOfSteps),
|
||||||
globalInputs: globalInputs,
|
globalInputs: globalInputs,
|
||||||
rememberId: rememberId, // used to open the modal when group task is started by backend and send via websocket back
|
rememberId: rememberId, // used to open the modal when group task is started by backend and send via websocket back
|
||||||
|
@ -151,6 +162,25 @@ export default function GroupTypeSelectionModal({
|
||||||
: null}
|
: null}
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
|
{console.log(currentSelectedModalGroupType)}
|
||||||
|
|
||||||
|
{currentSelectedModalGroupType !== null && (
|
||||||
|
<Form layout="vertical">
|
||||||
|
<br />
|
||||||
|
<Form.Item
|
||||||
|
label="Description"
|
||||||
|
tooltip={{
|
||||||
|
title:
|
||||||
|
"This description helps to understand afterwards what this task was about",
|
||||||
|
icon: <InfoCircleOutlined />,
|
||||||
|
}}
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<Input id="fitem-grouptypedescription" />
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
)}
|
||||||
|
|
||||||
<GroupGlobalInputs
|
<GroupGlobalInputs
|
||||||
categoryGroup={categoryGroup}
|
categoryGroup={categoryGroup}
|
||||||
currentSelectedModalGroupType={currentSelectedModalGroupType}
|
currentSelectedModalGroupType={currentSelectedModalGroupType}
|
||||||
|
@ -165,7 +195,7 @@ function GroupGlobalInputs({
|
||||||
currentSelectedModalGroupType,
|
currentSelectedModalGroupType,
|
||||||
notificationApi,
|
notificationApi,
|
||||||
}) {
|
}) {
|
||||||
const MyFormItem = ({ children, displayName, parameterName }) => {
|
const MyFormItem = ({ children, displayName }) => {
|
||||||
return (
|
return (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={
|
label={
|
||||||
|
@ -198,7 +228,6 @@ function GroupGlobalInputs({
|
||||||
<MyFormItem
|
<MyFormItem
|
||||||
key={"fitem-" + globalInput.parameterName}
|
key={"fitem-" + globalInput.parameterName}
|
||||||
displayName={globalInput.displayName}
|
displayName={globalInput.displayName}
|
||||||
parameterName={globalInput.parameterName}
|
|
||||||
children={
|
children={
|
||||||
<Input
|
<Input
|
||||||
key={"input-" + globalInput.parameterName}
|
key={"input-" + globalInput.parameterName}
|
||||||
|
@ -213,7 +242,6 @@ function GroupGlobalInputs({
|
||||||
<MyFormItem
|
<MyFormItem
|
||||||
key={"fitem-" + globalInput.parameterName}
|
key={"fitem-" + globalInput.parameterName}
|
||||||
displayName={globalInput.displayName}
|
displayName={globalInput.displayName}
|
||||||
parameterName={globalInput.parameterName}
|
|
||||||
children={
|
children={
|
||||||
<InputNumber
|
<InputNumber
|
||||||
key={"input-" + globalInput.parameterName}
|
key={"input-" + globalInput.parameterName}
|
||||||
|
|
Loading…
Reference in New Issue