From c6b54c8dbacae076378883c4e023d266b1a7ddf1 Mon Sep 17 00:00:00 2001 From: Mahender Reddy Jangari Date: Wed, 17 May 2023 19:41:38 +0530 Subject: [PATCH 1/2] Fixed display Rank on Reports --- .../elements/Report/ReportsResultPane.tsx | 19 ++++++++++++------- src/pages/api/auth/[...nextauth].jsx | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/elements/Report/ReportsResultPane.tsx b/src/components/elements/Report/ReportsResultPane.tsx index 22bd85a9..63eb5235 100644 --- a/src/components/elements/Report/ReportsResultPane.tsx +++ b/src/components/elements/Report/ReportsResultPane.tsx @@ -5,7 +5,7 @@ import { infoBubblesConfig } from "../../../../config/report"; import { AuthorsComponent } from "../Common/AuthorsComponent"; import { Author } from "../../../../types/Author"; import { reportConfig } from "../../../../config/report"; -import { setHelptextInfo, setReportFilterLabels } from "../../../utils/constants"; +import { setHelptextInfo, setReportFilterLabels,setReportFilterDisplayRank } from "../../../utils/constants"; interface ReportsResultPaneProps { title: string @@ -47,27 +47,32 @@ export const ReportsResultPane: React.FC = ({ { label: setReportFilterLabels(reportingWebDisplay,"Citation count (NIH)") , title: setHelptextInfo(reportingWebDisplay,"Citation count (NIH)"), - value: citationCount + value: citationCount, + displayRank : setReportFilterDisplayRank(reportingWebDisplay,"Citation count (NIH)") }, { label: setReportFilterLabels(reportingWebDisplay,"Percentile Rank"), title: setHelptextInfo(reportingWebDisplay,"Percentile Rank"), - value: percentileRank + value: percentileRank, + displayRank : setReportFilterDisplayRank(reportingWebDisplay,"Percentile Rank") }, { label: setReportFilterLabels(reportingWebDisplay,"Relative Citation Ratio (NIH)"), title: setHelptextInfo(reportingWebDisplay,"Relative Citation Ratio (NIH)"), - value: relativeCitationRatio + value: relativeCitationRatio, + displayRank : setReportFilterDisplayRank(reportingWebDisplay,"Relative Citation Ratio (NIH)") }, { label: setReportFilterLabels(reportingWebDisplay,"Journal Rank"), title: setHelptextInfo(reportingWebDisplay,"Journal Rank"), - value: journalImpactScore1 + value: journalImpactScore1, + displayRank : setReportFilterDisplayRank(reportingWebDisplay,"Journal Rank") }, { label: setReportFilterLabels(reportingWebDisplay,"TrendingPubs score"), title: setHelptextInfo(reportingWebDisplay,"TrendingPubs score"), - value: trendingPubsScore + value: trendingPubsScore, + displayRank : setReportFilterDisplayRank(reportingWebDisplay,"TrendingPubs score") } ] @@ -118,7 +123,7 @@ export const ReportsResultPane: React.FC = ({ {`PMID: `}{pmid}{' '} {doi && {' '}DOI{' '}} { - ADDITIONAL_INFO_CONFIGS.map(({ label, title, value}) => { + ADDITIONAL_INFO_CONFIGS.sort((a: any, b: any) => a.displayRank - b.displayRank).map(({ label, title, value}) => { return ( Date: Tue, 23 May 2023 20:33:27 +0530 Subject: [PATCH 2/2] removed info --- controllers/sendNotifications.controller.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/sendNotifications.controller.ts b/controllers/sendNotifications.controller.ts index 0ee8df7f..a58fe0eb 100644 --- a/controllers/sendNotifications.controller.ts +++ b/controllers/sendNotifications.controller.ts @@ -6,15 +6,15 @@ const nodemailer = require("nodemailer"); export async function sendNotification(req) { let transporter = nodemailer.createTransport(({//smtpTransport({ - host: 'smtp.med.cornell.edu', - port: 587, - secure: true, // true for 465, false for other ports + host: process.env.SMTP_HOST_NAME, + port: process.env.SMTP_PORT_NUMBER, + secure: true, logger: true, debug: true, secureConnection: true, auth: { - user: 'svc_deptdb', - pass: 'Lv173A201!LMtu8Bvp' + user: process.env.SMTP_USER, + pass: process.env.SMTP_PASSWORD }, tls:{ rejectUnAuthorized:true,