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

[Fix] - Task Card Enhacement (milestone-1) #510

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 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
57 changes: 44 additions & 13 deletions app/components/task-tabs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,50 @@
{{if @showTasks "task-tabs__dropdown-active"}}'
>
{{#each @taskStatusList as |status|}}
<button
data-test-task-tabs-button
href='#'
class='task-tabs__dropdown-container__button
{{if
(eq @userSelectedTaskText status.displayLabel)
"task-tabs__dropdown-container__button-active"
}}'
{{on 'click' (fn @changeUserSelectedTask status)}}
type='button'
>
{{status.displayLabel}}
</button>
{{#if @dev}}

{{#if
(and
(not-eq status.key 'VERIFIED')
(not-eq status.key 'RELEASED')
(not-eq status.key 'REGRESSION_CHECK')
(not-eq status.key 'SANITY_CHECK')
(not-eq status.key 'APPROVED')
(not-eq status.key 'SMOKE_TESTING')
(not-eq status.key 'NEEDS_REVIEW')
)
}}
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
Pratiyushkumar marked this conversation as resolved.
Show resolved Hide resolved
<button
data-test-task-tabs-button
href='#'
class='task-tabs__dropdown-container__button
{{if
(eq @userSelectedTaskText status.displayLabel)
"task-tabs__dropdown-container__button-active"
}}'
{{on 'click' (fn @changeUserSelectedTask status)}}
type='button'
>
{{status.displayLabel}}
</button>
{{/if}}

{{else}}
<button
data-test-task-tabs-button
href='#'
class='task-tabs__dropdown-container__button
{{if
(eq @userSelectedTaskText status.displayLabel)
"task-tabs__dropdown-container__button-active"
}}'
{{on 'click' (fn @changeUserSelectedTask status)}}
type='button'
>
{{status.displayLabel}}
</button>
{{/if}}

{{/each}}
</div>
{{#unless @showTasks}}
Expand Down
63 changes: 37 additions & 26 deletions app/components/task/holder.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,44 @@
{{/if}}
{{/if}}

{{#if (not-eq this.status this.TASK_KEYS.VERIFIED)}}
<div class='task-update-container'>
<label id='task-update-label' for='task-update'><b>Status:</b></label>
<select
data-test-task-status-select
id='task-update'
{{on 'change' this.onStatusChange}}
>
{{#each this.taskStatusList as |taskStatus|}}
<option
data-test-dropdown-option={{taskStatus.displayLabel}}
value={{taskStatus.key}}
selected={{eq taskStatus.key this.status}}
>
{{taskStatus.displayLabel}}
</option>
{{/each}}
</select>
</div>
{{/if}}
<div class='task-update-container'>
<label id='task-update-label' for='task-update'><b>Status:</b></label>
<select
data-test-task-status-select
id='task-update'
{{on 'change' this.onStatusChange}}
disabled={{eq @task.status this.TASK_KEYS.DONE}}
>
{{#each this.removedTaskStatus as |taskStatus|}}
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
<option
data-test-dropdown-option={{taskStatus.displayLabel}}
value={{taskStatus.key}}
selected={{eq taskStatus.key this.status}}
>
{{taskStatus.displayLabel}}
</option>
{{/each}}
</select>
</div>

<button
class='task-card__extensionForm-button'
data-test-task-extensionForm-button
type='button'
{{on 'click' this.toggleExtensionForm}}
>Extension Status</button>
{{#if @dev}}
{{#if (not-eq @task.status this.TASK_KEYS.DONE)}}
<button
class='task-card__extensionForm-button'
data-test-task-extensionForm-button
type='button'
{{on 'click' this.toggleExtensionForm}}
> Request Extension </button>
{{/if}}
{{else}}
<button
class='task-card__extensionForm-button'
data-test-task-extensionForm-button
type='button'
{{on 'click' this.toggleExtensionForm}}
> Extension Status</button>

{{/if}}

{{#if this.isLoading}}
<div data-test-task-spinner class='task-card__loader-container'>
Expand Down
27 changes: 27 additions & 0 deletions app/components/task/holder.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@ export default class TasksHolderComponent extends Component {
return statusToDisplay;
}

get removedTaskStatus() {
const statusToDisplay = this.availabletaskStatusList.filter(
(taskStatus) => {
if (this.args.dev === true) {
if (
taskStatus.key !== 'ALL' &&
taskStatus.key !== 'VERIFIED' &&
taskStatus.key !== 'RELEASED' &&
taskStatus.key !== 'REGRESSION_CHECK' &&
taskStatus.key !== 'SANITY_CHECK' &&
taskStatus.key !== 'APPROVED' &&
taskStatus.key !== 'SMOKE_TESTING' &&
taskStatus.key !== 'COMPLETED' &&
taskStatus.key !== 'NEEDS_REVIEW'
Ajeyakrishna-k marked this conversation as resolved.
Show resolved Hide resolved
) {
return true;
} else {
return false;
Pratiyushkumar marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
return taskStatus;
}
}
);
return statusToDisplay;
}

get taskStyleClass() {
const statusNotOverDueList = [
this.args.dev === true ? TASK_KEYS.DONE : TASK_KEYS.COMPLETED,
Expand Down
13 changes: 9 additions & 4 deletions app/constants/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ const TASK_STATUS_LIST = [
displayLabel: 'Completed',
key: COMPLETED,
},
{
displayLabel: 'Done',
key: DONE,
},

{
displayLabel: 'Needs Review',
key: NEEDS_REVIEW,
Expand All @@ -77,6 +74,10 @@ const TASK_STATUS_LIST = [
displayLabel: 'In Review',
key: IN_REVIEW,
},
{
displayLabel: 'Done',
key: DONE,
},
{
displayLabel: 'Approved',
key: APPROVED,
Expand Down Expand Up @@ -132,6 +133,10 @@ const TABS_TASK_STATUS_LIST = [
displayLabel: 'Merged',
key: MERGED,
},
{
displayLabel: 'Done',
key: DONE,
},
{
displayLabel: 'Verified',
key: VERIFIED,
Expand Down
67 changes: 36 additions & 31 deletions app/styles/tasks.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

.progress-bar-red {
--progress-bar-color:rgba(255, 0, 0, 0.8);
--progress-bar-color: rgba(255, 0, 0, 0.8);
}
.progress-bar-yellow {
--progress-bar-color: rgba(255, 255, 0, 0.9);
Expand All @@ -28,7 +28,7 @@
--progress-bar-color: rgba(0, 128, 0, 0.9);
}
.progress-bar-orange {
--progress-bar-color: rgba(255, 165, 0,0.9);
--progress-bar-color: rgba(255, 165, 0, 0.9);
}

.tasks-page {
Expand Down Expand Up @@ -196,11 +196,16 @@
transition: 250ms ease-in-out;
}

#task-update:hover {
#task-update:hover:not([disabled]) {
background-color: var(--primary-text-color);
color: var(--white);
}

#task-update:disabled {
-webkit-appearance: none;
-moz-appearance: none;
}

.task-details__title {
text-decoration: none;
font-size: 1.4rem;
Expand Down Expand Up @@ -384,7 +389,7 @@
color: var(--primary-text-color);
transition: 0.25s ease-in-out;
height: 2.5rem;
width: 10rem;
width: auto;
flex-shrink: 0;
}

Expand Down Expand Up @@ -608,18 +613,18 @@
white-space: normal;
}

.multiple-extension-form__container-close {
background-color:#a70606;
color: var(--button-proceed--text);
font-size: 1.2rem;
border: none;
border-radius: 8px;
padding: 5px 9px;
width: 40%;
display: flex;
justify-content: center;
margin:0 auto;
}
.multiple-extension-form__container-close {
background-color: #a70606;
color: var(--button-proceed--text);
font-size: 1.2rem;
border: none;
border-radius: 8px;
padding: 5px 9px;
width: 40%;
display: flex;
justify-content: center;
margin: 0 auto;
}

.error-message {
color: red;
Expand All @@ -630,7 +635,6 @@
width: 100%;
}


.error-placeholder {
color: red;
text-align: center;
Expand All @@ -647,16 +651,15 @@
background-color: #888;
}


.multiple-extension-form__open-button:hover ,
.multiple-extension-form__open-button:hover,
.multiple-extension-form__create-button:hover {
background-color: #01ad01;
color: #fff;
}

.multiple-extension-form__container-close:hover{
.multiple-extension-form__container-close:hover {
background-color: #d50707;
color:#fff
color: #fff;
}

.multiple-extension-form__create-button {
Expand All @@ -670,24 +673,25 @@
width: 40%;
display: flex;
justify-content: center;
margin:0 auto;
margin: 0 auto;
border: none;
border-radius: 8px;
padding: 5px 9px;
transition: background-color 0.3s ease;
}

.latest-extension-info__content th {
text-align: right;
width: 50%;
}
.latest-extension-info__content th {
text-align: right;
width: 50%;
}

.latest-extension-info__content th, td {
.latest-extension-info__content th,
td {
padding: 8px 2px;
vertical-align: top;
min-width: 50%;
}
.latest-table{
.latest-table {
width: 100%;
}
.latest-extension-info__content th {
Expand All @@ -697,7 +701,8 @@
text-align: left;
word-wrap: normal;
}
tr>th,tr>td{
tr > th,
tr > td {
vertical-align: top;
}

Expand All @@ -707,9 +712,9 @@ textarea {
overflow-y: auto;
}

div.buttons{
div.buttons {
display: flex;
flex-direction:row;
flex-direction: row;
min-width: 100%;
align-content: center;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions app/templates/tasks.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@userSelectedTaskText={{this.userSelectedTask.displayLabel}}
@showTasks={{this.showTasks}}
@toggleTasks={{this.toggleTasks}}
@dev={{this.dev}}
/>

<Tasks
Expand Down
Loading
Loading