{"size": 1573, "ext": "js", "max_stars_repo_path": "app/services/schedule.service.js", "max_stars_repo_name": "GorillaEnergy/MHPM", "max_stars_repo_stars_event_min_datetime": "2018-08-15T14:15:32.000Z", "max_stars_repo_stars_event_max_datetime": "2018-08-15T14:15:32.000Z", "max_issues_repo_path": "app/services/schedule.service.js", "max_issues_repo_name": "GorillaEnergy/MHPM", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/services/schedule.service.js", "max_forks_repo_name": "GorillaEnergy/MHPM", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.1020408163, "max_line_length": 65, "alphanum_fraction": 0.6141131596}
;(function () {
    'use strict';

    angular
        .module('service.scheduleService', [])
        .service('scheduleService', scheduleService);

    scheduleService.$inject = ['http', 'url', '$sessionStorage'];

    function scheduleService(http, url, $sessionStorage) {
        let model = {};

        model.createSchedule = createSchedule;
        model.updateSchedule = updateSchedule;
        model.deleteSchedule = deleteSchedule;
        model.approveSchedule = approveSchedule;
        model.visibleSchedule = visibleSchedule;
        model.getMySchedule = getMySchedule;
        model.getAllSchedules = getAllSchedules;
        model.getMyScheduleWeeks = getMyScheduleWeeks;

        return model;

        function createSchedule(data) {
            return http.post(url.schedule.create, data)
        }
        function updateSchedule(data) {
            return http.post(url.schedule.update, data)
        }
        function deleteSchedule(data) {
            return http.post(url.schedule.delete, data)
        }
        function approveSchedule(data) {
            return http.post(url.schedule.approve, data)
        }
        function visibleSchedule(data) {
            return http.post(url.schedule.visible, data)
        }
        function getMySchedule() {
            return http.get(url.schedule.getMySchedules)
        }
        function getAllSchedules() {
            return http.get(url.schedule.getSchedules)
        }
        function getMyScheduleWeeks() {
            return http.get(url.schedule.getMySchedulesWeeks)
        }
    }
})();