Existing Interest Query
Existing Interest Query
->getStorage('interested_project')
->getQuery()
->accessCheck(TRUE) // Explicitly set access check here.
// ->condition('user_id', $user->id())
->condition('project_id', $projectId)
->execute();
$applied_application_count = \Drupal::entityQuery('node')
->condition('type', 'applied_applications')
->condition('status', 1)
->condition('field_applied_status', 'collaborated')
->count()
->accessCheck(FALSE)
->execute();
"{
""status"": ""OK"",
""message"": "" Event statistic retrived successfully"",
""response"": {
""data"":[
{
""date"": ""16/12/2024"",
""name"": ""project"",
""totalValue"": 30,
""subcategories"": [
{
""name"": ""Project Interested"",
""value"": ""15""
},
{
""name"": ""c"",
""value"": ""15""
}
]
},
{
""date"": ""17/12/2024"",
""name"": ""project"",
""totalValue"": 30,
""subcategories"": [
{
""name"": ""Project Interested"",
""value"": ""15""
},
{
""name"": ""Project EOI submission"",
""value"": ""15""
}
]
},
]
}
}"
job:
{
""date"": ""filter type"",
""name"": ""job"",
""totalValue"": 30,
},"
case 'monthly':
// Group by each month.
//die($end_timestamp);
$end_timestamp = strtotime($endDate);
die($end_timestamp);
$current_month_start = strtotime('first day of this month 00:00:00',
$start_timestamp);
while ($current_month_start <= $end_timestamp) {
$month_start = $current_month_start;
$month_end = strtotime('last day of this month 23:59:59', $month_start);
$monthly_app_shortlisted_query = \Drupal::entityQuery('node')
->condition('type', 'applied_jobs')
// ->condition('created', $month_start, '>=')
->condition('created', min($month_end, $end_timestamp), '<=')
->condition('status', 1)
->condition('field_applied_status', 'collaborated')
->accessCheck(FALSE);
$monthly_app_shortlisted_count = count($monthly_app_shortlisted_query-
>execute());
$data[] = [
'date' => date('M', $month_start),
'name' => "job",
'totalValue'=> $monthly_app_shortlisted_count,
];
}