@using Indotalent.Features.Setting.Company @using Indotalent.Features.Setting.Company.Cqrs @using Indotalent.Features.Setting.Currency @using Indotalent.Features.Setting.Currency.Cqrs @using Indotalent.Shared.Utils @using MudBlazor @inject CompanyService CompanyService @inject CurrencyService CurrencyService @inject ISnackbar Snackbar Add New Company Configure organization identity and legal details. Company Profile Basic identity and branding of your organization. Company Name Default Currency @foreach (var curr in _currencies) { @curr.Code (@curr.Symbol) } Company Description Set as Default Company Tax ID (NPWP) Business License (NIB) Head Office Address Main office location and contact details. Street Address City State/Province ZIP Code Phone Email Social Media Presence External links for recruitment branding. LinkedIn X (Twitter) Facebook Instagram TikTok Other Information Additional company metadata. Other Information 1 Other Information 2 Other Information 3 Cancel @if (_processing) { Processing... } else { Create Company } @code { [Parameter] public EventCallback OnCancel { get; set; } [Parameter] public EventCallback OnSuccess { get; set; } private MudForm _form = default!; private CreateCompanyValidator _validator = new(); private CreateCompanyRequest _model = new(); private List _currencies = new(); private bool _processing = false; protected override async Task OnInitializedAsync() { var response = await CurrencyService.GetCurrencyListAsync(); if (response != null && response.IsSuccess) { _currencies = response.Value ?? new(); } } private async Task Submit() { await _form.Validate(); if (!_form.IsValid) return; _processing = true; try { var response = await CompanyService.CreateCompanyAsync(_model); await Task.Delay(500); if (response != null && response.IsSuccess) { Snackbar.Add("Company created successfully", Severity.Success); await OnSuccess.InvokeAsync(); } } finally { _processing = false; } } }