feat: implement fiscal ID validation; replace fiscal code validator and update related components
This commit is contained in:
@@ -9,17 +9,17 @@ export const PARTNER_MENU_ITEMS = [
|
||||
},
|
||||
{
|
||||
label: 'حسابهای کاربری',
|
||||
icon: 'pi pi-fw pi-home',
|
||||
icon: 'pi pi-fw pi-user',
|
||||
routerLink: ['/partner/accounts'],
|
||||
},
|
||||
{
|
||||
label: 'مشتریها',
|
||||
icon: 'pi pi-fw pi-home',
|
||||
icon: 'pi pi-fw pi-users',
|
||||
routerLink: ['/partner/consumers'],
|
||||
},
|
||||
{
|
||||
label: 'لایسنسها',
|
||||
icon: 'pi pi-fw pi-home',
|
||||
icon: 'pi pi-fw pi-key',
|
||||
routerLink: ['/partner/licenses'],
|
||||
},
|
||||
],
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
<form [formGroup]="form" (submit)="submit()" class="flex flex-col gap-4">
|
||||
<field-name [control]="form.controls.name" />
|
||||
<field-economic-code [control]="form.controls.economic_code" />
|
||||
<field-fiscal-code [control]="form.controls.fiscal_id" />
|
||||
<field-fiscal-id [control]="form.controls.fiscal_id" />
|
||||
<field-invoice-number-sequence [control]="form.controls.invoice_number_sequence" />
|
||||
<field-partner-token [control]="form.controls.partner_token" />
|
||||
<field-guild-id [control]="form.controls.guild_id" />
|
||||
|
||||
|
||||
+5
@@ -7,6 +7,7 @@ import {
|
||||
NameComponent,
|
||||
PartnerTokenComponent,
|
||||
} from '@/shared/components';
|
||||
import { InvoiceNumberSequenceComponent } from '@/shared/components/fields/invoice_number_sequence.component';
|
||||
import { FormFooterActionsComponent } from '@/shared/components/formFooterActions/form-footer-actions.component';
|
||||
import { fieldControl } from '@/shared/constants/fields';
|
||||
import { Component, inject, Input } from '@angular/core';
|
||||
@@ -28,6 +29,7 @@ import { PartnerConsumerBusinessActivitiesService } from '../../services/busines
|
||||
LicenseStartsAtComponent,
|
||||
FormFooterActionsComponent,
|
||||
Divider,
|
||||
InvoiceNumberSequenceComponent,
|
||||
],
|
||||
})
|
||||
export class ConsumerBusinessActivitiesFormComponent extends AbstractForm<
|
||||
@@ -44,6 +46,9 @@ export class ConsumerBusinessActivitiesFormComponent extends AbstractForm<
|
||||
name: fieldControl.name(this.initialValues?.name || ''),
|
||||
economic_code: fieldControl.economic_code(this.initialValues?.economic_code || ''),
|
||||
fiscal_id: fieldControl.fiscal_id(this.initialValues?.fiscal_id || ''),
|
||||
invoice_number_sequence: fieldControl.invoice_number_sequence(
|
||||
parseInt(this.initialValues?.invoice_number_sequence || '1'),
|
||||
),
|
||||
partner_token: fieldControl.partner_token(this.initialValues?.partner_token || ''),
|
||||
guild_id: fieldControl.guild_id(this.initialValues?.guild?.id || ''),
|
||||
license_starts_at: [''],
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface IBusinessActivityRawResponse {
|
||||
fiscal_id: string;
|
||||
partner_token: string;
|
||||
guild: ISummary;
|
||||
invoice_number_sequence: string;
|
||||
created_at: string;
|
||||
license_info: LicenseInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user