refac: rating submit -> save

This commit is contained in:
Timothy J. Baek 2024-10-14 20:35:06 -07:00
parent 90b7754cd6
commit 29e8e2d938
2 changed files with 6 additions and 6 deletions

View File

@ -50,15 +50,15 @@
loadReasons();
});
const submitHandler = () => {
console.log('submitHandler');
const saveHandler = () => {
console.log('saveHandler');
if (!selectedReason) {
toast.error($i18n.t('Please select a reason'));
return;
}
dispatch('submit', {
dispatch('save', {
reason: selectedReason,
comment: comment
});
@ -124,10 +124,10 @@
<button
class=" bg-emerald-700 text-white text-sm font-medium rounded-lg px-3.5 py-1.5"
on:click={() => {
submitHandler();
saveHandler();
}}
>
{$i18n.t('Submit')}
{$i18n.t('Save')}
</button>
</div>
</div>

View File

@ -1103,7 +1103,7 @@
<RateComment
bind:message
bind:show={showRateComment}
on:submit={(e) => {
on:save={(e) => {
dispatch('save', {
...message,
annotation: {