Files
InvoiceShelf/resources/scripts/admin/views/settings/customization/estimates/EstimatesTab.vue
Darko Gjorgjijoski 88adfe0e50 Add dark mode with CSS custom property theme system
Define 13 semantic color tokens (surface, text, border, hover) with
light/dark values in themes.css. Register with Tailwind via @theme inline.
Migrate all 335 Vue files from hardcoded gray/white classes to semantic
tokens. Add theme toggle (sun/moon/system) in user avatar dropdown.
Replace @tailwindcss/forms with custom form reset using theme vars.
Add status badge and alert tokens for dark mode. Theme-aware chart
grid/labels, skeleton placeholders, and editor. Inline script in
<head> prevents flash of wrong theme on load.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 02:05:00 +02:00

74 lines
1.7 KiB
Vue

<template>
<EstimatesTabEstimateNumber />
<BaseDivider class="my-8" />
<EstimatesTabExpiryDate />
<BaseDivider class="my-8" />
<EstimatesTabConvertEstimate />
<BaseDivider class="my-8" />
<EstimatesTabDefaultFormats />
<BaseDivider class="mt-6 mb-2" />
<ul class="divide-y divide-line-default">
<BaseSwitchSection
v-model="sendAsAttachmentField"
:title="$t('settings.customization.estimates.estimate_email_attachment')"
:description="
$t(
'settings.customization.estimates.estimate_email_attachment_setting_description'
)
"
/>
</ul>
</template>
<script setup>
import { computed, reactive, inject } from 'vue'
import { useCompanyStore } from '@/scripts/admin/stores/company'
import EstimatesTabEstimateNumber from './EstimatesTabEstimateNumber.vue'
import EstimatesTabExpiryDate from './EstimatesTabExpiryDate.vue'
import EstimatesTabDefaultFormats from './EstimatesTabDefaultFormats.vue'
import EstimatesTabConvertEstimate from './EstimatesTabConvertEstimate.vue'
const utils = inject('utils')
const companyStore = useCompanyStore()
const estimateSettings = reactive({
estimate_email_attachment: null,
})
utils.mergeSettings(estimateSettings, {
...companyStore.selectedCompanySettings,
})
const sendAsAttachmentField = computed({
get: () => {
return estimateSettings.estimate_email_attachment === 'YES'
},
set: async (newValue) => {
const value = newValue ? 'YES' : 'NO'
let data = {
settings: {
estimate_email_attachment: value,
},
}
estimateSettings.estimate_email_attachment = value
await companyStore.updateCompanySettings({
data,
message: 'general.setting_updated',
})
},
})
</script>