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
5 changes: 4 additions & 1 deletion client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
{{ t('nav.demandForecast') }}
</router-link>
<router-link to="/reports" :class="{ active: $route.path === '/reports' }">
Reports
{{ t('nav.reports') }}
</router-link>
<router-link to="/restocking" :class="{ active: $route.path === '/restocking' }">
{{ t('nav.restocking') }}
</router-link>
</nav>
<LanguageSwitcher />
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 getReportsQuarterly(filters = {}) {
const params = new URLSearchParams()
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}/reports/quarterly?${params.toString()}`)
return response.data
},

async getReportsMonthlyTrends(filters = {}) {
const params = new URLSearchParams()
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}/reports/monthly-trends?${params.toString()}`)
return response.data
},

async getRestockingRecommendations(filters = {}) {
const params = new URLSearchParams()
if (filters.warehouse && filters.warehouse !== 'all') params.append('warehouse', filters.warehouse)
if (filters.category && filters.category !== 'all') params.append('category', filters.category)
if (filters.budget != null && filters.budget !== '') params.append('budget', filters.budget)
const response = await axios.get(`${API_BASE_URL}/restocking?${params.toString()}`)
return response.data
}
}
76 changes: 76 additions & 0 deletions client/src/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default {
orders: 'Orders',
finance: 'Finance',
demandForecast: 'Demand Forecast',
reports: 'Reports',
restocking: 'Restocking',
companyName: 'Catalyst Components',
subtitle: 'Inventory Management System'
},
Expand Down Expand Up @@ -311,6 +313,80 @@ export default {
selectLanguage: 'Select Language'
},

// Restocking
restocking: {
title: 'Restocking Recommendations',
subtitle: 'Purchase order recommendations based on stock levels, demand forecast, and your budget',
budgetLabel: 'Budget Ceiling',
budgetPlaceholder: 'Enter budget (e.g. 50000)',
calculate: 'Calculate',
noData: 'No items require restocking with the current filters',
noBudget: 'Enter a budget ceiling above to see purchase recommendations',
summary: {
budget: 'Budget',
totalSpend: 'Recommended Spend',
itemsAtRisk: 'Items at Risk',
itemsCovered: 'Items Covered',
budgetRemaining: 'Budget Remaining'
},
table: {
sku: 'SKU',
name: 'Item Name',
warehouse: 'Warehouse',
category: 'Category',
currentStock: 'Current Stock',
daysOfStock: 'Days of Stock',
qtyToOrder: 'Qty to Order',
unitCost: 'Unit Cost',
lineTotal: 'Line Total',
urgency: 'Urgency',
status: 'Status'
},
urgency: {
high: 'High',
medium: 'Medium',
low: 'Low'
},
status: {
covered: 'Covered',
partial: 'Partial',
uncovered: 'Uncovered'
}
},

// Reports
reports: {
title: 'Performance Reports',
subtitle: 'View quarterly performance metrics and monthly trends',
loading: 'Loading reports...',
noData: 'No data available for selected filters',
quarterly: {
title: 'Quarterly Performance',
quarter: 'Quarter',
totalOrders: 'Total Orders',
totalRevenue: 'Total Revenue',
avgOrderValue: 'Avg Order Value',
fulfillmentRate: 'Fulfillment Rate'
},
monthlyChart: {
title: 'Monthly Revenue Trend'
},
monthlyAnalysis: {
title: 'Month-over-Month Analysis',
month: 'Month',
orders: 'Orders',
revenue: 'Revenue',
change: 'Change',
growthRate: 'Growth Rate'
},
stats: {
ytdRevenue: 'Total Revenue (YTD)',
avgMonthly: 'Avg Monthly Revenue',
ytdOrders: 'Total Orders (YTD)',
bestQuarter: 'Best Performing Quarter'
}
},

// Common
common: {
loading: 'Loading...',
Expand Down
76 changes: 76 additions & 0 deletions client/src/locales/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default {
orders: '注文',
finance: '財務',
demandForecast: '需要予測',
reports: 'レポート',
restocking: '補充',
companyName: '触媒コンポーネンツ',
subtitle: '在庫管理システム'
},
Expand Down Expand Up @@ -311,6 +313,80 @@ export default {
selectLanguage: '言語を選択'
},

// Restocking
restocking: {
title: '補充推奨',
subtitle: '在庫レベル、需要予測、予算に基づく発注推奨',
budgetLabel: '予算上限',
budgetPlaceholder: '予算を入力(例:50000)',
calculate: '計算',
noData: '現在のフィルターで補充が必要な品目はありません',
noBudget: '購入推奨を表示するには予算上限を入力してください',
summary: {
budget: '予算',
totalSpend: '推奨支出',
itemsAtRisk: 'リスク品目数',
itemsCovered: 'カバー済み品目',
budgetRemaining: '残予算'
},
table: {
sku: 'SKU',
name: '品目名',
warehouse: '倉庫',
category: 'カテゴリ',
currentStock: '現在の在庫',
daysOfStock: '在庫日数',
qtyToOrder: '注文数量',
unitCost: '単価',
lineTotal: '合計金額',
urgency: '緊急度',
status: 'ステータス'
},
urgency: {
high: '高',
medium: '中',
low: '低'
},
status: {
covered: 'カバー済み',
partial: '一部カバー',
uncovered: '未カバー'
}
},

// Reports
reports: {
title: 'パフォーマンスレポート',
subtitle: '四半期パフォーマンス指標と月次トレンドを確認',
loading: 'レポートを読み込み中...',
noData: '選択したフィルターのデータがありません',
quarterly: {
title: '四半期パフォーマンス',
quarter: '四半期',
totalOrders: '総注文数',
totalRevenue: '総収益',
avgOrderValue: '平均注文額',
fulfillmentRate: '履行率'
},
monthlyChart: {
title: '月次収益トレンド'
},
monthlyAnalysis: {
title: '前月比分析',
month: '月',
orders: '注文数',
revenue: '収益',
change: '変化',
growthRate: '成長率'
},
stats: {
ytdRevenue: '年初来総収益',
avgMonthly: '月次平均収益',
ytdOrders: '年初来総注文数',
bestQuarter: '最高パフォーマンス四半期'
}
},

// Common
common: {
loading: '読み込み中...',
Expand Down
4 changes: 3 additions & 1 deletion client/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Orders from './views/Orders.vue'
import Demand from './views/Demand.vue'
import Spending from './views/Spending.vue'
import Reports from './views/Reports.vue'
import Restocking from './views/RestockingView.vue'

const router = createRouter({
history: createWebHistory(),
Expand All @@ -16,7 +17,8 @@ const router = createRouter({
{ path: '/orders', component: Orders },
{ path: '/demand', component: Demand },
{ path: '/spending', component: Spending },
{ path: '/reports', component: Reports }
{ path: '/reports', component: Reports },
{ path: '/restocking', component: Restocking }
]
})

Expand Down
7 changes: 0 additions & 7 deletions client/src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,6 @@
@close="showBacklogModal = false"
/>

<PurchaseOrderModal
:is-open="showPOModal"
:backlog-item="selectedBacklogForPO"
:mode="poModalMode"
@close="showPOModal = false"
@po-created="handlePOCreated"
/>
</div>
</template>

Expand Down
Loading