diff --git a/app/analysis/edit/controller.js b/app/analysis/edit/controller.js index 851b78f99..d70c5b840 100644 --- a/app/analysis/edit/controller.js +++ b/app/analysis/edit/controller.js @@ -132,7 +132,7 @@ export default class AnalysisEditController extends Controller.extend( } get canBill() { - return this.session.data.user.isAccountant || this.isSuperuser; + return this.isAccountant || this.isSuperuser; } get needsReview() { diff --git a/app/analysis/edit/template.hbs b/app/analysis/edit/template.hbs index 39c7c90f7..5376c328f 100644 --- a/app/analysis/edit/template.hbs +++ b/app/analysis/edit/template.hbs @@ -39,10 +39,6 @@ project=this._project task=this._task }} - @disabled={{and - this.isAccountant - (not this.hasSelectedOwnReports) - }} as |t| > @@ -119,10 +115,6 @@ class="form-control comment-field" {{on "change" (pick "target.value" fi.update)}} value={{fi.value}} - disabled={{and - this.isAccountant - (not this.hasSelectedOwnReports) - }} /> {{#if model.task.project.customerVisible}} @@ -135,10 +127,6 @@ data-test-not-billable @checked={{fi.value}} @onChange={{fi.update}} - @disabled={{and - this.isAccountant - (not this.hasSelectedOwnReports) - }} > Not billable {{#if (eq model.notBillable null)}} @@ -155,10 +143,6 @@ data-test-review @checked={{fi.value}} @onChange={{fi.update}} - @disabled={{and - this.isAccountant - (not this.hasSelectedOwnReports) - }} > Needs Review {{#if (eq model.review null)}} diff --git a/tests/acceptance/analysis-test.js b/tests/acceptance/analysis-test.js index db1b2edb7..8485deb01 100644 --- a/tests/acceptance/analysis-test.js +++ b/tests/acceptance/analysis-test.js @@ -248,17 +248,17 @@ module("Acceptance | analysis", function (hooks) { assert .dom("[data-test-customer] .ember-power-select-trigger") - .hasAttribute("aria-disabled", "true"); + .hasAttribute("aria-disabled", "false"); assert .dom("[data-test-project] .ember-power-select-trigger") - .hasAttribute("aria-disabled", "true"); + .hasAttribute("aria-disabled", "false"); assert .dom("[data-test-task] .ember-power-select-trigger") - .hasAttribute("aria-disabled", "true"); + .hasAttribute("aria-disabled", "false"); - assert.dom("[data-test-comment]").isDisabled(); - assert.dom("[data-test-not-billable] input").isDisabled(); - assert.dom("[data-test-review] input").isDisabled(); + assert.dom("[data-test-comment]").isNotDisabled(); + assert.dom("[data-test-not-billable] input").isNotDisabled(); + assert.dom("[data-test-review] input").isNotDisabled(); assert.dom("[data-test-billed] input").isNotDisabled(); assert.dom("[data-test-verified] input").isDisabled(); });