Skip to content

Commit

Permalink
fix: fix birthdate selection UX (monicahq#3318)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Dec 22, 2019
1 parent 2d1343a commit 927b1f0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

### Fixes:

* Fix birthdate selection UX
* Fix OAuth login process with WebAuthn activated
* Fix journal entry edit
* Fix register in case country is not detected from ip address
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"/js/manifest.js": "/js/manifest.js?id=7db827d654313dce4250",
"/js/vendor.js": "/js/vendor.js?id=1363a5be6cbb2bfab4c3",
"/js/app.js": "/js/app.js?id=58aa6de864d9ae9c9aa8",
"/js/app.js": "/js/app.js?id=ce74ca952199a01737cb",
"/css/app-ltr.css": "/css/app-ltr.css?id=ff41d6c39e7fba5cf37e",
"/css/app-rtl.css": "/css/app-rtl.css?id=ee3f6d81111cdc99f35d",
"/css/stripe.css": "/css/stripe.css?id=76c70a7b11ae5f38a725",
Expand Down
12 changes: 9 additions & 3 deletions resources/js/components/partials/SpecialDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:value="'unknown'"
:dclass="'flex mb3'"
:iclass="[ dirltr ? 'mr2' : 'ml2' ]"
@change="event => { _saveOption(); }"
>
<template slot="label">
{{ $t('people.information_edit_unknown') }}
Expand All @@ -23,7 +24,7 @@
:value="'approximate'"
:dclass="'flex mb3'"
:iclass="[ dirltr ? 'mr2' : 'ml2' ]"
@change="event => { _focusAge() }"
@change="event => { if (this.selectedOptionSave !== 'approximate') {_focusAge();} _saveOption(); }"
>
<template slot="label">
{{ $t('people.information_edit_probably') }}
Expand All @@ -45,7 +46,7 @@
:value="'almost'"
:dclass="'flex mb3'"
:iclass="[ dirltr ? 'mr2' : 'ml2' ]"
@change="event => { _focusMonth() }"
@change="event => { if (this.selectedOptionSave !== 'almost') {_focusMonth();} _saveOption(); }"
>
<template slot="label">
{{ $t('people.information_edit_not_year') }}
Expand Down Expand Up @@ -76,7 +77,7 @@
:value="'exact'"
:dclass="'flex mb3'"
:iclass="[ dirltr ? 'mr2' : 'ml2' ]"
@change="event => { _focusBirthday() }"
@change="event => { if (this.selectedOptionSave !== 'exact') {_focusBirthday();} _saveOption(); }"
>
<template slot="label">
{{ $t('people.information_edit_exact') }}
Expand Down Expand Up @@ -156,6 +157,7 @@ export default {
return {
selectedDate: null,
selectedOption: null,
selectedOptionSave: null,
selectedMonth: 0,
selectedDay: 0,
hasBirthdayReminder: false
Expand All @@ -173,6 +175,7 @@ export default {
mounted() {
this.selectedOption = this.value != '' ? this.value : 'unknown';
this.selectedOptionSave = this.selectedOption;
this.selectedMonth = this.month;
this.selectedDay = this.day;
this.hasBirthdayReminder = this.reminder;
Expand All @@ -194,6 +197,9 @@ export default {
this.$refs.birthday.focus();
}, 100);
},
_saveOption() {
this.selectedOptionSave = this.selectedOption;
},
}
};
</script>

0 comments on commit 927b1f0

Please sign in to comment.