fix dark mode in item row and switch issue

This commit is contained in:
yashkanakiya
2023-03-31 17:13:40 +05:30
parent de235a91e5
commit eda4e89796
7 changed files with 97 additions and 58 deletions

View File

@ -15,10 +15,12 @@
<thead
class="
bg-white
border border-gray-200 border-solid
border
border-gray-200
border-solid
dark:shadow-glass dark:border dark:border-white/10 dark:bg-gray-800/70
"
>
"
>
<tr>
<th class="text-left" :class="theadClass">
<BaseContentPlaceholders v-if="isLoading">
@ -28,7 +30,19 @@
{{ $tc('items.item', 2) }}
</span>
</th>
<th class="text-right" :class="theadClass">
<th
class="
px-5
py-3
text-sm
not-italic
font-medium
leading-5
text-right text-gray-700
border-t border-b border-gray-200 border-solid
dark:text-white dark:border-white/10
"
>
<BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
</BaseContentPlaceholders>
@ -36,7 +50,19 @@
{{ $t('invoices.item.quantity') }}
</span>
</th>
<th class="text-left" :class="theadClass">
<th
class="
px-5
py-3
text-sm
not-italic
font-medium
leading-5
text-left text-gray-700
border-t border-b border-gray-200 border-solid
dark:text-white dark:border-white/10
"
>
<BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
</BaseContentPlaceholders>
@ -45,9 +71,18 @@
</span>
</th>
<th
v-if="store[storeProp].discount_per_item_enabled"
class="text-left"
:class="theadClass"
v-if="store[storeProp].discount_per_item === 'YES'"
class="
px-5
py-3
text-sm
not-italic
font-medium
leading-5
text-left text-gray-700
border-t border-b border-gray-200 border-solid
dark:text-white dark:border-white/10
"
>
<BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
@ -56,7 +91,19 @@
{{ $t('invoices.item.discount') }}
</span>
</th>
<th class="text-right" :class="theadClass">
<th
class="
px-5
py-3
text-sm
not-italic
font-medium
leading-5
text-right text-gray-700
border-t border-b border-gray-200 border-solid
dark:text-white dark:border-white/10
"
>
<BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
</BaseContentPlaceholders>
@ -116,7 +163,6 @@ import { useCompanyStore } from '@/scripts/admin/stores/company'
import { computed } from 'vue'
import draggable from 'vuedraggable'
import Item from './CreateItemRow.vue'
const props = defineProps({
store: {
type: Object,
@ -138,15 +184,8 @@ const props = defineProps({
type: String,
default: '',
},
theadClass: {
type: String,
default: `px-5 py-3 text-sm not-italic font-medium leading-5
text-gray-700 border-t border-b border-gray-200 border-solid dark:text-white dark:border-white/10`
},
})
const companyStore = useCompanyStore()
const defaultCurrency = computed(() => {
if (props.currency) {
return props.currency