Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
This commit is contained in:
176
reports-app/frontend/tests/fixtures/payments.js
vendored
Normal file
176
reports-app/frontend/tests/fixtures/payments.js
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
export const mockPayments = [
|
||||
{
|
||||
id: 1,
|
||||
reference: 'PAY001',
|
||||
date: '2024-02-10',
|
||||
client_name: 'SC CLIENT TEST SRL',
|
||||
amount: 25000.50,
|
||||
currency: 'RON',
|
||||
method: 'bank_transfer',
|
||||
invoice_number: 'INV001',
|
||||
bank_reference: 'TRF240210001',
|
||||
description: 'Plată factură INV001'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
reference: 'PAY002',
|
||||
date: '2024-02-28',
|
||||
client_name: 'COMPANIA ABC SRL',
|
||||
amount: 35000.00,
|
||||
currency: 'RON',
|
||||
method: 'bank_transfer',
|
||||
invoice_number: 'INV004',
|
||||
bank_reference: 'TRF240228002',
|
||||
description: 'Plată factură INV004'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
reference: 'PAY003',
|
||||
date: '2024-02-15',
|
||||
client_name: 'BUSINESS CASH SRL',
|
||||
amount: 5000.00,
|
||||
currency: 'RON',
|
||||
method: 'cash',
|
||||
invoice_number: 'INV010',
|
||||
bank_reference: null,
|
||||
description: 'Plată cash factură INV010'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
reference: 'PAY004',
|
||||
date: '2024-02-20',
|
||||
client_name: 'CARD PAYMENT SA',
|
||||
amount: 12500.75,
|
||||
currency: 'RON',
|
||||
method: 'card',
|
||||
invoice_number: 'INV015',
|
||||
bank_reference: 'CARD240220003',
|
||||
description: 'Plată cu cardul factură INV015'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
reference: 'PAY005',
|
||||
date: '2024-02-25',
|
||||
client_name: 'CHECK COMPANY SRL',
|
||||
amount: 8900.25,
|
||||
currency: 'RON',
|
||||
method: 'check',
|
||||
invoice_number: 'INV020',
|
||||
bank_reference: 'CHECK001234',
|
||||
description: 'Plată cu cec factură INV020'
|
||||
}
|
||||
];
|
||||
|
||||
export const mockPaymentDetails = {
|
||||
id: 1,
|
||||
reference: 'PAY001',
|
||||
date: '2024-02-10',
|
||||
client: {
|
||||
name: 'SC CLIENT TEST SRL',
|
||||
tax_code: 'RO12345678',
|
||||
account_number: 'RO49AAAA1B31007593840000'
|
||||
},
|
||||
amount: 25000.50,
|
||||
currency: 'RON',
|
||||
method: 'bank_transfer',
|
||||
invoice: {
|
||||
number: 'INV001',
|
||||
date: '2024-01-15',
|
||||
amount: 25000.50
|
||||
},
|
||||
bank_details: {
|
||||
reference: 'TRF240210001',
|
||||
bank_name: 'Banca Transilvania',
|
||||
transaction_id: 'BT202402100001',
|
||||
fees: 5.00
|
||||
},
|
||||
description: 'Plată factură INV001',
|
||||
created_at: '2024-02-10T10:30:00Z',
|
||||
created_by: 'admin',
|
||||
notes: 'Plată procesată automat'
|
||||
};
|
||||
|
||||
export const paymentMethods = {
|
||||
bank_transfer: 'Transfer bancar',
|
||||
cash: 'Numerar',
|
||||
card: 'Card',
|
||||
check: 'Cec',
|
||||
other: 'Altă metodă'
|
||||
};
|
||||
|
||||
export const paymentFilters = {
|
||||
method: ['all', 'bank_transfer', 'cash', 'card', 'check'],
|
||||
dateRange: {
|
||||
thisMonth: 'Această lună',
|
||||
lastMonth: 'Luna trecută',
|
||||
thisYear: 'Acest an',
|
||||
custom: 'Personalizat'
|
||||
},
|
||||
sortBy: {
|
||||
date: 'Data',
|
||||
reference: 'Referință',
|
||||
client: 'Client',
|
||||
amount: 'Sumă',
|
||||
method: 'Metodă'
|
||||
}
|
||||
};
|
||||
|
||||
export const mockPaymentSummary = {
|
||||
total_amount: 86400.50,
|
||||
total_count: 5,
|
||||
by_method: {
|
||||
bank_transfer: {
|
||||
amount: 60000.50,
|
||||
count: 2,
|
||||
percentage: 69.5
|
||||
},
|
||||
cash: {
|
||||
amount: 5000.00,
|
||||
count: 1,
|
||||
percentage: 5.8
|
||||
},
|
||||
card: {
|
||||
amount: 12500.75,
|
||||
count: 1,
|
||||
percentage: 14.5
|
||||
},
|
||||
check: {
|
||||
amount: 8900.25,
|
||||
count: 1,
|
||||
percentage: 10.3
|
||||
}
|
||||
},
|
||||
by_month: {
|
||||
'2024-02': {
|
||||
amount: 86400.50,
|
||||
count: 5
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const mockApiResponses = {
|
||||
paymentsSuccess: {
|
||||
status: 200,
|
||||
body: {
|
||||
items: mockPayments,
|
||||
total: mockPayments.length,
|
||||
page: 1,
|
||||
size: 10,
|
||||
pages: 1
|
||||
}
|
||||
},
|
||||
paymentsError: {
|
||||
status: 500,
|
||||
body: {
|
||||
detail: 'Error fetching payments'
|
||||
}
|
||||
},
|
||||
paymentDetailsSuccess: {
|
||||
status: 200,
|
||||
body: mockPaymentDetails
|
||||
},
|
||||
paymentSummarySuccess: {
|
||||
status: 200,
|
||||
body: mockPaymentSummary
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user