Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/frapid/frapid into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Malik Khan authored and Malik Khan committed Aug 23, 2020
2 parents 02b237c + f0e9180 commit 2d62caf
Show file tree
Hide file tree
Showing 202 changed files with 6,505 additions and 5,132 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ src/Frapid.Web/Areas/MixERP.CountryPacks.Nepal/
/src/Frapid.Web/Areas/MixERP.CountryPacks.Nepal
/src/Frapid.Web/Areas/Frapid.Customizations
/src/Frapid.Web/Areas/MixERP.EmployeePortal
/src/Frapid.Web/Resource/Temp
.vs
78 changes: 39 additions & 39 deletions builds/all.bat

Large diffs are not rendered by default.

31 changes: 17 additions & 14 deletions src/Frapid.Web.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Web", "Frapid.Web\Frapid.Web.csproj", "{77C7D586-FEE9-40E2-A1C4-699EF4B0A1F3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Console", "Console", "{1FB0A4E1-7F94-4FCB-A26B-312A7A3B5036}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4B708D47-066F-402E-839A-1318B4AE9009}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{F4AC123C-9618-4915-B69B-C8319D7AFE6F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Web", "Frapid.Web\Frapid.Web.csproj", "{77C7D586-FEE9-40E2-A1C4-699EF4B0A1F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Configuration", "Libraries\Frapid.Configuration\Frapid.Configuration.csproj", "{CA3C3D39-6775-4234-B343-38F0724ADCF8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.DataAccess", "Libraries\Frapid.DataAccess\Frapid.DataAccess.csproj", "{9BEA3809-B6D5-4025-AE7E-868E5E7E9C76}"
Expand All @@ -19,8 +27,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Areas", "Libraries\F
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Installer", "Libraries\Frapid.Installer\Frapid.Installer.csproj", "{BFFE76A6-7E9D-42FA-AB3A-108BD2125923}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.ApplicationState", "Libraries\Frapid.ApplicationState\Frapid.ApplicationState.csproj", "{EF3D84F8-3D64-45D7-9050-3AE204F5AA72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.DbPolicy", "Libraries\Frapid.DbPolicy\Frapid.DbPolicy.csproj", "{E2C5690C-EF80-4AFA-8107-5E58A936B15F}"
Expand All @@ -33,20 +39,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.TokenManager", "Libr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "frapid", "Libraries\Frapid.CommandLine\frapid.csproj", "{CD47926F-7148-49A1-AD08-A96B74A3A5F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Console", "Console", "{1FB0A4E1-7F94-4FCB-A26B-312A7A3B5036}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Backups", "Libraries\Frapid.Backups\Frapid.Backups.csproj", "{8993AD31-C303-4CA0-92D9-C100585A78E5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4B708D47-066F-402E-839A-1318B4AE9009}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Framework.Tests", "Libraries\Tests\Frapid.Framework.Tests\Frapid.Framework.Tests.csproj", "{10258887-3CB5-4877-848B-7D7C45F516D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Configuration.Tests", "Libraries\Tests\Frapid.Configuration.Tests\Frapid.Configuration.Tests.csproj", "{3946F2A8-A530-47CA-A080-A17510F05FD0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.TokenManager.Tests", "Libraries\Tests\Frapid.TokenManager.Tests\Frapid.TokenManager.Tests.csproj", "{2A4373DC-DF0F-4119-A8C2-C7CCF16EF314}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{F4AC123C-9618-4915-B69B-C8319D7AFE6F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Areas.Tests", "Libraries\Tests\Frapid.Areas.Tests\Frapid.Areas.Tests.csproj", "{4DF49869-7BB8-42B1-87AC-C5A5F0B87C54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.ApplicationState.Tests", "Libraries\Frapid.ApplicationState.Tests\Frapid.ApplicationState.Tests.csproj", "{2D50273B-17BE-4DD4-B747-02884BBACF3A}"
Expand Down Expand Up @@ -236,6 +236,8 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4B708D47-066F-402E-839A-1318B4AE9009} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
{F4AC123C-9618-4915-B69B-C8319D7AFE6F} = {23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}
{CA3C3D39-6775-4234-B343-38F0724ADCF8} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
{9BEA3809-B6D5-4025-AE7E-868E5E7E9C76} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
{A4DEE358-3203-425C-80E9-8EBA0A01B73F} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
Expand All @@ -249,14 +251,15 @@ Global
{EF3BDE7C-A3D5-493A-8817-BF47DF9CAE47} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
{CD47926F-7148-49A1-AD08-A96B74A3A5F6} = {1FB0A4E1-7F94-4FCB-A26B-312A7A3B5036}
{8993AD31-C303-4CA0-92D9-C100585A78E5} = {23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}
{4B708D47-066F-402E-839A-1318B4AE9009} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
{10258887-3CB5-4877-848B-7D7C45F516D2} = {4B708D47-066F-402E-839A-1318B4AE9009}
{3946F2A8-A530-47CA-A080-A17510F05FD0} = {4B708D47-066F-402E-839A-1318B4AE9009}
{2A4373DC-DF0F-4119-A8C2-C7CCF16EF314} = {4B708D47-066F-402E-839A-1318B4AE9009}
{F4AC123C-9618-4915-B69B-C8319D7AFE6F} = {23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}
{4DF49869-7BB8-42B1-87AC-C5A5F0B87C54} = {F4AC123C-9618-4915-B69B-C8319D7AFE6F}
{2D50273B-17BE-4DD4-B747-02884BBACF3A} = {F4AC123C-9618-4915-B69B-C8319D7AFE6F}
{4E863154-9D48-4023-BB76-8405A98BCAFF} = {23C8FECB-C7F3-4FF1-B2FF-8B296420C8CB}
{86545C4A-5202-4368-B013-EA37615CBD8E} = {0DFA1BB9-74FE-4C63-B8AF-0B312ED992F6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2BD31D9F-E23A-49DD-A27C-B6B9ACE38848}
EndGlobalSection
EndGlobal
11 changes: 9 additions & 2 deletions src/Frapid.Web/Application/BackupRegistration.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Frapid.Backups;
using Frapid.Configuration;
using Frapid.Configuration.Models;
using Frapid.Framework.Extensions;
using Quartz;
using Quartz.Impl;
Expand All @@ -11,12 +11,19 @@ public class BackupRegistration
{
public static void Register()
{
var parameter = Parameter.Get();

if (string.IsNullOrWhiteSpace(parameter.BackupScheduleUTC))
{
return;
}

var factory = new StdSchedulerFactory();
var scheduler = factory.GetScheduler();
scheduler.Start();

var job = JobBuilder.Create<BackupJob>().WithIdentity("Backup", "PerformBackup").Build();
string backupScheduleUtc = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "BackupScheduleUTC");
string backupScheduleUtc = parameter.BackupScheduleUTC;
var scheduleData = backupScheduleUtc.Split(',');

int hour = 0;
Expand Down
10 changes: 9 additions & 1 deletion src/Frapid.Web/Application/EodTaskRegistration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Frapid.Configuration;
using Frapid.Configuration.Models;
using Frapid.Framework.Extensions;
using Frapid.Web.Jobs;
using Quartz;
Expand All @@ -11,11 +12,18 @@ public class EodTaskRegistration
{
public static void Register()
{
var parameter = Parameter.Get();

if (string.IsNullOrWhiteSpace(parameter.EodScheduleUTC))
{
return;
}

var factory = new StdSchedulerFactory();
var scheduler = factory.GetScheduler();
scheduler.Start();

string backupScheduleUtc = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "EodScheduleUTC");
string backupScheduleUtc = parameter.EodScheduleUTC;
var scheduleData = backupScheduleUtc.Split(',');

int hour = 0;
Expand Down
27 changes: 20 additions & 7 deletions src/Frapid.Web/Application/LogManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using Frapid.Configuration;
using Frapid.Configuration.Models;
using Serilog;
using Serilog.Core;
using Serilog.Events;
Expand All @@ -11,19 +12,30 @@ internal static class LogManager
{
private static string GetLogDirectory()
{
string path = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "ApplicationLogDirectory");
string fallbackPath = PathMapper.MapPath("~/Resource/Temp");
var parameter = Parameter.Get();
string path = parameter.ApplicationLogDirectory;

if (string.IsNullOrWhiteSpace(path))
{
return PathMapper.MapPath("~/Resource/Temp");
return fallbackPath;
}

if (!Directory.Exists(path))
try
{
Directory.CreateDirectory(path);
}
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}

return path;
return path;
}
catch
{
//It is counterproductive to log errors
//when you know that you don't have access to the log directory
return fallbackPath;
}
}

private static string GetLogFileName()
Expand All @@ -35,7 +47,8 @@ private static string GetLogFileName()

private static LoggerConfiguration GetConfiguration()
{
string minimumLogLevel = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "MinimumLogLevel");
var parameter = Parameter.Get();
string minimumLogLevel = parameter.MinimumLogLevel;

var levelSwitch = new LoggingLevelSwitch();

Expand Down
5 changes: 0 additions & 5 deletions src/Frapid.Web/Areas/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/Ticketing
/TheSmsCentral

MixCBS.Banking
MixCBS.Deposits
MixCBS.Lendings
Expand All @@ -10,5 +7,3 @@ MixERP.Office
NplRemit
Salesific.CRM
MixERP.Discovery
/MailjetApp
/InitiativeNepal
9 changes: 2 additions & 7 deletions src/Frapid.Web/Areas/ElasticEmail/ElasticEmail.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -176,8 +176,6 @@
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
Expand All @@ -195,9 +193,6 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>start xcopy /y /r "$(ProjectDir)\bin\*.dll" "$(ProjectDir)..\..\bin"</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Frapid.Account.InputModels;
using Frapid.Areas.CSRF;
using Frapid.Configuration;
using Frapid.Configuration.Models;
using Frapid.Framework.Extensions;
using Mapster;
using Serilog;
Expand Down Expand Up @@ -81,7 +82,8 @@ public async Task<ActionResult> GetOfficesAsync()
[AllowAnonymous]
public ActionResult GetLanguages()
{
var cultures = ConfigurationManager.GetConfigurationValue("ParameterConfigFileLocation", "Cultures").Split(',');
var parameter = Parameter.Get();
var cultures = parameter.Cultures.Split(',');

var languages = (from culture in cultures
select culture.Trim()
Expand Down
8 changes: 6 additions & 2 deletions src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<Use64BitIISExpress />
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>12.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -258,8 +263,6 @@
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
Expand Down Expand Up @@ -288,6 +291,7 @@
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
7 changes: 5 additions & 2 deletions src/Frapid.Web/Areas/Frapid.Account/Frapid.Account.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frapid.Account", "Frapid.Account.csproj", "{8C157E84-F635-43D6-AC97-B9FF062D8DBF}"
EndProject
Expand All @@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ABDEE365-706E-456A-9913-F7E8687D7467}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 2d62caf

Please sign in to comment.