initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
---
task: 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"
cycles: 5
context: true
private: false
started: 2026-05-28T16:46:18Z
finished: 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
1. In `resources/js/Pages/ListProductsMarket.vue` line 19, change:
`const { isUltimate } = useAuth();`
to:
`const { isUltimate, isSuperOperator, isOperator } = useAuth();`
2. On line 69 of the same file, change:
`v-if="isUltimate"`
to:
`v-if="isUltimate || isSuperOperator || isOperator"`
3. Run `npm run build` to rebuild frontend assets.
4. Run `docker restart bukidbountyapp` to 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.