Compare commits
No commits in common. "057349ec6017b46709b645a3f4f922c59d6bd6f8" and "abb01d3318e6daba169c1ddbeab07be57985cd68" have entirely different histories.
057349ec60
...
abb01d3318
@ -18,7 +18,6 @@
|
|||||||
<Folder Include="bin\Debug\net6.0\ref\" />
|
<Folder Include="bin\Debug\net6.0\ref\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FirebaseAdmin" Version="2.3.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
|
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
|
||||||
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.9" />
|
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -37,7 +37,6 @@ using System.Net.Http.Headers;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Abp.Json;
|
using Abp.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace BCS.BMC.CompanyMasters
|
namespace BCS.BMC.CompanyMasters
|
||||||
{
|
{
|
||||||
public class CompanyMasterAppService : ICompanyMasterAppService
|
public class CompanyMasterAppService : ICompanyMasterAppService
|
||||||
@ -126,8 +125,8 @@ namespace BCS.BMC.CompanyMasters
|
|||||||
{
|
{
|
||||||
int companyId = 0;
|
int companyId = 0;
|
||||||
|
|
||||||
var company = from m in _companyMaster.GetAllList().Where(m => m.Url.ToLower().Trim() == input.Url.ToLower().Trim())
|
var company = from m in _companyMaster.GetAllList().Where(m => m.Id == input.Id && m.CompanyName.ToLower().Trim() == input.CompanyName.ToLower().Trim()
|
||||||
|
&& m.Url == input.Url.Trim())
|
||||||
select m;
|
select m;
|
||||||
|
|
||||||
var entity = input.MapTo<CompanyMaster>();
|
var entity = input.MapTo<CompanyMaster>();
|
||||||
@ -153,7 +152,8 @@ namespace BCS.BMC.CompanyMasters
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new UserFriendlyException("The Input Url Already Exist");
|
//throw new UserFriendlyException(string.Format(L("ClientDuplicateMessage"), L(input.ClientName)));
|
||||||
|
throw new UserFriendlyException("Url Already Exist");
|
||||||
}
|
}
|
||||||
return companyId;
|
return companyId;
|
||||||
}
|
}
|
||||||
@ -172,20 +172,6 @@ namespace BCS.BMC.CompanyMasters
|
|||||||
.Where(m => m.Id == input.Id && m.CompanyName.ToLower().Trim() == input.CompanyName.ToLower().Trim() && m.Id != input.Id)
|
.Where(m => m.Id == input.Id && m.CompanyName.ToLower().Trim() == input.CompanyName.ToLower().Trim() && m.Id != input.Id)
|
||||||
select m;
|
select m;
|
||||||
input.MapTo(entity);
|
input.MapTo(entity);
|
||||||
Uri uri = new Uri(input.Url, UriKind.Absolute);
|
|
||||||
var host = uri.Host;
|
|
||||||
|
|
||||||
if (host.Split('.').Length > 2)
|
|
||||||
{
|
|
||||||
int lastIndex = host.LastIndexOf(".");
|
|
||||||
int index = host.LastIndexOf(".", lastIndex - 1);
|
|
||||||
var subdomain = host.Substring(0, index);
|
|
||||||
if (subdomain != "www")
|
|
||||||
{
|
|
||||||
entity.SubDomainName = subdomain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.DomainName = host;
|
|
||||||
if (getclient == null || getclient.Count() == 0)
|
if (getclient == null || getclient.Count() == 0)
|
||||||
{
|
{
|
||||||
await _companyMaster.UpdateAsync(entity);
|
await _companyMaster.UpdateAsync(entity);
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.CompanyMasters.Dto
|
|
||||||
{
|
|
||||||
public class GetUrlDto
|
|
||||||
{
|
|
||||||
public string InputUrl { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.CompanyMasters.Dto
|
|
||||||
{
|
|
||||||
public class UserDetailsDto
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string SurName { get; set; }
|
|
||||||
public string EmailAddress { get; set; }
|
|
||||||
public bool IsActive { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.FirebaseCloudMessaging.Dto
|
|
||||||
{
|
|
||||||
public class FcmNotificationSetting
|
|
||||||
{
|
|
||||||
public string SenderId { get; set; }
|
|
||||||
public string ServerKey { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.FirebaseCloudMessaging.Dto
|
|
||||||
{
|
|
||||||
public class FireBaseResponseModel
|
|
||||||
{
|
|
||||||
[JsonProperty("isSuccess")]
|
|
||||||
public bool IsSuccess { get; set; }
|
|
||||||
[JsonProperty("message")]
|
|
||||||
public string Message { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.FirebaseCloudMessaging.Dto
|
|
||||||
{
|
|
||||||
public class NotificationModel
|
|
||||||
{
|
|
||||||
[JsonProperty("deviceId")]
|
|
||||||
public string DeviceId { get; set; }
|
|
||||||
[JsonProperty("isAndroidDevice")]
|
|
||||||
public bool IsAndroidDevice { get; set; }
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string Title { get; set; }
|
|
||||||
[JsonProperty("body")]
|
|
||||||
public string Body { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GoogleNotification
|
|
||||||
{
|
|
||||||
public class DataPayload
|
|
||||||
{
|
|
||||||
[JsonProperty("title")]
|
|
||||||
public string Title { get; set; }
|
|
||||||
[JsonProperty("body")]
|
|
||||||
public string Body { get; set; }
|
|
||||||
}
|
|
||||||
[JsonProperty("priority")]
|
|
||||||
public string Priority { get; set; } = "high";
|
|
||||||
[JsonProperty("data")]
|
|
||||||
public DataPayload Data { get; set; }
|
|
||||||
[JsonProperty("notification")]
|
|
||||||
public DataPayload Notification { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
using FirebaseAdmin.Messaging;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using FirebaseAdmin;
|
|
||||||
using Google.Apis.Auth.OAuth2;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
namespace BCS.BMC.FirebaseCloudMessaging
|
|
||||||
{
|
|
||||||
public class FirebaseNotificationAppService : IFirebaseNotificationAppService
|
|
||||||
{
|
|
||||||
|
|
||||||
public FirebaseNotificationAppService()
|
|
||||||
{
|
|
||||||
if (FirebaseApp.DefaultInstance is null)
|
|
||||||
{
|
|
||||||
FirebaseApp.Create(new AppOptions()
|
|
||||||
{
|
|
||||||
Credential = GoogleCredential.FromFile("firechat-57601-firebase-adminsdk-anscp-e04366c4d4.json")
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static async Task<string> SendNotification(string fcmToken, Notification notification)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var message = new Message()
|
|
||||||
{
|
|
||||||
Notification = notification,
|
|
||||||
Token = fcmToken,
|
|
||||||
};
|
|
||||||
|
|
||||||
return await FirebaseMessaging.DefaultInstance.SendAsync(message) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using Abp.Application.Services;
|
|
||||||
using FirebaseAdmin.Messaging;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.FirebaseCloudMessaging
|
|
||||||
{
|
|
||||||
public interface IFirebaseNotificationAppService : IApplicationService
|
|
||||||
{
|
|
||||||
// Task<string> SendNotification(string fcmToken, Notification notification);
|
|
||||||
}
|
|
||||||
}
|
|
@ -29,7 +29,7 @@ namespace BCS.BMC
|
|||||||
BMCLocalizationConfigurer.Configure(Configuration.Localization);
|
BMCLocalizationConfigurer.Configure(Configuration.Localization);
|
||||||
|
|
||||||
// Enable this line to create a multi-tenant application.
|
// Enable this line to create a multi-tenant application.
|
||||||
//Configuration.MultiTenancy.IsEnabled = BMCConsts.MultiTenancyEnabled;
|
Configuration.MultiTenancy.IsEnabled = BMCConsts.MultiTenancyEnabled;
|
||||||
|
|
||||||
// Configure roles
|
// Configure roles
|
||||||
AppRoleConfig.Configure(Configuration.Modules.Zero().RoleManagement);
|
AppRoleConfig.Configure(Configuration.Modules.Zero().RoleManagement);
|
||||||
|
@ -17,18 +17,6 @@ using BCS.BMC.Authorization;
|
|||||||
using BCS.BMC.Authorization.Users;
|
using BCS.BMC.Authorization.Users;
|
||||||
using BCS.BMC.Models.TokenAuth;
|
using BCS.BMC.Models.TokenAuth;
|
||||||
using BCS.BMC.MultiTenancy;
|
using BCS.BMC.MultiTenancy;
|
||||||
using BCS.BMC.CompanyMasters.Dto;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using BCS.BMC.BMC.CompanyMasters;
|
|
||||||
using Abp.Domain.Repositories;
|
|
||||||
using System.Runtime.Intrinsics.X86;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
|
||||||
using Abp.AutoMapper;
|
|
||||||
using Abp.Domain.Entities;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Controllers
|
namespace BCS.BMC.Controllers
|
||||||
{
|
{
|
||||||
@ -42,8 +30,7 @@ namespace BCS.BMC.Controllers
|
|||||||
private readonly IExternalAuthConfiguration _externalAuthConfiguration;
|
private readonly IExternalAuthConfiguration _externalAuthConfiguration;
|
||||||
private readonly IExternalAuthManager _externalAuthManager;
|
private readonly IExternalAuthManager _externalAuthManager;
|
||||||
private readonly UserRegistrationManager _userRegistrationManager;
|
private readonly UserRegistrationManager _userRegistrationManager;
|
||||||
private readonly IRepository<CompanyMaster, int> _companyMaster;
|
|
||||||
ResponseMessageModel responsemessage = new ResponseMessageModel();
|
|
||||||
public TokenAuthController(
|
public TokenAuthController(
|
||||||
LogInManager logInManager,
|
LogInManager logInManager,
|
||||||
ITenantCache tenantCache,
|
ITenantCache tenantCache,
|
||||||
@ -51,8 +38,7 @@ namespace BCS.BMC.Controllers
|
|||||||
TokenAuthConfiguration configuration,
|
TokenAuthConfiguration configuration,
|
||||||
IExternalAuthConfiguration externalAuthConfiguration,
|
IExternalAuthConfiguration externalAuthConfiguration,
|
||||||
IExternalAuthManager externalAuthManager,
|
IExternalAuthManager externalAuthManager,
|
||||||
UserRegistrationManager userRegistrationManager,
|
UserRegistrationManager userRegistrationManager)
|
||||||
IRepository<CompanyMaster, int> companyMaster)
|
|
||||||
{
|
{
|
||||||
_logInManager = logInManager;
|
_logInManager = logInManager;
|
||||||
_tenantCache = tenantCache;
|
_tenantCache = tenantCache;
|
||||||
@ -61,7 +47,6 @@ namespace BCS.BMC.Controllers
|
|||||||
_externalAuthConfiguration = externalAuthConfiguration;
|
_externalAuthConfiguration = externalAuthConfiguration;
|
||||||
_externalAuthManager = externalAuthManager;
|
_externalAuthManager = externalAuthManager;
|
||||||
_userRegistrationManager = userRegistrationManager;
|
_userRegistrationManager = userRegistrationManager;
|
||||||
_companyMaster = companyMaster;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@ -247,131 +232,5 @@ namespace BCS.BMC.Controllers
|
|||||||
{
|
{
|
||||||
return SimpleStringCipher.Instance.Encrypt(accessToken);
|
return SimpleStringCipher.Instance.Encrypt(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IActionResult> ValidateTenancy([FromBody] GetUrlDto input)
|
|
||||||
{
|
|
||||||
Uri uri = new Uri(input.InputUrl, UriKind.Absolute);
|
|
||||||
var domain = uri.Host;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(input.InputUrl))
|
|
||||||
{
|
|
||||||
return BadRequest("Please Enter A Valid Url");
|
|
||||||
}
|
|
||||||
var company = await _companyMaster.FirstOrDefaultAsync(x => x.DomainName == domain);
|
|
||||||
if (company == null)
|
|
||||||
{
|
|
||||||
return BadRequest("Url Not Found");
|
|
||||||
}
|
|
||||||
return Ok("Success");
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IActionResult> Login([FromBody] LoginInputModel input)
|
|
||||||
{
|
|
||||||
var subDomainName = "";
|
|
||||||
var protocol = "";
|
|
||||||
if (string.IsNullOrWhiteSpace(input.CompanyUrl))
|
|
||||||
{
|
|
||||||
return BadRequest("Please Enter A Valid Url");
|
|
||||||
}
|
|
||||||
using (HttpClient client = new HttpClient())
|
|
||||||
{
|
|
||||||
Uri uri = new Uri(input.CompanyUrl);
|
|
||||||
var host = uri.Host;
|
|
||||||
protocol = uri.Scheme;
|
|
||||||
if (host.Split('.').Length > 2)
|
|
||||||
{
|
|
||||||
int lastIndex = host.LastIndexOf(".");
|
|
||||||
int index = host.LastIndexOf(".", lastIndex - 1);
|
|
||||||
var subdomain = host.Substring(0, index);
|
|
||||||
if (subdomain != "www")
|
|
||||||
{
|
|
||||||
subDomainName = subdomain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var company = await _companyMaster.FirstOrDefaultAsync(x => x.DomainName == host);
|
|
||||||
if (company == null)
|
|
||||||
{
|
|
||||||
return BadRequest("Invalid Company Url");
|
|
||||||
}
|
|
||||||
|
|
||||||
// var baseUrl = uri + "api/BmcLogin";
|
|
||||||
var baseUrl = protocol + "://" + host + "/api/BmcLogin";
|
|
||||||
var data = new
|
|
||||||
{
|
|
||||||
usernameOrEmailAddress = input.UsernameOrEmailAddress,
|
|
||||||
password = input.Password
|
|
||||||
};
|
|
||||||
var requestJson = JsonConvert.SerializeObject(data);
|
|
||||||
var requestContent = new StringContent(requestJson.ToString());
|
|
||||||
requestContent.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/json");
|
|
||||||
HttpResponseMessage response = await client.PostAsync(baseUrl, requestContent);
|
|
||||||
|
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
|
||||||
{
|
|
||||||
var responseStream = await response.Content.ReadAsStringAsync();
|
|
||||||
LoginOrRegisterResponseMessageModel result = JsonConvert.DeserializeObject<LoginOrRegisterResponseMessageModel>(responseStream);
|
|
||||||
return Ok(result);
|
|
||||||
}
|
|
||||||
else if (response.StatusCode == HttpStatusCode.InternalServerError)
|
|
||||||
{
|
|
||||||
var contents = await response.Content.ReadAsStringAsync();
|
|
||||||
ResponseMessageModel result = JsonConvert.DeserializeObject<ResponseMessageModel>(contents);
|
|
||||||
|
|
||||||
return BadRequest(result.error.message == "Login Failed" ? "Invalid Username Or Password" : result.error.message);
|
|
||||||
}
|
|
||||||
return Ok();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IActionResult> Registration([FromBody] RegistrationInput input)
|
|
||||||
{
|
|
||||||
Uri uri = new Uri(input.CompanyUrl, UriKind.Absolute);
|
|
||||||
var domain = uri.Host;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(input.CompanyUrl))
|
|
||||||
{
|
|
||||||
return BadRequest("Please Enter A Valid Url");
|
|
||||||
}
|
|
||||||
var company = await _companyMaster.FirstOrDefaultAsync(x => x.DomainName == domain);
|
|
||||||
if (company == null)
|
|
||||||
{
|
|
||||||
return BadRequest("Url Not Found");
|
|
||||||
}
|
|
||||||
using (HttpClient client = new HttpClient())
|
|
||||||
{
|
|
||||||
var baseUrl = input.CompanyUrl + "/api/services/bwac/employeeRegister/RegisterEmployeeAsNewUser";
|
|
||||||
|
|
||||||
var data = new
|
|
||||||
{
|
|
||||||
phoneNo = input.Phoneno,
|
|
||||||
userName = input.UserNameOrEmail,
|
|
||||||
password = input.Password
|
|
||||||
};
|
|
||||||
var requestJson = JsonConvert.SerializeObject(data);
|
|
||||||
var requestContent = new StringContent(requestJson.ToString());
|
|
||||||
requestContent.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/json");
|
|
||||||
HttpResponseMessage response = await client.PostAsync(baseUrl, requestContent);
|
|
||||||
|
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
|
||||||
{
|
|
||||||
var responseStream = await response.Content.ReadAsStringAsync();
|
|
||||||
LoginOrRegisterResponseMessageModel result = JsonConvert.DeserializeObject<LoginOrRegisterResponseMessageModel>(responseStream);
|
|
||||||
return Ok(result);
|
|
||||||
}
|
|
||||||
else if (response.StatusCode == HttpStatusCode.InternalServerError)
|
|
||||||
{
|
|
||||||
var contents = await response.Content.ReadAsStringAsync();
|
|
||||||
ResponseMessageModel result = JsonConvert.DeserializeObject<ResponseMessageModel>(contents);
|
|
||||||
return BadRequest(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return BadRequest();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Models.TokenAuth
|
|
||||||
{
|
|
||||||
public class LoginInputModel
|
|
||||||
{
|
|
||||||
public string CompanyUrl { get; set; }
|
|
||||||
public string UsernameOrEmailAddress { get; set; }
|
|
||||||
public string Password { get; set; }
|
|
||||||
public string FcmToken { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Models.TokenAuth
|
|
||||||
{
|
|
||||||
public class LoginOrRegisterResponseMessageModel
|
|
||||||
{
|
|
||||||
public result result { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class result
|
|
||||||
{
|
|
||||||
|
|
||||||
public int statusCode { get; set; }
|
|
||||||
public string userName { get; set; }
|
|
||||||
public string userId { get; set; }
|
|
||||||
public string employeeId { get; set; }
|
|
||||||
public string phoneNo { get; set; }
|
|
||||||
public string profilePictureId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Models.TokenAuth
|
|
||||||
{
|
|
||||||
public class RegistrationInput
|
|
||||||
{
|
|
||||||
public string Firstname { get; set; }
|
|
||||||
public string Lastname { get; set; }
|
|
||||||
public string UserNameOrEmail { get; set; }
|
|
||||||
public string Phoneno { get; set; }
|
|
||||||
public string Password { get; set; }
|
|
||||||
public string Status { get; set; }
|
|
||||||
public string Protocol { get; set; }
|
|
||||||
public string CompanyUrl { get; set; }
|
|
||||||
public string Subdomain { get; set; }
|
|
||||||
public string Domain { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Models.TokenAuth
|
|
||||||
{
|
|
||||||
public class ResponseMessageModel
|
|
||||||
{
|
|
||||||
public Error error { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Error
|
|
||||||
{
|
|
||||||
public string message { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"isRoot": true,
|
|
||||||
"tools": {
|
|
||||||
"dotnet-ef": {
|
|
||||||
"version": "6.0.10",
|
|
||||||
"commands": [
|
|
||||||
"dotnet-ef"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -42,7 +42,6 @@
|
|||||||
<PackageReference Include="Abp.HangFire" Version="7.3.0" />
|
<PackageReference Include="Abp.HangFire" Version="7.3.0" />
|
||||||
<PackageReference Include="Abp.RedisCache" Version="7.3.0" />
|
<PackageReference Include="Abp.RedisCache" Version="7.3.0" />
|
||||||
<PackageReference Include="Abp.Castle.Log4Net" Version="7.3.0" />
|
<PackageReference Include="Abp.Castle.Log4Net" Version="7.3.0" />
|
||||||
<PackageReference Include="FirebaseAdmin" Version="2.3.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="wwwroot\libs\" />
|
<Folder Include="wwwroot\libs\" />
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
using BCS.BMC.Controllers;
|
|
||||||
using BCS.BMC.FirebaseCloudMessaging;
|
|
||||||
using FirebaseAdmin.Messaging;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace BCS.BMC.Web.Controllers
|
|
||||||
{
|
|
||||||
//[Route("api/notification")]
|
|
||||||
//[ApiController]
|
|
||||||
public class FirebaseNotificationController : BMCControllerBase
|
|
||||||
{
|
|
||||||
private readonly FirebaseNotificationAppService _notificationService;
|
|
||||||
|
|
||||||
public FirebaseNotificationController(FirebaseNotificationAppService notificationService)
|
|
||||||
{
|
|
||||||
_notificationService = notificationService;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Route("send")]
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IActionResult> Notification(string fcmToken, [FromBody] Notification notification)
|
|
||||||
{
|
|
||||||
var result = await FirebaseNotificationAppService.SendNotification(fcmToken, notification);
|
|
||||||
return Ok(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -12,9 +12,9 @@
|
|||||||
<script src="~/view-resources/Views/CompanyMaster/Index.js" asp-append-version="true"></script>
|
<script src="~/view-resources/Views/CompanyMaster/Index.js" asp-append-version="true"></script>
|
||||||
</environment>
|
</environment>
|
||||||
|
|
||||||
<environment names="Staging,Production">
|
@* <environment names="Staging,Production">
|
||||||
<script src="~/view-resources/Views/CompanyMaster/Index.min.js" asp-append-version="true"></script>
|
<script src="~/view-resources/Views/Users/ClientMaster.min.js" asp-append-version="true"></script>
|
||||||
</environment>
|
</environment>*@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section class="content">
|
@*<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -415,4 +415,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.row -->
|
<!-- /.row -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>*@
|
||||||
|
@ -156,11 +156,5 @@
|
|||||||
"inputFiles": [
|
"inputFiles": [
|
||||||
"wwwroot/Common/helpers.js"
|
"wwwroot/Common/helpers.js"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"outputFileName": "wwwroot/view-resources/Views/CompanyMaster/Index.min.js",
|
|
||||||
"inputFiles": [
|
|
||||||
"wwwroot/view-resources/Views/CompanyMaster/Index.js"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "service_account",
|
|
||||||
"project_id": "firechat-57601",
|
|
||||||
"private_key_id": "e04366c4d4ad7167925421faaf7daf868cd5c686",
|
|
||||||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCZwdt1kWg3mX8/\nXAdaECug6Kp9d3cfXshJLjZRtzUyeC7nkE10Ld0hhgxUH/5Fopu2vjTM0eq3NSNi\nte2ulpcEf4yObF5ZQEIeBvdf7uhvnvk1T+o/OcldkFyybWxSzCLwHWrS+eNkxKKP\nCbpXQuZ5v5g95p9FGFr9zM29gMB1FH1l0IiOh5UwGpTo39Glsdalw7OFDKYkWl0u\noGQ0qsO+As/MQKyYw4cJqIz6h8CX4WuloZhfKLv+KW8jwjN01UrlRNJQiJazSHYV\nLb9sP9WkGnVRnhXNtUy/vy6Cd5xSmd1wCPByNao04tlXPdBSwydqPsBmFjsSUX9V\nYg9Y5X6dAgMBAAECggEAEPr6x0TJXf04CKxGLOkaQwlO7XpIZTuCIlWAhDfCdTzB\nRADeEkA6ap2zi4WDqaG9UUo3lI3I6SDCNAA5gTgk8hyP+O6ji3ca64FYx8x0+QF1\nLjERgpgEKAQYaKVy+sCL9I6bId+dAEpDAEmnvZlS0LabE+2oleiMVqPL7kC41cpt\n9CVgjFUb8IaziGXkCBPboHt/MFs6bYBUJFAonME7O2hN3k9n4TSPcdjUvF+FrH/s\nN/GfimGqhRADX3jEONdiFuD77TTJMa6HcdeSnH2A9LbcDJGLb9dfLitJT0M8xbr1\nbkBA6SVe/RMfmYiyd1KfYmtvNnTvTEnJvIWfLLxo1QKBgQDQ85VVJAouBlbcSOqt\nS9qg9m7ze+dPHrt20kDRVZA8eglCjlQQTBbz3vbhFG8epL1i6r8NPi8SJt8UoQNM\ntxRQs2GRldOnEF0pSiwbbpk+XSAwTTt6DfOVbGSz+Z1LksKFrEEUAkNgem9S2+Zt\nCqHVkXxJxLkJpQ2qU+CPrqAm3wKBgQC8YMIgaKCZS8q485H+usiKmPLtSqYqv2Uw\nEujxkr6Esj25ev/bcBaIorJJm9Uk3ffUt2yZ3cmcNZfMsXQUdzEas/FHOxOY1Ria\n6dBCVKJy1oGC4HaOovLDMOLTrCUfcauJYdbRLOLBbhIRRqoGbva+dM8Xhdozfna6\ntvGlT242AwKBgDReJ/oLq0V3r0NMPwypqySWPp5lWkZ5FFCmRzpvsFOH3lRA6Y6g\nE0yRf9xPS74pWZG19aXzBMcO2PAJnpMWe0/ydSyQmVgQgNi9Tyqc4GlB27RfVt2z\nK24ymVaF48cyA/COiEzkeFBwvv/MPwbrGD43VSgD1sA1DqS2mtxHzrmPAoGATnY6\nxUbvBYrFEE4bVC82Ukwsetup5Io9uk1WCzCk/B5FiVkK8rp4GEcz3Wbz21w82rPf\nnyL6036bEJ4lDFUs9cNXTuTzX6f6jKOwo8AevZhM71dQ6k5CsTxObf34pGUzHpDK\n6es5M3oGOn3lWbKkQWXj0BdncCVPjKugcMtpy0MCgYAGPZTc0C2tPFPWavMfHcrq\nAUlVVkENELi41AcensgX+dbMQNJ8ePB4u2s5AEECbTGvG+NHIpfHOTr8bN/uw3PG\n7vPIsrfNuONkc13uhWF4YtvANcx2rhLxma84Ey5Ai2kvx6fer+BRRK3Wr36n3AEw\nssODLddJnZESSdlIdsghLw==\n-----END PRIVATE KEY-----\n",
|
|
||||||
"client_email": "firebase-adminsdk-anscp@firechat-57601.iam.gserviceaccount.com",
|
|
||||||
"client_id": "101896998053383660888",
|
|
||||||
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
||||||
"token_uri": "https://oauth2.googleapis.com/token",
|
|
||||||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
|
||||||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-anscp%40firechat-57601.iam.gserviceaccount.com"
|
|
||||||
}
|
|
@ -173,8 +173,41 @@
|
|||||||
|
|
||||||
|
|
||||||
var $delete = $('#btnDelete');
|
var $delete = $('#btnDelete');
|
||||||
|
//$("#btnDelete").on("click", function () {
|
||||||
|
// debugger;
|
||||||
|
// _$companyTable.rows($('table tr').has('input:checked')).remove().draw();
|
||||||
|
//})
|
||||||
|
|
||||||
|
//$("#btnDelete").on("click", function () {
|
||||||
|
// debugger;
|
||||||
|
|
||||||
|
// const table = document.getElementById("CompanyMasterTable");
|
||||||
|
// console.log(table.id);
|
||||||
|
// //for (const [index, row] of [...table.rows].entries()) {
|
||||||
|
// // if (row.querySelector('input:checked')) {
|
||||||
|
// //table.deleteRow(index);
|
||||||
|
// // console.log(table);
|
||||||
|
// // deletOpenTagsByCheckBoxes(index);
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
//});
|
||||||
|
|
||||||
|
// $(function () {
|
||||||
$delete.click(function () {
|
$delete.click(function () {
|
||||||
|
debugger;
|
||||||
|
//var ids = $.map(_$companyTable('getSelections'), function (row) {
|
||||||
|
// return row.id
|
||||||
|
// });
|
||||||
|
//var rows = _$companyTable.rows({ 'search': 'applied' }).nodes();
|
||||||
|
//var deleteId = $('input[type="checkbox"]', rows).prop('checked', this.checked);
|
||||||
|
|
||||||
|
//var ids = deleteId;
|
||||||
|
//var ids = $('#CompanyMasterTable').column(1, { selected: true }).data();
|
||||||
|
|
||||||
|
//var ids = []
|
||||||
|
//$('input[type="checkbox"]:checked').each(function () {
|
||||||
|
// ids.push($(this).data('id'))
|
||||||
|
//})
|
||||||
var ids = _$companyTable
|
var ids = _$companyTable
|
||||||
.row({ selected: true })
|
.row({ selected: true })
|
||||||
.data();
|
.data();
|
||||||
@ -188,9 +221,10 @@
|
|||||||
}
|
}
|
||||||
deletOpenTagsByCheckBoxes();
|
deletOpenTagsByCheckBoxes();
|
||||||
});
|
});
|
||||||
|
// });
|
||||||
|
|
||||||
function deletOpenTagsByCheckBoxes(idList) {
|
function deletOpenTagsByCheckBoxes(idList) {
|
||||||
|
debugger;
|
||||||
abp.utils.formatString(
|
abp.utils.formatString(
|
||||||
l('Deleteselectedrecords'),
|
l('Deleteselectedrecords'),
|
||||||
function (isConfirmed) {
|
function (isConfirmed) {
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
//-----------------------
|
//-----------------------
|
||||||
|
|
||||||
// Get context with jQuery - using jQuery's .get() method.
|
// Get context with jQuery - using jQuery's .get() method.
|
||||||
var salesChartCanvas = $('#salesChart').get(0).getContext('2d');
|
// var salesChartCanvas = $('#salesChart').get(0).getContext('2d');
|
||||||
// This will get the first returned node in the jQuery collection.
|
// This will get the first returned node in the jQuery collection.
|
||||||
|
|
||||||
var salesChartData = {
|
var salesChartData = {
|
||||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||||
@ -83,11 +83,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Create the line chart
|
//Create the line chart
|
||||||
var salesChart = new Chart(salesChartCanvas, {
|
//var salesChart = new Chart(salesChartCanvas, {
|
||||||
type: 'line',
|
// type: 'line',
|
||||||
data: salesChartData,
|
// data: salesChartData,
|
||||||
options: salesChartOptions
|
// options: salesChartOptions
|
||||||
});
|
//});
|
||||||
|
|
||||||
//---------------------------
|
//---------------------------
|
||||||
//- END MONTHLY SALES CHART -
|
//- END MONTHLY SALES CHART -
|
||||||
|
Loading…
x
Reference in New Issue
Block a user