This commit is contained in:
2021-01-19 18:27:10 +00:00
parent a1073acf8f
commit bb0f7721ad

View File

@@ -21,23 +21,20 @@
v-model="newSerial"
:label="$ay.t('PartSerialNumbersAvailable')"
clearable
no-resize
rows="5"
:rows="$vuetify.breakpoint.xs ? 5 : 20"
ref="newSerial"
data-cy="newSerial"
append-outer-icon="$ayiPlus"
@click:append-outer="addItem()"
></v-textarea>
</v-col>
<v-col cols="12" class="mt-n12">
<v-col cols="12" sm="6" class="mt-n12">
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th />
<!-- <th class="text-left">
{{ $ay.t("PartSerialNumbersAvailable") }}
</th> -->
<th />
</tr>
</thead>
@@ -45,7 +42,8 @@
<tr v-for="(item, index) in sortedList()" :key="index">
<td>
{{ item }}
</td>
<td>
<v-icon class="ml-6" @click="removeItem(index)">
$ayiTrashAlt
</v-icon>
@@ -174,8 +172,8 @@ export default {
return this.obj.slice().sort();
},
removeItem: function(index) {
vm.obj.splice(index, 1);
vm.formState.dirty = true;
this.obj.splice(index, 1);
this.formState.dirty = true;
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
@@ -189,8 +187,8 @@ export default {
splitted = [...splitted, ...this.obj];
let uniqueItems = [...new Set(splitted)];
uniqueItems.sort();
console.log(uniqueItems);
//1,2,3,1,014369160,5,3,9,qw
this.obj = uniqueItems;
this.formState.dirty = true;
},
ayaTypes: function() {
return window.$gz.type;