Client - reset user sport preferences - fix #123

This commit is contained in:
Sam
2021-12-19 12:23:40 +01:00
parent 91e7127a09
commit 781bf86634
14 changed files with 57 additions and 11 deletions

View File

@ -138,6 +138,12 @@
<button :disabled="loading" @click="updateSportInEdition(null)">
{{ $t('buttons.CANCEL') }}
</button>
<button
:disabled="loading"
@click="(e) => resetSport(e, sport.id)"
>
{{ $t('buttons.RESET') }}
</button>
</div>
</td>
</tr>
@ -234,6 +240,13 @@
sportPayload
)
}
function resetSport(event: Event, sportId: number) {
event.preventDefault()
store.dispatch(
AUTH_USER_STORE.ACTIONS.RESET_USER_SPORT_PREFERENCES,
sportId
)
}
watch(
() => loading.value,
@ -287,6 +300,11 @@
min-width: 80px;
}
}
.sport-btn {
display: flex;
background: yellow;
gap: $default-padding;
}
.threshold-input {
padding: $default-padding * 0.5;
width: 50px;