This commit is contained in:
@@ -29,19 +29,53 @@
|
||||
data-cy="partId"
|
||||
@input="addItem()"
|
||||
></gz-pick-list>
|
||||
<v-simple-table>
|
||||
<template v-slot:default>
|
||||
<v-simple-table class="my-6">
|
||||
<!-- WIDE TABLE VIEW -->
|
||||
<template v-if="$vuetify.breakpoint.smAndUp" v-slot:default>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">
|
||||
{{ $ay.t("PartList") }}
|
||||
</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in sortedList" :key="item.partId">
|
||||
<td>{{ item.partDisplay }}</td>
|
||||
<td>
|
||||
<v-icon @click="openItem(item)">
|
||||
$ayiEdit
|
||||
</v-icon>
|
||||
</td>
|
||||
<td>
|
||||
<v-icon @click="removeItem(item)">
|
||||
$ayiTrashAlt
|
||||
</v-icon>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</template>
|
||||
<!-- MOBILE TABLE VIEW -->
|
||||
<template v-else v-slot:default>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">
|
||||
{{ $ay.t("PartList") }}
|
||||
</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in sortedList" :key="item.partId">
|
||||
<td>{{ item.partDisplay }}</td>
|
||||
<td>
|
||||
<v-icon small @click="openItem(item)">
|
||||
$ayiEdit
|
||||
</v-icon>
|
||||
</td>
|
||||
<td>
|
||||
<v-icon small @click="removeItem(item)">
|
||||
$ayiTrashAlt
|
||||
@@ -68,7 +102,7 @@
|
||||
<v-textarea
|
||||
v-model="obj.notes"
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('Notes')"
|
||||
:label="$ay.t('PartAssemblyNotes')"
|
||||
:error-messages="form().serverErrors(this, 'notes')"
|
||||
ref="notes"
|
||||
data-cy="notes"
|
||||
@@ -303,6 +337,12 @@ export default {
|
||||
vm.obj.items.splice(index, 1);
|
||||
vm.formState.dirty = true;
|
||||
},
|
||||
openItem: function(item) {
|
||||
window.$gz.eventBus.$emit("openobject", {
|
||||
type: window.$gz.type.Part,
|
||||
id: item.partId
|
||||
});
|
||||
},
|
||||
canSave: function() {
|
||||
return this.formState.valid && this.formState.dirty;
|
||||
},
|
||||
@@ -649,8 +689,6 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
@@ -674,7 +712,7 @@ async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"PartAssembly",
|
||||
"PartAssemblyName",
|
||||
"Notes",
|
||||
"PartAssemblyNotes",
|
||||
"PartList",
|
||||
"Part",
|
||||
"PartAssemblyCustom1",
|
||||
|
||||
Reference in New Issue
Block a user