Skip to content

Commit

Permalink
Remove feature flag from showing the status in task card and handle e…
Browse files Browse the repository at this point in the history
…dit view. (#969)
  • Loading branch information
skv93-coder authored Oct 29, 2023
1 parent d61b07e commit 427c01e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions __tests__/Unit/Components/Tasks/Card.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,10 @@ describe('Task card', () => {
expect(spanElement).toHaveTextContent('Started 3 years ago'); // Mocked date from moment
});
it('Should show the status of the task', () => {
// TODO: After UI change remove dev flag
renderWithRouter(
<Provider store={store()}>
<Card {...DEFAULT_PROPS} />
</Provider>,
{ query: { dev: 'true' } }
</Provider>
);
const spanElement = screen.getByTestId('task-status');
expect(spanElement).toHaveTextContent('Completed');
Expand Down
10 changes: 3 additions & 7 deletions src/components/tasks/card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FC, useState, useEffect, useRef, ChangeEvent } from 'react';
import Image from 'next/image';
import classNames from '@/components/tasks/card/card.module.scss';
import DevFeature from '@/components/DevFeature';
import getDateInString from '@/helperFunctions/getDateInString';
import { useKeyLongPressed } from '@/hooks/useKeyLongPressed';
import { CardProps } from '@/interfaces/task.type';
Expand Down Expand Up @@ -565,15 +564,12 @@ const Card: FC<CardProps> = ({
</div>
{/* EDIT task status */}
<div className={classNames.taskStatusEditMode}>
{isEditable && (
{isEditable ? (
<TaskStatusEditMode
task={editedTaskDetails}
setEditedTaskDetails={setEditedTaskDetails}
/>
)}
</div>
<DevFeature>
{cardDetails.status && (
) : (
<div className={classNames.statusContainer} style={{}}>
<p className={classNames.cardSpecialFont}>
Status:
Expand All @@ -590,7 +586,7 @@ const Card: FC<CardProps> = ({
</p>
</div>
)}
</DevFeature>
</div>
</div>

<div className={classNames.contributor}>
Expand Down

0 comments on commit 427c01e

Please sign in to comment.