68 lines
3.0 KiB
Plaintext
68 lines
3.0 KiB
Plaintext
@using TaxBaik.Application.DTOs
|
|
@using TaxBaik.Application.Services
|
|
@using Microsoft.FluentUI.AspNetCore.Components
|
|
|
|
<form class="admin-form" @onsubmit="HandleSubmit" @onsubmit:preventDefault>
|
|
<FluentTextInput Label="이름" @bind-CurrentValue="model.Name" />
|
|
<FluentTextInput Label="전화번호 (예: 010-1234-5678)" @bind-CurrentValue="model.Phone" />
|
|
<FluentTextInput Label="이메일" @bind-CurrentValue="model.Email" />
|
|
<FluentSelect TValue="string" TOption="string" Label="문의 유형" @bind-CurrentValue="model.ServiceType">
|
|
<FluentOption Value="@("사업자세무")">사업자세무</FluentOption>
|
|
<FluentOption Value="@("부동산세금")">부동산세금</FluentOption>
|
|
<FluentOption Value="@("가족자산")">가족자산</FluentOption>
|
|
<FluentOption Value="@("기타")">기타</FluentOption>
|
|
</FluentSelect>
|
|
<FluentTextArea Label="문의 내용" @bind-CurrentValue="model.Message" />
|
|
<FluentSelect TValue="string" TOption="string" Label="상태" @bind-CurrentValue="model.Status">
|
|
<FluentOption Value="@("new")">신규</FluentOption>
|
|
<FluentOption Value="@("consulting")">상담중</FluentOption>
|
|
<FluentOption Value="@("contracted")">계약완료</FluentOption>
|
|
<FluentOption Value="@("rejected")">거절</FluentOption>
|
|
<FluentOption Value="@("closed")">종결</FluentOption>
|
|
</FluentSelect>
|
|
<FluentTextArea Label="관리 메모" @bind-CurrentValue="model.AdminMemo" />
|
|
|
|
<div class="admin-form-actions">
|
|
<button type="submit" class="admin-login-submit">@ButtonText</button>
|
|
<button type="button" class="admin-secondary-button" @onclick="OnCancel">취소</button>
|
|
</div>
|
|
</form>
|
|
|
|
@code {
|
|
[Parameter, EditorRequired] public string ButtonText { get; set; } = "저장";
|
|
[Parameter] public EventCallback<InquiryFormModel> OnSubmit { get; set; }
|
|
[Parameter] public EventCallback OnCancel { get; set; }
|
|
[Parameter] public InquiryFormModel? InitialData { get; set; }
|
|
private InquiryFormModel model = new();
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
if (InitialData != null)
|
|
{
|
|
model = new InquiryFormModel
|
|
{
|
|
Name = InitialData.Name,
|
|
Phone = InitialData.Phone,
|
|
Email = InitialData.Email,
|
|
ServiceType = InitialData.ServiceType,
|
|
Message = InitialData.Message,
|
|
Status = InitialData.Status,
|
|
AdminMemo = InitialData.AdminMemo
|
|
};
|
|
}
|
|
}
|
|
|
|
private Task HandleSubmit() => OnSubmit.InvokeAsync(model);
|
|
|
|
public class InquiryFormModel
|
|
{
|
|
public string Name { get; set; } = "";
|
|
public string Phone { get; set; } = "";
|
|
public string? Email { get; set; }
|
|
public string ServiceType { get; set; } = "기타";
|
|
public string Message { get; set; } = "";
|
|
public string Status { get; set; } = "new";
|
|
public string? AdminMemo { get; set; }
|
|
}
|
|
}
|