Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
perryr16 committed Apr 30, 2024
1 parent 910d7f7 commit 2d17883
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ angular.module('BE.seed.controller.at_submission_import_modal', []).controller('
status_message: '',
in_progress: false,
complete: false,
result: {},
result: {}
};

$scope.get_submissions = () => {
Expand All @@ -42,7 +42,7 @@ angular.module('BE.seed.controller.at_submission_import_modal', []).controller('
(data) => {
$scope.status.in_progress = false;
$scope.status.complete = true;
$scope.status.result = {error: data.data.message};
$scope.status.result = { error: data.data.message };
},
$scope.status
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ angular.module('BE.seed.controller.organization_settings', []).controller('organ
audit_template_service.upsert_audit_template_config($scope.org.id, $scope.at_conf, $scope.timezone)
.then(() => {
audit_template_service.get_audit_template_configs($scope.org.id)
.then((response) => $scope.at_conf = response[0])
.then((response) => { $scope.at_conf = response[0]; });
});
}

Expand Down Expand Up @@ -521,17 +521,15 @@ angular.module('BE.seed.controller.organization_settings', []).controller('organ
$scope.at_conf = $scope.at_conf.id ? { id: $scope.at_conf.id } : {};
};
const validate_at_conf = () => {
const {update_at_day, update_at_hour, update_at_minute} = $scope.at_conf;
const { update_at_day, update_at_hour, update_at_minute } = $scope.at_conf;

const validate_input = (input, upper_limit) => {
return typeof input == 'number' && input >= 0 && input <= upper_limit;
}
const validate_input = (input, upper_limit) => typeof input === 'number' && input >= 0 && input <= upper_limit;

return (
validate_input(update_at_day, 6) &&
validate_input(update_at_hour, 23) &&
validate_input(update_at_minute, 59)
)
);
};

$scope.audit_template_report_types = [
Expand Down

0 comments on commit 2d17883

Please sign in to comment.