Files
2024-04-19 09:32:05 +02:00

151 lines
6.6 KiB
Plaintext

@page "/SuperAdmin"
@using WebDoorCreator.UI.Components
<div class="d-flex justify-content-around">
<div class="btn-group">
<button @onclick="() => SetMode(AdminMode.Company)" class="btn px-5 @cssMode(AdminMode.Company)">Company</button>
<AuthorizeView Roles="SuperAdmin">
<Authorized>
<button @onclick="() => SetMode(AdminMode.Interface)" class="btn px-5 @cssMode(AdminMode.Interface)">Interface</button>
</Authorized>
</AuthorizeView>
<button @onclick="() => SetMode(AdminMode.Component)" class="btn px-5 @cssMode(AdminMode.Component)">Components</button>
</div>
</div>
<div class="cardShadow mt-2 p-2">
@if (CurrMode == AdminMode.Company)
{
<div class="p-2">
<AuthorizeView Roles="SuperAdmin">
<Authorized>
<div class="mb-3 text-end">
<button type="button" class="btn btn-sm btn-success" @onclick="()=>clearFields()" data-bs-toggle="modal" data-bs-target="#newCompModal">
<i class="fa-solid fa-plus"></i> Add new company
</button>
</div>
</Authorized>
</AuthorizeView>
<CompanyList E_currCompany="catchCurrComp"></CompanyList>
</div>
}
else if (CurrMode == AdminMode.Interface)
{
<div class="p-2">
<VocRefresh lang="EN"></VocRefresh>
</div>
}
else if (CurrMode == AdminMode.Component)
{
@*<HwMan></HwMan>*@
<div class="p-2">
<CompoCompare updateRecordCount="UpdateTotCount" actFilter="@currFilter"></CompoCompare>
<div>
<EgwCoreLib.Razor.DataPager @ref="pagerCompoFiles" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" showLoading="@isLoading" />
</div>
</div>
}
</div>
@*
<div class="">
<div class="d-flex justify-content-between">
<div class="pb-0 d-flex justify-content-start">
<div class="fs-5 @selectedComp" @onclick="()=>doShowComp()">
Company management
</div>
<div class="fs-5 @selectedUser" @onclick="()=>doShowUser()">
Files management
</div>
</div>
@*<div>
<button class="btn btn-warning" @onclick="()=>refreshHw()">HARDWARE REFRESH</button>
@*<button class="btn btn-info" @onclick="()=>refreshVoc()">VOCABULARY REFRESH</button>
</div>
<!--NON USO TYPE FILE PERCHE' NON PRENDE IL PATH DEL FILE MA RESTITUISCE C:\\fakepath-->
<button class="btn btn-info" @onclick="()=>refreshFiles()">FILES REFRESH</button>
<input @bind-value="@defaultPath" />
</div>
<div class="listContainer">
<!-- Button trigger modal -->
<div class="d-flex justify-content-between mb-2">
@if (isCompShow)
{
<h5 class="">General Application company list</h5>
<button type="button" class="btn btn-sm btn-success" data-bs-toggle="modal" data-bs-target="#newCompModal">
<i class="fa-solid fa-plus"></i> Add new company
</button>
}
else
{
<h5 class="">General Application files management</h5>
}
</div>
@if (isCompShow)
{
<CompanyList E_currCompany="catchCurrComp"></CompanyList>
}
else
{
<VocRefresh lang="EN"></VocRefresh>
}
</div>
</div>*@
<!-- Modal Company -->
<div class="modal fade" id="newCompModal" tabindex="-1" aria-labelledby="newCompModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="newCompModalLabel">Insert new company</h1>
</div>
<div class="modal-body">
<div class="w-100">
<div class="form-floating">
<input id="companyExtCode" @bind-value="@companyExtCode" class="form-control w-100 w-100w-100 my-1" />
<label for="companyExtCode" class="form-label">Company external code</label>
</div>
<div class="form-floating">
<textarea id="companyName" @bind="@companyName" class="form-control w-100" rows="3"></textarea>
<label for="companyName" class="form-label">Company name</label>
</div>
<div class="form-floating">
<input id="address" @bind="@address" class="form-control w-100 my-1" />
<label for="address" class="form-label">Company address</label>
</div>
<div class="form-floating">
<input id="city" @bind="@city" class="form-control w-100 my-1" />
<label for="city" class="form-label">Company city location</label>
</div>
<div class="form-floating">
<textarea id="zipCode" @bind="zipCode" class="form-control w-100" rows="5"></textarea>
<label for="zipCode" class="form-label">City zip code</label>
</div>
<div class="form-floating">
<input id="state" @bind="@state" class="form-control w-100 my-1" />
<label for="state" class="form-label">State</label>
</div>
<div class="form-floating">
<input id="vat" @bind="@vat" class="form-control w-100 my-1" />
<label for="vat" class="form-label">Company VAT</label>
</div>
<div class="form-floating">
<input id="privateNote" @bind="@privateNote" class="form-control w-100 my-1" />
<label for="privateNote" class="form-label">Private notes</label>
</div>
<div class="form-floating">
<input id="companyToken" @bind="@companyToken" class="form-control w-100 my-1" />
<label for="companyToken" class="form-label">Company token</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" @onclick="()=>addModNewCompany()">Save changes</button>
</div>
</div>
</div>
</div>