diff --git a/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx b/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx index b29f7ba4c..e90220698 100644 --- a/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx +++ b/client/src/components/dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component.jsx @@ -38,7 +38,6 @@ export default function DashboardMonthlyEmployeeEfficiency({ if (!!ticketsByDate[val]) { dailyHrs = ticketsByDate[val].reduce( (dayAcc, dayVal) => { - console.log(dayAcc); return { actual: dayAcc.actual + dayVal.actualhrs, productive: dayAcc.actual + dayVal.productivehrs, diff --git a/client/src/components/dashboard-components/pojected-monthly-sales/projected-monthly-sales.component.jsx b/client/src/components/dashboard-components/pojected-monthly-sales/projected-monthly-sales.component.jsx index ba461678f..10b268f0d 100644 --- a/client/src/components/dashboard-components/pojected-monthly-sales/projected-monthly-sales.component.jsx +++ b/client/src/components/dashboard-components/pojected-monthly-sales/projected-monthly-sales.component.jsx @@ -34,16 +34,43 @@ export const DashboardProjectedMonthlySalesGql = ` projected_monthly_sales: jobs(where: { voided: {_eq: false}, _or: [ - {_and: [{date_invoiced: {_gte: "${moment() - .startOf("month").startOf('day').toISOString()}"}}, {date_invoiced: {_lte: "${moment() - .endOf("month").endOf('day').toISOString()}"}}]}, - + {_and: [ + {date_invoiced:{_is_null: false }}, + {date_invoiced: {_gte: "${moment() + .startOf("month") + .startOf("day") + .toISOString()}"}}, {date_invoiced: {_lte: "${moment() + .endOf("month") + .endOf("day") + .toISOString()}"}}]}, + { + +_and:[ + {date_invoiced:{_is_null: true }}, + {actual_completion: {_gte: "${moment() + .startOf("month") + .startOf("day") + .toISOString()}"}}, {actual_completion: {_lte: "${moment() + .endOf("month") + .endOf("day") + .toISOString()}"}} + +] + }, + {_and: [ {date_invoiced: {_is_null: true}}, + {actual_completion: {_is_null: true}} {scheduled_completion: {_gte: "${moment() - .startOf("month") - .startOf('day').toISOString()}"}}, {scheduled_completion: {_lte: "${moment() - .endOf("month").endOf('day').toISOString()}"}}]} + .startOf("month") + .startOf("day") + .toISOString()}"}}, {scheduled_completion: {_lte: "${moment() + .endOf("month") + .endOf("day") + .toISOString()}"}} + + +]} ]}) { id