feat(accounts): add account settings service

- Add AccountsSettingsService for managing account-related settings
- Update validators, create and edit services to use settings
- Add constants for account configuration
- Update frontend utils and translations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ahmed Bouhuolia
2026-02-25 19:27:53 +02:00
parent b5d1a2c9d0
commit d35915b16b
8 changed files with 94 additions and 14 deletions

View File

@@ -15,10 +15,16 @@ export const AccountDialogAction = {
*/
export const transformApiErrors = (errors) => {
const fields = {};
if (errors.find((e) => e.type === 'account_code_required')) {
fields.code = intl.get('account_code_is_required');
}
if (errors.find((e) => e.type === 'NOT_UNIQUE_CODE')) {
fields.code = intl.get('account_code_is_not_unique');
}
if (errors.find((e) => e.type === 'ACCOUNT.NAME.NOT.UNIQUE')) {
if (errors.find((e) => e.type === 'account_code_not_unique')) {
fields.code = intl.get('account_code_is_not_unique');
}
if (errors.find((e) => e.type === 'account_name_not_unqiue')) {
fields.name = intl.get('account_name_is_already_used');
}
if (