Skip to content

Commit c63db28

Browse files
committed
MMI-3349 (bcgov#2524)
* added remove duplicate titles for the last 3 days * update npm package * fix editor bug * fix editor build error * add missing changes * remove files and added missing files * update logic if content with the same title already sent out, it will not send to subscribers again when the flag is on * update
1 parent fc196a3 commit c63db28

38 files changed

+771
-74
lines changed

app/editor/.yarn/cache/tno-core-npm-1.0.27-3063e2245b-0a37ba9541.zip renamed to app/editor/.yarn/cache/tno-core-npm-1.0.28-a07dd79a18-69ecabc771.zip

2.03 MB
Binary file not shown.

app/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"redux-logger": "3.0.6",
6161
"styled-components": "6.1.11",
6262
"stylis": "4.3.2",
63-
"tno-core": "1.0.27"
63+
"tno-core": "1.0.28"
6464
},
6565
"devDependencies": {
6666
"@simbathesailor/use-what-changed": "2.0.0",

app/editor/src/features/admin/reports/components/ReportContentOptions.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export const ReportContentOptions = () => {
4444
name="settings.content.excludeHistorical"
4545
tooltip="Exclude content already reported on in prior instances of this report"
4646
/>
47+
<FormikCheckbox
48+
label="Remove duplicate titles from the last 3 days"
49+
name="settings.content.removeDuplicateTitles3Days"
50+
tooltip="Keep only the most recent story when duplicate titles are published within the past three days."
51+
/>
4752
<FormikSelect
4853
label="Excludes content already reported on in the selected reports"
4954
name="settings.content.excludeReports"

app/editor/src/features/admin/reports/components/ReportSectionContent.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ export const ReportSectionContent = ({ index }: IReportSectionContentProps) => {
6868
label="Remove Duplicate Content"
6969
tooltip="Remove content from this section that is in above sections"
7070
/>
71+
<FormikCheckbox
72+
name={`sections.${index}.settings.removeDuplicateTitles3Days`}
73+
label="Remove duplicate titles from the last 3 days"
74+
tooltip="Keep only the most recent story when duplicate titles are published within the past three days."
75+
/>
7176
<Show visible={!!section.folderId || !!section.linkedReportId}>
7277
<FormikCheckbox
7378
name={`sections.${index}.settings.overrideExcludeHistorical`}

app/editor/src/features/admin/reports/components/ReportSectionGallery.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ export const ReportSectionGallery = ({ index }: IReportSectionGalleryProps) => {
7171
label="Remove Duplicate Content"
7272
tooltip="Remove content from this section that is in above sections"
7373
/>
74+
<FormikCheckbox
75+
name={`sections.${index}.settings.removeDuplicateTitles3Days`}
76+
label="Remove duplicate titles from the last 3 days"
77+
tooltip="Keep only the most recent story when duplicate titles are published within the past three days."
78+
/>
7479
<Show visible={!!section.folderId || !!section.linkedReportId}>
7580
<FormikCheckbox
7681
name={`sections.${index}.settings.overrideExcludeHistorical`}

app/editor/src/features/admin/reports/components/ReportSectionMediaAnalytics.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ export const ReportSectionMediaAnalytics = ({ index }: IReportSectionMediaAnalyt
7979
label="Remove duplicate content"
8080
tooltip="Remove content from this section that is in above sections"
8181
/>
82+
<FormikCheckbox
83+
name={`sections.${index}.settings.removeDuplicateTitles3Days`}
84+
label="Remove duplicate titles from the last 3 days"
85+
tooltip="Keep only the most recent story when duplicate titles are published within the past three days."
86+
/>
8287
</Show>
8388
<Show visible={!!section.folderId || !!section.linkedReportId}>
8489
<FormikCheckbox

app/editor/src/features/admin/reports/constants/defaultReport.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const defaultReport: IReportModel = {
2727
excludeHistorical: false,
2828
excludeReports: [],
2929
highlightKeywords: false,
30+
removeDuplicateTitles3Days: false,
3031
showLinkToStory: false,
3132
clearFolders: false,
3233
onlyNewContent: false,

app/editor/src/features/admin/reports/utils/createReportSection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const createReportSection = (
1717
label: '',
1818
useAllContent: type === ReportSectionTypeName.MediaAnalytics,
1919
removeDuplicates: false,
20+
removeDuplicateTitles3Days: false,
2021
overrideExcludeHistorical: false,
2122
showHeadlines: type === ReportSectionTypeName.TableOfContents,
2223
showFullStory: type === ReportSectionTypeName.Content,

app/editor/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12209,7 +12209,7 @@ __metadata:
1220912209
sass-extract-loader: 1.1.0
1221012210
styled-components: 6.1.11
1221112211
stylis: 4.3.2
12212-
tno-core: 1.0.27
12212+
tno-core: 1.0.28
1221312213
typescript: 4.9.5
1221412214
vitest: 3.0.7
1221512215
languageName: unknown
@@ -16674,9 +16674,9 @@ __metadata:
1667416674
languageName: node
1667516675
linkType: hard
1667616676

16677-
"tno-core@npm:1.0.27":
16678-
version: 1.0.27
16679-
resolution: "tno-core@npm:1.0.27"
16677+
"tno-core@npm:1.0.28":
16678+
version: 1.0.28
16679+
resolution: "tno-core@npm:1.0.28"
1668016680
dependencies:
1668116681
"@elastic/elasticsearch": ^8.13.1
1668216682
"@fortawesome/free-solid-svg-icons": ^6.4.2
@@ -16709,7 +16709,7 @@ __metadata:
1670916709
styled-components: ^6.1.11
1671016710
stylis: ^4.3.2
1671116711
yup: ^1.1.1
16712-
checksum: 0a37ba95419455d675d723d1373aab1c17d534d85c9ead4192653bb722b8da1d2c386444b4bdc9c4a806f0df8fc54f2e944ee24f7ae32d3ff9b28445b841384b
16712+
checksum: 69ecabc7713077cf82d686e05335a373a83f609d4eac6298f197ed6801ce832d5624801e2fb5eccafef971e7c0c88509a3178aae95a8b2f131086ced71e5b6c9
1671316713
languageName: node
1671416714
linkType: hard
1671516715

Binary file not shown.

0 commit comments

Comments
 (0)