chore: Fix .env.test quotes and format frontend code
- Fix TEST_ORACLE_USER quotes in .env.test for shell source compatibility - Format 14 frontend files with Prettier (stores, views, utils) - All 122 tests passing (77 telegram + 35 backend + 10 E2E) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
Balanță de Verificare
|
||||
</h1>
|
||||
<p class="page-subtitle">
|
||||
{{ currentPeriodText }} - {{ companyStore.selectedCompany?.name || "Selectați companie" }}
|
||||
{{ currentPeriodText }} -
|
||||
{{ companyStore.selectedCompany?.name || "Selectați companie" }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -128,47 +129,99 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<Column field="cont" header="Cont" sortable :style="{ width: '8%' }">
|
||||
<Column
|
||||
field="cont"
|
||||
header="Cont"
|
||||
sortable
|
||||
:style="{ width: '8%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<strong>{{ slotProps.data.cont }}</strong>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="denumire" header="Denumire Cont" sortable :style="{ width: '20%' }" />
|
||||
<Column
|
||||
field="denumire"
|
||||
header="Denumire Cont"
|
||||
sortable
|
||||
:style="{ width: '20%' }"
|
||||
/>
|
||||
|
||||
<Column field="sold_precedent_debit" header="Sold Prec. D" sortable :style="{ width: '10%' }">
|
||||
<Column
|
||||
field="sold_precedent_debit"
|
||||
header="Sold Prec. D"
|
||||
sortable
|
||||
:style="{ width: '10%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.sold_precedent_debit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.sold_precedent_debit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="sold_precedent_credit" header="Sold Prec. C" sortable :style="{ width: '10%' }">
|
||||
<Column
|
||||
field="sold_precedent_credit"
|
||||
header="Sold Prec. C"
|
||||
sortable
|
||||
:style="{ width: '10%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.sold_precedent_credit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.sold_precedent_credit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="rulaj_lunar_debit" header="Rulaj D" sortable :style="{ width: '10%' }">
|
||||
<Column
|
||||
field="rulaj_lunar_debit"
|
||||
header="Rulaj D"
|
||||
sortable
|
||||
:style="{ width: '10%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.rulaj_lunar_debit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.rulaj_lunar_debit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="rulaj_lunar_credit" header="Rulaj C" sortable :style="{ width: '10%' }">
|
||||
<Column
|
||||
field="rulaj_lunar_credit"
|
||||
header="Rulaj C"
|
||||
sortable
|
||||
:style="{ width: '10%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.rulaj_lunar_credit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.rulaj_lunar_credit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="sold_final_debit" header="Sold Final D" sortable :style="{ width: '11%' }">
|
||||
<Column
|
||||
field="sold_final_debit"
|
||||
header="Sold Final D"
|
||||
sortable
|
||||
:style="{ width: '11%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.sold_final_debit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.sold_final_debit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="sold_final_credit" header="Sold Final C" sortable :style="{ width: '11%' }">
|
||||
<Column
|
||||
field="sold_final_credit"
|
||||
header="Sold Final C"
|
||||
sortable
|
||||
:style="{ width: '11%' }"
|
||||
>
|
||||
<template #body="slotProps">
|
||||
<div class="text-right">{{ formatCurrency(slotProps.data.sold_final_credit) }}</div>
|
||||
<div class="text-right">
|
||||
{{ formatCurrency(slotProps.data.sold_final_credit) }}
|
||||
</div>
|
||||
</template>
|
||||
</Column>
|
||||
</DataTable>
|
||||
@@ -200,8 +253,18 @@ const localFilters = ref({
|
||||
// Computed
|
||||
const currentPeriodText = computed(() => {
|
||||
const months = [
|
||||
"Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie",
|
||||
"Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
|
||||
"Ianuarie",
|
||||
"Februarie",
|
||||
"Martie",
|
||||
"Aprilie",
|
||||
"Mai",
|
||||
"Iunie",
|
||||
"Iulie",
|
||||
"August",
|
||||
"Septembrie",
|
||||
"Octombrie",
|
||||
"Noiembrie",
|
||||
"Decembrie",
|
||||
];
|
||||
const monthName = months[trialBalanceStore.filters.luna - 1] || "";
|
||||
return `${monthName} ${trialBalanceStore.filters.an}`;
|
||||
@@ -248,7 +311,7 @@ const applyFilters = async () => {
|
||||
cont: localFilters.value.cont,
|
||||
denumire: localFilters.value.denumire,
|
||||
},
|
||||
companyStore.selectedCompany.id_firma
|
||||
companyStore.selectedCompany.id_firma,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -275,7 +338,7 @@ const loadTrialBalance = async () => {
|
||||
|
||||
try {
|
||||
await trialBalanceStore.fetchTrialBalance(
|
||||
companyStore.selectedCompany.id_firma
|
||||
companyStore.selectedCompany.id_firma,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Failed to load trial balance:", error);
|
||||
@@ -293,7 +356,7 @@ const onPageChange = async (event) => {
|
||||
|
||||
await trialBalanceStore.changePage(
|
||||
event.page + 1,
|
||||
companyStore.selectedCompany.id_firma
|
||||
companyStore.selectedCompany.id_firma,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -306,7 +369,7 @@ const onSort = async (event) => {
|
||||
await trialBalanceStore.sort(
|
||||
sortBy,
|
||||
sortOrder,
|
||||
companyStore.selectedCompany.id_firma
|
||||
companyStore.selectedCompany.id_firma,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -379,8 +442,8 @@ const exportExcel = async () => {
|
||||
|
||||
// Prepare data for export - Use raw numbers (not formatted) so Excel treats them as numbers
|
||||
const exportData = allData.map((row) => ({
|
||||
"Cont": row.cont,
|
||||
"Denumire": row.denumire,
|
||||
Cont: row.cont,
|
||||
Denumire: row.denumire,
|
||||
"Sold Precedent D": parseFloat(row.sold_precedent_debit) || 0,
|
||||
"Sold Precedent C": parseFloat(row.sold_precedent_credit) || 0,
|
||||
"Rulaj Lunar D": parseFloat(row.rulaj_lunar_debit) || 0,
|
||||
@@ -392,7 +455,7 @@ const exportExcel = async () => {
|
||||
const result = exportToExcel(
|
||||
exportData,
|
||||
`balanta_verificare_${currentPeriodText.value.replace(/\s+/g, "_")}`,
|
||||
"Balanță de Verificare"
|
||||
"Balanță de Verificare",
|
||||
);
|
||||
|
||||
if (result.success) {
|
||||
@@ -459,14 +522,44 @@ const exportPDF = async () => {
|
||||
// A4 landscape width: ~297mm total, margins 8mm left+right = 281mm usable
|
||||
// Use 'auto' width to fill entire page width
|
||||
const columns = [
|
||||
{ field: "cont", header: "Cont", type: "text", width: 'auto' },
|
||||
{ field: "denumire", header: "Denumire Cont", type: "text", width: 'auto' },
|
||||
{ field: "sold_precedent_debit", header: "Sold Prec. D", type: "number", width: 'auto' },
|
||||
{ field: "sold_precedent_credit", header: "Sold Prec. C", type: "number", width: 'auto' },
|
||||
{ field: "rulaj_lunar_debit", header: "Rulaj D", type: "number", width: 'auto' },
|
||||
{ field: "rulaj_lunar_credit", header: "Rulaj C", type: "number", width: 'auto' },
|
||||
{ field: "sold_final_debit", header: "Sold Final D", type: "number", width: 'auto' },
|
||||
{ field: "sold_final_credit", header: "Sold Final C", type: "number", width: 'auto' },
|
||||
{ field: "cont", header: "Cont", type: "text", width: "auto" },
|
||||
{ field: "denumire", header: "Denumire Cont", type: "text", width: "auto" },
|
||||
{
|
||||
field: "sold_precedent_debit",
|
||||
header: "Sold Prec. D",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
{
|
||||
field: "sold_precedent_credit",
|
||||
header: "Sold Prec. C",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
{
|
||||
field: "rulaj_lunar_debit",
|
||||
header: "Rulaj D",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
{
|
||||
field: "rulaj_lunar_credit",
|
||||
header: "Rulaj C",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
{
|
||||
field: "sold_final_debit",
|
||||
header: "Sold Final D",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
{
|
||||
field: "sold_final_credit",
|
||||
header: "Sold Final C",
|
||||
type: "number",
|
||||
width: "auto",
|
||||
},
|
||||
];
|
||||
|
||||
const result = exportToPDF(
|
||||
@@ -476,8 +569,8 @@ const exportPDF = async () => {
|
||||
{
|
||||
companyName: companyStore.selectedCompany?.name || "",
|
||||
title: "Balanta de Verificare",
|
||||
period: currentPeriodText.value
|
||||
}
|
||||
period: currentPeriodText.value,
|
||||
},
|
||||
);
|
||||
|
||||
if (result.success) {
|
||||
@@ -517,7 +610,7 @@ watch(
|
||||
if (newCompany) {
|
||||
await loadTrialBalance();
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user