@{ /****************************************************************************** // MARECHAI: Master repository of computing history artifacts information // ---------------------------------------------------------------------------- // // Author(s) : Natalia Portillo // // --[ License ] -------------------------------------------------------------- // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ---------------------------------------------------------------------------- // Copyright © 2003-2020 Natalia Portillo *******************************************************************************/ } @page "/admin/companies/details/{Id:int}" @page "/admin/companies/edit/{Id:int}" @page "/admin/companies/create" @using Marechai.Database.Models @using Marechai.Database @inherits OwningComponentBase @inject IStringLocalizer L @inject Iso31661NumericService CountriesService @inject NavigationManager NavigationManager @inject CompanyLogosService CompanyLogosService @inject IWebHostEnvironment Host @inject IFileReaderService FileReaderService; @inject IJSRuntime JSRuntime @inject UserManager UserManager @inject AuthenticationStateProvider AuthenticationStateProvider @attribute [Authorize(Roles = "UberAdmin, Admin")]

@L["Company details"]


@if(!_loaded) {

@L["Loading..."]

return; }
@L["Common name (as usually displayed publicly)"] @L["Please enter a valid name."] @if(_editing || _model.LegalName != null) { @L["Legal name (as shown in governmental registries including \"Inc.\", \"Corp.\", \"gmbH\", etc...)"] @if(_editing) { @L["Unknown (legal name)"] } @if(!_editing || !_unknownLegalName) { @L["Please enter a valid legal name."] } } @L["Status"] @if(_editing || _model.Founded != null) { @L["Founded"] @if(_editing) { @L["Unknown (foundation date)"] } @if(!_editing || !_unknownFounded) { @L["Unknown foundation month"] @L["Unknown foundation day"] @L["If the foundation day or month are selected as unknown, pick anyone in the field below, it will be ignored."] @L["Please enter a valid foundation date."] } } @if(_editing || _model.Website != null) { @L["Website"] @if(_editing) { @L["Unknown (website)"] } @if(!_editing || !_unknownWebsite) { @L["Please enter a valid website."] } } @if(_editing || _model.Twitter != null) { @L["Twitter"] @if(_editing) { @L["Unknown (twitter)"] } @if(!_editing || !_unknownTwitter) { @L["Please enter a valid Twitter handle."] } } @if(_editing || _model.Facebook != null) { @L["Facebook"] @if(_editing) { @L["Unknown (facebook)"] } @if(!_editing || !_unknownFacebook) { @L["Please enter a valid Facebook user name."] } } @if(_editing || _model.Address != null) { @L["Address"] @if(_editing) { @L["Unknown (address)"] } @if(!_editing || !_unknownAddress) { @L["Please enter a valid address."] } } @if(_editing || _model.City != null) { @L["City"] @if(_editing) { @L["Unknown (city)"] } @if(!_editing || !_unknownCity) { @L["Please enter a valid city."] } } @if(_editing || _model.Province != null) { @L["Province"] @if(_editing) { @L["Unknown (province)"] } @if(!_editing || !_unknownProvince) { @L["Please enter a valid province."] } } @if(_editing || _model.PostalCode != null) { @L["Postal code"] @if(_editing) { @L["Unknown (postal code)"] } @if(!_editing || !_unknownPostalCode) { @L["Please enter a valid postal code."] } } @if(_editing || _model.CountryId != null) { @L["Country"] @if(_editing) { @L["Unknown (country)"] } @if(!_editing || !_unknownCountry) { } } @if((int)_model.Status > 1) { @if(_editing || _model.Sold != null) { @L["Sold"] @if(_editing) { @L["Unknown (sold/merged/bankrupt date)"] } @if(!_editing || !_unknownSold) { @L["Unknown sold/merge/bankruptcy month"] @L["Unknown sold/merge/bankruptcy day"] @L["If the sold, merge or bankruptcy day or month are selected as unknown, pick anyone in the field below, it will be ignored."] @L["Please enter a valid sold/merge/bankruptcy date."] } } @if(_editing || _model.SoldToId != null) { @L["Sold to"] @if(_editing) { @L["Unknown (sold to)"] } @if(!_editing || !_unknownSoldTo) { } } }
@if(!_editing) { } else { } @L["Back to list"] @if(!_editing) { }
@if(_logos.Count > 0) {

@L["Logos"]

@foreach(var logo in _logos) { var logoFound = File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", logo.Guid + ".svg")); }
@L["Logo"] @L["Year logo came in use"]
@if(logoFound) { } else { @L["Cannot find logo file"] } @if(logo.Year.HasValue) { @logo.Year } else { @L["Unknown (logo year)"] } @if(logoFound) { }
} @L["Delete logo"] @if(_currentLogo?.Year != null) { @string.Format(L["Are you sure you want to delete the company logo introduced in {0}?"], _currentLogo?.Year) } else { @L["Are you sure you want to delete the company logo you selected?"] } @L["Change logo year"] @if(_currentLogo != null) {
@L["Year logo came in use"] @L["Unknown (logo year)"] @if(!_unknownLogoYear) { @L["Please enter a valid year."] } }
@if(_currentLogo != null) { }
@L["Upload new logo"] @if(!_uploaded) { @if(!_uploading) { @L["Choose SVG (version 1.1 or lower) logo file"]

} else { @L["Uploading..."]
@($"{_progressValue:F2}")%
} @if(_uploadError) { @_uploadErrorMessage } } else {
@L["SVG"] @L["PNG"] @L["WebP"]
@L["May not show properly"] @L["May not show properly"]
@L["Year logo came in use"] @L["Unknown (logo year)"] @if(!_unknownLogoYear) { @L["Please enter a valid year."] } }

@L["Company description"]


@if(_readonlyDescription && _description is null) { } @if(!_readonlyDescription || _description != null) { if(_readonlyDescription) { } else { } Markdown Preview @((MarkupString)_description.Html) }