Browse Source

Removed unused info.

feature/billing
Teknikode 7 months ago
parent
commit
e9f3dceeba
  1. 1
      Teknik/Areas/Contact/Controllers/ContactController.cs
  2. 1
      Teknik/Areas/Error/Controllers/ErrorController.cs
  3. 4
      Teknik/Areas/Help/Views/Help/Index.cshtml
  4. 20
      Teknik/Areas/Help/Views/Help/Irc.cshtml
  5. 16
      Teknik/Areas/Help/Views/Help/Mumble.cshtml
  6. 13
      Teknik/Areas/Stats/Models/Bill.cs
  7. 13
      Teknik/Areas/Stats/Models/Donation.cs
  8. 13
      Teknik/Areas/Stats/Models/OneTime.cs
  9. 22
      Teknik/Areas/Stats/Models/Transaction.cs
  10. 35
      Teknik/Areas/Stats/Views/Stats/Bills.cshtml
  11. 37
      Teknik/Areas/Stats/Views/Stats/Donations.cshtml
  12. 35
      Teknik/Areas/Stats/Views/Stats/OneTimes.cshtml
  13. 60
      Teknik/Areas/Stats/Views/Stats/Transactions.cshtml
  14. 5
      Teknik/Data/TeknikEntities.cs
  15. 3
      Teknik/Scripts/Error/Error.js
  16. 3
      Teknik/Views/Shared/_Navbar.cshtml

1
Teknik/Areas/Contact/Controllers/ContactController.cs

@ -61,7 +61,6 @@ namespace Teknik.Areas.Contact.Controllers @@ -61,7 +61,6 @@ namespace Teknik.Areas.Contact.Controllers
client.Port = _config.ContactConfig.EmailAccount.Port;
client.EnableSsl = _config.ContactConfig.EmailAccount.SSL;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
//client.UseDefaultCredentials = true;
client.Credentials = new System.Net.NetworkCredential(_config.ContactConfig.EmailAccount.Username, _config.ContactConfig.EmailAccount.Password);
client.Timeout = 5000;

1
Teknik/Areas/Error/Controllers/ErrorController.cs

@ -185,7 +185,6 @@ Stack Trace: @@ -185,7 +185,6 @@ Stack Trace:
client.Port = _config.ContactConfig.EmailAccount.Port;
client.EnableSsl = _config.ContactConfig.EmailAccount.SSL;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = true;
client.Credentials = new System.Net.NetworkCredential(_config.ContactConfig.EmailAccount.Username, _config.ContactConfig.EmailAccount.Password);
client.Timeout = 5000;

4
Teknik/Areas/Help/Views/Help/Index.cshtml

@ -27,14 +27,10 @@ @@ -27,14 +27,10 @@
<dd>Blogging platform available to the users and visible to the public.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.Git")">Git Repositories</a></dt>
<dd>Unlimited public and private Git repositories.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.IRC")">IRC Network</a></dt>
<dd>IRC network that uses the Teknik userbase for nickname authentication.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.Mail")">Mail Server</a></dt>
<dd>Mail service featuring IMAP and POP3 support with <b>1 GB</b> storage.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.Markdown")">Markdown</a></dt>
<dd>Markdown syntax used throughout the site.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.Mumble")">Mumble Chat Server</a></dt>
<dd>The public Mumble server and configuration settings needed.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.RSS")">RSS Feeds</a></dt>
<dd>Built-in RSS support for content updates.</dd>
<dt><a href="@Url.SubRouteUrl("help", "Help.Tools")">Tools</a></dt>

20
Teknik/Areas/Help/Views/Help/Irc.cshtml

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
<div class="container">
<ol class="breadcrumb">
<li><a href="@Url.SubRouteUrl("help", "Help.Index")">Help Index</a></li>
<li class="active"><a href="#">IRC Network</a></li>
</ol>
<div class="row">
<h2><b>IRC</b></h2>
<hr>
<h3>IRC Server Info</h3>
<p>
You can connect to the Teknik IRC using any RFC compliant client by connecting to <b>irc.@Config.Host</b> on port <b>6667</b>.
</p>
<h3>Channel Information</h3>
<p>
The main channel for Teknik support is located at #teknik.
</p>
</div>
</div>

16
Teknik/Areas/Help/Views/Help/Mumble.cshtml

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
<div class="container">
<ol class="breadcrumb">
<li><a href="@Url.SubRouteUrl("help", "Help.Index")">Help Index</a></li>
<li class="active"><a href="#">Mumble Chat Server</a></li>
</ol>
<div class="row">
<h2><b>Mumble</b></h2>
<hr>
<h3>Mumble Server Info</h3>
<p>
You can connect to the Mumble server by connecting to <b>mumble.@Config.Host</b> on port <b>64738</b>.
</p>
</div>
</div>

13
Teknik/Areas/Stats/Models/Bill.cs

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Teknik.Areas.Stats.Models
{
public class Bill : Transaction
{
public string Recipient { get; set; }
}
}

13
Teknik/Areas/Stats/Models/Donation.cs

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Teknik.Areas.Stats.Models
{
public class Donation : Transaction
{
public string Sender { get; set; }
}
}

13
Teknik/Areas/Stats/Models/OneTime.cs

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Teknik.Areas.Stats.Models
{
public class OneTime : Transaction
{
public string Recipient { get; set; }
}
}

22
Teknik/Areas/Stats/Models/Transaction.cs

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Teknik.Utilities;
namespace Teknik.Areas.Stats.Models
{
public class Transaction
{
public int TransactionId { get; set; }
public decimal Amount { get; set; }
public CurrencyType Currency { get; set; }
public string Reason { get; set; }
public DateTime DateSent { get; set; }
}
}

35
Teknik/Areas/Stats/Views/Stats/Bills.cshtml

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
@model List<Teknik.Areas.Stats.ViewModels.BillViewModel>
@using Teknik.Areas.Stats.ViewModels
@if (Model != null && Model.Any())
{
<div class="row">
<div class="col-sm-12">
<h3>Bills</h3>
<div class="row">
<div class="col-sm-12">
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#bills-section">View Bills</button>
</div>
</div>
<br />
<div id="bills-section" class="collapse in">
<table class="table table-condensed table-bordered table-hover">
<tr>
<th><strong>Date</strong></th>
<th><strong>Amount</strong></th>
<th><strong>Description</strong></th>
</tr>
@foreach (BillViewModel bill in Model)
{
<tr>
<td>@bill.DateSent.ToString("MMMM dd, yyyy")</td>
<td>@bill.Amount <var>@bill.Currency.ToString()</var></td>
<td>@bill.Reason</td>
</tr>
}
</table>
</div>
</div>
</div>
}

37
Teknik/Areas/Stats/Views/Stats/Donations.cshtml

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
@model List<Teknik.Areas.Stats.ViewModels.DonationViewModel>
@using Teknik.Areas.Stats.ViewModels
@if (Model != null && Model.Any())
{
<div class="row">
<div class="col-sm-12">
<h3>Donations</h3>
<div class="row">
<div class="col-sm-12">
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#donations-section">View Donations</button>
</div>
</div>
<br />
<div id="donations-section" class="collapse in">
<table class="table table-condensed table-bordered table-hover">
<tr>
<th><strong>Date</strong></th>
<th><strong>Amount</strong></th>
<th><strong>Donor</strong></th>
<th><strong>Reason for Donation</strong></th>
</tr>
@foreach (DonationViewModel donation in Model)
{
<tr>
<td>@donation.DateSent.ToString("MMMM dd, yyyy")</td>
<td>@donation.Amount <var>@donation.Currency.ToString()</var></td>
<td>@donation.Sender</td>
<td>@donation.Reason</td>
</tr>
}
</table>
</div>
</div>
</div>
}

35
Teknik/Areas/Stats/Views/Stats/OneTimes.cshtml

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
@model List<Teknik.Areas.Stats.ViewModels.OneTimeViewModel>
@using Teknik.Areas.Stats.ViewModels
@if (Model != null && Model.Any())
{
<div class="row">
<div class="col-sm-12">
<h3>One Time Payments</h3>
<div class="row">
<div class="col-sm-12">
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#oneTime-section">View Payments</button>
</div>
</div>
<br />
<div id="oneTime-section" class="collapse in">
<table class="table table-condensed table-bordered table-hover">
<tr>
<th><strong>Date</strong></th>
<th><strong>Amount</strong></th>
<th><strong>Reason for Payment</strong></th>
</tr>
@foreach (OneTimeViewModel oneTime in Model)
{
<tr>
<td>@oneTime.DateSent.ToString("MMMM dd, yyyy")</td>
<td>@oneTime.Amount <var>@oneTime.Currency.ToString()</var></td>
<td>@oneTime.Reason</td>
</tr>
}
</table>
</div>
</div>
</div>
}

60
Teknik/Areas/Stats/Views/Stats/Transactions.cshtml

@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
@model Teknik.Areas.Stats.ViewModels.TransactionsViewModel
@using Teknik.Areas.Stats.ViewModels
@{
decimal totalBills = Model.CurrentMonthBills;
decimal totalIncome = Model.CurrentMonthIncome;
int incomePercentage = 0;
if (totalIncome != 0 && totalBills != 0)
{
incomePercentage = (int)Math.Min(Math.Floor((totalIncome / totalBills) * 100), 100);
}
string processStyle = "progress-bar progress-bar-success";
if (incomePercentage < 100)
{
processStyle += " progress-bar-striped";
}
}
<div class="row">
<div class="col-sm-12">
<h2 class="text-center"><b>Transactions</b></h2>
<hr>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h3 class="text-center">Monthly Donation Target</h3>
<div class="progress">
<div class="@processStyle" role="progressbar" style="width: @incomePercentage%"></div>
</div>
<div class="row">
<div class="col-sm-12 text-center">$@totalIncome Donated / $@totalBills Bills</div>
</div>
</div>
</div>
<h3 class="text-center">Transaction Totals</h3>
<div class="row">
<div class="col-sm-3 text-center">
<h4>Donations</h4>
<p>$@Math.Round(Model.TotalDonations, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>Bills</h4>
<p>$@Math.Round(Model.TotalBills, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>One-Time Payments</h4>
<p>$@Math.Round(Model.TotalOneTimes, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>Net Profit</h4>
<p>$@Math.Round(Model.TotalNet, 2)</p>
</div>
</div>
</div>
</div>
@await Html.PartialAsync("~/Areas/Stats/Views/Stats/Bills.cshtml", Model.Bills)
@await Html.PartialAsync("~/Areas/Stats/Views/Stats/OneTimes.cshtml", Model.OneTimes)
@await Html.PartialAsync("~/Areas/Stats/Views/Stats/Donations.cshtml", Model.Donations)

5
Teknik/Data/TeknikEntities.cs

@ -46,7 +46,6 @@ namespace Teknik.Data @@ -46,7 +46,6 @@ namespace Teknik.Data
public DbSet<PodcastFile> PodcastFiles { get; set; }
public DbSet<PodcastComment> PodcastComments { get; set; }
// Transparency
public DbSet<Transaction> Transactions { get; set; }
public DbSet<Takedown> Takedowns { get; set; }
// Url Shortener
public DbSet<ShortenedUrl> ShortenedUrls { get; set; }
@ -115,9 +114,6 @@ namespace Teknik.Data @@ -115,9 +114,6 @@ namespace Teknik.Data
// Takedowns
modelBuilder.Entity<Takedown>().HasMany(t => t.Attachments).WithOne().HasForeignKey("Takedown_TakedownId"); // Legacy???
// Transactions
modelBuilder.Entity<Transaction>().Property(t => t.Amount).HasColumnType("decimal(19, 5)");
// Users
modelBuilder.Entity<User>().ToTable("Users");
modelBuilder.Entity<InviteCode>().ToTable("InviteCodes");
@ -152,7 +148,6 @@ namespace Teknik.Data @@ -152,7 +148,6 @@ namespace Teknik.Data
modelBuilder.Entity<PodcastComment>().ToTable("PodcastComments");
modelBuilder.Entity<PodcastTag>().ToTable("PodcastTags");
// Transparency
modelBuilder.Entity<Transaction>().ToTable("Transactions");
modelBuilder.Entity<Takedown>().ToTable("Takedowns");
// Custom Attributes

3
Teknik/Scripts/Error/Error.js

@ -18,8 +18,7 @@ $(document).ready(function () { @@ -18,8 +18,7 @@ $(document).ready(function () {
success: function(response) {
if (response.result) {
$("#top_msg").css('display', 'inline', 'important');
$("#top_msg").html(
'<div class="alert alert-info alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Thank you for your help! Feedback has been submitted.</div>');
$("#top_msg").html('<div class="alert alert-info alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Thank you for your help! Feedback has been submitted.</div>');
} else {
$("#top_msg").css('display', 'inline', 'important');
$("#top_msg")

3
Teknik/Views/Shared/_Navbar.cshtml

@ -69,9 +69,6 @@ @@ -69,9 +69,6 @@
<li class="@Url.GetActive("mail")">
<a href="@Url.SubRouteUrl("mail", "Mail.Index")" target="_blank"><i class="fa fa-envelope fa-fw"></i>&nbsp;&nbsp;Mail</a>
</li>
<li class="@Url.GetActive("mumble")">
<a href="mumble://mumble.@(Config.Host):64738/?version=1.2.5" target="_blank"><i class="fa fa-comments fa-fw"></i>&nbsp;&nbsp;Mumble</a>
</li>
</ul>
</li>
<li is-active-route asp-controller="Contact">

Loading…
Cancel
Save