Added PLZ Autocompletion & InputChangeFunctions

This commit is contained in:
2024-12-27 12:14:27 +01:00
parent a1e6061579
commit 42686efbe7
2 changed files with 38 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import vehicle from "~/components/columnRenderings/vehicle.vue"
import usePlanning from "~/components/columnRenderings/usePlanning.vue"
import quantity from "~/components/helpRenderings/quantity.vue"
import {useZipCheck} from "~/composables/useZipCheck.js";
// @ts-ignore
export const useDataStore = defineStore('data', () => {
@@ -166,6 +167,11 @@ export const useDataStore = defineStore('data', () => {
key: "infoData.zip",
label: "Postleitzahl",
inputType: "number",
inputChangeFunction: async function (row) {
if(row.infoData.zip) {
row.infoData.city = (await useZipCheck(row.infoData.zip))
}
},
disabledInTable: true
},
{
@@ -764,7 +770,12 @@ export const useDataStore = defineStore('data', () => {
key: "infoData.zip",
label: "Postleitzahl",
inputType: "number",
disabledInTable: true
disabledInTable: true,
inputChangeFunction: async function (row) {
if(row.infoData.zip) {
row.infoData.city = (await useZipCheck(row.infoData.zip))
}
},
},
{
key: "infoData.city",
@@ -904,7 +915,12 @@ export const useDataStore = defineStore('data', () => {
label: "Postleitzahl",
inputType: "number",
disabledInTable: true,
inputColumn: "Ort"
inputColumn: "Ort",
inputChangeFunction: async function (row) {
if(row.infoData.zip) {
row.infoData.city = (await useZipCheck(row.infoData.zip))
}
},
},
{
key: "infoData.city",