From b6d3974a39f571065a22cb6b82b753fd633a6c62 Mon Sep 17 00:00:00 2001 From: Mitan Omar Date: Thu, 29 Feb 2024 14:14:56 +0100 Subject: [PATCH] fix(TaskSelection): reset component filter when updating the page controller properties --- app/analysis/index/controller.js | 8 ++++++++ app/analysis/index/template.hbs | 4 ++-- app/components/task-selection/template.hbs | 10 +++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/analysis/index/controller.js b/app/analysis/index/controller.js index 2b7c1f662..500f0eb64 100644 --- a/app/analysis/index/controller.js +++ b/app/analysis/index/controller.js @@ -113,6 +113,14 @@ export default class AnalysisController extends QPController { return this.totalItems > this.exportLimit; } + get getFromDate() { + return this.fromDate || null; + } + + get getToDate() { + return this.toDate || null; + } + get exportLimitMessage() { return `The export limit is ${this.exportLimit}. Please use filters to reduce the amount of reports.`; } diff --git a/app/analysis/index/template.hbs b/app/analysis/index/template.hbs index 69429bb21..b4550c858 100644 --- a/app/analysis/index/template.hbs +++ b/app/analysis/index/template.hbs @@ -106,7 +106,7 @@ @@ -115,7 +115,7 @@ diff --git a/app/components/task-selection/template.hbs b/app/components/task-selection/template.hbs index caffd4651..1d6cf1dec 100644 --- a/app/components/task-selection/template.hbs +++ b/app/components/task-selection/template.hbs @@ -4,7 +4,7 @@ (ensure-safe-component "optimized-power-select") options=this.customersAndRecentTasks disabled=@disabled - selected=this.customer + selected=@initial.customer placeholder="Select customer..." searchField="longName" allowClear=true @@ -19,8 +19,8 @@ project=(component (ensure-safe-component "optimized-power-select") options=this.projects - disabled=(or @disabled (not this.customer)) - selected=this.project + disabled=(or @disabled (not @initial.customer)) + selected=@initial.project placeholder="Select project..." searchField="name" allowClear=true @@ -35,8 +35,8 @@ task=(component (ensure-safe-component "optimized-power-select") options=this.tasks - disabled=(or @disabled (not this.project)) - selected=this.task + disabled=(or @disabled (not @initial.project)) + selected=@initial.task placeholder="Select task..." searchField="name" allowClear=true