Skip to content

Commit

Permalink
If the contact email is empty, save&sent will be disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
CihanSenturk committed Oct 9, 2023
1 parent 87fe9dc commit 4732fd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Modals/DocumentTransactions.php
Expand Up @@ -81,7 +81,8 @@ public function create(Document $document)
],
'send' => [
'text' => trans('general.save_and_send'),
'class' => 'disabled:bg-green-100'
'class' => 'disabled:bg-green-100',
'disabled' => ! empty($document->contact_email) ? false : true,
],
'confirm' => [
'text' => trans('general.save'),
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/components/AkauntingModalAddNew.vue
Expand Up @@ -45,7 +45,7 @@
<span :class="[{'opacity-0': form.loading}]">{{ buttons.confirm.text }}</span>
</button>

<button v-if="buttons.send" :disabled="form.loading" type="button" class="relative px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" :class="buttons.send.class" @click="onSubmitViaSendEmail">
<button v-if="buttons.send" :disabled="buttons.send.disabled||form.loading" type="button" class="relative px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" :class="buttons.send.class" @click="onSubmitViaSendEmail">
<i v-if="form.loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': form.loading}]">{{ buttons.send.text }}</span>
</button>
Expand Down

0 comments on commit 4732fd4

Please sign in to comment.