From 88aec09c4dd3c311d9bbba4828c78bd0745fb7f7 Mon Sep 17 00:00:00 2001 From: "swapnil.verma" Date: Mon, 30 Oct 2023 14:07:41 +0530 Subject: [PATCH 1/3] [ACS-6107] Updated default configuraiton for date-range component in extensions to match the required config for the new date range component --- app/src/app.config.json | 8 +++++--- .../aca-content/assets/app.extensions.json | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/src/app.config.json b/app/src/app.config.json index c28817d8e8..c5290990d6 100644 --- a/app/src/app.config.json +++ b/app/src/app.config.json @@ -1031,14 +1031,16 @@ { "id": "createdDateRange", "name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE", - "columnKey": "createdAt", "enabled": true, "component": { "selector": "date-range", "settings": { "field": "cm:created", - "dateFormat": "DD-MMM-YY", - "maxDate": "today" + "dateFormat": "dd-MMM-yy", + "maxDate": "today", + "displayedLabelsByField": { + "cm:created": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE" + } } } } diff --git a/projects/aca-content/assets/app.extensions.json b/projects/aca-content/assets/app.extensions.json index a52f7c55b5..42e851fe77 100644 --- a/projects/aca-content/assets/app.extensions.json +++ b/projects/aca-content/assets/app.extensions.json @@ -1456,7 +1456,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "field": "cm:created,cm:modified", "dateFormat": "dd-MMM-yy", @@ -1646,7 +1646,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "field": "cm:created", "dateFormat": "dd-MMM-yy", @@ -1783,7 +1783,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "allowUpdateOnChange": false, "hideDefaultAction": true, @@ -1807,12 +1807,15 @@ "allowUpdateOnChange": false, "hideDefaultAction": true, "field": "cm:from", - "dateFormat": "DD-MMM-YY" + "dateFormat": "dd-MMM-yy", + "displayedLabelsByField": { + "cm:created": "SEARCH.CATEGORIES.EFFECTIVITY_FROM" + } } } }, { - "id": "createdDateRange", + "id": "effectivnessTo", "name": "SEARCH.CATEGORIES.EFFECTIVITY_TO", "enabled": true, "component": { @@ -1821,7 +1824,10 @@ "allowUpdateOnChange": false, "hideDefaultAction": true, "field": "cm:to", - "dateFormat": "DD-MMM-YY" + "dateFormat": "dd-MMM-yy", + "displayedLabelsByField": { + "cm:created": "SEARCH.CATEGORIES.EFFECTIVITY_FROM" + } } } } From 6bbb969d64e0a9191d37ebbecaf10f62933dd32f Mon Sep 17 00:00:00 2001 From: "swapnil.verma" Date: Mon, 30 Oct 2023 14:14:20 +0530 Subject: [PATCH 2/3] [ACS-6107] Updated E2Es to remove references to old date-range component --- .../suites/search/search-filters.test.ts | 2 -- .../search/filters/created-date-filter.ts | 31 ------------------- .../src/components/search/index.ts | 1 - .../src/components/search/search-filters.ts | 2 -- 4 files changed, 36 deletions(-) diff --git a/e2e/protractor/suites/search/search-filters.test.ts b/e2e/protractor/suites/search/search-filters.test.ts index 06516a33cb..ee1725dc5e 100644 --- a/e2e/protractor/suites/search/search-filters.test.ts +++ b/e2e/protractor/suites/search/search-filters.test.ts @@ -73,7 +73,6 @@ describe('Search filters', () => { const { dataTable, filters, toolbar } = page; const fileTypeFilter = filters.fileType; - const createdDateFilter = filters.createdDate; const peopleFilter = filters.people; const locationFilter = filters.location; const modifiedDateFilter = filters.modifiedDate; @@ -111,7 +110,6 @@ describe('Search filters', () => { }); it('[C279186] Filters are displayed', async () => { - expect(await createdDateFilter.isDisplayed()).toBe(true, 'Created date filter panel not displayed'); expect(await fileTypeFilter.isDisplayed()).toBe(true, 'File type filter panel not displayed'); expect(await peopleFilter.isDisplayed()).toBe(true, 'People filter panel not displayed'); expect(await locationFilter.isDisplayed()).toBe(true, 'Location filter panel not displayed'); diff --git a/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts b/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts index 44ca03409c..e69de29bb2 100755 --- a/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts +++ b/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts @@ -1,31 +0,0 @@ -/*! - * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Alfresco Example Content Application - * - * This file is part of the Alfresco Example Content Application. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * The Alfresco Example Content Application is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The Alfresco Example Content Application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - */ - -import { GenericFilter } from './generic-filter'; - -export class CreatedDateFilter extends GenericFilter { - constructor() { - super('Created date'); - } -} diff --git a/projects/aca-testing-shared/src/components/search/index.ts b/projects/aca-testing-shared/src/components/search/index.ts index ac60627bf2..23b64e49f8 100644 --- a/projects/aca-testing-shared/src/components/search/index.ts +++ b/projects/aca-testing-shared/src/components/search/index.ts @@ -23,7 +23,6 @@ */ export * from './filters/autocomplete-chips-filter'; -export * from './filters/created-date-filter'; export * from './filters/facet-filter'; export * from './filters/generic-filter'; export * from './filters/properties-filter'; diff --git a/projects/aca-testing-shared/src/components/search/search-filters.ts b/projects/aca-testing-shared/src/components/search/search-filters.ts index 7ea60a9091..e43ec7db98 100755 --- a/projects/aca-testing-shared/src/components/search/search-filters.ts +++ b/projects/aca-testing-shared/src/components/search/search-filters.ts @@ -24,7 +24,6 @@ import { by, browser } from 'protractor'; import { Component } from '../component'; -import { CreatedDateFilter } from './filters/created-date-filter'; import { FacetFilter } from './filters/facet-filter'; import { AutocompleteChipsFilter } from './filters/autocomplete-chips-filter'; import { PropertiesFilter } from './filters/properties-filter'; @@ -33,7 +32,6 @@ import { FacetTabbedFilter } from './filters/facet-tabbed-filter'; export class SearchFilters extends Component { resetAllButton = browser.element(by.css('button[adf-reset-search]')); - createdDate = new CreatedDateFilter(); fileType = new PropertiesFilter(); people = new FacetTabbedFilter('People'); location = new AutocompleteChipsFilter('Location'); From 28a0a22afc27385d1cb85fec3f38a67bd6699925 Mon Sep 17 00:00:00 2001 From: "swapnil.verma" Date: Thu, 23 Nov 2023 17:11:03 +0530 Subject: [PATCH 3/3] [ACS-6107] Restored missing column key --- app/src/app.config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/app.config.json b/app/src/app.config.json index c5290990d6..a81a4f88e5 100644 --- a/app/src/app.config.json +++ b/app/src/app.config.json @@ -1031,6 +1031,7 @@ { "id": "createdDateRange", "name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE", + "columnKey": "createdAt", "enabled": true, "component": { "selector": "date-range",