|
2 | 2 | import { CheckCircleIcon, TagIcon, UserGroupIcon } from '@heroicons/vue/20/solid'; |
3 | 3 | import { FolderIcon } from '@heroicons/vue/16/solid'; |
4 | 4 | import BillableIcon from '@/packages/ui/src/Icons/BillableIcon.vue'; |
| 5 | +import InvoiceStatusIcon from '@/packages/ui/src/Icons/InvoiceStatusIcon.vue'; |
5 | 6 | import ReportingRoundingControls from '@/Components/Common/Reporting/ReportingRoundingControls.vue'; |
6 | 7 | import TaskMultiselectDropdown from '@/Components/Common/Task/TaskMultiselectDropdown.vue'; |
7 | 8 | import ClientMultiselectDropdown from '@/Components/Common/Client/ClientMultiselectDropdown.vue'; |
@@ -29,6 +30,7 @@ const selectedTasks = defineModel<string[]>('selectedTasks', { required: true }) |
29 | 30 | const selectedClients = defineModel<string[]>('selectedClients', { required: true }); |
30 | 31 | const selectedTags = defineModel<string[]>('selectedTags', { required: true }); |
31 | 32 | const billable = defineModel<'true' | 'false' | null>('billable', { required: true }); |
| 33 | +const invoiced = defineModel<'true' | 'false' | null>('invoiced', { default: null }); |
32 | 34 | const roundingEnabled = defineModel<boolean>('roundingEnabled', { required: true }); |
33 | 35 | const roundingType = defineModel<TimeEntryRoundingType>('roundingType', { required: true }); |
34 | 36 | const roundingMinutes = defineModel<number>('roundingMinutes', { required: true }); |
@@ -126,6 +128,32 @@ async function createTag(name: string) { |
126 | 128 | <SelectItem value="false">Non Billable</SelectItem> |
127 | 129 | </SelectContent> |
128 | 130 | </Select> |
| 131 | + <Select v-model="invoiced" @update:model-value="emit('submit')"> |
| 132 | + <SelectTrigger |
| 133 | + size="sm" |
| 134 | + variant="outline" |
| 135 | + :active="invoiced !== null" |
| 136 | + :show-chevron="false"> |
| 137 | + <SelectValue class="flex items-center gap-2"> |
| 138 | + <InvoiceStatusIcon |
| 139 | + size="small" |
| 140 | + :invoiced="invoiced === 'true'" |
| 141 | + :class=" |
| 142 | + invoiced !== null |
| 143 | + ? 'dark:text-accent-300/80 text-accent-400/80' |
| 144 | + : 'text-text-quaternary' |
| 145 | + " /> |
| 146 | + <span class="text-text-secondary">{{ |
| 147 | + invoiced === 'false' ? 'Not Invoiced' : 'Invoiced' |
| 148 | + }}</span> |
| 149 | + </SelectValue> |
| 150 | + </SelectTrigger> |
| 151 | + <SelectContent> |
| 152 | + <SelectItem :value="null">Both</SelectItem> |
| 153 | + <SelectItem value="true">Invoiced</SelectItem> |
| 154 | + <SelectItem value="false">Not Invoiced</SelectItem> |
| 155 | + </SelectContent> |
| 156 | + </Select> |
129 | 157 | <ReportingRoundingControls |
130 | 158 | v-model:enabled="roundingEnabled" |
131 | 159 | v-model:type="roundingType" |
|
0 commit comments