WIP: system user management

This commit is contained in:
Frede Hundewadt 2023-03-02 10:24:59 +01:00
parent 5b42d8c995
commit 3d4f463927
20 changed files with 442 additions and 66 deletions

View file

@ -22,7 +22,7 @@
{
<div class="list-group-item list-group-item-action" style="cursor: pointer;">
<div class="row align-items-center">
<div class="col-sm-1">@user.SalesRep</div>
<div class="col-sm-1">@user.CountryCode @user.SalesRep</div>
<div class="col-sm-3">@user.FullName</div>
<div class="col-sm-2">@user.PhoneNumber</div>
<div class="col-sm-2">
@ -31,13 +31,6 @@
<div class="col-sm-2">
<a class="btn btn-success d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/customers">Kunder</a>
</div>
<div class="col-sm-2">
<AuthorizeView Roles="Admin,Office">
<Authorized>
<a class="btn btn-info d-block" href="/office/users/advisors/@user.CountryCode.ToLower()/@user.UserId/view">Rediger</a>
</Authorized>
</AuthorizeView>
</div>
</div>
</div>
}

View file

@ -27,7 +27,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
public partial class ReportPrintOrderPage
public partial class CommonReportPrintOrderPage
{
[Parameter] public string CountryCode { get; set; } = "";
[Parameter] public string UserId { get; set; } = "";
@ -36,7 +36,7 @@ public partial class ReportPrintOrderPage
[Inject] public NavigationManager Navigator { get; set; }
[Inject] public IOrderProcessRepository ProcessRepo { get; set; }
[Inject] public IJSRuntime JsRuntime { get; set; }
[Inject] public ILogger<ReportPrintOrderPage> Logger { get; set; }
[Inject] public ILogger<CommonReportPrintOrderPage> Logger { get; set; }
[Inject] public IToastService Toaster { get; set; }
private ReportView Report { get; set; } = new();
private List<ReportItemView> Items { get; set; } = new();

View file

@ -23,7 +23,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages;
public partial class ReportPrintSummaryPage
public partial class CommonReportPrintSummaryPage
{
[Parameter] public string CountryCode { get; set; } = "";
[Parameter] public string UserId { get; set; } = "";
@ -31,7 +31,7 @@ public partial class ReportPrintSummaryPage
[Inject] public ILocalStorageService Storage { get; set; }
[Inject] public NavigationManager Navigator { get; set; }
[Inject] public IJSRuntime JsRuntime { get; set; }
[Inject] public ILogger<ReportPrintSummaryPage> Logger { get; set; }
[Inject] public ILogger<CommonReportPrintSummaryPage> Logger { get; set; }
private ReportView Report { get; set; } = new();
private IJSObjectReference JsModule { get; set; }
private string ReturnUrl { get; set; } = "";

View file

@ -0,0 +1,148 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
@using Microsoft.AspNetCore.Authorization
@using Wonky.Client.Components
@attribute [Authorize(Roles = "Admin")]
@page "/office/users/advisors/{CountryCode}/{UserId}/view"
<div class="card">
<div class="card-header bg-dark text-white">
<h3>Bruger info</h3>
</div>
<div class="card-body">
@if (!string.IsNullOrWhiteSpace(UserInfo.UserId))
{
<EditForm EditContext="UserEditContext" OnValidSubmit="UpdateAdvisor">
<DataAnnotationsValidator/>
<div class="row">
<div class="col">
<table class="table">
<tbody>
<tr class="align-middle">
<th scope="col">
Fornavn
</th>
<td>
<InputText id="firstName" class="form-control" @bind-Value="UserInfo.FirstName" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.FirstName)"></ValidationMessage>
</td>
<th scope="col">
Efternavn
</th>
<td>
<InputText id="lastName" class="form-control" @bind-Value="UserInfo.LastName" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.LastName)"></ValidationMessage>
</td>
</tr>
<tr class="align-middle">
<th scope="col">
Email
</th>
<td>
<InputText id="email" class="form-control" @bind-Value="UserInfo.Email" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.Email)"></ValidationMessage>
</td>
<th scope="col">
Mobilnummer
</th>
<td>
<InputText id="phoneNumber" class="form-control" @bind-Value="UserInfo.PhoneNumber" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.PhoneNumber)"></ValidationMessage>
</td>
</tr>
<tr class="align-middle">
<th scope="col">
Sælgernr.
</th>
<td>
<InputText id="salesRep" class="form-control" @bind-Value="UserInfo.SalesRep" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.SalesRep)"></ValidationMessage>
</td>
<th scope="col">
Landekode
</th>
<td>
<InputText id="countryCode" class="form-control" @bind-Value="UserInfo.CountryCode" readonly="@ReadOnly" />
<ValidationMessage For="@(() => UserInfo.CountryCode)"></ValidationMessage>
</td>
</tr>
<tr class="align-middle">
<th scope="col">
Spærret
</th>
<td colspan="3">
<InputCheckbox id="lockoutEnabled" class="form-check" @bind-Value="UserInfo.LockoutEnabled"/>
<ValidationMessage For="@(() => UserInfo.LockoutEnabled)"></ValidationMessage>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col">
<button type="button" class="btn btn-danger" @onclick="() => ReadOnly = !ReadOnly">Rediger</button>
</div>
<div class="col">
<button type="submit" class="btn btn-primary">Gem</button>
</div>
<div class="col">
<a class="btn btn-primary" href="/office/users/advisors/@CountryCode">Tilbage</a>
</div>
<div class="col">
<a class="btn btn-primary" href="/office/users/advisors/@CountryCode/@UserId/reports">Salg</a>
</div>
</div>
</EditForm>
<EditForm EditContext="PasswdContext" class="mt-5" >
<DataAnnotationsValidator />
<h3>NULSTIL ADGANGSKODE</h3>
<div class="alert-info">
<h4>Password politik</h4>
<p>Mindst 10 tegn bestående af store og små bogstaver samt tal.</p>
<p>Du kan teste pasword og danne stærke password på <a href="https://pw.nix.dk">pw.nix.dk</a></p>
</div>
<div class="row mb-3">
<label for="newPasswd" class="col-md-2 col-form-label">Ny</label>
<div class="col-md-10">
<InputText id="newPasswd" class="form-control" @bind-Value="@Passwords.NewPassword"/>
<ValidationMessage For="@(() => Passwords.NewPassword)"></ValidationMessage>
</div>
</div>
<div class="row mb-3">
<label for="verifyPasswd" class="col-md-2 col-form-label">Bekræft</label>
<div class="col-md-10">
<InputText id="verifyPasswd" class="form-control" @bind-Value="@Passwords.ConfirmPassword"/>
<ValidationMessage For="@(() => Passwords.ConfirmPassword)"></ValidationMessage>
</div>
</div>
<div class="row">
<div class="col align-content-end">
<button class="btn btn-warning" @onclick="SetPassword" disabled="@PwInvalid">NULSTIL</button>
</div>
</div>
</EditForm>
}
</div>
</div>
@if (Working)
{
<WorkingThreeDots/>
}

View file

@ -0,0 +1,116 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.Text.Json;
using Blazored.Toast.Services;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Wonky.Client.Helpers;
using Wonky.Client.HttpInterceptors;
using Wonky.Client.HttpRepository;
using Wonky.Entity.DTO;
using Wonky.Entity.Views;
#pragma warning disable CS8618
namespace Wonky.Client.Pages;
public partial class OfficeUserAdvisorViewEditPage : IDisposable
{
[Parameter] public string UserId { get; set; } = "";
[Parameter] public string CountryCode { get; set; } = "";
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ISystemUserRepository UserRepo { get; set; }
[Inject] public ILogger<OfficeUserAdvisorViewEditPage> Logger { get; set; }
[Inject] public IToastService Toaster { get; set; }
private UserManagerEditView UserInfo { get; set; } = new();
private EditContext UserEditContext { get; set; }
private ResetPasswordDto Passwords { get; set; } = new();
private EditContext PasswdContext { get; set; }
private bool PwInvalid { get; set; } = true;
private bool Working { get; set; } = true;
private bool ReadOnly { get; set; } = true;
private const int MinPwLength = 10;
private readonly JsonSerializerOptions _options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
};
protected override async Task OnParametersSetAsync()
{
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
UserInfo = await UserRepo.GetUserInfo(UserId);
UserEditContext = new EditContext(UserInfo);
PasswdContext = new EditContext(Passwords);
PasswdContext.OnFieldChanged += PwHandleFieldChanged;
PasswdContext.OnValidationStateChanged += PwValidationChanged;
Working = false;
}
private async Task UpdateAdvisor()
{
ReadOnly = true;
Working = true;
Toaster.ShowInfo("Sender data til server ...");
await UserRepo.UpdateUserInfo(UserId, UserInfo);
Working = false;
Toaster.ShowInfo("Sælger er opdateret ...");
// _navigator.NavigateTo($"/office/users/advisors/{CountryCode}/{UserId}");
}
private void PwHandleFieldChanged(object sender, FieldChangedEventArgs e)
{
PwInvalid = !PasswdContext.Validate();
StateHasChanged();
}
private void PwValidationChanged(object sender, ValidationStateChangedEventArgs e)
{
PwInvalid = true;
if (!Utils.IsValidPasswd(Passwords.NewPassword, MinPwLength))
return;
PasswdContext.OnFieldChanged -= PwHandleFieldChanged;
PasswdContext.OnValidationStateChanged -= PwValidationChanged;
PasswdContext = new EditContext(Passwords);
PasswdContext.OnFieldChanged += PwHandleFieldChanged;
PasswdContext.OnValidationStateChanged += PwValidationChanged;
}
private async Task SetPassword()
{
if (Working)
return;
Working = true;
Toaster.ShowInfo("Nulstiller adgangskode.");
await UserRepo.ResetUserPassword(UserId, Passwords.NewPassword, Passwords.ConfirmPassword);
Passwords.NewPassword = "";
Passwords.ConfirmPassword = "";
Working = false;
Toaster.ShowInfo("Adgangskode er nulstillet.");
// _navigator.NavigateTo($"/office/users/advisors/{CountryCode}/{UserId}");
}
public void Dispose()
{
Interceptor.DisposeEvent();
PasswdContext.OnFieldChanged -= PwHandleFieldChanged;
PasswdContext.OnValidationStateChanged -= PwValidationChanged;
}
}

View file

@ -0,0 +1,6 @@
@page "/system/krv/products"
<h3>SystemKrvProductsAdminPage</h3>
@code {
}

View file

@ -0,0 +1,6 @@
@page "/system/krv/protections"
<h3>SystemKrvProtectionsAdminPage</h3>
@code {
}

View file

@ -0,0 +1,6 @@
@page "/system/krv/texts"
<h3>SystemKrvTextsAdminPage</h3>
@code {
}

View file

@ -0,0 +1,29 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Admin")]
@page "/system"
<PageTitle>System Mmanager</PageTitle>
<div class="list-group">
<a class="list-group-item list-group-item-action" href="/system/users">Bruger Admin</a>
<a class="list-group-item list-group-item-action" href="/system/supervisors">Supervisor Admin</a>
<a class="list-group-item list-group-item-action" href="/system/krv/products">Kemi Produkt Admin</a>
<a class="list-group-item list-group-item-action" href="/system/krv/protections">Kemi Værnemiddel Admin</a>
<a class="list-group-item list-group-item-action" href="/system/krv/texts">Kemi Tekster Admin</a>
</div>

View file

@ -1,3 +1,4 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
@ -14,11 +15,10 @@
//
using Microsoft.AspNetCore.Components;
using Wonky.Entity.DTO;
namespace Wonky.Client.Components;
namespace Wonky.Client.Pages;
public partial class OfficeCountryUserListComponent
public partial class SystemManagerLandingPage
{
[Parameter] public List<UserManagerListView> UserList { get; set; } = new();
[Parameter] public string CountryCode { get; set; } = "";
}

View file

@ -0,0 +1,28 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Admin")]
@page "/system/supervisors"
<PageTitle>SupervisorUserListPage</PageTitle>
<h3>Supervisor User List Page</h3>
@code {
}

View file

@ -15,41 +15,51 @@
//
*@
@if (UserList.Any())
{
<div class="list-group list-group-flush">
<div class="list-group-item">
<div class="row">
<div class="col fw-bold">
Navn
</div>
<div class="col fw-bold">
Telefon
</div>
<div class="col fw-bold">
Email
</div>
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Admin")]
@page "/system/users"
<PageTitle>Admin User List Page</PageTitle>
<h3>Admin User List Page</h3>
<div class="list-group">
<div class="list-group-item">
<div class="row">
<div class="col-sm-1">
</div>
</div>
@foreach (var user in UserList)
<div class="col-sm-5">
<div class="h4">Navn</div>
</div>
<div class="col-sm-4">
<div class="h4">Email</div>
</div>
<div class="col-sm-2">
<div class="h4">Telefon</div>
</div>
</div>
</div>
@if (UserList.Any())
{
foreach (var user in UserList)
{
<a class="list-group-item list-group-item-action" href="/office/users/office/@user.CountryCode.ToLower()/@user.UserId/view">
<a class="list-group-item list-group-item-action" href="/system/users/@user.UserId">
<div class="row">
<div class="col">
<div class="col-sm-1">
@user.CountryCode @user.SalesRep
</div>
<div class="col-sm-5">
@user.FullName
</div>
<div class="col">
@user.PhoneNumber
</div>
<div class="col">
<div class="col-sm-4">
@user.Email
</div>
<div class="col-sm-2">
@user.PhoneNumber
</div>
</div>
</a>
}
</div>
}
else
{
<div>Ingen data</div>
}
}
</div>

View file

@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Components;
using Wonky.Client.HttpInterceptors;
using Wonky.Client.HttpRepository;
using Wonky.Entity.DTO;
namespace Wonky.Client.Pages;
public partial class SystemUserListPage : IDisposable
{
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ISystemUserRepository UserRepo { get; set; }
private List<UserManagerListView> UserList { get; set; } = new();
protected override async Task OnInitializedAsync()
{
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
UserList = await UserRepo.GetUsers();
}
public void Dispose()
{
Interceptor.DisposeEvent();
}
}

View file

@ -18,7 +18,7 @@
@using Microsoft.AspNetCore.Authorization
@using Wonky.Client.Components
@attribute [Authorize(Roles = "Admin")]
@page "/office/users/advisors/{CountryCode}/{UserId}/view"
@page "/system/users/{UserId}"
<div class="card">
<div class="card-header bg-dark text-white">
@ -27,7 +27,7 @@
<div class="card-body">
@if (!string.IsNullOrWhiteSpace(UserInfo.UserId))
{
<EditForm EditContext="UserEditContext" OnValidSubmit="UpdateAdvisor">
<EditForm EditContext="UserEditContext" OnValidSubmit="UpdateUser">
<DataAnnotationsValidator/>
<div class="row">
<div class="col">
@ -102,10 +102,7 @@
<button type="submit" class="btn btn-primary">Gem</button>
</div>
<div class="col">
<a class="btn btn-primary" href="/office/users/advisors/@CountryCode">Tilbage</a>
</div>
<div class="col">
<a class="btn btn-primary" href="/office/users/advisors/@CountryCode/@UserId/reports">Salg</a>
<a class="btn btn-primary" href="/system/users">Tilbage</a>
</div>
</div>
</EditForm>

View file

@ -22,7 +22,7 @@ using Wonky.Client.Helpers;
using Wonky.Client.HttpInterceptors;
using Wonky.Client.HttpRepository;
using Wonky.Entity.DTO;
using Wonky.Entity.Views;
#pragma warning disable CS8618
namespace Wonky.Client.Pages;
@ -33,8 +33,7 @@ public partial class SystemUserViewEditPage : IDisposable
[Parameter] public string CountryCode { get; set; } = "";
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public ISystemUserRepository UserRepo { get; set; }
// [Inject] public ILogger<SystemUserViewEditPage> Logger { get; set; }
// [Inject] public NavigationManager Navigator { get; set; }
[Inject] public ILogger<SystemUserViewEditPage> Logger { get; set; }
[Inject] public IToastService Toaster { get; set; }
private UserManagerEditView UserInfo { get; set; } = new();
private EditContext UserEditContext { get; set; }
@ -43,7 +42,6 @@ public partial class SystemUserViewEditPage : IDisposable
private bool PwInvalid { get; set; } = true;
private bool Working { get; set; } = true;
private bool ReadOnly { get; set; } = true;
private const int MinPwLength = 10;
private readonly JsonSerializerOptions _options = new JsonSerializerOptions
{
@ -54,25 +52,25 @@ public partial class SystemUserViewEditPage : IDisposable
{
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
UserInfo = await UserRepo.GetUserInfo(UserId);
UserEditContext = new EditContext(UserInfo);
PasswdContext = new EditContext(Passwords);
PasswdContext.OnFieldChanged += PwHandleFieldChanged;
PasswdContext.OnFieldChanged += PwHandleFieldChanged!;
PasswdContext.OnValidationStateChanged += PwValidationChanged;
Working = false;
}
private async Task UpdateAdvisor()
private async Task UpdateUser()
{
ReadOnly = true;
Working = true;
Toaster.ShowInfo("Sender data til server ...");
await UserRepo.UpdateUserInfo(UserId, UserInfo);
Working = false;
Toaster.ShowInfo("Sælger er opdateret ...");
// _navigator.NavigateTo($"/office/users/advisors/{CountryCode}/{UserId}");
Toaster.ShowInfo("Bruger er opdateret ...");
}
private void PwHandleFieldChanged(object sender, FieldChangedEventArgs e)
@ -80,18 +78,18 @@ public partial class SystemUserViewEditPage : IDisposable
PwInvalid = !PasswdContext.Validate();
StateHasChanged();
}
private void PwValidationChanged(object sender, ValidationStateChangedEventArgs e)
private void PwValidationChanged(object? sender, ValidationStateChangedEventArgs e)
{
PwInvalid = true;
if (!Utils.IsValidPasswd(Passwords.NewPassword, MinPwLength))
if (!Utils.IsValidPasswd(Passwords.NewPassword))
return;
PasswdContext.OnFieldChanged -= PwHandleFieldChanged;
PasswdContext.OnFieldChanged -= PwHandleFieldChanged!;
PasswdContext.OnValidationStateChanged -= PwValidationChanged;
PasswdContext = new EditContext(Passwords);
PasswdContext.OnFieldChanged += PwHandleFieldChanged;
PasswdContext.OnFieldChanged += PwHandleFieldChanged!;
PasswdContext.OnValidationStateChanged += PwValidationChanged;
}
@ -106,12 +104,11 @@ public partial class SystemUserViewEditPage : IDisposable
Passwords.ConfirmPassword = "";
Working = false;
Toaster.ShowInfo("Adgangskode er nulstillet.");
// _navigator.NavigateTo($"/office/users/advisors/{CountryCode}/{UserId}");
}
public void Dispose()
{
Interceptor.DisposeEvent();
PasswdContext.OnFieldChanged -= PwHandleFieldChanged;
PasswdContext.OnFieldChanged -= PwHandleFieldChanged!;
PasswdContext.OnValidationStateChanged -= PwValidationChanged;
}
}

View file

@ -109,6 +109,14 @@
</div>
</Authorized>
</AuthorizeView>
<AuthorizeView Roles="Admin">
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/system">
<i class="bi-gear-wide-connected pe-2" style="font-size:1.3em;" aria-hidden="true"></i> System
</NavLink>
</div>
</AuthorizeView>
<AuthorizeView Roles="Admin,Advisor,Office,Supervisor,Warehouse">
<div class="nav-item px-3">
@ -116,6 +124,11 @@
<i class="bi-question pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Hjælp
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/logout">
<i class="bi-lock pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Log af
</NavLink>
</div>
</AuthorizeView>
</nav>
</div>

View file

@ -1,7 +1,7 @@
{
"appInfo": {
"name": "Wonky Online",
"version": "0.118.5",
"version": "0.119.0",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"
@ -19,7 +19,7 @@
}
},
"apiConfig": {
"baseUrl": "https://zeta.innotec.dk",
"baseUrl": "https://dev.innotec.dk",
"catalog": "api/v2/catalog/country",
"crmCustomers": "api/v2/crm/companies",
"crmInventoryExt": "history/inventory",