|
|
@@ -32,7 +32,7 @@
|
|
|
active-color="primary"
|
|
|
/>
|
|
|
<q-btn
|
|
|
- v-if="currentTab === 'products'"
|
|
|
+ v-if="currentTab === 'products' && canAdd"
|
|
|
color="primary-2"
|
|
|
style="height: 40px; width: 40px; min-width: 40px"
|
|
|
@click="handleAdd"
|
|
|
@@ -41,7 +41,7 @@
|
|
|
</q-btn>
|
|
|
|
|
|
<q-btn
|
|
|
- v-if="currentTab === 'orders'"
|
|
|
+ v-if="currentTab === 'orders' && canAdd"
|
|
|
label="Importar"
|
|
|
color="primary-2"
|
|
|
icon="mdi-file-import-outline"
|
|
|
@@ -69,6 +69,7 @@
|
|
|
<script setup>
|
|
|
import { defineAsyncComponent, ref, shallowRef, watch } from "vue";
|
|
|
import { useQuasar } from "quasar";
|
|
|
+import { permissionStore } from "src/stores/permission";
|
|
|
|
|
|
import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
|
|
|
import CustomTabComponent from "src/components/shared/CustomTabComponent.vue";
|
|
|
@@ -80,6 +81,8 @@ const StockTab = defineAsyncComponent(() => import("./tabs/StockTab.vue"));
|
|
|
const OrdersTab = defineAsyncComponent(() => import("./tabs/OrdersTab.vue"));
|
|
|
|
|
|
const currentTab = ref("products");
|
|
|
+const permissions = permissionStore();
|
|
|
+const canAdd = permissions.getAccess("franchisor_products", "add");
|
|
|
const search = ref("");
|
|
|
const currentPage = ref(1);
|
|
|
const totalPages = ref(1);
|