diff --git a/apps/dashboard/src/components/FindUser.vue b/apps/dashboard/src/components/FindUser.vue index d073a77a..e4b41a8b 100644 --- a/apps/dashboard/src/components/FindUser.vue +++ b/apps/dashboard/src/components/FindUser.vue @@ -72,7 +72,7 @@ const filterUsers = (e: any) => { } }; -const defaultUser = ref([]); +const defaultUser: Ref> = ref([]); onBeforeMount(() => { if (props.modelValue) { diff --git a/apps/dashboard/src/components/InputSpan.vue b/apps/dashboard/src/components/InputSpan.vue index 2b3eb7c4..9aa303e8 100644 --- a/apps/dashboard/src/components/InputSpan.vue +++ b/apps/dashboard/src/components/InputSpan.vue @@ -30,7 +30,7 @@ v-model="internalValue as number" :disabled="disabled"/>
@@ -56,7 +56,7 @@ const props = defineProps({ required: true }, value: { - type: [String, Number], + type: [String, Number, Boolean], }, attributes: { type: Object as PropType, @@ -92,14 +92,16 @@ const emit = defineEmits(['update:value']); const stringInputs = ['text', 'textarea']; const numberInputs = ['currency', 'number']; +const booleanInputs = ['switch']; const initialValue = () => { if (stringInputs.includes(props.type)) return ''; if (numberInputs.includes(props.type)) return 0; + if (booleanInputs.includes(props.type)) return false; return ''; }; -const internalValue: Ref = ref(initialValue()); +const internalValue: Ref = ref(initialValue()); onMounted(() => { internalValue.value = props.value ?? ''; diff --git a/apps/dashboard/src/modules/financial/components/invoice/InvoiceUserTable.vue b/apps/dashboard/src/modules/financial/components/invoice/InvoiceUserTable.vue index f6dab7e8..2b70f03e 100644 --- a/apps/dashboard/src/modules/financial/components/invoice/InvoiceUserTable.vue +++ b/apps/dashboard/src/modules/financial/components/invoice/InvoiceUserTable.vue @@ -16,20 +16,12 @@ @@ -91,10 +83,16 @@ const getAllUsers = async (skip: number) => { } }; + +// Typing is absolutely fucked in the api but it works const getInvoiceableBalances = async (skip: number) => { + //@ts-ignore-next-line const response = await apiService.balance.getAllBalance(undefined, undefined, -1, undefined, undefined, undefined, ["INVOICE"], undefined, undefined, false, Number.MAX_SAFE_INTEGER, skip); + //@ts-ignore-next-line balances.value.push(...response.data.records); + //@ts-ignore-next-line if (response.data._pagination.count > response.data.records.length) { + //@ts-ignore-next-line await getInvoiceableBalances(skip + response.data.records.length); } }; diff --git a/apps/dashboard/src/modules/financial/components/invoice/forms/InvoiceCreateForm.vue b/apps/dashboard/src/modules/financial/components/invoice/forms/InvoiceCreateForm.vue index a4a5316c..6564bef3 100644 --- a/apps/dashboard/src/modules/financial/components/invoice/forms/InvoiceCreateForm.vue +++ b/apps/dashboard/src/modules/financial/components/invoice/forms/InvoiceCreateForm.vue @@ -1,5 +1,7 @@