Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]

jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
track_progress: true
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

Review this pull request and focus on:

- Correctness: logic errors, unhandled edge cases, error handling
- Code quality: readability, maintainability, adherence to the
conventions already used in this repo
- Security: input validation, injection risks, exposed secrets
- Performance: obvious bottlenecks or wasteful work
- Tests: is the new behaviour covered?

Leave inline comments for specific issues and a top-level comment
for general observations. Be concise and skip nitpicks.
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
37 changes: 37 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
14 changes: 13 additions & 1 deletion client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
<router-link to="/demand" :class="{ active: $route.path === '/demand' }">
{{ t('nav.demandForecast') }}
</router-link>
<router-link to="/restocking" :class="{ active: $route.path === '/restocking' }">
{{ t('nav.restocking') }}
</router-link>
<router-link to="/reports" :class="{ active: $route.path === '/reports' }">
Reports
{{ t('nav.reports') }}
</router-link>
</nav>
<LanguageSwitcher />
Expand Down Expand Up @@ -467,6 +470,15 @@ tbody tr:hover {
color: #1e40af;
}

.badge.restocking_order {
background: #e0e7ff;
color: #3730a3;
}

.stat-card.info-alt .stat-value {
color: #8b5cf6;
}

.loading {
text-align: center;
padding: 3rem;
Expand Down
25 changes: 25 additions & 0 deletions client/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,30 @@ export const api = {
async getPurchaseOrderByBacklogItem(backlogItemId) {
const response = await axios.get(`${API_BASE_URL}/purchase-orders/${backlogItemId}`)
return response.data
},

async getRestockingRecommendations(budget, filters = {}) {
const params = new URLSearchParams()
params.append('budget', budget)
if (filters.warehouse && filters.warehouse !== 'all') params.append('warehouse', filters.warehouse)
if (filters.category && filters.category !== 'all') params.append('category', filters.category)

const response = await axios.get(`${API_BASE_URL}/restocking/recommendations?${params.toString()}`)
return response.data
},

async createRestockingOrder(orderData) {
const response = await axios.post(`${API_BASE_URL}/restocking-orders`, orderData)
return response.data
},

async getQuarterlyReports() {
const response = await axios.get(`${API_BASE_URL}/reports/quarterly`)
return response.data
},

async getMonthlyTrends() {
const response = await axios.get(`${API_BASE_URL}/reports/monthly-trends`)
return response.data
}
}
Loading