corretto altre cose (workbox mancante)
This commit is contained in:
@@ -107,6 +107,8 @@ export default defineComponent({
|
||||
|
||||
const allColumns = ref([]);
|
||||
|
||||
const isVisibleEditBtn = ref(false)
|
||||
|
||||
// Colonne della tabella
|
||||
const allColumns_Raccolta = ref([
|
||||
{ name: 'pos', label: 'Ind', field: 'pos', align: 'left', style: 'width: 50px', notsortable: true },
|
||||
@@ -208,8 +210,10 @@ export default defineComponent({
|
||||
|
||||
if (props.table === 'products') {
|
||||
allColumns.value = allColumns_Catalog.value;
|
||||
isVisibleEditBtn.value = true
|
||||
} else if (props.table === 'catalogs') {
|
||||
allColumns.value = allColumns_Raccolta.value;
|
||||
isVisibleEditBtn.value = false
|
||||
}
|
||||
|
||||
optionscatalogo.value = {
|
||||
@@ -783,6 +787,10 @@ export default defineComponent({
|
||||
return image;
|
||||
}
|
||||
|
||||
function isProduct() {
|
||||
return props.table === 'products'
|
||||
}
|
||||
|
||||
onMounted(mounted);
|
||||
|
||||
return {
|
||||
@@ -825,6 +833,8 @@ export default defineComponent({
|
||||
exportToCSV,
|
||||
isSortable,
|
||||
getImageByElement,
|
||||
isVisibleEditBtn,
|
||||
isProduct,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -116,8 +116,9 @@
|
||||
: element.productInfo?.image_link
|
||||
"
|
||||
style="width: 50px; height: 50px"
|
||||
class="rounded-borders cursor-pointer"
|
||||
@click="showProduct(element)"
|
||||
class="rounded-borders"
|
||||
:style="isProduct() ? 'cursor: pointer' : ''"
|
||||
@click="isProduct() ? showProduct(element) : null"
|
||||
/>
|
||||
</td>
|
||||
|
||||
@@ -138,12 +139,16 @@
|
||||
>
|
||||
<q-list>
|
||||
<q-item
|
||||
v-if="isVisibleEditBtn"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="modifyProduct(element)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>Modifica</q-item-label>
|
||||
<q-item-label>
|
||||
<q-icon name="edit" size="20px" class="q-mr-xs" />
|
||||
Modifica
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
@@ -152,7 +157,10 @@
|
||||
@click="removeProduct(element)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>Elimina</q-item-label>
|
||||
<q-item-label>
|
||||
<q-icon name="delete" size="20px" class="q-mr-xs" />
|
||||
Elimina
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
Reference in New Issue
Block a user