mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
Merge branch 'add_status_estimate' into 'master'
add status filter
This commit is contained in:
@ -304,8 +304,10 @@
|
|||||||
},
|
},
|
||||||
"accepted": "Accepted",
|
"accepted": "Accepted",
|
||||||
"rejected": "Rejected",
|
"rejected": "Rejected",
|
||||||
|
"expired": "Expired",
|
||||||
"sent": "Sent",
|
"sent": "Sent",
|
||||||
"draft": "Draft",
|
"draft": "Draft",
|
||||||
|
"viewed": "Viewed",
|
||||||
"declined": "Declined",
|
"declined": "Declined",
|
||||||
"new_estimate": "New Estimate",
|
"new_estimate": "New Estimate",
|
||||||
"add_new_estimate": "Add New Estimate",
|
"add_new_estimate": "Add New Estimate",
|
||||||
|
|||||||
@ -54,6 +54,16 @@
|
|||||||
/>
|
/>
|
||||||
</BaseInputGroup>
|
</BaseInputGroup>
|
||||||
|
|
||||||
|
<BaseInputGroup :label="$t('estimates.status')">
|
||||||
|
<BaseMultiselect
|
||||||
|
v-model="filters.status"
|
||||||
|
:options="status"
|
||||||
|
searchable
|
||||||
|
:placeholder="$t('general.select_a_status')"
|
||||||
|
@update:modelValue="setActiveTab"
|
||||||
|
@remove="clearStatusSearch()"
|
||||||
|
/>
|
||||||
|
</BaseInputGroup>
|
||||||
<BaseInputGroup :label="$t('general.from')">
|
<BaseInputGroup :label="$t('general.from')">
|
||||||
<BaseDatePicker
|
<BaseDatePicker
|
||||||
v-model="filters.from_date"
|
v-model="filters.from_date"
|
||||||
@ -329,6 +339,11 @@ function hasAtleastOneAbility() {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function clearStatusSearch(removedOption, id) {
|
||||||
|
filters.status = ''
|
||||||
|
refreshTable()
|
||||||
|
}
|
||||||
|
|
||||||
function refreshTable() {
|
function refreshTable() {
|
||||||
tableComponent.value && tableComponent.value.refresh()
|
tableComponent.value && tableComponent.value.refresh()
|
||||||
}
|
}
|
||||||
@ -443,6 +458,23 @@ function setActiveTab(val) {
|
|||||||
case 'SENT':
|
case 'SENT':
|
||||||
activeTab.value = t('general.sent')
|
activeTab.value = t('general.sent')
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case 'VIEWED':
|
||||||
|
activeTab.value = t('estimates.viewed')
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'EXPIRED':
|
||||||
|
activeTab.value = t('estimates.expired')
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'ACCEPTED':
|
||||||
|
activeTab.value = t('estimates.accepted')
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'REJECTED':
|
||||||
|
activeTab.value = t('estimates.rejected')
|
||||||
|
break
|
||||||
|
|
||||||
default:
|
default:
|
||||||
activeTab.value = t('general.all')
|
activeTab.value = t('general.all')
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user