From 2670433d5dc22447328048c3f34db034553986dd Mon Sep 17 00:00:00 2001 From: Amit Sawhney Date: Sun, 23 Jan 2022 20:20:28 -0600 Subject: [PATCH] Remove dev logging --- api/src/controllers/resource.controller.ts | 1 - api/src/controllers/utils.ts | 7 ------- api/src/mail/sender.ts | 3 --- api/src/services/pitch.service.ts | 5 ----- client/src/components/form/ReviewClaimForm.tsx | 3 --- client/src/components/modal/AddIssue.tsx | 7 ++----- client/src/components/modal/SubmitPitchModal.tsx | 2 -- .../components/modal/ViewPitchFeedback/individualTab.tsx | 2 +- client/src/components/table/columns.tsx | 8 +------- client/src/pages/Resources.tsx | 1 - 10 files changed, 4 insertions(+), 35 deletions(-) diff --git a/api/src/controllers/resource.controller.ts b/api/src/controllers/resource.controller.ts index 6e53d0d7..e0203672 100644 --- a/api/src/controllers/resource.controller.ts +++ b/api/src/controllers/resource.controller.ts @@ -96,7 +96,6 @@ export const getResourceByName = async ( ): Promise => { const options = extractOptions(req.query); - console.log(req.params.name); const resource = await ResourceService.getByName(req.params.name, options); if (!resource) { diff --git a/api/src/controllers/utils.ts b/api/src/controllers/utils.ts index 0b456b69..2cf0c476 100644 --- a/api/src/controllers/utils.ts +++ b/api/src/controllers/utils.ts @@ -5,7 +5,6 @@ import { PaginateOptions } from '../services/types'; export const extractPopulateQuery = ( query: Record, ): 'none' | 'default' | 'full' => { - console.log(query); if (!query.populate) { return 'none'; } @@ -144,11 +143,6 @@ const extractFilterQuery = ( } } - console.log('Filter is: ', filter); - console.log('Field is: ', field); - console.log('Operator is: ', operator); - console.log('Value is: ', value); - if (operator) { return { [field]: { [`$${operator}`]: value } }; } @@ -158,6 +152,5 @@ const extractFilterQuery = ( const filters = _.merge({}, ...cleanFilters); - console.log(filters); return filters; }; diff --git a/api/src/mail/sender.ts b/api/src/mail/sender.ts index ae1882b3..7f3b0e9b 100644 --- a/api/src/mail/sender.ts +++ b/api/src/mail/sender.ts @@ -17,9 +17,6 @@ export const sendMail = async (mailOptions: SendMailOptions): Promise => { }; export const sendRejectUserMail = (contributor: User, reviewer: User): void => { - console.log(contributor); - console.log(reviewer); - const templateValues = { contributor: contributor.fullname, role: contributor.role, diff --git a/api/src/services/pitch.service.ts b/api/src/services/pitch.service.ts index a6dafaea..5fabf33d 100644 --- a/api/src/services/pitch.service.ts +++ b/api/src/services/pitch.service.ts @@ -194,9 +194,6 @@ const paginate = async ( searchFilter(search), ); - console.log('Mereged filters: '); - console.log(mergedFilters); - const pitches = await Pitch.find(mergedFilters) .skip(offset * limit) .limit(limit) @@ -459,7 +456,6 @@ export const decrementTeamTarget = async ( let pitch; if (pitchWithTeam) { - //console.log('WITH TEAM'); pitch = await updateModel( { _id: _id, @@ -473,7 +469,6 @@ export const decrementTeamTarget = async ( }, ); } else { - //console.log('NO TEAM'); pitch = await updateModel( { _id }, { diff --git a/client/src/components/form/ReviewClaimForm.tsx b/client/src/components/form/ReviewClaimForm.tsx index 245de2c0..687e9122 100644 --- a/client/src/components/form/ReviewClaimForm.tsx +++ b/client/src/components/form/ReviewClaimForm.tsx @@ -78,8 +78,6 @@ export const ReviewClaimForm: FC = ({ ), }; - console.log('NEW PITCH', newPitch); - const pitchIds = pitch!.issueStatuses.map(({ issueId: { _id } }) => _id); const newIds = data.issueStatuses.map(({ issueId: { _id } }) => _id); @@ -265,7 +263,6 @@ export const ReviewClaimForm: FC = ({ {editMode ? ( <>
- {console.log('hey')} Add Pitch to Issue(s) ({ diff --git a/client/src/components/modal/AddIssue.tsx b/client/src/components/modal/AddIssue.tsx index 427548e4..44f9bfd7 100644 --- a/client/src/components/modal/AddIssue.tsx +++ b/client/src/components/modal/AddIssue.tsx @@ -45,7 +45,6 @@ const AddIssueModal: FC = ({ ...rest }): ReactElement => { } else if (res.error.response.status === 409) { toast.error('Issue with this date and type already exists'); } else { - console.log(res); toast.error('Unable to add a new issue'); } }; @@ -66,10 +65,8 @@ const AddIssueModal: FC = ({ ...rest }): ReactElement => { changeField('type', value ? (value as string) : ''); }; - const formatDate = (date: Date | undefined): string => { - console.log(date); - return new Date(date || new Date()).toISOString().split('T')[0]; - }; + const formatDate = (date: Date | undefined): string => + new Date(date || new Date()).toISOString().split('T')[0]; useEffect(() => { setFormData(defaultData); diff --git a/client/src/components/modal/SubmitPitchModal.tsx b/client/src/components/modal/SubmitPitchModal.tsx index 192ce345..c7deefa8 100644 --- a/client/src/components/modal/SubmitPitchModal.tsx +++ b/client/src/components/modal/SubmitPitchModal.tsx @@ -70,8 +70,6 @@ export const SubmitPitchModal: FC = ({ ...rest }): ReactElement => { author: user!._id, }; - console.log(data.writerIntent); - if (data.writerIntent === undefined || data.writerIntent === 'false') { body.writer = undefined; } diff --git a/client/src/components/modal/ViewPitchFeedback/individualTab.tsx b/client/src/components/modal/ViewPitchFeedback/individualTab.tsx index 9b5d30da..98b0702d 100644 --- a/client/src/components/modal/ViewPitchFeedback/individualTab.tsx +++ b/client/src/components/modal/ViewPitchFeedback/individualTab.tsx @@ -65,7 +65,7 @@ const IndividualTab: FC = ({
{feedback.secondQuestion}
List any new contacts you made that could be useful for future Weekly - writers to have (include ƒname, organizational affiliation, contact + writers to have (include name, organizational affiliation, contact info):
{feedback.thirdQuestion}
diff --git a/client/src/components/table/columns.tsx b/client/src/components/table/columns.tsx index ad3a9149..1649cd8a 100644 --- a/client/src/components/table/columns.tsx +++ b/client/src/components/table/columns.tsx @@ -346,8 +346,7 @@ export const pitchStatusCol = configureColumn< id: 'status', title: 'Status', width: 1, - extractor: function StatusCell({ title, status }) { - console.log(title, status); + extractor: function StatusCell({ status }) { return ; }, }); @@ -372,11 +371,6 @@ export const associatedTeamsColumn = configureColumn< const { user } = useAuth(); const { teams } = useTeams(); - if (pitch.title.includes('National')) { - console.log(getPitchTeamsForContributor(pitch, user!, teams)); - console.log(pitch); - } - return (
{ }, [isOnboarded]); const getCalendlyUrl = (): string => { - console.log(window.location.hostname); if (window.location.hostname === 'localhost') { return 'https://calendly.com/sawhney4/60min'; }