Skip to content

Commit

Permalink
0.62.0
Browse files Browse the repository at this point in the history
This closes #88 and closes #89
  • Loading branch information
coni2k committed Jul 10, 2016
1 parent a650f6a commit a7ad94b
Show file tree
Hide file tree
Showing 118 changed files with 10,002 additions and 3,115 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ ngClient/_system/js/appSettings/*.js
WebApi/Configs/*.config

# Gulp generated files
ngClient/_system/js/app/app.js
ngClient/_system/js/app/app.min.js
ngClient/_system/js/app/app.min.js.map
ngClient/_system/js/app/*.js
ngClient/_system/js/app/*.map
ngClient/_system/js/lib/*.js
ngClient/_system/js/lib/*.map
ngClient/_system/css/app.css
Expand Down
4 changes: 2 additions & 2 deletions BusinessObjects/Models/ElementCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public ElementCell(ElementField field, ElementItem item)
public string StringValue { get; private set; }

// TODO Doesn't have to be nullable but it requires a default value then which needs to be done
// by manually editing migration file which is not necessary at the moment / SH - 03 Aug. '15
// by manually editing migration file which is not necessary at the moment / coni2k - 03 Aug. '15
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public decimal? NumericValueTotal { get; private set; }

// TODO Doesn't have to be nullable but it requires a default value then which needs to be done
// by manually editing migration file which is not necessary at the moment / SH - 03 Aug. '15
// by manually editing migration file which is not necessary at the moment / coni2k - 03 Aug. '15
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int? NumericValueCount { get; private set; }

Expand Down
2 changes: 1 addition & 1 deletion BusinessObjects/Models/ElementField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ElementField EnableIndex(ElementFieldIndexCalculationType calculationType
return this;
}

// TODO Where is DisableIndex my dear?! / SH - 11 Jun. '16
// TODO Where is DisableIndex my dear?! / coni2k - 11 Jun. '16

void ValidateEnableIndex()
{
Expand Down
4 changes: 2 additions & 2 deletions BusinessObjects/Models/ResourcePool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public string Key
public bool UseFixedResourcePoolRate { get; set; }

// TODO Doesn't have to be nullable but it requires a default value then which needs to be done
// by manually editing migration file which is not necessary at the moment / SH - 03 Aug. '15
// by manually editing migration file which is not necessary at the moment / coni2k - 03 Aug. '15
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public decimal? ResourcePoolRateTotal { get; private set; }

// TODO Doesn't have to be nullable but it requires a default value then which needs to be done
// by manually editing migration file which is not necessary at the moment / SH - 03 Aug. '15
// by manually editing migration file which is not necessary at the moment / coni2k - 03 Aug. '15
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int? ResourcePoolRateCount { get; private set; }

Expand Down
2 changes: 1 addition & 1 deletion BusinessObjects/WealthEconomyContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static WealthEconomyContext Create()
return new WealthEconomyContext();
}

// These definitions are used in generating OData metadata at the moment / SH - 07 Nov '14
// These definitions are used in generating OData metadata at the moment / coni2k - 07 Nov '14
public virtual DbSet<ResourcePool> ResourcePool { get; set; }
public virtual DbSet<Element> Element { get; set; }
public virtual DbSet<ElementField> ElementField { get; set; }
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
### Changelog

**0.62.0**

* Typescript
https://github.com/forCrowd/WealthEconomy/issues/88
* Resharper
https://github.com/forCrowd/WealthEconomy/issues/89
* Comments signature update - coni2k

**0.61.3**

* New contributor: mrjsykes
Expand Down Expand Up @@ -365,7 +373,7 @@ Now both cases call updateAnonymousChanges method which handles this case correc

**0.40.0**

* Email confirmation has implemented
* Email confirmation was implemented
* Survey.docx: A simple survey about the content.
* logger.js minor improvements
* forEach, some, filter functions instead of 'for' loops for arrays
Expand Down
2 changes: 1 addition & 1 deletion Facade/EmailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public async Task SendAsync(IdentityMessage message)
}
case EnvironmentType.Live:
{
// TODO Get rid of this ugliness asap! / SH - 04 Jan. '16
// TODO Get rid of this ugliness asap! / coni2k - 04 Jan. '16
// This email type is only a notification to the admin
var notificationToAdmin = message.Subject == "New external login" ||
message.Subject == "New anonymous login";
Expand Down
2 changes: 1 addition & 1 deletion Framework/T4/EF6.Utility.ttinclude
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IMPORTANT REMARK: EntityFramework.dll + EntityFramework.SqlServer.dll files unde
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE" folder
were replaced with Entity Framework 6.1.3 versions
that copied from "packages" folder under the solution.
v0.35.1 - SH - 02 Nov. '15
v0.35.1 - coni2k - 02 Nov. '15
*/ #>
<#@ assembly name="%VS140COMNTOOLS%..\IDE\EntityFramework.dll" #>
<#@ assembly name="%VS140COMNTOOLS%..\IDE\Microsoft.Data.Entity.Design.dll" #>
Expand Down
2 changes: 1 addition & 1 deletion SolutionItems/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
//
// AssemblyFileVersion is not in use for the moment
//
[assembly: AssemblyVersion("0.61.3")]
[assembly: AssemblyVersion("0.62.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion SolutionItems/Scripts/Build/MSBuild.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

REM Compiles the project with MSBuild & quite mode
REM SH - 07 May '14
REM coni2k - 07 May '14

REM Confirmation
CHOICE /M "Are you sure you want to run the script"
Expand Down
2 changes: 1 addition & 1 deletion SolutionItems/Scripts/Build/RunIISExpress.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Manually runs IIS Express with the current applicationhost.config file
#
# SH - 03 Jan. '16
# coni2k - 03 Jan. '16

& 'C:\Program Files\IIS Express\iisexpress.exe' /config:'..\..\..\.vs\config\applicationhost.config' /systray:true
2 changes: 1 addition & 1 deletion SolutionItems/Scripts/Build/WebApiWarmUp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Makes a request to WebApi application to prevent waiting after the build operations (check WebApi project properties - Build Events tab)
#
# SH - 05 Oct. '14
# coni2k - 05 Oct. '14

# Make an async request
(New-Object System.Net.WebClient).DownloadStringAsync("http://localhost:15001")
Expand Down
2 changes: 1 addition & 1 deletion WebApi/App_Start/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class Startup
// Configuration order is important
// 1a. CorsConfig - 1b. ConfigureAuth
// 2a. config.SuppressDefaultHostAuthentication() - 2b. MessageHandlers + ServerCompressionHandler
// TODO There should be more (maybe routing?) - Try to make the rest clear as well / SH - 13 Jan. '16
// TODO There should be more (maybe routing?) - Try to make the rest clear as well / coni2k - 13 Jan. '16
// More info on Cors part; http://stackoverflow.com/a/25758949/1087768
public void Configuration(IAppBuilder app)
{
Expand Down
2 changes: 1 addition & 1 deletion WebApi/Controllers/Api/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public async Task<IHttpActionResult> ExternalLoginCallback(string clientReturnUr

// Since this method MUST return RedirectResult, cover the whole block with try & catch,
// so it always redirect the user back to ngClient and won't get stuck on WebApi in case of an error
// SH - 16 Jan. '16
// coni2k - 16 Jan. '16
try
{
var content = await GetLoginInfoText();
Expand Down
2 changes: 1 addition & 1 deletion WebApi/Results/ChallengeResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ChallengeResult(HttpRequestMessage request, string provider, string redir
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)
{
var properties = new AuthenticationProperties {
RedirectUri = RedirectUri // Without this prop, external provider returns to the page that it came from (in the current case /api/Account/ExternalLogin / SH - 29 Dec' 15)
RedirectUri = RedirectUri // Without this prop, external provider returns to the page that it came from (in the current case /api/Account/ExternalLogin / coni2k - 29 Dec' 15)
};

Request.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
Expand Down
4 changes: 2 additions & 2 deletions ngClient.Tests/entities/ElementTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ describe('ng Element', function () {
// TODO Manually update?!
directIncomeField.setIndexIncome();

// TODO Doesn't work at the moment, fix it later / SH - 27 Oct. '15
// TODO Doesn't work at the moment, fix it later / coni2k - 27 Oct. '15
//expect(element.totalIncome()).toBe(2750);

// TODO Update / remove
Expand Down Expand Up @@ -862,7 +862,7 @@ describe('ng Element', function () {
// TODO Manually update?!
directIncomeField.setIndexIncome();

// TODO Doesn't work at the moment, fix it later / SH - 27 Oct. '15
// TODO Doesn't work at the moment, fix it later / coni2k - 27 Oct. '15
//expect(element.totalIncomeAverage()).toBe(2750 / 2);

// TODO Update / remove
Expand Down
2 changes: 1 addition & 1 deletion ngClient/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<system.web>
<!-- Since there is no server-side code, this section is actually not necessary.
However, it prevents Visual Studio to automatically pops up the 'Enable debug mode' question when ngClients application runs.
SH - 17 Jan. '16 -->
coni2k - 17 Jan. '16 -->
<compilation debug="true"/>
</system.web>
<system.webServer>
Expand Down
2 changes: 1 addition & 1 deletion ngClient/_system/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ input[type="checkbox"].input-validation-error {
display: none;
}

/* Project level custom helpers / SH 24 Jan. '14 */
/* Project level custom helpers / coni2k 24 Jan. '14 */

/* #region - Spaces - */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
* Authorization interceptors for angular & OData
*/

(function () {
module Main.Config {
'use strict';

angular.module('main')
.config(['$httpProvider', authorizationConfig]);

angular.module('main')
.run(['logger', '$window', authorizationRun]);
var angularInterceptorId = 'AngularInterceptor';

var interceptorId = 'angularInterceptor';
angular.module('main')
.factory(interceptorId, ['logger', '$q', '$window', angularInterceptor]);
.config(['$httpProvider', authorizationConfig])
.run(['logger', '$window', authorizationRun])
.factory(angularInterceptorId, ['logger', '$q', '$window', angularInterceptor]);

function authorizationConfig($httpProvider) {
$httpProvider.interceptors.push(interceptorId);
function authorizationConfig($httpProvider: ng.IHttpProvider) {
$httpProvider.interceptors.push(angularInterceptorId);
}

function authorizationRun(logger, $window) {
Expand All @@ -27,7 +24,7 @@
// OData interceptor
var oldClient = $window.OData.defaultHttpClient;
var newClient = {
request: function (request, success, error) {
request(request, success, error) {
request.headers = request.headers || {};
var token = angular.fromJson($window.localStorage.getItem('token'));
request.headers.Authorization = token !== null ? 'Bearer ' + token.access_token : '';
Expand All @@ -37,25 +34,24 @@
$window.OData.defaultHttpClient = newClient;
}

// angular
function angularInterceptor(logger, $q, $window) {

// Logger
logger = logger.forSource(interceptorId);
logger = logger.forSource(angularInterceptorId);

return {
request: function (config) {
request(config) {
config.headers = config.headers || {};
var token = angular.fromJson($window.localStorage.getItem('token'));
config.headers.Authorization = token !== null ? 'Bearer ' + token.access_token : '';
return config;
},
response: function (response) {
response(response) {
if (response.status === 401) {
// handle the case where the user is not authenticated
}
return response || $q.when(response);
}
};
}
})();
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
(function () {
module Main.Config {
'use strict';

angular.module('main')
.config(['breezeProvider', breezeConfig])
.config(['zDirectivesConfigProvider', breezeConfigDirective]);

function breezeConfig(breezeProvider) {
.config(['zDirectivesConfigProvider', breezeDirectiveConfig]);

function breezeConfig(breezeProvider: any) {
breeze.config.initializeAdapterInstance('uriBuilder', 'odata');

// Use Web API OData to query and save
Expand All @@ -16,16 +15,11 @@
// convert between server-side PascalCase and client-side camelCase
// breeze.NamingConvention.camelCase.setAsDefault();

function getRoutePrefix_Microsoft_AspNet_WebApi_OData_5_3_x(dataService) {
function getRoutePrefix_Microsoft_AspNet_WebApi_OData_5_3_x(dataService: any) {

// Copied from breeze.debug and modified for Web API OData v.5.3.1.
var parser = null;
if (typeof document === 'object') { // browser
parser = document.createElement('a');
parser.href = dataService.serviceName;
} else { // node
parser = url.parse(dataService.serviceName);
}
var parser = document.createElement('a');
parser.href = dataService.serviceName;

// THE CHANGE FOR 5.3.1: Add '/' prefix to pathname
var prefix = parser.pathname;
Expand All @@ -40,13 +34,11 @@
}
}

// Configure the Breeze Validation Directive for bootstrap
function breezeConfigDirective(config) {

// Custom template with warning icon before the error message
config.zRequiredTemplate = '';
config.zValidateTemplate = '<span class="help-block">%error%!</span>';
function breezeDirectiveConfig(config: any) {

// Custom template with warning icon before the error message
config.zRequiredTemplate = '';
config.zValidateTemplate = '<span class="help-block">%error%!</span>';

}

})();
}
Loading

0 comments on commit a7ad94b

Please sign in to comment.