{"size": 954, "ext": "js", "max_stars_repo_path": "resources/js/institutions.js", "max_stars_repo_name": "jdenoc/money-tracker", "max_stars_repo_stars_event_min_datetime": "2019-10-12T10:53:19.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-05T05:29:43.000Z", "max_issues_repo_path": "resources/js/institutions.js", "max_issues_repo_name": "jdenoc/money-tracker", "max_issues_repo_issues_event_min_datetime": "2017-02-27T06:10:17.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-22T04:18:31.000Z", "max_forks_repo_path": "resources/js/institutions.js", "max_forks_repo_name": "jdenoc/money-tracker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 184, "max_forks_count": null, "avg_line_length": 29.8125, "max_line_length": 126, "alphanum_fraction": 0.5744234801}
import { ObjectBaseClass } from './objectBaseClass';
import { SnotifyStyle } from 'vue-snotify';
import Store from './store';

export class Institutions extends ObjectBaseClass {

    constructor(){
        super();
        this.storeType = Store.getters.STORE_TYPE_INSTITUTIONS;
        this.uri = '/api/institutions';
    }

    axiosFailure(error){
        if(error.response){
            switch(error.response.status){
                case 404:
                    this.assign = [];
                    return {type: SnotifyStyle.info, message: "No institutions currently available"};
                case 500:
                default:
                    return {type: SnotifyStyle.error, message: "An error occurred while attempting to retrieve institutions"};
            }
        }
    }
}

// var institutions = {
//     display: function(){
//         institutionsPane.clear();
//         institutionsPane.displayInstitutions();
//     }
// };