revert: rollback Fluent UI and Blazor homepage to last successful state (3be3794)
This commit is contained in:
@@ -1,38 +1,61 @@
|
||||
@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" />
|
||||
<MudForm @ref="form">
|
||||
<MudTextField @bind-Value="model.Name" Label="이름"
|
||||
Variant="Variant.Outlined" Class="mb-4" Required="true" />
|
||||
|
||||
<div class="admin-form-actions">
|
||||
<button type="submit" class="admin-login-submit">@ButtonText</button>
|
||||
<button type="button" class="admin-secondary-button" @onclick="OnCancel">취소</button>
|
||||
<MudTextField @bind-Value="model.Phone" Label="전화번호 (예: 010-1234-5678)"
|
||||
Variant="Variant.Outlined" Class="mb-4" Required="true" />
|
||||
|
||||
<MudTextField @bind-Value="model.Email" Label="이메일"
|
||||
Variant="Variant.Outlined" Class="mb-4" InputType="InputType.Email" />
|
||||
|
||||
<MudSelect @bind-Value="model.ServiceType" Label="문의 유형"
|
||||
Variant="Variant.Outlined" Class="mb-4">
|
||||
<MudSelectItem Value="@("사업자세무")">사업자세무</MudSelectItem>
|
||||
<MudSelectItem Value="@("부동산세금")">부동산세금</MudSelectItem>
|
||||
<MudSelectItem Value="@("가족자산")">가족자산</MudSelectItem>
|
||||
<MudSelectItem Value="@("기타")">기타</MudSelectItem>
|
||||
</MudSelect>
|
||||
|
||||
<MudTextField @bind-Value="model.Message" Label="문의 내용"
|
||||
Variant="Variant.Outlined" Lines="5" Class="mb-4" Required="true" />
|
||||
|
||||
<MudSelect @bind-Value="model.Status" Label="상태"
|
||||
Variant="Variant.Outlined" Class="mb-4">
|
||||
<MudSelectItem Value="@("new")">신규</MudSelectItem>
|
||||
<MudSelectItem Value="@("consulting")">상담중</MudSelectItem>
|
||||
<MudSelectItem Value="@("contracted")">계약완료</MudSelectItem>
|
||||
<MudSelectItem Value="@("rejected")">거절</MudSelectItem>
|
||||
<MudSelectItem Value="@("closed")">종결</MudSelectItem>
|
||||
</MudSelect>
|
||||
|
||||
<MudTextField @bind-Value="model.AdminMemo" Label="관리 메모"
|
||||
Variant="Variant.Outlined" Lines="3" Class="mb-4" />
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" @onclick="HandleSubmit">
|
||||
@ButtonText
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" @onclick="OnCancel">취소</MudButton>
|
||||
</div>
|
||||
</form>
|
||||
</MudForm>
|
||||
|
||||
@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; }
|
||||
[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 MudForm? form;
|
||||
private InquiryFormModel model = new();
|
||||
|
||||
protected override void OnInitialized()
|
||||
@@ -52,7 +75,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
private Task HandleSubmit() => OnSubmit.InvokeAsync(model);
|
||||
private async Task HandleSubmit()
|
||||
{
|
||||
if (form == null)
|
||||
return;
|
||||
|
||||
await form.Validate();
|
||||
if (!form.IsValid)
|
||||
return;
|
||||
|
||||
await OnSubmit.InvokeAsync(model);
|
||||
}
|
||||
|
||||
public class InquiryFormModel
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user