Files
BarangaySystem/.claude/plans/e45c0c127d270347cb4763699642f6af-complete.md
2026-06-06 18:43:00 +08:00

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

  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.