Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Real-Dev-Squad/website-my
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
vinit717 committed Mar 15, 2024
2 parents a843f67 + b6aac58 commit d4556bf
Show file tree
Hide file tree
Showing 19 changed files with 207 additions and 680 deletions.
1 change: 1 addition & 0 deletions app/components/profile-field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
placeholder={{@placeholder}}
class="profile-field-input"
required={{@required}}
disabled={{@isDeveloper}}
{{on 'input' (fn this.inputFieldChanged)}}
{{on 'blur' (fn this.checkInputValidation)}}
/>
Expand Down
29 changes: 2 additions & 27 deletions app/components/progress-bar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,15 @@
step='10'
{{on 'change' this.onChange}}
{{on 'input' this.onInput}}
disabled={{not this.isEditable}}
/>
<button
data-test-progress-bar-button
{{on 'click' this.turnEditModeOn}}
class='progress-slider__button
{{unless this.isEditable "progress-slider__button--hover"}}'
type='button'
>
{{#if this.isEditable}}
<span class='progress-slider__button__text'>{{@value}}</span>
{{else}}
<svg
class='progress-slider__button__edit-icon'
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<path
class='progress-slider__button__edit-icon__inner'
opacity='0.5'
d='M4 20H8L18 10L14 6L4 16V20Z'
fill='#000000'
/>
<path
class='progress-slider__button__edit-icon__outer'
d='M18 10L21 7L17 3L14 6M18 10L8 20H4V16L14 6M18 10L14 6'
stroke='#000000'
stroke-width='1.5'
stroke-linecap='round'
stroke-linejoin='round'
/>
</svg>
{{/if}}
<span class='progress-slider__button__text'>{{@value}}</span>

</button>

</div>
21 changes: 0 additions & 21 deletions app/components/progress-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,16 @@ import { action } from '@ember/object';
import { debounce } from '@ember/runloop';

export default class ProgressBarComponent extends Component {
@tracked isEditable = false;
@tracked value = this.args.value;
lastEditTime = null;

@action turnEditModeOn() {
this.isEditable = true;
this.lastEditTime = Date.now();
this.setEditableToFalse();
}

setEditableToFalse() {
setTimeout(() => {
const timeDelta = Date.now() - this.lastEditTime;
if (this.isEditable && timeDelta >= 5000) {
this.isEditable = false;
} else if (this.isEditable) {
this.setEditableToFalse();
}
}, 5000);
}

@action onInput(e) {
this.lastEditTime = Date.now();
this.value = e.target.value;
if (this.args.onInput) {
this.args.onInput(this.value);
}
}

@action onChange(e) {
this.lastEditTime = Date.now();
if (this.args.onChange) {
debounce(this, this.debouncedChange, e, 600);
}
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.

21 changes: 6 additions & 15 deletions app/components/task/holder.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,12 @@
<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
Loading

0 comments on commit d4556bf

Please sign in to comment.