When I click a button in my form, it adds a new line. The challenge is making sure that each new line evaluates independently and correctly. In this case, the task involves checking the first 2 digits of a barcode against a dataset to determine a match or return "nothing found". At the moment, the evaluation is not working as expected - it always displays "No Agency found" and applies this to all fields because they share the same v-model on a new line add. How can I modify this so that each field is evaluated correctly and independently?
Below are the relevant sections from my template and script:
<div id="q-app" class="q-pa-lg">
<!-- Code snippet here -->
</div>
export default {
data() {
return {
// Data properties listed here
};
},
methods: {
// Methods defined here
},
mounted() {
// Code for mounting the application
}
}
For a more detailed look at the code, check out the codepen.