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:
142
reports-app/frontend/tests/fixtures/invoices.js
vendored
Normal file
142
reports-app/frontend/tests/fixtures/invoices.js
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
export const mockInvoices = [
|
||||
{
|
||||
id: 1,
|
||||
number: 'INV001',
|
||||
date: '2024-01-15',
|
||||
client_name: 'SC CLIENT TEST SRL',
|
||||
amount: 25000.50,
|
||||
currency: 'RON',
|
||||
status: 'paid',
|
||||
due_date: '2024-02-15',
|
||||
payment_date: '2024-02-10'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
number: 'INV002',
|
||||
date: '2024-01-20',
|
||||
client_name: 'CLIENT EXEMPLU SA',
|
||||
amount: 18500.75,
|
||||
currency: 'RON',
|
||||
status: 'unpaid',
|
||||
due_date: '2024-02-20',
|
||||
payment_date: null
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
number: 'INV003',
|
||||
date: '2024-01-25',
|
||||
client_name: 'FIRMA TEST SRL',
|
||||
amount: 12750.00,
|
||||
currency: 'RON',
|
||||
status: 'overdue',
|
||||
due_date: '2024-02-25',
|
||||
payment_date: null
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
number: 'INV004',
|
||||
date: '2024-02-01',
|
||||
client_name: 'COMPANIA ABC SRL',
|
||||
amount: 35000.00,
|
||||
currency: 'RON',
|
||||
status: 'paid',
|
||||
due_date: '2024-03-01',
|
||||
payment_date: '2024-02-28'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
number: 'INV005',
|
||||
date: '2024-02-05',
|
||||
client_name: 'BUSINESS PARTNER SA',
|
||||
amount: 8900.25,
|
||||
currency: 'RON',
|
||||
status: 'unpaid',
|
||||
due_date: '2024-03-05',
|
||||
payment_date: null
|
||||
}
|
||||
];
|
||||
|
||||
export const mockInvoiceDetails = {
|
||||
id: 1,
|
||||
number: 'INV001',
|
||||
date: '2024-01-15',
|
||||
due_date: '2024-02-15',
|
||||
client: {
|
||||
name: 'SC CLIENT TEST SRL',
|
||||
tax_code: 'RO12345678',
|
||||
address: 'Strada Exemplu, Nr. 123, București',
|
||||
phone: '+40 21 123 4567',
|
||||
email: 'contact@clienttest.ro'
|
||||
},
|
||||
items: [
|
||||
{
|
||||
description: 'Servicii consultanță',
|
||||
quantity: 10,
|
||||
unit_price: 2000.00,
|
||||
amount: 20000.00
|
||||
},
|
||||
{
|
||||
description: 'Servicii implementare',
|
||||
quantity: 5,
|
||||
unit_price: 1000.10,
|
||||
amount: 5000.50
|
||||
}
|
||||
],
|
||||
subtotal: 25000.50,
|
||||
tax_rate: 19,
|
||||
tax_amount: 4750.10,
|
||||
total: 29750.60,
|
||||
currency: 'RON',
|
||||
status: 'paid',
|
||||
payment_date: '2024-02-10',
|
||||
payment_method: 'Transfer bancar',
|
||||
notes: 'Factura plătită la termen'
|
||||
};
|
||||
|
||||
export const invoiceStatuses = {
|
||||
paid: 'Plătit',
|
||||
unpaid: 'Neplătit',
|
||||
overdue: 'Întârziat',
|
||||
draft: 'Proiect',
|
||||
cancelled: 'Anulat'
|
||||
};
|
||||
|
||||
export const invoiceFilters = {
|
||||
status: ['all', 'paid', 'unpaid', 'overdue'],
|
||||
dateRange: {
|
||||
thisMonth: 'Această lună',
|
||||
lastMonth: 'Luna trecută',
|
||||
thisYear: 'Acest an',
|
||||
custom: 'Personalizat'
|
||||
},
|
||||
sortBy: {
|
||||
date: 'Data',
|
||||
number: 'Număr',
|
||||
client: 'Client',
|
||||
amount: 'Sumă',
|
||||
status: 'Status'
|
||||
}
|
||||
};
|
||||
|
||||
export const mockApiResponses = {
|
||||
invoicesSuccess: {
|
||||
status: 200,
|
||||
body: {
|
||||
items: mockInvoices,
|
||||
total: mockInvoices.length,
|
||||
page: 1,
|
||||
size: 10,
|
||||
pages: 1
|
||||
}
|
||||
},
|
||||
invoicesError: {
|
||||
status: 500,
|
||||
body: {
|
||||
detail: 'Error fetching invoices'
|
||||
}
|
||||
},
|
||||
invoiceDetailsSuccess: {
|
||||
status: 200,
|
||||
body: mockInvoiceDetails
|
||||
}
|
||||
};
|
||||
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