Skip to content

Commit

Permalink
Socioboard Updates
Browse files Browse the repository at this point in the history
1. Socioboard-->Message-->My task-->When first time my task page is
opening then image is showing small. But when we are reloading the page
then image is becoming big.
2. task dashboard loading issue if there is no accounts in socioboard
3. Compose >Select images >it should take single image, user can able to
selest only one image to post
4. add loader in following modules and sub modules
i) all tabs of report
ii) posted rss feeds and rss queue
iii loading circle after comment
iv) while using inbox messages and more
5.  Change all the error messages in socioboard by coordinate with ravi
sir
6.  Fixed issue the no account message is comming sometimes even if the
profiles are there
7.  add loading circle in socioqueue, sent  message,boardme,inside
boardme and in inbox message notification if it take time to fetch data
8   Messages>Inbox message notification >please remove conversation
arrow, its making lot of confusions sometimes
9.  inbox message notification> taking so delay to fetch actual message
10. fixed issue in inbox message notification conversation window, the
message is not sending smoothly after clicking enter
11. fixed issue in all tabs of message module, date hover issue in every
messages inbox, smart inbox and sent messages
12. fixed deleting issue in dashboard social profile issue
13. showing wrong message, Twitter account was added in any other group
14. fixed issue in facebook page report
i). my Facebook page graph
ii).Page impression graph
iii).impression breakdown graph
iv).impression by age&gender
v). stroies graph
vi).share type graph
vii).sharing by age & gender
15. fixed issue in group report
i).my Facebook page graph
ii).Page impression graph
iii).impression breakdown graph
iv).impression by age&gender
v).stroies graph
vi).share type graph
vii).sharing by age & gender
  • Loading branch information
socioboard committed Feb 20, 2017
1 parent ec7a4f5 commit eba1c82
Show file tree
Hide file tree
Showing 118 changed files with 758 additions and 296 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
1 change: 1 addition & 0 deletions src/Api.Socioboard/Controllers/GoogleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public IActionResult GoogleLogin(string code,Domain.Socioboard.Enum.SBAccountTyp
user.UserName = "Socioboard";
user.EmailValidateToken = "Google";
user.UserType = "User";
user.LastLoginTime = DateTime.UtcNow;
user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.UnPaid;
try
{
Expand Down
78 changes: 69 additions & 9 deletions src/Api.Socioboard/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public IActionResult Register(User user)
user.UserName = "Socioboard";
user.UserType = "User";
user.PayPalAccountStatus = Domain.Socioboard.Enum.PayPalAccountStatus.notadded;
if(user.AccountType== Domain.Socioboard.Enum.SBAccountType.Free)
user.LastLoginTime = DateTime.UtcNow;
if (user.AccountType== Domain.Socioboard.Enum.SBAccountType.Free)
{
user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.UnPaid;
}
Expand Down Expand Up @@ -115,6 +116,64 @@ public IActionResult Register(User user)
}


[HttpPost("SocioboardAccountCreation")]
public IActionResult SocioboardAccountCreation(User user)
{
user.CreateDate = DateTime.UtcNow.AddDays(-320);
user.ExpiryDate = DateTime.UtcNow.AddDays(1);
user.EmailValidateToken = SBHelper.RandomString(20);
user.ValidateTokenExpireDate = DateTime.UtcNow.AddDays(1);
user.ActivationStatus = Domain.Socioboard.Enum.SBUserActivationStatus.MailSent;
user.Password = SBHelper.MD5Hash(user.Password);
user.UserName = "Socioboard";
user.UserType = "User";
user.PayPalAccountStatus = Domain.Socioboard.Enum.PayPalAccountStatus.notadded;
user.LastLoginTime = DateTime.UtcNow;
if (user.AccountType == Domain.Socioboard.Enum.SBAccountType.Free)
{
user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.UnPaid;
}
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}

DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
IList<User> lstUser = dbr.Find<User>(t => t.EmailId.Equals(user.EmailId));
if (lstUser != null && lstUser.Count() > 0)
{
return BadRequest("This Email is already registered please login to continue");
}
IList<User> lstUser1 = dbr.Find<User>(a => a.PhoneNumber.Equals(user.PhoneNumber));
if (lstUser1 != null && lstUser1.Count() > 0)
{
return BadRequest("Phone Number Exist");
}
int SavedStatus = dbr.Add<Domain.Socioboard.Models.User>(user);
User nuser = dbr.Single<User>(t => t.EmailId.Equals(user.EmailId));
if (SavedStatus == 1 && nuser != null)
{
Groups group = new Groups();
group.adminId = nuser.Id;
// group.id = nuser.Id;
group.createdDate = DateTime.UtcNow;
group.groupName = Domain.Socioboard.Consatants.SocioboardConsts.DefaultGroupName;
SavedStatus = dbr.Add<Groups>(group);
if (SavedStatus == 1)
{
long GroupId = dbr.FindSingle<Domain.Socioboard.Models.Groups>(t => t.adminId == group.adminId && t.groupName.Equals(group.groupName)).id;
GroupMembersRepository.createGroupMember(GroupId, nuser, _redisCache, dbr);
}
return Ok("Register Successfully.");
}
else
{
return BadRequest("Can't create user");
}
return Ok("Register Successfully.");
}


/// <summary>
/// To login page.
/// </summary>
Expand Down Expand Up @@ -1020,6 +1079,7 @@ public IActionResult FacebookLogin(string AccessToken, Domain.Socioboard.Enum.SB
user.UserName = "Socioboard";
user.UserType = "User";
user.EmailValidateToken = "Facebook";
user.LastLoginTime = DateTime.UtcNow;
try
{
user.ProfilePicUrl = "https://graph.facebook.com/" + Convert.ToString(profile["id"]) + "/picture?type=small";
Expand Down Expand Up @@ -1268,14 +1328,14 @@ public IActionResult ForgotPasswordSendMail(string emailId)
{
return Ok("Your account deleted permanently please contact socioboard support team ");
}
else if (user.EmailValidateToken.Equals("Facebook"))
{
return Ok("Password reset is not permitted as the email address you have entered is already registered in Socioboard with Facebook. Please login through Facebook.");
}
else if (user.EmailValidateToken.Equals("Google"))
{
return Ok("Password reset is not permitted as the email address you have entered is already registered in Socioboard with Google. Please login through Google.");
}
//else if (user.EmailValidateToken.Equals("Facebook"))
//{
// return Ok("Password reset is not permitted as the email address you have entered is already registered in Socioboard with Facebook. Please login through Facebook.");
//}
//else if (user.EmailValidateToken.Equals("Google"))
//{
// return Ok("Password reset is not permitted as the email address you have entered is already registered in Socioboard with Google. Please login through Google.");
//}
else if (user.ActivationStatus == Domain.Socioboard.Enum.SBUserActivationStatus.MailSent)
{
return Ok("Please verify your email address before resetting your password");
Expand Down
31 changes: 27 additions & 4 deletions src/Api.Socioboard/Model/DatabaseRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public DatabaseRepository(ILogger logger, IHostingEnvironment env)
using (NHibernate.ISession session = SessionFactory.GetNewSession(_env))
{
result = session.Query<T>().Where(query).ToList();
var futureCount = session.Query<Domain.Socioboard.Models.User>().GroupBy(x => x.CreateDate)
.Select(x => x.Count())
.ToFutureValue();
var count = futureCount.Value;
}
}
catch (Exception ex)
Expand All @@ -49,6 +45,33 @@ public DatabaseRepository(ILogger logger, IHostingEnvironment env)
return result;
}


public IList<T> FindWithRange<T>(Expression<Func<T, bool>> query, int skip, int take) where T : class, new()
{
IList<T> result = null;
try
{
using (NHibernate.ISession session = SessionFactory.GetNewSession(_env))
{
result = session.Query<T>().Where(query).Skip(skip).Take(take).ToList();
}
}
catch (Exception ex)
{
_logger.LogCritical(ex.Message);
_logger.LogError(ex.StackTrace);
try
{
_logger.LogError(ex.InnerException.Message);

}
catch { }
}

return result;

}

public int GetCount<T>(Expression<Func<T, bool>> query) where T : class, new()
{
int PiadUser = 0;
Expand Down
4 changes: 1 addition & 3 deletions src/Api.Socioboard/Repositories/TwitterRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ public static string AddTwitterAccount(long userId, long groupId, bool follow, M
{
if (twitterAccount.userId == userId)
{
IList<Domain.Socioboard.Models.Groups> grpname = dbr.Find<Domain.Socioboard.Models.Groups>(t => t.id == twitterAccount.userId);
string name= grpname.First().groupName;
return ("Twitter account already added in "+name+" group.");
return ("Twitter account already added by you.");
}
return "This Account is added by other user.";
}
Expand Down
Binary file modified src/Api.Socioboard/bin/Debug/net451/Api.Socioboard.exe
Binary file not shown.
Binary file modified src/Api.Socioboard/bin/Debug/net451/Api.Socioboard.pdb
Binary file not shown.
Binary file modified src/Api.Socioboard/bin/Debug/net451/win7-x64/Api.Socioboard.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IDatabaseRepository
int Add<T>(T item) where T : class, new();
int Add<T>(IEnumerable<T> items) where T : class, new();
IList<T> Find<T>(Expression<Func<T, bool>> query) where T : class, new();

IList<T> FindWithRange<T>(Expression<Func<T, bool>> query, int skip, int take) where T : class, new();
int GetCount<T>(Expression<Func<T, bool>> query) where T : class, new();
}
}
Binary file modified src/Domain.Socioboard/bin/Debug/net451/Domain.Socioboard.dll
Binary file not shown.
Binary file modified src/Domain.Socioboard/bin/Debug/net451/Domain.Socioboard.pdb
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Domain.Socioboard.dll
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Domain.Socioboard.pdb
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Socioboard.Facebook.dll
Binary file not shown.
Binary file modified src/Socioboard.Facebook/bin/Debug/net451/Socioboard.Facebook.pdb
Binary file not shown.
Binary file modified src/Socioboard.Google/bin/Debug/net451/Socioboard.Google.dll
Binary file not shown.
Binary file modified src/Socioboard.Google/bin/Debug/net451/Socioboard.Google.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/Socioboard.LinkedIn/bin/Debug/net451/Socioboard.LinkedIn.dll
Binary file not shown.
Binary file modified src/Socioboard.LinkedIn/bin/Debug/net451/Socioboard.LinkedIn.pdb
Binary file not shown.
Binary file modified src/Socioboard.Twitter/bin/Debug/net451/Socioboard.Twitter.dll
Binary file not shown.
Binary file modified src/Socioboard.Twitter/bin/Debug/net451/Socioboard.Twitter.pdb
Binary file not shown.
30 changes: 21 additions & 9 deletions src/Socioboard/Themes/Socioboard/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,35 @@
ga('send', 'pageview');
</script>

@if (TempData["Error"] != null)
{
@*<!— Hotjar Tracking Code for www.socioboard.com —>*@
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:418900,hjsv:5};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
</script>

@if (TempData["Error"] != null)
{
<script>
$(document).ready(function () {
alertify.set({ delay: 5000 });
alertify.error("@Convert.ToString(TempData["Error"])");
});
</script>
}
@if (TempData["Success"] != null)
{
<script>
</script>
}
@if (TempData["Success"] != null)
{
<script>
$(document).ready(function () {
alertify.set({ delay: 5000 });
alertify.success("@Convert.ToString(TempData["Success"])");
});
</script>
}
</script>
}
</body>
</html>
Loading

0 comments on commit eba1c82

Please sign in to comment.