{"size": 1394, "ext": "js", "max_stars_repo_path": "resources/js/register-bundle/store.js", "max_stars_repo_name": "IMPMAC/academico", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/register-bundle/store.js", "max_issues_repo_name": "IMPMAC/academico", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/js/register-bundle/store.js", "max_forks_repo_name": "IMPMAC/academico", "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": 26.8076923077, "max_line_length": 63, "alphanum_fraction": 0.606169297}
import moment from 'moment';

export const store = {
    state: {
        firstname: null,
        lastname: null,
        email: null,
        password: null,
        idnumber_type: 'passport',
        idnumber: null,
        address: null,
        phonenumber: null,
        tc_consent: false,
        birthdate: null,
        profession: null,
        institution: null,
        userPicture: null,
        gender: null,
        contacts: []
    },

    updateUserData(data) {
        this.state.firstname = data.firstname
        this.state.lastname = data.lastname
        this.state.gender = data.gender
        this.state.email = data.email
        this.state.password = data.password
        this.state.idnumber_type = data.idnumber_type
        this.state.idnumber = data.idnumber
        this.state.address = data.address
        this.state.phonenumber = data.phonenumber
        this.state.tc_consentdata = data.tc_consentdata
    },

    updatePictureData(data) {
        this.state.userPicture = data
    },

    updateInfoData(data) {
        this.state.address = data.address,
        this.state.birthdate = moment(data.birthdate).format(),
        this.state.profession = data.profession,
        this.state.institution = data.institution,
        this.state.phonenumbers = data.phonenumbers
    },

    updateContactsData(data) {
        this.state.contacts = data
    },

  };
