Updated projected monthly sales.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user