Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Story Submission User Story Submission #649

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 42 additions & 5 deletions src/people/widgetViews/GenerateStoriesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { useHistory, useParams } from 'react-router-dom';
import { EuiOverlayMask } from '@elastic/eui';
import { useStores } from '../../store';
import { getHost } from '../../config';
import { FieldWrap } from '../../pages/tickets/style.ts';
import { Label } from '../../pages/tickets/style.ts';
import { UserStoryWrapper } from './workspace/style';
import {
GenerateStoriesModal,
GenerateStoriesHeader,
Expand All @@ -11,7 +14,8 @@ import {
GenerateStoriesText,
GenerateStoriesFooter,
GenerateStoriesButton,
SendStoriesButton
SendStoriesButton,
UserStoryField
} from './workspace/style';

const GenerateStoriesView: React.FC = () => {
Expand Down Expand Up @@ -79,17 +83,50 @@ const GenerateStoriesView: React.FC = () => {
<GenerateStoriesContent>
<GenerateStoriesText>
{response ? (
<pre>{JSON.stringify(response, null, 2)}</pre>
response?.success ? (
'Workflow submitted please check back in 5 minutes and refresh the feature screen'
) : (
'Workflow failed: Please contact Hive Product Manager'
)
) : postData ? (
<pre>{JSON.stringify(postData, null, 2)}</pre>
<>
<FieldWrap>
<Label>Product Brief</Label>
<UserStoryWrapper>
<UserStoryField>{postData.productBrief}</UserStoryField>
</UserStoryWrapper>
</FieldWrap>

<FieldWrap>
<Label>Feature Name</Label>
<UserStoryWrapper>
<UserStoryField>{postData.featureName}</UserStoryField>
</UserStoryWrapper>
</FieldWrap>

<FieldWrap>
<Label>Feature Description</Label>
<UserStoryWrapper>
<UserStoryField>{postData.description}</UserStoryField>
</UserStoryWrapper>
</FieldWrap>
</>
) : (
'Story Generation Coming Soon!'
)}
</GenerateStoriesText>
</GenerateStoriesContent>
<GenerateStoriesFooter>
<GenerateStoriesButton onClick={handleClose}>Cancel</GenerateStoriesButton>
<SendStoriesButton onClick={submitStories}>Send</SendStoriesButton>
{response ? (
<>
<SendStoriesButton onClick={handleClose}>Close</SendStoriesButton>
</>
) : (
<>
<GenerateStoriesButton onClick={handleClose}>Cancel</GenerateStoriesButton>
<SendStoriesButton onClick={submitStories}>Send</SendStoriesButton>
</>
)}
</GenerateStoriesFooter>
</GenerateStoriesModal>
</EuiOverlayMask>
Expand Down
Loading