mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 20:51:09 -04:00
Add New SweetAlert & Notification Components
This commit is contained in:
committed by
Mohit Panjwani
parent
3f7db2793f
commit
c3d3e5e35f
@ -107,9 +107,7 @@
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<p class="p-0 mb-1 text-base leading-snug text-black">
|
||||
{{
|
||||
$t('settings.customization.estimates.estimate_email_attachment')
|
||||
}}
|
||||
{{ $t('settings.customization.estimates.estimate_email_attachment') }}
|
||||
</p>
|
||||
|
||||
<p
|
||||
@ -117,7 +115,9 @@
|
||||
style="max-width: 480px"
|
||||
>
|
||||
{{
|
||||
$t('settings.customization.estimates.estimate_email_attachment_setting_description')
|
||||
$t(
|
||||
'settings.customization.estimates.estimate_email_attachment_setting_description'
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
@ -126,7 +126,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import { mapActions } from 'vuex'
|
||||
const { required, maxLength, alpha } = require('vuelidate/lib/validators')
|
||||
|
||||
export default {
|
||||
@ -244,7 +244,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
...mapActions('company', ['updateCompanySettings']),
|
||||
|
||||
...mapActions('notification', ['showNotification']),
|
||||
async setEstimateSetting() {
|
||||
let data = {
|
||||
settings: {
|
||||
@ -254,7 +254,10 @@ export default {
|
||||
}
|
||||
let response = await this.updateCompanySettings(data)
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$t('general.setting_updated'))
|
||||
this.showNotification({
|
||||
type: 'success',
|
||||
message: this.$t('general.setting_updated'),
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -286,9 +289,12 @@ export default {
|
||||
}
|
||||
|
||||
if (this.updateSetting(data)) {
|
||||
window.toastr['success'](
|
||||
this.$t('settings.customization.estimates.estimate_setting_updated')
|
||||
)
|
||||
this.showNotification({
|
||||
type: 'success',
|
||||
message: this.$t(
|
||||
'settings.customization.estimates.estimate_setting_updated'
|
||||
),
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user