|
|
|
@ -18,10 +18,14 @@ define(['angular', 'uiRouter'], function () {
|
|
|
|
|
app.controller('orderValidCalendarCtrl', ['$scope', '$http', '$filter', function ($scope, $http, $filter) {
|
|
|
|
|
$scope.today = new Date();
|
|
|
|
|
$scope.loadValidatedDates = function (month) {
|
|
|
|
|
var monthStr = $filter('date')(month, 'yyyyMM');
|
|
|
|
|
let monthStr = $filter('date')(month, 'yyyyMM');
|
|
|
|
|
$http.get('/sys/financial/validated_dates/' + monthStr).then(function (resp) {
|
|
|
|
|
$scope.validatedDates = resp.data;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.findReport = function (dateStr) {
|
|
|
|
|
let filtered = $scope.validatedDates.filter(rp => rp.date === dateStr);
|
|
|
|
|
return filtered.length ? filtered[0] : null
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('orderValidationCtrl', ['$scope', '$http', '$filter', '$stateParams', 'commonDialog',
|
|
|
|
|