parasails.registerPage('edit-usercare', {
  //  ╦╔╗╔╦╔╦╗╦╔═╗╦    ╔═╗╔╦╗╔═╗╔╦╗╔═╗
  //  ║║║║║ ║ ║╠═╣║    ╚═╗ ║ ╠═╣ ║ ║╣
  //  ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝  ╚═╝ ╩ ╩ ╩ ╩ ╚═╝
  data: {
    //…
  },

  //  ╦  ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦  ╔═╗
  //  ║  ║╠╣ ║╣ ║  ╚╦╝║  ║  ║╣
  //  ╩═╝╩╚  ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝
  beforeMount: function () {
    //…
  },
  mounted: async function () {
    //…
  },

  //  ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
  //  ║║║║ ║ ║╣ ╠╦╝╠═╣║   ║ ║║ ║║║║╚═╗
  //  ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝
  methods: {

    //TODO:
    save: function () {
      Cloud.saveUsercare
        .with({
            id: this.usercare.id?this.usercare.id:undefined,
            dtContact: new Date(),
            record: this.usercare.record,
            whoCares: this.usercare.whoCares,
            user: this.usercare.user.id,
            owner: this.me.id
          }
        )
        .then((record) => {
          this.usecare = record
          alert(`Saved Successfully`)
          this.goto('/usercare/search-usercare')
        })
        .catch(
          err => {
            console.log(err)
            alert('Erro ao tentar registrar o evento')
          }
        )
    }
  }
});
