feat: add eTrade fields to company entity and onboarding process

- Added new fields to the Company entity: licenceNumber, statusDescription, dateRegistered, renewedFrom, renewalDate, renewedTo, region, zone, woreda, kebele, houseNo, and etradePhone.
- Updated onboarding wizard to include a new contact step and fetch company information from eTrade using TIN.
- Created ETradeInfo component to handle fetching and displaying eTrade data.
- Implemented ETradeService to interact with eTrade API and extract relevant company registration data.
- Added new DTOs for fetching eTrade data and handling responses.
- Updated CompanyProfileForm to integrate new fields and handle eTrade data.
- Created hooks for managing eTrade data fetching and error handling.
This commit is contained in:
Marshal
2026-06-20 10:27:41 +00:00
parent 4a0085ef57
commit 1f92a04ecf
19 changed files with 1088 additions and 75 deletions

View File

@@ -0,0 +1,79 @@
export interface ETradeAddressInfo {
Region: string;
Zone: string;
Woreda: string;
Kebele: string;
HouseNo: string;
MobilePhone: string;
RegularPhone: string;
}
export interface ETradeAssociateInfo {
Position: string | null;
ManagerName: string;
ManagerNameEng: string;
Photo: string | null;
MobilePhone: string | null;
RegularPhone: string | null;
}
export interface ETradeBusinessInfo {
MainGuid: string;
OwnerTIN: string;
DateRegistered: string;
TradeName: string;
LicenceNumber: string;
Status: number;
StatusDescription: string;
Capital: number;
AssociateShortInfos: ETradeAssociateInfo[];
AddressInfo: ETradeAddressInfo;
RenewedTo: string;
RenewedToDateString: string;
RenewalDate: string;
RenewedFrom: string;
CancellationDate: string | null;
}
export interface ETradeCompanyInfo {
Tin: string;
LegalCondtion: string;
RegNo: string;
RegDate: string;
BusinessName: string;
BusinessNameAmh: string;
PaidUpCapital: number;
AssociateShortInfos: ETradeAssociateInfo[];
Businesses: Array<{
MainGuid: string;
OwnerTIN: string;
DateRegistered: string;
TradeNameAmh: string;
TradesName: string;
LicenceNumber: string;
RenewalDate: string;
RenewedFrom: string;
RenewedTo: string;
BusinessLicensingGroupMain: string | null;
SubGroups: string | null;
}>;
}
export interface CompanyRegistrationData {
licenceNumber: string;
statusDescription: string;
dateRegistered: string;
renewedFrom: string;
renewalDate: string;
renewedTo: string;
region: string;
zone: string;
woreda: string;
kebele: string;
houseNo: string;
mobilePhone: string;
regularPhone: string;
managerName: string;
managerEmail?: string;
managerPhone: string;
}

View File

@@ -3,6 +3,7 @@ import type { BaseEntity } from "../common";
export * from "./dropdown_settings";
export * from "./file_upload_settings";
export * from "./overview";
export * from "./etrade";
export enum TradeDirection {
IMPORT = "IMPORT",