1.9 KiB
1.9 KiB
task, cycles, context, private, started, finished
| task | cycles | context | private | started | finished |
|---|---|---|---|---|---|
| In ListProductsMarket.vue, hide the "+ New Product" button for all non-Big-3 account types — currently v-if="isUltimate", should be v-if="isUltimate || isSuperOperator || isOperator" | 5 | true | false | 2026-05-28T16:46:18Z | 2026-05-28T16:46:23Z |
files
- resources/js/Pages/ListProductsMarket.vue [lines 18-72] — contains the useAuth destructure (line 19) and the button v-if guard (line 69)
- resources/js/composables/Core/useAuth.js [lines 102-124] — exports isUltimate, isSuperOperator, isOperator
steps
- In
resources/js/Pages/ListProductsMarket.vueline 19, change:const { isUltimate } = useAuth();to:const { isUltimate, isSuperOperator, isOperator } = useAuth(); - On line 69 of the same file, change:
v-if="isUltimate"to:v-if="isUltimate || isSuperOperator || isOperator" - Run
npm run buildto rebuild frontend assets. - Run
docker restart bukidbountyappto apply the new build.
context
// resources/js/Pages/ListProductsMarket.vue
// line 19 (current)
const { isUltimate } = useAuth();
// line 69 (current)
<button v-if="isUltimate" @click="navigate({ page: 'CreateProductUltimate' })"
class="btn btn-sm btn-primary rounded-pill px-3 py-1">
<i class="fas fa-plus me-1"></i> New Product
</button>
// resources/js/composables/Core/useAuth.js
// lines 102-124
const isUltimate = computed(() => role.value === UserTypes.ULTIMATE);
const isSuperOperator = computed(() => role.value === UserTypes.SUPER_OPERATOR);
const isOperator = computed(() => role.value === UserTypes.OPERATOR);
// ...
return { isUltimate, isSuperOperator, isOperator, ... };
notes
- dictionary: ai-docs/dictionary.md
- linters: none
- constraints: Big 3 = ULTIMATE, SUPER_OPERATOR, OPERATOR per dictionary. STORE_OWNER and below must NOT see the button. No backend changes required — frontend-only visibility guard.