diff --git a/classes/components/forms/counter/CounterReportForm.php b/classes/components/forms/counter/CounterReportForm.php new file mode 100644 index 00000000000..59c2ea7773e --- /dev/null +++ b/classes/components/forms/counter/CounterReportForm.php @@ -0,0 +1,52 @@ +reportFields['PR'] = array_map(function ($field) { + $field->groupId = 'default'; + return $field; + }, $formFieldsPR); + + $formFieldsPR_P1 = PR_P1::getReportSettingsFormFields(); + $this->reportFields['PR_P1'] = array_map(function ($field) { + $field->groupId = 'default'; + return $field; + }, $formFieldsPR_P1); + + $formFieldsTR = TR::getReportSettingsFormFields(); + $this->reportFields['TR'] = array_map(function ($field) { + $field->groupId = 'default'; + return $field; + }, $formFieldsTR); + + $formFieldsTR_B3 = TR_B3::getReportSettingsFormFields(); + $this->reportFields['TR_B3'] = array_map(function ($field) { + $field->groupId = 'default'; + return $field; + }, $formFieldsTR_B3); + } +} diff --git a/classes/sushi/PR.php b/classes/sushi/PR.php index 8fbe4b1d4ea..6866f1c4995 100644 --- a/classes/sushi/PR.php +++ b/classes/sushi/PR.php @@ -18,6 +18,8 @@ namespace APP\sushi; use APP\core\Services; +use Illuminate\Support\Collection; +use PKP\components\forms\FieldOptions; use PKP\statistics\PKPStatisticsHelper; use PKP\sushi\CounterR5Report; @@ -133,10 +135,9 @@ public function getSupportedAttributes(): array ]; } - /** - * Get report items - */ - public function getReportItems(): array + + /** Get DB query results for the report */ + protected function getQueryResults(): Collection { $params['contextIds'] = [$this->context->getId()]; $params['institutionId'] = $this->customerId; @@ -168,6 +169,13 @@ public function getReportItems(): array 'Data' => __('sushi.exception.3030', ['beginDate' => $this->beginDate, 'endDate' => $this->endDate]) ]); } + return $results; + } + + /** Get report items */ + public function getReportItems(): array + { + $results = $this->getQueryResults(); // There is only one platform, so there will be only one report item $item['Platform'] = $this->platformName; @@ -201,7 +209,6 @@ public function getReportItems(): array $metrics['Unique_Item_Investigations'] = $result->metric_book_investigations_unique + $result->metric_chapter_investigations_unique; $metrics['Total_Item_Requests'] = $result->metric_book_requests + $result->metric_chapter_requests; $metrics['Unique_Item_Requests'] = $result->metric_book_requests_unique + $result->metric_chapter_requests_unique; - $metrics['Total_Item_Requests'] = $result->metric_book_requests + $result->metric_chapter_requests; $metrics['Unique_Title_Investigations'] = $result->metric_title_investigations_unique; $metrics['Unique_Title_Requests'] = $result->metric_title_requests_unique; // filter here by requested metric types @@ -220,4 +227,126 @@ public function getReportItems(): array $items = [$item]; return $items; } + + /** Get TSV report column names */ + public function getTSVColumnNames(): array + { + $columnRow = ['Platform']; + if (in_array('Data_Type', $this->attributesToShow)) { + array_push($columnRow, 'Data_Type'); + } + if (in_array('Access_Method', $this->attributesToShow)) { + array_push($columnRow, 'Access_Method'); + } + array_push($columnRow, 'Metric_Type', 'Reporting_Period_Total'); + if ($this->granularity == 'Month') { + $period = $this->getMonthlyDatePeriod(); + foreach ($period as $dt) { + array_push($columnRow, $dt->format('M-Y')); + } + } + return [$columnRow]; + } + + /** Get TSV report rows */ + public function getTSVReportItems(): array + { + $results = $this->getQueryResults(); + + // get total numbers for every metric type + $metricsTotal['Total_Item_Investigations'] = $results->pluck('metric_book_investigations')->sum() + $results->pluck('metric_chapter_investigations')->sum(); + $metricsTotal['Unique_Item_Investigations'] = $results->pluck('metric_book_investigations_unique')->sum() + $results->pluck('metric_chapter_investigations_unique')->sum(); + $metricsTotal['Total_Item_Requests'] = $results->pluck('metric_book_requests')->sum() + $results->pluck('metric_chapter_requests')->sum(); + $metricsTotal['Unique_Item_Requests'] = $results->pluck('metric_book_requests_unique')->sum() + $results->pluck('metric_chapter_requests_unique')->sum(); + $metricsTotal['Unique_Title_Investigations'] = $results->pluck('metric_title_investigations_unique')->sum(); + $metricsTotal['Unique_Title_Requests'] = $results->pluck('metric_title_requests_unique')->sum(); + + $resultRows = []; + // filter here by requested metric types + foreach ($this->metricTypes as $metricType) { + // if the total numbers for the given metric type > 0 + if ($metricsTotal[$metricType] > 0) { + // construct the result row + $resultRow = []; + array_push($resultRow, $this->platformName); // Platform + if (in_array('Data_Type', $this->attributesToShow)) { + array_push($resultRow, self::DATA_TYPE); // Data_Type + } + if (in_array('Access_Method', $this->attributesToShow)) { + array_push($resultRow, self::ACCESS_METHOD); // Access_Method + } + array_push($resultRow, $metricType); // Metric_Type + array_push($resultRow, $metricsTotal[$metricType]); // Reporting_Period_Total + if ($this->granularity == 'Month') { // metrics for each month in the given period + $period = $this->getMonthlyDatePeriod(); + foreach ($period as $dt) { + $month = $dt->format('Ym'); + $result = $results->firstWhere('month', '=', $month); + if ($result === null) { + array_push($resultRow, '0'); + } else { + $metrics['Total_Item_Investigations'] = $result->metric_book_investigations + $result->metric_chapter_investigations; + $metrics['Unique_Item_Investigations'] = $result->metric_book_investigations_unique + $result->metric_chapter_investigations_unique; + $metrics['Total_Item_Requests'] = $result->metric_book_requests + $result->metric_chapter_requests; + $metrics['Unique_Item_Requests'] = $result->metric_book_requests_unique + $result->metric_chapter_requests_unique; + $metrics['Unique_Title_Investigations'] = $result->metric_title_investigations_unique; + $metrics['Unique_Title_Requests'] = $result->metric_title_requests_unique; + array_push($resultRow, $metrics[$metricType]); + } + } + } + $resultRows[] = $resultRow; + } + } + + return $resultRows; + } + + /** Get report specific form fields */ + public static function getReportSettingsFormFields(): array + { + $formFields = parent::getCommonReportSettingsFormFields(); + + $metricTypes = [ + 'Total_Item_Investigations', + 'Unique_Item_Investigations', + 'Total_Item_Requests', + 'Unique_Item_Requests', + 'Unique_Title_Investigations', + 'Unique_Title_Requests' + ]; + $metricTypeOptions = []; + foreach ($metricTypes as $metricType) { + $metricTypeOptions[] = ['value' => $metricType, 'label' => $metricType]; + } + $formFields[] = new FieldOptions('metric_type', [ + 'label' => __('manager.statistics.counterR5Report.settings.metricType'), + 'options' => $metricTypeOptions, + 'value' => $metricTypes, + 'groupId' => 'default', + ]); + + $attributesToShow = ['Data_Type', 'Access_Method']; + $attributesToShowOptions = []; + foreach ($attributesToShow as $attributeToShow) { + $attributesToShowOptions[] = ['value' => $attributeToShow, 'label' => $attributeToShow]; + } + $formFields[] = new FieldOptions('attributes_to_show', [ + 'label' => __('manager.statistics.counterR5Report.settings.attributesToShow'), + 'options' => $attributesToShowOptions, + 'value' => [], + 'groupId' => 'default', + ]); + + $formFields[] = new FieldOptions('granularity', [ + 'label' => __('manager.statistics.counterR5Report.settings.excludeMonthlyDetails'), + 'options' => [ + ['value' => true, 'label' => __('manager.statistics.counterR5Report.settings.excludeMonthlyDetails')], + ], + 'value' => false, + 'groupId' => 'default', + ]); + + return $formFields; + } } diff --git a/classes/sushi/PR_P1.php b/classes/sushi/PR_P1.php index 8d051894223..ae698c2a819 100644 --- a/classes/sushi/PR_P1.php +++ b/classes/sushi/PR_P1.php @@ -114,4 +114,10 @@ public function setAttributes(array $attributes): void { $this->attributes = []; } + + /** Get report specific form fields */ + public static function getReportSettingsFormFields(): array + { + return parent::getCommonReportSettingsFormFields(); + } } diff --git a/classes/sushi/TR.php b/classes/sushi/TR.php index 1f71404d0f0..7fa1c2210ea 100644 --- a/classes/sushi/TR.php +++ b/classes/sushi/TR.php @@ -19,6 +19,9 @@ use APP\core\Services; use APP\facades\Repo; +use Illuminate\Support\Collection; +use PKP\components\forms\FieldOptions; +use PKP\components\forms\FieldText; use PKP\statistics\PKPStatisticsHelper; use PKP\sushi\CounterR5Report; @@ -180,10 +183,8 @@ public function setFilters(array $filters): void // check section_type and metric_type mismatch ? } - /** - * Get report items - */ - public function getReportItems(): array + /** Get DB query results for the report */ + protected function getQueryResults(): Collection { $params['contextIds'] = [$this->context->getId()]; $params['institutionId'] = $this->customerId; @@ -218,6 +219,15 @@ public function getReportItems(): array 'Data' => __('sushi.exception.3030', ['beginDate' => $this->beginDate, 'endDate' => $this->endDate]) ]); } + return $results; + } + + /** + * Get report items + */ + public function getReportItems(): array + { + $results = $this->getQueryResults(); // Group result by submission ID // If Section_Type is attribute to show, group additionally by section type @@ -450,4 +460,355 @@ public function getReportItems(): array return $items; } + + /** Get TSV report column names */ + public function getTSVColumnNames(): array + { + $columnRow = ['Title', 'Publisher', 'Publisher ID', 'Platform', 'DOI', 'Proprietary_ID', 'ISBN', 'Print_ISSN', 'Online_ISSN', 'URI']; + + if (in_array('Data_Type', $this->attributesToShow)) { + array_push($columnRow, 'Data_Type'); + } + if (in_array('Section_Type', $this->attributesToShow)) { + array_push($columnRow, 'Section_Type'); + } + if (in_array('YOP', $this->attributesToShow)) { + array_push($columnRow, 'YOP'); + } + if (in_array('Access_Type', $this->attributesToShow)) { + array_push($columnRow, 'Access_Type'); + } + if (in_array('Access_Method', $this->attributesToShow)) { + array_push($columnRow, 'Access_Method'); + } + + array_push($columnRow, 'Metric_Type', 'Reporting_Period_Total'); + + if ($this->granularity == 'Month') { + $period = $this->getMonthlyDatePeriod(); + foreach ($period as $dt) { + array_push($columnRow, $dt->format('M-Y')); + } + } + + return [$columnRow]; + } + + /** Get TSV report rows */ + public function getTSVReportItems(): array + { + $results = $this->getQueryResults(); + + // Group result by submission ID + // If Section_Type is attribute to show, group additionally by section type + // Also filter results by requested section and metric types + $resultsGroupedBySubmission = $items = []; + foreach ($results as $result) { + $includeResult = false; + if (in_array('Book', $this->sectionTypes) && + !empty(array_intersect($this->metricTypes, ['Total_Item_Investigations', 'Unique_Item_Investigations', 'Total_Item_Requests', 'Unique_Item_Requests'])) && + ($result->metric_book_investigations > 0 || $result->metric_book_investigations_unique > 0 || $result->metric_book_requests > 0 || $result->metric_book_requests_unique > 0)) { + if (in_array('Section_Type', $this->attributesToShow)) { + $resultsGroupedBySubmission[$result->submission_id]['Book'][] = $result; + } + $includeResult = true; + } + if (in_array('Chapter', $this->sectionTypes) && + !empty(array_intersect($this->metricTypes, ['Total_Item_Investigations', 'Unique_Item_Investigations', 'Total_Item_Requests', 'Unique_Item_Requests'])) && + ($result->metric_chapter_investigations > 0 || $result->metric_chapter_investigations_unique > 0 || $result->metric_chapter_requests > 0 || $result->metric_chapter_requests_unique > 0)) { + if (in_array('Section_Type', $this->attributesToShow)) { + $resultsGroupedBySubmission[$result->submission_id]['Chapter'][] = $result; + } + $includeResult = true; + } + if (in_array('Title', $this->sectionTypes) && + !empty(array_intersect($this->metricTypes, ['Unique_Title_Investigations', 'Unique_Title_Requests'])) && + ($result->metric_title_investigations_unique > 0 || $result->metric_title_requests_unique > 0)) { + if (in_array('Section_Type', $this->attributesToShow)) { + $resultsGroupedBySubmission[$result->submission_id]['Title'][] = $result; + } + $includeResult = true; + } + if (!in_array('Section_Type', $this->attributesToShow) && $includeResult) { + $resultsGroupedBySubmission[$result->submission_id][] = $result; + } + } + + + foreach ($resultsGroupedBySubmission as $submissionId => $submissionResults) { + // Section_Type is in attributes_to_show, the query results are grouped by section type + if (in_array('Section_Type', $this->attributesToShow)) { + foreach ($submissionResults as $sectionType => $results) { + $results = collect($results); + + // get total numbers for every metric type + $metricsTotal['Total_Item_Investigations'] = $metricsTotal['Unique_Item_Investigations'] = + $metricsTotal['Total_Item_Requests'] = $metricsTotal['Unique_Item_Requests'] = 0; + switch ($sectionType) { + case 'Book': + $metricsTotal['Total_Item_Investigations'] = $results->pluck('metric_book_investigations')->sum(); + $metricsTotal['Unique_Item_Investigations'] = $results->pluck('metric_book_investigations_unique')->sum(); + $metricsTotal['Total_Item_Requests'] = $results->pluck('metric_book_requests')->sum(); + $metricsTotal['Unique_Item_Requests'] = $results->pluck('metric_book_requests_unique')->sum(); + break; + case 'Chapter': + $metricsTotal['Total_Item_Investigations'] = $results->pluck('metric_chapter_investigations')->sum(); + $metricsTotal['Unique_Item_Investigations'] = $results->pluck('metric_chapter_investigations_unique')->sum(); + $metricsTotal['Total_Item_Requests'] = $results->pluck('metric_chapter_requests')->sum(); + $metricsTotal['Unique_Item_Requests'] = $results->pluck('metric_chapter_requests_unique')->sum(); + break; + case 'Title': + $metricsTotal['Unique_Title_Investigations'] = $results->pluck('metric_title_investigations_unique')->sum(); + $metricsTotal['Unique_Title_Requests'] = $results->pluck('metric_title_requests_unique')->sum(); + break; + } + + // Get the submission properties + $submission = Repo::submission()->get($submissionId); + if (!$submission || !$submission->getOriginalPublication()) { + break; + } + $currentPublication = $submission->getCurrentPublication(); + $submissionLocale = $submission->getData('locale'); + $itemTitle = $currentPublication->getLocalizedTitle($submissionLocale); + $doi = $currentPublication->getDoi(); + $datePublished = $submission->getOriginalPublication()->getData('datePublished'); + + // filter here by requested metric types + foreach ($this->metricTypes as $metricType) { + if (array_key_exists($metricType, $metricsTotal) && $metricsTotal[$metricType] > 0) { + // construct the result row + $resultRow = [ + $itemTitle, // Title + $this->context->getData('publisherInstitution'), // Publisher + '', // Publisher ID + $this->platformName, // Platform + $doi ?? '', // DOI + $this->platformId . ':' . $submissionId, // Proprietary_ID + '', // ISBN + '', // Print_ISSN + '', // Online_ISSN + '', // URI + ]; + + if (in_array('Data_Type', $this->attributesToShow)) { + array_push($resultRow, self::DATA_TYPE); // Data_Type + } + if (in_array('Section_Type', $this->attributesToShow)) { + // do not display section type for title metrics + if ($sectionType != 'Title') { + array_push($resultRow, $sectionType); // Section_Type + } else { + array_push($resultRow, ''); + } + } + if (in_array('YOP', $this->attributesToShow)) { + array_push($resultRow, date('Y', strtotime($datePublished))); // YOP + } + if (in_array('Access_Type', $this->attributesToShow)) { + array_push($resultRow, self::ACCESS_TYPE); // Access_Type + } + if (in_array('Access_Method', $this->attributesToShow)) { + array_push($resultRow, self::ACCESS_METHOD); // Access_Method + } + array_push($resultRow, $metricType); // Metric_Type + array_push($resultRow, $metricsTotal[$metricType]); // Reporting_Period_Total + + if ($this->granularity == 'Month') { // metrics for each month in the given period + $period = $this->getMonthlyDatePeriod(); + foreach ($period as $dt) { + $month = $dt->format('Ym'); + $result = $results->firstWhere('month', '=', $month); + if ($result === null) { + array_push($resultRow, '0'); + } else { + switch ($sectionType) { + case 'Book': + $metrics['Total_Item_Investigations'] = $result->metric_book_investigations; + $metrics['Unique_Item_Investigations'] = $result->metric_book_investigations_unique; + $metrics['Total_Item_Requests'] = $result->metric_book_requests; + $metrics['Unique_Item_Requests'] = $result->metric_book_requests_unique; + break; + case 'Chapter': + $metrics['Total_Item_Investigations'] = $result->metric_chapter_investigations; + $metrics['Unique_Item_Investigations'] = $result->metric_chapter_investigations_unique; + $metrics['Total_Item_Requests'] = $result->metric_chapter_requests; + $metrics['Unique_Item_Requests'] = $result->metric_chapter_requests_unique; + break; + case 'Title': + $metrics['Unique_Title_Investigations'] = $result->metric_title_investigations_unique; + $metrics['Unique_Title_Requests'] = $result->metric_title_requests_unique; + break; + } + array_push($resultRow, $metrics[$metricType]); + } + } + } + $resultRows[] = $resultRow; + } + } + } + } else { // Section_Type is not in attributes_to_show + $results = collect($submissionResults); + + $metricsTotal['Total_Item_Investigations'] = $metricsTotal['Unique_Item_Investigations'] = + $metricsTotal['Total_Item_Requests'] = $metricsTotal['Unique_Item_Requests'] = 0; + if (in_array('Book', $this->sectionTypes)) { + $metricsTotal['Total_Item_Investigations'] += $results->pluck('metric_book_investigations')->sum(); + $metricsTotal['Unique_Item_Investigations'] += $results->pluck('metric_book_investigations_unique')->sum(); + $metricsTotal['Total_Item_Requests'] += $results->pluck('metric_book_requests')->sum(); + $metricsTotal['Unique_Item_Requests'] += $results->pluck('metric_book_requests_unique')->sum(); + } + if (in_array('Chapter', $this->sectionTypes)) { + $metricsTotal['Total_Item_Investigations'] += $results->pluck('metric_chapter_investigations')->sum(); + $metricsTotal['Unique_Item_Investigations'] += $results->pluck('metric_chapter_investigations_unique')->sum(); + $metricsTotal['Total_Item_Requests'] += $results->pluck('metric_chapter_requests')->sum(); + $metricsTotal['Unique_Item_Requests'] += $results->pluck('metric_chapter_requests_unique')->sum(); + } + if (in_array('Title', $this->sectionTypes)) { + $metricsTotal['Unique_Title_Investigations'] = $results->pluck('metric_title_investigations_unique')->sum(); + $metricsTotal['Unique_Title_Requests'] = $results->pluck('metric_title_requests_unique')->sum(); + } + + // Get the submission properties + $submission = Repo::submission()->get($submissionId); + if (!$submission || !$submission->getOriginalPublication()) { + break; + } + $currentPublication = $submission->getCurrentPublication(); + $submissionLocale = $submission->getData('locale'); + $itemTitle = $currentPublication->getLocalizedTitle($submissionLocale); + $doi = $currentPublication->getDoi(); + $datePublished = $submission->getOriginalPublication()->getData('datePublished'); + + // filter here by requested metric types + foreach ($this->metricTypes as $metricType) { + if (array_key_exists($metricType, $metricsTotal) && $metricsTotal[$metricType] > 0) { + // construct the result row + $resultRow = [ + $itemTitle, // Title + $this->context->getData('publisherInstitution'), // Publisher + '', // Publisher ID + $this->platformName, // Platform + $doi ?? '', // DOI + $this->platformId . ':' . $submissionId, // Proprietary_ID + '', // ISBN + '', // Print_ISSN + '', // Online_ISSN + '', // URI + ]; + + if (in_array('Data_Type', $this->attributesToShow)) { + array_push($resultRow, self::DATA_TYPE); // Data_Type + } + // Section_Type is not in attributes_to_show + // so no need to consider it here + if (in_array('YOP', $this->attributesToShow)) { + array_push($resultRow, date('Y', strtotime($datePublished))); // YOP + } + if (in_array('Access_Type', $this->attributesToShow)) { + array_push($resultRow, self::ACCESS_TYPE); // Access_Type + } + if (in_array('Access_Method', $this->attributesToShow)) { + array_push($resultRow, self::ACCESS_METHOD); // Access_Method + } + array_push($resultRow, $metricType); // Metric_Type + array_push($resultRow, $metricsTotal[$metricType]); // Reporting_Period_Total + + if ($this->granularity == 'Month') { // metrics for each month in the given period + $period = $this->getMonthlyDatePeriod(); + foreach ($period as $dt) { + $month = $dt->format('Ym'); + $result = $results->firstWhere('month', '=', $month); + if ($result === null) { + array_push($resultRow, '0'); + } else { + // consider section_type filter + $metrics['Total_Item_Investigations'] = $metrics['Unique_Item_Investigations'] = + $metrics['Total_Item_Requests'] = $metrics['Unique_Item_Requests'] = 0; + if (in_array('Book', $this->sectionTypes)) { + $metrics['Total_Item_Investigations'] += $result->metric_book_investigations; + $metrics['Unique_Item_Investigations'] += $result->metric_book_investigations_unique; + $metrics['Total_Item_Requests'] += $result->metric_book_requests; + $metrics['Unique_Item_Requests'] += $result->metric_book_requests_unique; + } + if (in_array('Chapter', $this->sectionTypes)) { + $metrics['Total_Item_Investigations'] += $result->metric_chapter_investigations; + $metrics['Unique_Item_Investigations'] += $result->metric_chapter_investigations_unique; + $metrics['Total_Item_Requests'] += $result->metric_chapter_requests; + $metrics['Unique_Item_Requests'] += $result->metric_chapter_requests_unique; + } + if (in_array('Title', $this->sectionTypes)) { + $metrics['Unique_Title_Investigations'] = $result->metric_title_investigations_unique; + $metrics['Unique_Title_Requests'] = $result->metric_title_requests_unique; + } + array_push($resultRow, $metrics[$metricType]); + } + } + } + $resultRows[] = $resultRow; + } + } + } + } + + return $resultRows; + } + + /** Get report specific form fields */ + public static function getReportSettingsFormFields(): array + { + $formFields = parent::getCommonReportSettingsFormFields(); + + $metricTypes = [ + 'Total_Item_Investigations', + 'Unique_Item_Investigations', + 'Total_Item_Requests', + 'Unique_Item_Requests', + 'Unique_Title_Investigations', + 'Unique_Title_Requests' + ]; + $metricTypeOptions = []; + foreach ($metricTypes as $metricType) { + $metricTypeOptions[] = ['value' => $metricType, 'label' => $metricType]; + } + $formFields[] = new FieldOptions('metric_type', [ + 'label' => __('manager.statistics.counterR5Report.settings.metricType'), + 'options' => $metricTypeOptions, + 'groupId' => 'default', + 'value' => $metricTypes, + ]); + + $attributesToShow = ['Data_Type', 'Access_Method', 'Section_Type', 'Access_Type', 'YOP']; + $attributesToShowOptions = []; + foreach ($attributesToShow as $attributeToShow) { + $attributesToShowOptions[] = ['value' => $attributeToShow, 'label' => $attributeToShow]; + } + $formFields[] = new FieldOptions('attributes_to_show', [ + 'label' => __('manager.statistics.counterR5Report.settings.attributesToShow'), + 'options' => $attributesToShowOptions, + 'groupId' => 'default', + 'value' => [], + ]); + + $formFields[] = new FieldText('yop', [ + 'label' => __('manager.statistics.counterR5Report.settings.yop'), + 'description' => __('manager.statistics.counterR5Report.settings.date.yop.description'), + 'size' => 'small', + 'isMultilingual' => false, + 'isRequired' => false, + 'groupId' => 'default', + ]); + + $formFields[] = new FieldOptions('granularity', [ + 'label' => __('manager.statistics.counterR5Report.settings.excludeMonthlyDetails'), + 'options' => [ + ['value' => true, 'label' => __('manager.statistics.counterR5Report.settings.excludeMonthlyDetails')], + ], + 'value' => false, + 'groupId' => 'default', + ]); + + return $formFields; + } } diff --git a/classes/sushi/TR_B3.php b/classes/sushi/TR_B3.php index 50eeb556a7e..993b9248d09 100644 --- a/classes/sushi/TR_B3.php +++ b/classes/sushi/TR_B3.php @@ -106,4 +106,10 @@ public function setAttributes(array $attributes): void { $this->attributes = []; } + + /** Get report specific form fields */ + public static function getReportSettingsFormFields(): array + { + return parent::getCommonReportSettingsFormFields(); + } } diff --git a/js/load.js b/js/load.js index 660579a8d26..3c1440abad2 100644 --- a/js/load.js +++ b/js/load.js @@ -16,6 +16,7 @@ import Page from '@/components/Container/Page.vue'; import AccessPage from '@/components/Container/AccessPage.vue'; import AddContextContainer from '@/components/Container/AddContextContainer.vue'; import AdminPage from '@/components/Container/AdminPage.vue'; +import CounterReportsPage from '@/components/Container/CounterReportsPage.vue'; import DecisionPage from '@/components/Container/DecisionPage.vue'; import DoiPage from '@/components/Container/DoiPageOMP.vue'; import ImportExportPage from '@/components/Container/ImportExportPage.vue'; @@ -46,6 +47,7 @@ window.pkp = Object.assign(PkpLoad, { AccessPage, AddContextContainer, AdminPage, + CounterReportsPage, DecisionPage, DoiPage, ImportExportPage,