1
0
This commit is contained in:
Ahmed Bouhuolia
2026-05-17 20:38:56 +02:00
parent 00feae58a7
commit 8c8e5138df
5 changed files with 16296 additions and 13256 deletions
+50 -50
View File
@@ -44,73 +44,73 @@
"action.transferred": "Transferred", "action.transferred": "Transferred",
"action.locking_changed": "Locking Changed", "action.locking_changed": "Locking Changed",
"metadata.bill_with_amount": "Bill {{billNumber}} - {{amount}} {{currencyCode}}", "metadata.bill_with_amount": "Bill {billNumber} - {amount} {currencyCode}",
"metadata.bill": "Bill {{billNumber}}", "metadata.bill": "Bill {billNumber}",
"metadata.invoice_with_balance": "Invoice {{invoiceNumber}} - Balance: {{balance}} {{currencyCode}}", "metadata.invoice_with_balance": "Invoice {invoiceNumber} - Balance: {balance} {currencyCode}",
"metadata.invoice": "Invoice {{invoiceNumber}}", "metadata.invoice": "Invoice {invoiceNumber}",
"metadata.receipt_with_amount": "Receipt {{receiptNumber}} - {{amount}} {{currencyCode}}", "metadata.receipt_with_amount": "Receipt {receiptNumber} - {amount} {currencyCode}",
"metadata.receipt": "Receipt {{receiptNumber}}", "metadata.receipt": "Receipt {receiptNumber}",
"metadata.estimate_with_total": "Estimate {{estimateNumber}} - {{total}} {{currencyCode}}", "metadata.estimate_with_total": "Estimate {estimateNumber} - {total} {currencyCode}",
"metadata.estimate": "Estimate {{estimateNumber}}", "metadata.estimate": "Estimate {estimateNumber}",
"metadata.payment_receive_with_amount": "Payment {{paymentReceiveNo}} - {{amount}} {{currencyCode}}", "metadata.payment_receive_with_amount": "Payment {paymentReceiveNo} - {amount} {currencyCode}",
"metadata.payment_receive": "Payment {{paymentReceiveNo}}", "metadata.payment_receive": "Payment {paymentReceiveNo}",
"metadata.payment_made_with_amount": "Payment {{paymentNumber}} - {{amount}} {{currencyCode}}", "metadata.payment_made_with_amount": "Payment {paymentNumber} - {amount} {currencyCode}",
"metadata.payment_made": "Payment {{paymentNumber}}", "metadata.payment_made": "Payment {paymentNumber}",
"metadata.expense_with_currency": "Expense - {{amount}} {{currencyCode}}", "metadata.expense_with_currency": "Expense - {amount} {currencyCode}",
"metadata.expense": "Expense - {{amount}}", "metadata.expense": "Expense - {amount}",
"metadata.expense_plain": "Expense", "metadata.expense_plain": "Expense",
"metadata.credit_note_with_amount": "Credit Note {{creditNoteNumber}} - {{amount}} {{currencyCode}}", "metadata.credit_note_with_amount": "Credit Note {creditNoteNumber} - {amount} {currencyCode}",
"metadata.credit_note": "Credit Note {{creditNoteNumber}}", "metadata.credit_note": "Credit Note {creditNoteNumber}",
"metadata.vendor_credit_with_total": "Vendor Credit {{vendorCreditNumber}} - {{total}} {{currencyCode}}", "metadata.vendor_credit_with_total": "Vendor Credit {vendorCreditNumber} - {total} {currencyCode}",
"metadata.vendor_credit": "Vendor Credit {{vendorCreditNumber}}", "metadata.vendor_credit": "Vendor Credit {vendorCreditNumber}",
"metadata.journal_with_amount": "Journal {{journalNumber}} - {{amount}} {{currencyCode}}", "metadata.journal_with_amount": "Journal {journalNumber} - {amount} {currencyCode}",
"metadata.journal": "Journal {{journalNumber}}", "metadata.journal": "Journal {journalNumber}",
"metadata.cashflow_with_currency": "Cashflow - {{amount}} {{currencyCode}}", "metadata.cashflow_with_currency": "Cashflow - {amount} {currencyCode}",
"metadata.cashflow": "Cashflow - {{amount}}", "metadata.cashflow": "Cashflow - {amount}",
"metadata.cashflow_plain": "Cashflow", "metadata.cashflow_plain": "Cashflow",
"metadata.account_with_code": "Account: {{name}} ({{code}})", "metadata.account_with_code": "Account: {name} ({code})",
"metadata.account": "Account: {{name}}", "metadata.account": "Account: {name}",
"metadata.account_plain": "Account", "metadata.account_plain": "Account",
"metadata.adjustment": "Adjustment: {{reason}}", "metadata.adjustment": "Adjustment: {reason}",
"metadata.adjustment_plain": "Inventory Adjustment", "metadata.adjustment_plain": "Inventory Adjustment",
"metadata.transfer": "Transfer: {{transactionNumber}}", "metadata.transfer": "Transfer: {transactionNumber}",
"metadata.transfer_plain": "Warehouse Transfer", "metadata.transfer_plain": "Warehouse Transfer",
"metadata.item_with_code": "{{name}} ({{code}})", "metadata.item_with_code": "{name} ({code})",
"metadata.item": "{{name}}", "metadata.item": "{name}",
"metadata.item_plain": "Item", "metadata.item_plain": "Item",
"metadata.customer_with_email": "{{displayName}} ({{email}})", "metadata.customer_with_email": "{displayName} ({email})",
"metadata.customer": "{{displayName}}", "metadata.customer": "{displayName}",
"metadata.customer_plain": "Customer", "metadata.customer_plain": "Customer",
"metadata.vendor_with_email": "{{displayName}} ({{email}})", "metadata.vendor_with_email": "{displayName} ({email})",
"metadata.vendor": "{{displayName}}", "metadata.vendor": "{displayName}",
"metadata.vendor_plain": "Vendor", "metadata.vendor_plain": "Vendor",
"metadata.role_with_old": "Role: {{roleName}} (was: {{oldRoleName}})", "metadata.role_with_old": "Role: {roleName} (was: {oldRoleName})",
"metadata.role": "Role: {{roleName}}", "metadata.role": "Role: {roleName}",
"metadata.role_plain": "Role", "metadata.role_plain": "Role",
"metadata.tax_rate": "{{name}} - {{rate}}%", "metadata.tax_rate": "{name} - {rate}%",
"metadata.tax_rate_name": "{{name}}", "metadata.tax_rate_name": "{name}",
"metadata.tax_rate_plain": "Tax Rate", "metadata.tax_rate_plain": "Tax Rate",
"metadata.warehouse": "Warehouse: {{code}}", "metadata.warehouse": "Warehouse: {code}",
"metadata.warehouse_plain": "Warehouse", "metadata.warehouse_plain": "Warehouse",
"metadata.branch_with_code": "{{name}} ({{code}})", "metadata.branch_with_code": "{name} ({code})",
"metadata.branch": "{{name}}", "metadata.branch": "{name}",
"metadata.branch_plain": "Branch", "metadata.branch_plain": "Branch",
"metadata.item_category": "Category: {{name}}", "metadata.item_category": "Category: {name}",
"metadata.item_category_plain": "Item Category", "metadata.item_category_plain": "Item Category",
"metadata.bank_rule": "Rule: {{name}}", "metadata.bank_rule": "Rule: {name}",
"metadata.bank_rule_plain": "Bank Rule", "metadata.bank_rule_plain": "Bank Rule",
"metadata.locking_with_date": "Module: {{module}} locked to {{lockToDate}}", "metadata.locking_with_date": "Module: {module} locked to {lockToDate}",
"metadata.locking_module": "Module: {{module}}", "metadata.locking_module": "Module: {module}",
"metadata.locking_plain": "Transactions Locking", "metadata.locking_plain": "Transactions Locking",
"metadata.refund_amount": "Refund - {{amount}}", "metadata.refund_amount": "Refund - {amount}",
"metadata.refund_plain": "Refund", "metadata.refund_plain": "Refund",
"metadata.imported_with_payee": "Imported - {{payee}}: {{amount}} {{currencyCode}}", "metadata.imported_with_payee": "Imported - {payee}: {amount} {currencyCode}",
"metadata.imported": "Imported - {{amount}} {{currencyCode}}", "metadata.imported": "Imported - {amount} {currencyCode}",
"metadata.imported_plain": "Imported Transaction", "metadata.imported_plain": "Imported Transaction",
"metadata.plaid_with_batch": "Plaid Sync - Account {{plaidAccountId}} (Batch: {{batch}})", "metadata.plaid_with_batch": "Plaid Sync - Account {plaidAccountId} (Batch: {batch})",
"metadata.plaid": "Plaid Sync - Account {{plaidAccountId}}", "metadata.plaid": "Plaid Sync - Account {plaidAccountId}",
"metadata.plaid_plain": "Plaid Sync", "metadata.plaid_plain": "Plaid Sync",
"metadata.bank_with_payee": "{{payee}}: {{amount}} {{currencyCode}}", "metadata.bank_with_payee": "{payee}: {amount} {currencyCode}",
"metadata.bank": "{{amount}} {{currencyCode}}", "metadata.bank": "{amount} {currencyCode}",
"metadata.bank_plain": "Bank Transaction" "metadata.bank_plain": "Bank Transaction"
} }
@@ -1,9 +1,17 @@
import { ApiProperty } from '@nestjs/swagger'; import { ApiProperty } from '@nestjs/swagger';
export class GetAuditLogFilterOptionsResponseDto { class AuditLogFilterOptionDto {
@ApiProperty({ type: [String], example: ['sale_invoice', 'bill', 'payment'] }) @ApiProperty({ example: 'SaleInvoice' })
subjects: string[]; key: string;
@ApiProperty({ type: [String], example: ['created', 'edited', 'deleted'] }) @ApiProperty({ example: 'Sale Invoice' })
actions: string[]; label: string;
}
export class GetAuditLogFilterOptionsResponseDto {
@ApiProperty({ type: [AuditLogFilterOptionDto] })
subjects: AuditLogFilterOptionDto[];
@ApiProperty({ type: [AuditLogFilterOptionDto] })
actions: AuditLogFilterOptionDto[];
} }
@@ -1,5 +1,5 @@
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { snakeCase } from 'lodash'; import { I18nService } from 'nestjs-i18n';
import { AuditLog } from '../models/AuditLog.model'; import { AuditLog } from '../models/AuditLog.model';
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel'; import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
@@ -18,6 +18,7 @@ export class GetAuditLogFilterOptionsService {
constructor( constructor(
@Inject(AuditLog.name) @Inject(AuditLog.name)
private readonly auditLogModel: TenantModelProxy<typeof AuditLog>, private readonly auditLogModel: TenantModelProxy<typeof AuditLog>,
private readonly i18n: I18nService,
) {} ) {}
async getFilterOptions(): Promise<AuditLogFilterOptions> { async getFilterOptions(): Promise<AuditLogFilterOptions> {
@@ -37,11 +38,11 @@ export class GetAuditLogFilterOptionsService {
subjects: subjectRows subjects: subjectRows
.map((r) => r.subject) .map((r) => r.subject)
.filter(Boolean) .filter(Boolean)
.map((key) => ({ key, label: snakeCase(key) })), .map((key) => ({ key, label: this.i18n.t(`audit_log.subject.${key}`) })),
actions: actionRows actions: actionRows
.map((r) => r.action) .map((r) => r.action)
.filter(Boolean) .filter(Boolean)
.map((key) => ({ key, label: snakeCase(key) })), .map((key) => ({ key, label: this.i18n.t(`audit_log.action.${key}`) })),
}; };
} }
} }
+16227 -13198
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -2,3 +2,5 @@ packages:
# all packages in direct subdirs of packages/ # all packages in direct subdirs of packages/
- 'packages/*' - 'packages/*'
- 'shared/*' - 'shared/*'
allowBuilds:
bcrypt: true