{"size": 694, "ext": "js", "max_stars_repo_path": "resources/assets/js/components/deleteopenhouse/deleteopenhouse.js", "max_stars_repo_name": "hahadenny/square60_github", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/assets/js/components/deleteopenhouse/deleteopenhouse.js", "max_issues_repo_name": "hahadenny/square60_github", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/assets/js/components/deleteopenhouse/deleteopenhouse.js", "max_forks_repo_name": "hahadenny/square60_github", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.0303030303, "max_line_length": 63, "alphanum_fraction": 0.4221902017}

Vue.component('deleteopenhouse', {
    props: ['id','num'],
    data () {
        return {
        }
    },
    methods: {

        deleteOpenHouse() {

            var url = '/deleteopenhouse';

            var postData = {
                id: this.id,
            };

            var elem =  'openHouse-'+ this.num;
            var result = confirm("Are you sure to delete it?");
            if (result) {
                axios.post(url, postData).then(response=>{
                    $('#messageResponse').html(response.data);
                    //console.log(response.data)
                });
                document.getElementById(elem).remove();
            }

        },


    }

});