rename type to model
This commit is contained in:
parent
4ed15b740b
commit
32439e3e87
@ -11,7 +11,7 @@ export interface Suggestion {
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
text: String,
|
text: String,
|
||||||
id: String | undefined,
|
id: String | undefined,
|
||||||
type: String
|
model: String
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const SearchQuery = ref(props.text || "");
|
const SearchQuery = ref(props.text || "");
|
||||||
@ -29,7 +29,7 @@ function load(text: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const budgetStore = useBudgetsStore();
|
const budgetStore = useBudgetsStore();
|
||||||
GET("/budget/" + budgetStore.CurrentBudgetID + "/autocomplete/" + props.type + "?s=" + text)
|
GET("/budget/" + budgetStore.CurrentBudgetID + "/autocomplete/" + props.model + "?s=" + text)
|
||||||
.then(x => x.json())
|
.then(x => x.json())
|
||||||
.then(x => {
|
.then(x => {
|
||||||
let suggestions = x || [];
|
let suggestions = x || [];
|
||||||
|
@ -25,7 +25,8 @@ const payload = computed(() => JSON.stringify({
|
|||||||
|
|
||||||
function saveTransaction(e: MouseEvent) {
|
function saveTransaction(e: MouseEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
accountStore.saveTransaction(payload.value);
|
console.log(TX);
|
||||||
|
//accountStore.saveTransaction(payload.value);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -35,10 +36,10 @@ function saveTransaction(e: MouseEvent) {
|
|||||||
<DateInput class="border-b-2 border-black" v-model="TX.Date" />
|
<DateInput class="border-b-2 border-black" v-model="TX.Date" />
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width: 150px;">
|
<td style="max-width: 150px;">
|
||||||
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" type="payees" />
|
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" model="payees" />
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width: 200px;">
|
<td style="max-width: 200px;">
|
||||||
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" type="categories" />
|
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" model="categories" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="block w-full border-b-2 border-black" type="text" v-model="TX.Memo" />
|
<input class="block w-full border-b-2 border-black" type="text" v-model="TX.Memo" />
|
||||||
|
@ -51,10 +51,10 @@ function saveTransaction(e: MouseEvent) {
|
|||||||
<DateInput class="border-b-2 border-black" v-model="TX.Date" />
|
<DateInput class="border-b-2 border-black" v-model="TX.Date" />
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width: 150px;">
|
<td style="max-width: 150px;">
|
||||||
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" type="payees" />
|
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" model="payees" />
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width: 200px;">
|
<td style="max-width: 200px;">
|
||||||
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" type="categories" />
|
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" model="categories" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input class="block w-full border-b-2 border-black" type="text" v-model="TX.Memo" />
|
<input class="block w-full border-b-2 border-black" type="text" v-model="TX.Memo" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user