add overdue

This commit is contained in:
radhika587
2022-03-02 18:09:41 +05:30
parent 3908878109
commit 2cb51b84c7
11 changed files with 52 additions and 42 deletions

View File

@ -237,6 +237,14 @@
:currency="row.data.currency"
/>
<BasePaidStatusBadge
v-if="row.data.overdue"
status="OVERDUE"
class="px-1 py-0.5 ml-2"
>
{{ $t('invoices.overdue') }}
</BasePaidStatusBadge>
<BasePaidStatusBadge
:status="row.data.paid_status"
class="px-1 py-0.5 ml-2"
@ -284,7 +292,7 @@ const showFilters = ref(false)
const status = ref([
{
label: 'Status',
options: ['DRAFT', 'DUE', 'SENT', 'VIEWED', 'OVERDUE', 'COMPLETED'],
options: ['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED'],
},
{
label: 'Paid Status',
@ -527,10 +535,6 @@ function setActiveTab(val) {
activeTab.value = t('invoices.viewed')
break
case 'OVERDUE':
activeTab.value = t('invoices.overdue')
break
default:
activeTab.value = t('general.all')
break

View File

@ -267,9 +267,7 @@ onSearched = debounce(onSearched, 500)
>
<BaseButton
v-if="
invoiceData.status === 'SENT' ||
invoiceData.status === 'OVERDUE' ||
invoiceData.status === 'VIEWED'
invoiceData.status === 'SENT' || invoiceData.status === 'VIEWED'
"
variant="primary"
>

View File

@ -29,6 +29,8 @@ export default {
return ' bg-yellow-500 bg-opacity-25 text-yellow-900 uppercase font-normal text-center '
case 'PARTIALLY_PAID':
return 'bg-blue-400 bg-opacity-25 text-blue-900 uppercase font-normal text-center'
case 'OVERDUE':
return 'bg-red-300 bg-opacity-50 px-2 py-1 text-sm text-red-900 uppercase font-normal text-center'
default:
return 'bg-gray-500 bg-opacity-25 text-gray-900 uppercase font-normal text-center'
}

View File

@ -160,7 +160,7 @@ const route = useRoute()
const table = ref(null)
let isFetchingInitialData = ref(true)
let showFilters = ref(false)
const status = ref(['DRAFT', 'DUE', 'SENT', 'VIEWED', 'OVERDUE', 'COMPLETED'])
const status = ref(['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED'])
const filters = reactive({
status: '',
from_date: '',

View File

@ -209,11 +209,6 @@ export default {
bgColor: '#C9E3EC',
color: '#2c5282',
}
case 'OVERDUE':
return {
bgColor: '#FED7D7',
color: '#c53030',
}
case 'COMPLETED':
return {
bgColor: '#D5EED0',
@ -256,8 +251,6 @@ export default {
return global.t('estimates.expired')
case 'PARTIALLY PAID':
return global.t('estimates.partially_paid')
case 'OVERDUE':
return global.t('invoices.overdue')
case 'COMPLETED':
return global.t('invoices.completed')
case 'DUE':