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

Dev to main sync #557

Merged
merged 8 commits into from
Feb 7, 2024
Merged
6 changes: 5 additions & 1 deletion app/components/task-details.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class='task-details'>
<div class='task-details__title-container'>
<p class='task-details__title'>{{@task.title}}</p>
<a
href='{{@taskDetailsURL}}'
title="Click to open details of task on status site"
class='task-details__status-site-link'
><p class='task-details__title'>{{@task.title}}</p></a>
<div class='task-card__progress-bar-container'>
<div
class='{{unless
Expand Down
78 changes: 0 additions & 78 deletions app/components/task/extension-form.hbs

This file was deleted.

160 changes: 0 additions & 160 deletions app/components/task/extension-form.js

This file was deleted.

22 changes: 7 additions & 15 deletions app/components/task/holder.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,18 @@
@isProgressBarDisabled={{this.isProgressBarDisabled}}
@onInputChange={{this.progressBarInputChange}}
@dev={{@dev}}
@taskDetailsURL={{this.taskDetailsURL}}
/>

<div class='task-card__status-update-container'>

{{#if this.extensionFormOpened}}
{{#if @dev}}
<Task::MultipleExtensionForm
@task={{@task}}
@closeForm={{this.closeExtensionForm}}
@title='Extension Details'
@closeModel={{this.closeExtensionModel}}
/>
{{else}}
<Task::ExtensionForm
@task={{@task}}
@closeForm={{this.closeExtensionForm}}
@title='Form for extension Request'
@closeModel={{this.closeExtensionModel}}
/>
{{/if}}
<Task::MultipleExtensionForm
@task={{@task}}
@closeForm={{this.closeExtensionForm}}
@title='Extension Details'
@closeModel={{this.closeExtensionModel}}
/>
{{/if}}

{{#if (not-eq this.status this.TASK_KEYS.VERIFIED)}}
Expand Down
7 changes: 6 additions & 1 deletion app/components/task/holder.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { action } from '@ember/object';
import { TASK_KEYS, TASK_STATUS_LIST } from 'website-my/constants/tasks';
import { tracked } from '@glimmer/tracking';
import { TASK_PERCENTAGE } from '../../constants/tasks';
import ENV from 'website-my/config/environment';

const STATUS_SITE = ENV.STATUS_SITE;

export default class TasksHolderComponent extends Component {
@tracked percentCompleted = this.args.task.percentCompleted;
Expand Down Expand Up @@ -101,7 +104,9 @@ export default class TasksHolderComponent extends Component {
get isProgressBarDisabled() {
return this.status !== TASK_KEYS.IN_PROGRESS;
}

get taskDetailsURL() {
return `${STATUS_SITE}/tasks/${this.args.task.id}`;
}
@action
async onPercentageChange(e) {
const { value } = e.target;
Expand Down
22 changes: 22 additions & 0 deletions app/styles/tasks.css
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,24 @@
justify-content: space-between;
align-items: center;
}
.task-details__title-container a {
max-width: 18.5rem;
}
@media screen and (min-width: 900px) {
.task-details__title-container a {
max-width: 18.3rem;
}
}
@media screen and ((max-width: 900px) and (min-width: 720px)) {
.task-details__title-container a {
max-width: 18.3rem;
}
}
@media screen and (max-width: 720px) {
.task-details__title-container a {
max-width: 100%;
}
}

#task-update {
border: 1px solid var(--tasks-page--text);
Expand Down Expand Up @@ -544,6 +562,10 @@
margin: 10px;
}

.task-details__status-site-link {
text-decoration: none;
}

@media screen and (max-width: 720px) {
.task-card {
width: 90%;
Expand Down
4 changes: 4 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = function (environment) {

if (environment === 'development') {
ENV.BASE_API_URL = 'http://localhost:3000';
ENV.STATUS_SITE = 'https://staging-status.realdevsquad.com';
ENV.MIXPANEL_TOKEN = 'TEST_TOKEN';
ENV['ember-cli-mirage'] = {
enabled: false,
Expand All @@ -57,15 +58,18 @@ module.exports = function (environment) {
ENV.APP.autoboot = false;
//mock server url
ENV.BASE_API_URL = '/mock-api';
ENV.STATUS_SITE = 'http://localhost:3000';
}

if (environment === 'staging') {
ENV.BASE_API_URL = 'https://staging-api.realdevsquad.com';
ENV.STATUS_SITE = 'https://staging-status.realdevsquad.com';
}

if (environment === 'production') {
// here you can enable a production-specific feature
ENV.BASE_API_URL = 'https://api.realdevsquad.com';
ENV.STATUS_SITE = 'https://status.realdevsquad.com';
}

return ENV;
Expand Down
Loading
Loading