40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using CommunityToolkit.Mvvm.DependencyInjection;
|
|
using FastBill.Services;
|
|
using FastBill.ViewModels;
|
|
using FastBill.Views;
|
|
using PSCHelpdesk.Shared.Plugin;
|
|
using PSCHelpdesk.Shared.Service;
|
|
using PSCHelpdesk.Shared.Setting;
|
|
|
|
namespace FastBill;
|
|
|
|
public class FastBill: Contract
|
|
{
|
|
public string GetName()
|
|
{
|
|
return "FastBill";
|
|
}
|
|
|
|
public void Configure()
|
|
{
|
|
var menuService = Ioc.Default.GetRequiredService<IMenuService>();
|
|
var fastBillTab = new PSCHelpdesk.Shared.Menu.Item()
|
|
{
|
|
Header = "Customers",
|
|
CommandParameter = new CustomerViewModel(new CustomerService())
|
|
};
|
|
menuService.AddMenuItem(fastBillTab);
|
|
var settingsService = Ioc.Default.GetRequiredService<ISettingsService>();
|
|
var fastbillSettings = new Item()
|
|
{
|
|
Header = "Fastbill",
|
|
CommandParameter = new SettingsViewModel()
|
|
};
|
|
settingsService.AddSetting(fastbillSettings);
|
|
}
|
|
|
|
public List<Type> LoadViews()
|
|
{
|
|
return [typeof(SettingsView), typeof(CustomerView)];
|
|
}
|
|
} |