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

View File

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