From b0651d2ea6fb678cea8dc60410b6ff8c8d7e859c Mon Sep 17 00:00:00 2001 From: Frede Hundewadt <22748698+fhdk@users.noreply.github.com> Date: Sun, 19 Jun 2022 08:05:43 +0200 Subject: [PATCH] remove companyView --- Wonky.Client/Pages/CompanyEdit.razor.cs | 2 +- Wonky.Client/Pages/CompanyView.razor | 86 ------------------------ Wonky.Client/Pages/CompanyView.razor.cs | 71 ------------------- Wonky.Client/Pages/CompanyView.razor.css | 3 - 4 files changed, 1 insertion(+), 161 deletions(-) delete mode 100644 Wonky.Client/Pages/CompanyView.razor delete mode 100644 Wonky.Client/Pages/CompanyView.razor.cs delete mode 100644 Wonky.Client/Pages/CompanyView.razor.css diff --git a/Wonky.Client/Pages/CompanyEdit.razor.cs b/Wonky.Client/Pages/CompanyEdit.razor.cs index b49751d5..b847be56 100644 --- a/Wonky.Client/Pages/CompanyEdit.razor.cs +++ b/Wonky.Client/Pages/CompanyEdit.razor.cs @@ -35,7 +35,7 @@ namespace Wonky.Client.Pages; public partial class CompanyEdit : IDisposable { [Inject] public IToastService ToastService { get; set; } - [Inject] public ILogger Logger { get; set; } + [Inject] public ILogger Logger { get; set; } [Inject] public NavigationManager Navigation { get; set; } [Inject] public ICompanyHttpRepository CompanyRepo { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; } diff --git a/Wonky.Client/Pages/CompanyView.razor b/Wonky.Client/Pages/CompanyView.razor deleted file mode 100644 index 99ff5528..00000000 --- a/Wonky.Client/Pages/CompanyView.razor +++ /dev/null @@ -1,86 +0,0 @@ -@* -// 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] -// -*@ - -@page "/company/{companyId}" -@using Microsoft.AspNetCore.Authorization -@using Wonky.Client.Components; -@using Wonky.Client.Helpers -@attribute [Authorize(Roles = "Adviser")] - - -@if (_companyDto != null) -{ -
-
-
- tombstone - @_companyDto.Name -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Konto@_companyDto.AccountTelefon@_companyDto.Phone
Adresse1@_companyDto.Address1Adresse2@_companyDto.Address2
Postnummer@_companyDto.ZipCodeBynavn@_companyDto.City
CVR@_companyDto.VatNumberEmail@_companyDto.Email
Næste besøg@_companyDto.NextVisitSidste besøg@_companyDto.LastVisit
-
- -
-} -else -{ - -} \ No newline at end of file diff --git a/Wonky.Client/Pages/CompanyView.razor.cs b/Wonky.Client/Pages/CompanyView.razor.cs deleted file mode 100644 index ffccc18a..00000000 --- a/Wonky.Client/Pages/CompanyView.razor.cs +++ /dev/null @@ -1,71 +0,0 @@ -// 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; -using System.Threading.Tasks; -using Blazored.LocalStorage; -using Blazored.Toast.Services; -using Wonky.Client.HttpInterceptors; -using Wonky.Client.HttpRepository; -using Microsoft.AspNetCore.Components; -using Wonky.Client.Helpers; -using Wonky.Client.Services; -using Wonky.Entity.DTO; -using Wonky.Entity.Models; -using Wonky.Entity.Views; - -namespace Wonky.Client.Pages; - -public partial class CompanyView : IDisposable -{ - [Inject] public ILogger Logger { get; set; } - [Inject] public IToastService ToastService { get; set; } - [Inject] public NavigationManager NavManager { get; set; } - [Inject] public ICompanyHttpRepository CompanyRepo { get; set; } - [Inject] public HttpInterceptorService Interceptor { get; set; } - [Inject] public VatInfoLookupService VatInfoLookup { get; set; } - [Inject] public ILocalStorageService Storage { get; set; } - [Parameter] public string CompanyId { get; set; } = ""; - private CompanyDto _companyDto = new (); - private string _vatState = "the-dead"; - private bool _vatInvalid = true; - - protected override async Task OnParametersSetAsync() - { - _companyDto = await CompanyRepo.GetCompanyById(CompanyId); - } - - protected override async Task OnInitializedAsync() - { - Interceptor.RegisterEvent(); - Interceptor.RegisterBeforeSendEvent(); - var xu = await Storage.GetItemAsync("_xu"); - - _companyDto.CountryCode = xu.CountryCode; - if (_companyDto.HasFolded == 0) - { - _vatInvalid = !VatUtils.ValidateFormat(_companyDto.CountryCode, _companyDto.VatNumber); - _vatState = !_vatInvalid ? "the-draw" : "the-good"; - } - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - Interceptor.DisposeEvent(); - } -} \ No newline at end of file diff --git a/Wonky.Client/Pages/CompanyView.razor.css b/Wonky.Client/Pages/CompanyView.razor.css deleted file mode 100644 index 9fa29d4f..00000000 --- a/Wonky.Client/Pages/CompanyView.razor.css +++ /dev/null @@ -1,3 +0,0 @@ -th { - width: 200px; -} \ No newline at end of file