mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
#2480 Sales Reports
This commit is contained in:
parent
15b4177b52
commit
a6ca1a6eb1
@ -0,0 +1,28 @@
|
|||||||
|
$(document).ready( function () {
|
||||||
|
$('#metaCategoryReport').DataTable({
|
||||||
|
ajax: {
|
||||||
|
url: '/admin/api/cats/report/category',
|
||||||
|
dataSrc( json ) {
|
||||||
|
json.recordsTotal = json.total;
|
||||||
|
json.recordsFiltered = json.total;
|
||||||
|
|
||||||
|
return json.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
processing: true,
|
||||||
|
serverSide: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
data: 'name',
|
||||||
|
render: function ( data, type, row, meta ) {
|
||||||
|
return `
|
||||||
|
<a href="/admin/cats/edit/${row.id}" class="text-info">
|
||||||
|
${data ? data : categoryReportTrans.undefined_category}
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
} );
|
||||||
@ -37,5 +37,10 @@ return [
|
|||||||
'please_wait' => 'Please wait.Deleting Sub Categories',
|
'please_wait' => 'Please wait.Deleting Sub Categories',
|
||||||
'category_selection' => 'Category Selection',
|
'category_selection' => 'Category Selection',
|
||||||
'go_to_parent' => 'Go To Parent',
|
'go_to_parent' => 'Go To Parent',
|
||||||
'preview' => 'Preview'
|
'preview' => 'Preview',
|
||||||
|
|
||||||
|
// Report
|
||||||
|
'undefined_category' => 'Undefined Category',
|
||||||
|
'categories_with_no_meta_report' => 'Categories with No Meta Report',
|
||||||
|
'category' => 'Category',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
<div class="row">
|
||||||
|
{% set reports = [
|
||||||
|
{
|
||||||
|
'title': trans('visiosoft.module.cats::field.categories_with_no_meta_report'),
|
||||||
|
'id': 'metaCategoryReport',
|
||||||
|
'columns': [
|
||||||
|
trans('visiosoft.module.cats::field.category'),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
] %}
|
||||||
|
|
||||||
|
{% for report in reports %}
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header bg-danger">
|
||||||
|
<h5 class="card-title text-white">{{ report.title }}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-block">
|
||||||
|
<table id="{{ report.id }}" class="display">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
{% for column in report.columns %}
|
||||||
|
<th>{{ column }}</th>
|
||||||
|
{% endfor %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const categoryReportTrans = {
|
||||||
|
undefined_category: `{{ trans('visiosoft.module.cats::field.undefined_category') }}`,
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{ asset_add('scripts.js', 'visiosoft.module.cats::js/admin/dashboard/report.js') }}
|
||||||
@ -49,6 +49,9 @@ class CatsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'uses' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@all',
|
'uses' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@all',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Admin ReportController
|
||||||
|
'admin/api/cats/report/category' => 'Visiosoft\CatsModule\Http\Controller\Admin\ReportController@category',
|
||||||
|
|
||||||
// Sitemap
|
// Sitemap
|
||||||
'sitemap.xml' => 'Visiosoft\CatsModule\Http\Controller\SitemapController@index',
|
'sitemap.xml' => 'Visiosoft\CatsModule\Http\Controller\SitemapController@index',
|
||||||
'sitemap.xml/categories' => 'Visiosoft\CatsModule\Http\Controller\SitemapController@categories',
|
'sitemap.xml/categories' => 'Visiosoft\CatsModule\Http\Controller\SitemapController@categories',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user