Compare commits
10 Commits
abb01d3318
...
057349ec60
Author | SHA1 | Date | |
---|---|---|---|
057349ec60 | |||
a9fdec8332 | |||
0ede4ee972 | |||
5f38e0e3ef | |||
b17027163c | |||
0529c994a3 | |||
a3c1042ed2 | |||
44609a8659 | |||
f6bbb415b9 | |||
94699dd23d |
@ -18,6 +18,7 @@
|
||||
<Folder Include="bin\Debug\net6.0\ref\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FirebaseAdmin" Version="2.3.0" />
|
||||
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.9" />
|
||||
</ItemGroup>
|
||||
|
@ -37,6 +37,7 @@ using System.Net.Http.Headers;
|
||||
using Newtonsoft.Json;
|
||||
using Abp.Json;
|
||||
|
||||
|
||||
namespace BCS.BMC.CompanyMasters
|
||||
{
|
||||
public class CompanyMasterAppService : ICompanyMasterAppService
|
||||
@ -125,8 +126,8 @@ namespace BCS.BMC.CompanyMasters
|
||||
{
|
||||
int companyId = 0;
|
||||
|
||||
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())
|
||||
var company = from m in _companyMaster.GetAllList().Where(m => m.Url.ToLower().Trim() == input.Url.ToLower().Trim())
|
||||
|
||||
select m;
|
||||
|
||||
var entity = input.MapTo<CompanyMaster>();
|
||||
@ -151,9 +152,8 @@ namespace BCS.BMC.CompanyMasters
|
||||
companyId = await _companyMaster.InsertAndGetIdAsync(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw new UserFriendlyException(string.Format(L("ClientDuplicateMessage"), L(input.ClientName)));
|
||||
throw new UserFriendlyException("Url Already Exist");
|
||||
{
|
||||
throw new UserFriendlyException("The Input Url Already Exist");
|
||||
}
|
||||
return companyId;
|
||||
}
|
||||
@ -166,12 +166,26 @@ namespace BCS.BMC.CompanyMasters
|
||||
//throw new UserFriendlyException(NotFoundRecord ("Name", input.ClientName));
|
||||
throw new UserFriendlyException("No Record Found");
|
||||
}
|
||||
|
||||
|
||||
|
||||
var getclient = from m in _companyMaster.GetAllList()
|
||||
.Where(m => m.Id == input.Id && m.CompanyName.ToLower().Trim() == input.CompanyName.ToLower().Trim() && m.Id != input.Id)
|
||||
select m;
|
||||
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)
|
||||
{
|
||||
await _companyMaster.UpdateAsync(entity);
|
||||
|
@ -0,0 +1,13 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
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);
|
||||
|
||||
// Enable this line to create a multi-tenant application.
|
||||
Configuration.MultiTenancy.IsEnabled = BMCConsts.MultiTenancyEnabled;
|
||||
//Configuration.MultiTenancy.IsEnabled = BMCConsts.MultiTenancyEnabled;
|
||||
|
||||
// Configure roles
|
||||
AppRoleConfig.Configure(Configuration.Modules.Zero().RoleManagement);
|
||||
|
@ -17,6 +17,18 @@ using BCS.BMC.Authorization;
|
||||
using BCS.BMC.Authorization.Users;
|
||||
using BCS.BMC.Models.TokenAuth;
|
||||
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
|
||||
{
|
||||
@ -30,7 +42,8 @@ namespace BCS.BMC.Controllers
|
||||
private readonly IExternalAuthConfiguration _externalAuthConfiguration;
|
||||
private readonly IExternalAuthManager _externalAuthManager;
|
||||
private readonly UserRegistrationManager _userRegistrationManager;
|
||||
|
||||
private readonly IRepository<CompanyMaster, int> _companyMaster;
|
||||
ResponseMessageModel responsemessage = new ResponseMessageModel();
|
||||
public TokenAuthController(
|
||||
LogInManager logInManager,
|
||||
ITenantCache tenantCache,
|
||||
@ -38,7 +51,8 @@ namespace BCS.BMC.Controllers
|
||||
TokenAuthConfiguration configuration,
|
||||
IExternalAuthConfiguration externalAuthConfiguration,
|
||||
IExternalAuthManager externalAuthManager,
|
||||
UserRegistrationManager userRegistrationManager)
|
||||
UserRegistrationManager userRegistrationManager,
|
||||
IRepository<CompanyMaster, int> companyMaster)
|
||||
{
|
||||
_logInManager = logInManager;
|
||||
_tenantCache = tenantCache;
|
||||
@ -47,6 +61,7 @@ namespace BCS.BMC.Controllers
|
||||
_externalAuthConfiguration = externalAuthConfiguration;
|
||||
_externalAuthManager = externalAuthManager;
|
||||
_userRegistrationManager = userRegistrationManager;
|
||||
_companyMaster = companyMaster;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -117,7 +132,7 @@ namespace BCS.BMC.Controllers
|
||||
}
|
||||
|
||||
var accessToken = CreateAccessToken(CreateJwtClaims(loginResult.Identity));
|
||||
|
||||
|
||||
return new ExternalAuthenticateResultModel
|
||||
{
|
||||
AccessToken = accessToken,
|
||||
@ -232,5 +247,131 @@ namespace BCS.BMC.Controllers
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
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; }
|
||||
|
||||
}
|
||||
}
|
12
BCS.BMC/src/BCS.BMC.Web.Mvc/.config/dotnet-tools.json
Normal file
12
BCS.BMC/src/BCS.BMC.Web.Mvc/.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "6.0.10",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -42,6 +42,7 @@
|
||||
<PackageReference Include="Abp.HangFire" Version="7.3.0" />
|
||||
<PackageReference Include="Abp.RedisCache" Version="7.3.0" />
|
||||
<PackageReference Include="Abp.Castle.Log4Net" Version="7.3.0" />
|
||||
<PackageReference Include="FirebaseAdmin" Version="2.3.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\libs\" />
|
||||
|
@ -0,0 +1,29 @@
|
||||
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>
|
||||
</environment>
|
||||
|
||||
@* <environment names="Staging,Production">
|
||||
<script src="~/view-resources/Views/Users/ClientMaster.min.js" asp-append-version="true"></script>
|
||||
</environment>*@
|
||||
<environment names="Staging,Production">
|
||||
<script src="~/view-resources/Views/CompanyMaster/Index.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<section class="content">
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@ -415,4 +415,4 @@
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
</section>*@
|
||||
</section>
|
||||
|
@ -80,7 +80,7 @@
|
||||
"wwwroot/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js",
|
||||
"wwwroot/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js",
|
||||
"wwwroot/libs/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js",
|
||||
|
||||
|
||||
"wwwroot/libs/jquery-validate/jquery.validate.js",
|
||||
"wwwroot/libs/jquery-validate/jquery.validate.unobtrusive.js",
|
||||
"wwwroot/libs/push.js/push.js",
|
||||
@ -156,5 +156,11 @@
|
||||
"inputFiles": [
|
||||
"wwwroot/Common/helpers.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"outputFileName": "wwwroot/view-resources/Views/CompanyMaster/Index.min.js",
|
||||
"inputFiles": [
|
||||
"wwwroot/view-resources/Views/CompanyMaster/Index.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"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,41 +173,8 @@
|
||||
|
||||
|
||||
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 () {
|
||||
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
|
||||
.row({ selected: true })
|
||||
.data();
|
||||
@ -221,10 +188,9 @@
|
||||
}
|
||||
deletOpenTagsByCheckBoxes();
|
||||
});
|
||||
// });
|
||||
|
||||
|
||||
function deletOpenTagsByCheckBoxes(idList) {
|
||||
debugger;
|
||||
abp.utils.formatString(
|
||||
l('Deleteselectedrecords'),
|
||||
function (isConfirmed) {
|
||||
|
@ -12,8 +12,8 @@
|
||||
//-----------------------
|
||||
|
||||
// Get context with jQuery - using jQuery's .get() method.
|
||||
// var salesChartCanvas = $('#salesChart').get(0).getContext('2d');
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var salesChartCanvas = $('#salesChart').get(0).getContext('2d');
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
|
||||
var salesChartData = {
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
@ -83,11 +83,11 @@
|
||||
};
|
||||
|
||||
//Create the line chart
|
||||
//var salesChart = new Chart(salesChartCanvas, {
|
||||
// type: 'line',
|
||||
// data: salesChartData,
|
||||
// options: salesChartOptions
|
||||
//});
|
||||
var salesChart = new Chart(salesChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesChartData,
|
||||
options: salesChartOptions
|
||||
});
|
||||
|
||||
//---------------------------
|
||||
//- END MONTHLY SALES CHART -
|
||||
|
Loading…
x
Reference in New Issue
Block a user