mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 21:21:09 -04:00 
			
		
		
		
	add status filter
This commit is contained in:
		
				
					committed by
					
						 Mohit Panjwani
						Mohit Panjwani
					
				
			
			
				
	
			
			
			
						parent
						
							5b50dadd91
						
					
				
				
					commit
					658e125555
				
			| @ -54,6 +54,16 @@ | ||||
|         /> | ||||
|       </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')"> | ||||
|         <BaseDatePicker | ||||
|           v-model="filters.from_date" | ||||
| @ -329,6 +339,11 @@ function hasAtleastOneAbility() { | ||||
|   ]) | ||||
| } | ||||
|  | ||||
| async function clearStatusSearch(removedOption, id) { | ||||
|   filters.status = '' | ||||
|   refreshTable() | ||||
| } | ||||
|  | ||||
| function refreshTable() { | ||||
|   tableComponent.value && tableComponent.value.refresh() | ||||
| } | ||||
| @ -443,6 +458,23 @@ function setActiveTab(val) { | ||||
|     case 'SENT': | ||||
|       activeTab.value = t('general.sent') | ||||
|       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: | ||||
|       activeTab.value = t('general.all') | ||||
|       break | ||||
|  | ||||
		Reference in New Issue
	
	Block a user