initial commit

This commit is contained in:
2026-07-21 14:28:43 +07:00
commit 01107db6fd
995 changed files with 75124 additions and 0 deletions
@@ -0,0 +1,28 @@
@page "/thirdparty/vendor-group"
@using Indotalent.Features.Thirdparty.VendorGroup
@using Indotalent.Features.Thirdparty.VendorGroup.Cqrs
@using Indotalent.Features.Thirdparty.VendorGroup.Components
@using MudBlazor
@if (_currentView == ViewMode.Create)
{
<_VendorGroupCreateForm OnCancel="BackToTable" OnSuccess="HandleSuccess" />
}
else if (_currentView == ViewMode.Update || _currentView == ViewMode.View)
{
<_VendorGroupUpdateForm Data="_selectedData!" ReadOnly="@(_currentView == ViewMode.View)" OnCancel="BackToTable" OnSuccess="HandleSuccess" />
}
else
{
<_VendorGroupDataTable OnAdd="() => ShowCreate()" OnEdit="(item) => ShowUpdate(item, false)" OnView="(item) => ShowUpdate(item, true)" />
}
@code {
private enum ViewMode { Table, Create, Update, View }
private ViewMode _currentView = ViewMode.Table;
private UpdateVendorGroupRequest? _selectedData;
private void ShowCreate() => _currentView = ViewMode.Create;
private void ShowUpdate(UpdateVendorGroupRequest data, bool isReadOnly) { _selectedData = data; _currentView = isReadOnly ? ViewMode.View : ViewMode.Update; }
private void BackToTable() { _currentView = ViewMode.Table; _selectedData = null; }
private void HandleSuccess() { _currentView = ViewMode.Table; _selectedData = null; }
}