Start adding MonthlyInventory
This commit is contained in:
@@ -57,5 +57,16 @@ namespace InventoryTraker.Web.Controllers
|
|||||||
|
|
||||||
return BetterJson(report.ToArray());
|
return BetterJson(report.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public ActionResult MonthlyInventory()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionResult MonthlyInventory(DateTime month)
|
||||||
|
{
|
||||||
|
return BetterJson(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
<Content Include="js\inventory\InventoryEditDirective.js" />
|
<Content Include="js\inventory\InventoryEditDirective.js" />
|
||||||
<Content Include="js\inventory\InventoryDistributeDirective.js" />
|
<Content Include="js\inventory\InventoryDistributeDirective.js" />
|
||||||
<Content Include="js\profile\EditProfileController.js" />
|
<Content Include="js\profile\EditProfileController.js" />
|
||||||
|
<Content Include="js\report\MonthlyInventoryReportController.js" />
|
||||||
<Content Include="js\report\DistributionReportDirective.js" />
|
<Content Include="js\report\DistributionReportDirective.js" />
|
||||||
<Content Include="js\report\DistributionReportQueryDirective.js" />
|
<Content Include="js\report\DistributionReportQueryDirective.js" />
|
||||||
<Content Include="js\report\DistributionReportController.js" />
|
<Content Include="js\report\DistributionReportController.js" />
|
||||||
@@ -395,6 +396,7 @@
|
|||||||
<Content Include="Views\Transaction\Index.cshtml" />
|
<Content Include="Views\Transaction\Index.cshtml" />
|
||||||
<Content Include="Views\InventoryType\Index.cshtml" />
|
<Content Include="Views\InventoryType\Index.cshtml" />
|
||||||
<Content Include="Views\Report\Distribution.cshtml" />
|
<Content Include="Views\Report\Distribution.cshtml" />
|
||||||
|
<Content Include="Views\Report\MonthlyInventory.cshtml" />
|
||||||
<None Include="Web.Debug.config">
|
<None Include="Web.Debug.config">
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<monthly-report-query></monthly-report-query>
|
<monthly-inventory-report-query></monthly-inventory-report-query>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" ng-show="vm.inventoryData.length">
|
<div class="row" ng-show="vm.monthlyInventoryData.length">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<monthly-report distribution-data="vm.distributionData"></monthly-report>
|
<monthly-inventory-report distribution-data="vm.monthlyInventoryData"></monthly-inventory-report>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<a href="@(Html.BuildUrlFromExpression<ReportController>(c => c.Distribution()))"><i class="fa fa-file-o"></i> Distribution</a>
|
<a href="@(Html.BuildUrlFromExpression<ReportController>(c => c.Distribution()))"><i class="fa fa-file-o"></i> Distribution</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="@(Html.BuildUrlFromExpression<ReportController>(c => c.Distribution()))"><i class="fa fa-file-o"></i> Monthly Inventory</a>
|
<a href="@(Html.BuildUrlFromExpression<ReportController>(c => c.MonthlyInventory()))"><i class="fa fa-file-o"></i> Monthly Inventory</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
window.app.controller('MonthlyInventoryReportController', MonthlyInventoryReportController);
|
||||||
|
|
||||||
|
MonthlyInventoryReportController.$inject = ['$scope', 'reportSvc'];
|
||||||
|
function MonthlyInventoryReportController($scope, reportSvc) {
|
||||||
|
var vm = this;
|
||||||
|
vm.monthlyInventoryData = reportSvc.monthlyInventoryData;
|
||||||
|
}
|
||||||
|
})();
|
||||||
@@ -4,13 +4,15 @@
|
|||||||
reportSvc.$inject = ['$http'];
|
reportSvc.$inject = ['$http'];
|
||||||
function reportSvc($http) {
|
function reportSvc($http) {
|
||||||
var distributionData = [];
|
var distributionData = [];
|
||||||
|
var monthlyInventoryData = [];
|
||||||
|
|
||||||
var svc = {
|
var svc = {
|
||||||
distributionData: distributionData,
|
distributionData: distributionData,
|
||||||
|
monthlyInventoryData: monthlyInventoryData,
|
||||||
loadDistributionReport: loadDistributionReport
|
loadDistributionReport: loadDistributionReport
|
||||||
};
|
};
|
||||||
|
|
||||||
//loadDistributionReport({ startDate: '2015-06-01', endDate: '2016-01-01' });
|
loadDistributionReport({ startDate: '2015-05-01', endDate: '2016-01-01' });
|
||||||
return svc;
|
return svc;
|
||||||
|
|
||||||
function loadDistributionReport(query) {
|
function loadDistributionReport(query) {
|
||||||
@@ -19,5 +21,12 @@
|
|||||||
angular.copy(data, distributionData);
|
angular.copy(data, distributionData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadMonthlyInventoryData(query) {
|
||||||
|
return $http.post('/Report/MonthlyInventory', query)
|
||||||
|
.success(function (data) {
|
||||||
|
angular.copy(data, monthlyInventoryData);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
Reference in New Issue
Block a user