Updated projected monthly sales.
This commit is contained in:
@@ -38,7 +38,6 @@ export default function DashboardMonthlyEmployeeEfficiency({
|
|||||||
if (!!ticketsByDate[val]) {
|
if (!!ticketsByDate[val]) {
|
||||||
dailyHrs = ticketsByDate[val].reduce(
|
dailyHrs = ticketsByDate[val].reduce(
|
||||||
(dayAcc, dayVal) => {
|
(dayAcc, dayVal) => {
|
||||||
console.log(dayAcc);
|
|
||||||
return {
|
return {
|
||||||
actual: dayAcc.actual + dayVal.actualhrs,
|
actual: dayAcc.actual + dayVal.actualhrs,
|
||||||
productive: dayAcc.actual + dayVal.productivehrs,
|
productive: dayAcc.actual + dayVal.productivehrs,
|
||||||
|
|||||||
@@ -34,16 +34,43 @@ export const DashboardProjectedMonthlySalesGql = `
|
|||||||
projected_monthly_sales: jobs(where: {
|
projected_monthly_sales: jobs(where: {
|
||||||
voided: {_eq: false},
|
voided: {_eq: false},
|
||||||
_or: [
|
_or: [
|
||||||
{_and: [{date_invoiced: {_gte: "${moment()
|
{_and: [
|
||||||
.startOf("month").startOf('day').toISOString()}"}}, {date_invoiced: {_lte: "${moment()
|
{date_invoiced:{_is_null: false }},
|
||||||
.endOf("month").endOf('day').toISOString()}"}}]},
|
{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: [
|
{_and: [
|
||||||
{date_invoiced: {_is_null: true}},
|
{date_invoiced: {_is_null: true}},
|
||||||
|
{actual_completion: {_is_null: true}}
|
||||||
{scheduled_completion: {_gte: "${moment()
|
{scheduled_completion: {_gte: "${moment()
|
||||||
.startOf("month")
|
.startOf("month")
|
||||||
.startOf('day').toISOString()}"}}, {scheduled_completion: {_lte: "${moment()
|
.startOf("day")
|
||||||
.endOf("month").endOf('day').toISOString()}"}}]}
|
.toISOString()}"}}, {scheduled_completion: {_lte: "${moment()
|
||||||
|
.endOf("month")
|
||||||
|
.endOf("day")
|
||||||
|
.toISOString()}"}}
|
||||||
|
|
||||||
|
|
||||||
|
]}
|
||||||
|
|
||||||
]}) {
|
]}) {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user