RollCall Full Uploaded - task changes - ticket changes

This commit is contained in:
SamSys
2024-09-09 22:05:04 +03:30
parent 9077346afc
commit 6d281328f0
45 changed files with 1661 additions and 947 deletions

View File

@@ -10,13 +10,12 @@ public static class Version
{
static Version()
{
StyleVersion = "2.12.07";
AdminVersion = "2.5.27";
CameraVersion = "1.0.4";
StyleVersion = "2.12.10";
AdminVersion = "2.5.30";
CameraVersion = "1.0.6";
}
public static string StyleVersion { get; set; }
public static string AdminVersion { get; set; }
public static string CameraVersion { get; set; }
}

View File

@@ -224,30 +224,30 @@ public class AccountRepository : RepositoryBase<long, Account>, IAccountReposito
public List<AccountViewModel> GetAccountEqualToLowerPositionValue()
{
public List<AccountViewModel> GetAccountEqualToLowerPositionValue()
{
var account = GetIncludePositions(int.Parse(_contextAccessor.HttpContext.User.FindFirst("AccountId").Value));
return _context.Accounts.Include(x => x.Position)
.Where(x => x.Position.PositionValue >= account.Position.PositionValue && x.IsActiveString == "true").Select(x => new AccountViewModel()
{
PositionValue = x.Position.PositionValue,
Id = x.id,
Fullname = x.Fullname,
Mobile = x.Mobile,
ProfilePhoto = x.ProfilePhoto,
Role = x.Role.Name,
RoleId = x.RoleId,
Username = x.Username,
RoleName = x.RoleName,
CreationDate = x.CreationDate.ToFarsi(),
IsActiveString = x.IsActiveString,
CreationDateGr = x.CreationDate,
var account = GetIncludePositions(int.Parse(_contextAccessor.HttpContext.User.FindFirst("AccountId").Value));
return _context.Accounts.Include(x => x.Position)
.Where(x => x.Position.PositionValue >= account.Position.PositionValue && x.IsActiveString == "true" && x.id != account.id).Select(x => new AccountViewModel()
{
PositionValue = x.Position.PositionValue,
Id = x.id,
Fullname = x.Fullname,
Mobile = x.Mobile,
ProfilePhoto = x.ProfilePhoto,
Role = x.Role.Name,
RoleId = x.RoleId,
Username = x.Username,
RoleName = x.RoleName,
CreationDate = x.CreationDate.ToFarsi(),
IsActiveString = x.IsActiveString,
CreationDateGr = x.CreationDate,
}).ToList();
}).ToList();
}
public List<Account> GetAccountsByIds(List<long> ids)
}
public List<Account> GetAccountsByIds(List<long> ids)
{
var res = _context.Accounts.Include(x => x.Position).Where(x => x.PositionId != null);
return res.Where(x => ids.Contains(x.id)).ToList();

View File

@@ -13,6 +13,8 @@ namespace CompanyManagment.App.Contracts.Workshop
public long EmployeeId { get; set; }
public string Name { get; set; }
public IFormFile ProfilePhoto { get; set; }
public bool HasPicture { get; set; }
public string Pic1 { get; set; }
public string Pic2 { get; set; }
public bool HasPicture { get; set; }
}
}

View File

@@ -622,7 +622,7 @@ public class InsuranceListApplication: IInsuranceListApplication
}
//farokhiChanges
if (item.EmployeeId == 42783)
employeeDetailsForInsuranceObj.MonthlyBenefits = 88000000;
employeeDetailsForInsuranceObj.MonthlyBenefits = 5382855;
employeeDetailsForInsuranceObj.BenefitsIncludedContinuous =employeeDetailsForInsuranceObj.MonthlyBenefits + employeeDetailsForInsuranceObj.MonthlySalary;
@@ -666,7 +666,7 @@ public class InsuranceListApplication: IInsuranceListApplication
employeeDetailsForInsuranceObj.StartWorkDateGr = item.StartWorkDateGr;
//farokhiChanges
if (item.EmployeeId == 42783)
employeeDetailsForInsuranceObj.MonthlyBenefits = 88000000;
employeeDetailsForInsuranceObj.MonthlyBenefits = 5382855;
list.Add(employeeDetailsForInsuranceObj);
}

View File

@@ -83,15 +83,16 @@ public class RollCallEmployeeApplication : IRollCallEmployeeApplication
public OperationResult UploadedImage(long Employeeid, long WorkshopId)
{
var opreation = new OperationResult();
var emp = _rollCallEmployeeRepository.Get(Employeeid);
if (emp == null)
return opreation.Failed("پرسنل یافت نشد");
var opreation = new OperationResult();
var emp = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(Employeeid, WorkshopId);
if (emp == null)
return opreation.Failed("پرسنل یافت نشد");
emp.HasImage();
_rollCallEmployeeRepository.SaveChanges();
return opreation.Succcedded();
}
var rollCall = _rollCallEmployeeRepository.Get(emp.Id);
rollCall.HasImage();
_rollCallEmployeeRepository.SaveChanges();
return opreation.Succcedded();
}
public List<RollCallEmployeeViewModel> GetByWorkshopId(long workshopId)

View File

@@ -29,6 +29,7 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
var query = _context.RollCallEmployees.Select(x => new RollCallEmployeeViewModel()
{
Id = x.id,
EmployeeId = x.EmployeeId,
WorkshopId = x.WorkshopId,
EmployeeFullName = x.EmployeeFullName,
IsActiveString = x.IsActiveString,

View File

@@ -95,7 +95,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
{
StartDate = x.StartDate,
EndDate = x.EndDate,
TotalWorkingHours = $"{Convert.ToInt32(x.TotalhourseSpan.TotalHours)}:{x.TotalhourseSpan.Minutes.ToString("00")}",
TotalWorkingHours = $"{x.TotalhourseSpan.TotalHours.ToString("0")}:{x.TotalhourseSpan.Minutes.ToString("00")}",
DayOfWeek = x.DayOfWeek,
RollCallDateFa = x.RollCallDateFa,
DateTimeGr = x.DateTimeGr,
@@ -237,7 +237,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
IsHoliday = _holidayItemApplication.IsHoliday(x.DateGr),
IsAbsent = !x.RollCallTimesList.Any(),
RollCallTimesList = x.RollCallTimesList,
TotalWorkingHours = $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
TotalWorkingHours = $"{x.TotalWorkingHoursSpan.TotalHours.ToString("0")}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
}).ToList();
return new EmployeeRollCallsByMonthViewModel()
{
@@ -362,7 +362,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
HasLeave = x.HasLeave,
IsAbsent = x.IsAbsent,
PersonnelCode = x.PersonnelCode,
TotalWorkingHours = $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}"
TotalWorkingHours = $"{x.TotalWorkingHoursSpan.TotalHours.ToString("0")}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}"
});
return result;
}
@@ -443,7 +443,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
EmployeeFullName = x.EmployeeFullName,
EmployeeId = x.EmployeeId,
TotalWorkingHours =
$"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
$"{x.TotalWorkingHoursSpan.TotalHours.ToString("0")}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
RollCallTimesList = x.RollCallTimesList
}).ToList();

View File

@@ -710,8 +710,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
BaseResult = Sum + fixFeePrice;
//var rondUp = Convert.ToInt32(BaseResult);
Console.WriteLine($"{test} - mozdeSaleGhabl[{firstDayliSalary}] - mozdeSaleJari[{BaseResult}] - fixFeePercentage[{fixFeePercentage}] - fixFeePrice[{fixFeePrice}]");
//آی دی سال جاری
loopDateId = salary.Where(x => x.StartDate <= LoopDateGr && x.EndDate >= LoopDateGr && x.id != loopDateId).Select(x => x.id).FirstOrDefault();
// ذخیره سال جاری بعنوان سال گذشته برای عملیات بعدی
@@ -746,12 +745,12 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
var Sum = firstDayliSalary + percntSumDaylifee;
//مزد پایه
BaseResult = Sum + fixFeePrice;
//var rondUp = Convert.ToInt32(BaseResult);
//var rondUp = Convert.ToInt32(BaseResult);
Console.WriteLine($"{test} - mozdeSaleGhabl[{firstDayliSalary}] - mozdeSaleJari[{BaseResult}] - fixFeePercentage[{fixFeePercentage}] - fixFeePrice[{fixFeePrice}]");
//آی دی سال جاری
loopDateId = salary.Where(x => x.StartDate <= LoopDateGr && x.EndDate >= LoopDateGr && x.id != loopDateId).Select(x => x.id).FirstOrDefault();
//آی دی سال جاری
loopDateId = salary.Where(x => x.StartDate <= LoopDateGr && x.EndDate >= LoopDateGr && x.id != loopDateId).Select(x => x.id).FirstOrDefault();
// ذخیره سال جاری بعنوان سال گذشته برای عملیات بعدی
oldYear = loopdateYear;
}
@@ -774,12 +773,12 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
//مزد پایه
BaseResult = Sum + fixFeePrice;
//var rondUp = Convert.ToInt32(BaseResult);
//var rondUp = Convert.ToInt32(BaseResult);
Console.WriteLine($"{test} - mozdeSaleGhabl[{firstDayliSalary}] - mozdeSaleJari[{BaseResult}] - fixFeePercentage[{fixFeePercentage}] - fixFeePrice[{fixFeePrice}]");
//آی دی سال جاری
loopDateId = salary.Where(x => x.StartDate <= LoopDateGr && x.EndDate >= LoopDateGr && x.id != loopDateId).Select(x => x.id).FirstOrDefault();
//آی دی سال جاری
loopDateId = salary.Where(x => x.StartDate <= LoopDateGr && x.EndDate >= LoopDateGr && x.id != loopDateId).Select(x => x.id).FirstOrDefault();
// ذخیره سال جاری بعنوان سال گذشته برای عملیات بعدی
oldYear = loopdateYear;
}
@@ -806,8 +805,11 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
//پایه سنوات سال جاری بعلاوه مزد پایه
BaseResult += Basic;
basicResultSum += Basic;
//صفر نمودن شمارنده روزها
DayCounter = 0;
Console.BackgroundColor = ConsoleColor.DarkYellow;
Console.WriteLine($"{test} - mozd[{BaseResult}] - Basic[{Basic}]");
Console.ResetColor();
//صفر نمودن شمارنده روزها
DayCounter = 0;
}
//if (loopdateFa == "1398/12/29")

View File

@@ -844,7 +844,7 @@ public class IndexModel : PageModel
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
//farokhiChanges
if (employeeId == 42783)
benefitsIncludedContinuousL = 88000000;
benefitsIncludedContinuousL = 5382855;
if (workingDaysL < endMonthCurrentDayL)
{
if (endMonthCurrentDayL == 29)

View File

@@ -1,16 +1,17 @@
@model AccountManagement.Application.Contracts.Task.CreateTaskModal
@* @model ServiceHost.Areas.AdminNew.Pages.Company.Task.CreateModel *@
@inject _0_Framework.Application.IAuthHelper AuthHelper;
@using Version = _0_Framework.Application.Version
@using _0_Framework.Application
@{
ViewData["title"] = " - وظیفه جدید";
string adminVersion = _0_Framework.Application.Version.AdminVersion;
}
<script src="~/AssetsClient/js/jquery-ui.js"></script>
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/tasks/css/create.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/tasks/css/create.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
@@ -313,7 +314,7 @@
</div>
<!-- مودال -->
<script src="~/assetsclient/js/site.js?ver=@Version.AdminVersion"></script>
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
@@ -333,4 +334,4 @@
</script>
<script src="~/assetsadminnew/tasks/js/create.js?ver=@Version.AdminVersion"></script>
<script src="~/assetsadminnew/tasks/js/create.js?ver=@adminVersion"></script>

View File

@@ -12,7 +12,7 @@
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/table-grid.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/tasks/css/task-manager-list.css" rel="stylesheet" />
<link href="~/assetsadminnew/tasks/css/task-manager-list.css?ver=123" rel="stylesheet" />
@* ?ver=@Version.AdminVersion *@
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.AdminVersion" rel="stylesheet" />

View File

@@ -0,0 +1,64 @@
@page
@model ServiceHost.Areas.Camera.Pages.ErrorMessageModel
@using Version = _0_Framework.Application.Version
@{
Layout = "Shared/_Layout";
ViewData["Title"] = " - " + "خطای سیستمی";
}
@section Styles
{
<link rel="stylesheet" href="~/AssetsClient/css/webcam.css?ver=@Version.CameraVersion">
<style>
body {
background-color: #222831
}
.title-logo {
color: #20a2a2;
font-weight: 600;
}
.title-logo-mobile {
font-size: 55px;
font-weight: 700;
margin: 0 0 40px 0;
}
</style>
}
<div class="d-flex flex-column justify-content-center vh-100 text-center">
<div>
<svg width="100px" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 621.6 721.91">
<defs>
<style>
.clsd-1 {
fill: url(#linear-gradient-2);
}
.clsd-2 {
fill: url(#linear-gradient-3);
}
.clsd-3 {
fill: url(#linear-gradient);
}
</style>
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#30c1c1" />
<stop offset="1" stop-color="#087474" />
</linearGradient>
<linearGradient id="linear-gradient-2" x1="217.07" y1="187.47" x2="523.83" y2="187.47" xlink:href="#linear-gradient" />
<linearGradient id="linear-gradient-3" x1="1.3" y1="146.6" x2="395.56" y2="146.6" xlink:href="#linear-gradient" />
</defs>
<polygon class="clsd-3" points="0 328.82 129.91 244.95 129.91 453.87 310.8 562.4 488.4 453.87 488.4 355.2 310.8 355.2 488.4 241.73 621.6 241.73 621.6 541.02 310.8 721.91 0 541.02 0 328.82" />
<polygon class="clsd-1" points="217.07 309.16 217.07 192.4 426.8 65.78 523.83 123.33 217.07 309.16" />
<polyline class="clsd-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0" />
</svg>
<h5 class="mt-2 title-logo">سامانه هوشمند گزارشگیر</h5>
</div>
<div>
<p class="text-white">@Model.Message</p>
</div>
</div>

View File

@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ServiceHost.Areas.Camera.Pages
{
public class ErrorMessageModel : PageModel
{
public string Message { get; set; }
public void OnGet(string message)
{
if (message == "ServiceNotFound")
Message = "شما سرویس فعال ندارید.";
if (message == "EmployeeNotFound")
Message = "شما هیچ پرسنلی را به حضور غیاب اضافه نکرده‌اید.";
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,127 +1,162 @@
using System.Diagnostics;
using _0_Framework.Application;
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.RollCall;
using CompanyManagment.App.Contracts.RollCallEmployee;
using CompanyManagment.App.Contracts.RollCallService;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.IO;
using CompanyManagment.App.Contracts.RollCallEmployee;
using CompanyManagment.App.Contracts.RollCallService;
namespace ServiceHost.Areas.Camera.Pages;
[Authorize]
public class IndexModel : PageModel
{
private readonly IAuthHelper _authHelper;
private readonly IConfiguration _configuration;
private readonly IEmployeeApplication _employeeApplication;
private readonly IRollCallApplication _rollCallApplication;
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
private readonly IRollCallServiceApplication _rollCallServiceApplication;
private readonly IWebHostEnvironment _webHostEnvironment;
public string filePath = "";
public List<ImageData> ImageDataList;
public string modelPath = "";
public List<long> PersonelIds;
public long WorkshopId;
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly IConfiguration _configuration;
private readonly IEmployeeApplication _employeeApplication;
private readonly IRollCallApplication _rollCallApplication;
private readonly IRollCallServiceApplication _rollCallServiceApplication;
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
private readonly IAuthHelper _authHelper;
public long WorkshopId;
public List<ImageData> ImageDataList;
public List<long> PersonelIds;
public IndexModel(IWebHostEnvironment webHostEnvironment, IConfiguration configuration,
IEmployeeApplication employeeApplication, IRollCallApplication rollCallApplication, IAuthHelper authHelper,
IRollCallServiceApplication rollCallServiceApplication,
IRollCallEmployeeApplication rollCallEmployeeApplication)
{
_webHostEnvironment = webHostEnvironment;
_configuration = configuration;
_employeeApplication = employeeApplication;
_rollCallApplication = rollCallApplication;
_authHelper = authHelper;
_rollCallServiceApplication = rollCallServiceApplication;
_rollCallEmployeeApplication = rollCallEmployeeApplication;
}
public IndexModel(IWebHostEnvironment webHostEnvironment, IConfiguration configuration, IEmployeeApplication employeeApplication, IRollCallApplication rollCallApplication, IAuthHelper authHelper, IRollCallServiceApplication rollCallServiceApplication, IRollCallEmployeeApplication rollCallEmployeeApplication)
{
_webHostEnvironment = webHostEnvironment;
_configuration = configuration;
_employeeApplication = employeeApplication;
_rollCallApplication = rollCallApplication;
_authHelper = authHelper;
_rollCallServiceApplication = rollCallServiceApplication;
_rollCallEmployeeApplication = rollCallEmployeeApplication;
}
public void OnGet()
{
var cameraAccount = _authHelper.CameraAccountInfo();
WorkshopId = cameraAccount.WorkshopId;
var service = _rollCallServiceApplication.GetActiveServiceByWorkshopId(cameraAccount.WorkshopId);
if (service != null && service.IsActiveString == "true")
if (_rollCallEmployeeApplication.GetByWorkshopId(cameraAccount.WorkshopId).Count > 0)
{
PersonelIds = _rollCallEmployeeApplication.GetByWorkshopId(cameraAccount.WorkshopId)
.Where(x => x.IsActiveString == "true" && x.HasUploadedImage == "true")
.Select(x => x.EmployeeId)
.Take(service.MaxPersonValid)
.ToList();
var imageData = new List<ImageData>();
foreach (var personId in PersonelIds)
for (var i = 1; i <= 2; i++)
{
var fileContent = System.IO.File.ReadAllBytes(
$"{_webHostEnvironment.ContentRootPath}\\Faces\\{WorkshopId}\\{personId}\\{i}.jpg");
imageData.Add(new ImageData
{
ImagePath = Convert.ToBase64String(fileContent),
ImageNumber = i,
Id = personId
});
}
public IActionResult OnGet()
{
var cameraAccount = _authHelper.CameraAccountInfo();
WorkshopId = cameraAccount.WorkshopId;
var service = _rollCallServiceApplication.GetActiveServiceByWorkshopId(cameraAccount.WorkshopId);
if (service != null && service.IsActiveString == "true")
{
if (_rollCallEmployeeApplication.GetByWorkshopId(cameraAccount.WorkshopId).Count > 0)
{
var personnelIdsList = _rollCallEmployeeApplication.GetByWorkshopId(cameraAccount.WorkshopId)
.Where(x => x.IsActiveString == "true" && x.HasUploadedImage == "true")
.Select(x => x.EmployeeId);
ImageDataList = imageData;
}
}
if (service.MaxPersonValid != -1)
{
PersonelIds = personnelIdsList.Take(service.MaxPersonValid).ToList();
}
else
{
PersonelIds = personnelIdsList.ToList();
}
public IActionResult OnGetEmployeeFlag(long employeeId, long workshopId)
{
var employeeFullName = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId)
.EmployeeFullName;
var flagId = _rollCallApplication.Flag(employeeId, workshopId);
var imageData = new List<ImageData>();
foreach (var personId in PersonelIds)
{
for (int i = 1; i <= 2; i++)
{
byte[] fileContent = System.IO.File.ReadAllBytes($"{_webHostEnvironment.ContentRootPath}\\Faces\\{WorkshopId}\\{personId}\\{i}.jpg");
imageData.Add(new ImageData()
{
ImagePath = Convert.ToBase64String(fileContent),
ImageNumber = i,
Id = personId
});
}
}
ImageDataList = imageData;
}
else
{
var message = "EmployeeNotFound";
return Redirect("/Camera/ErrorMessage?message=" + message);
}
return new JsonResult(new
{
employeeName = employeeFullName,
flag = flagId
});
}
} else
{
var message = "ServiceNotFound";
return Redirect("/Camera/ErrorMessage?message=" + message);
}
public IActionResult OnGetOut(long flagId)
{
var res = _rollCallApplication.Edit(flagId);
if (res.IsSuccedded)
return new JsonResult(new
{
isSuccess = true
});
return new JsonResult(new
{
isSuccess = false
});
}
return Page();
}
public IActionResult OnGetInCom(long employeeId, long workshopId)
{
var now = DateTime.Now;
var command = new CreateRollCall
{
WorkshopId = workshopId,
EmployeeId = employeeId,
StartDate = now
};
var res = _rollCallApplication.Create(command);
if (res.IsSuccedded)
return new JsonResult(new
{
isSuccess = true
});
return new JsonResult(new
{
isSuccess = false
});
}
public IActionResult OnGetEmployeeFlag(long employeeId, long workshopId)
{
var employeeFullName = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId).EmployeeFullName;
var flagId = _rollCallApplication.Flag(employeeId, workshopId);
return new JsonResult(new
{
employeeName = employeeFullName,
flag = flagId
});
}
public IActionResult OnGetOut(long flagId)
{
var res = _rollCallApplication.Edit(flagId);
if (res.IsSuccedded)
{
return new JsonResult(new
{
isSuccess = true,
});
}
else
{
return new JsonResult(new
{
isSuccess = false,
});
}
}
public IActionResult OnGetInCom(long employeeId, long workshopId)
{
var now = DateTime.Now;
var command = new CreateRollCall()
{
WorkshopId = workshopId,
EmployeeId = employeeId,
StartDate = now,
};
var res = _rollCallApplication.Create(command);
if (res.IsSuccedded)
{
return new JsonResult(new
{
isSuccess = true,
});
}
else
{
return new JsonResult(new
{
isSuccess = false,
});
}
}
}
public class ImageData
{
public string ImagePath { get; set; }
public int ImageNumber { get; set; }
public long Id { get; set; }
public string ImagePath { get; set; }
public int ImageNumber { get; set; }
public long Id { get; set; }
}

View File

@@ -0,0 +1,154 @@
@using Microsoft.AspNetCore.Razor.Language.Intermediate
@using Version = _0_Framework.Application.Version
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=100vw">
<meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
<meta name="author" content="Coderthemes">
<link rel="shortcut icon" href="~/AdminTheme/assets/images/favicon_1.ico">
<title>@ViewData["Title"] | دادمهر گستر </title>
<!-- Base Css Files -->
<link href="~/AdminTheme/assets/css/bootstrap.min.css" rel="stylesheet" />
<!-- Font Icons -->
<link href="~/AdminTheme/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="~/AdminTheme/assets/ionicon/css/ionicons.min.css" rel="stylesheet" />
<link href="~/AdminTheme/assets/css/material-design-iconic-font.min.css" rel="stylesheet">
<!-- animate css -->
<link href="~/AdminTheme/assets/css/animate.css" rel="stylesheet" />
<!-- Waves-effect -->
<link href="~/AdminTheme/assets/css/waves-effect.css" rel="stylesheet">
<!-- sweet alerts -->
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
<!-- Custom Files -->
@*<link href="~/AdminTheme/assets/css/persian-datepicker.min.css" rel="stylesheet" />*@
<style>
#iframe {
width: 100%;
height: 2000px;
border: unset;
}
.b1 {
display: block !important;
}
input.persianDateInput {
text-align: center !important;
}
.sweet-alert {
font-family: 'IranSans' !important
}
</style>
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
<link href="~/AdminTheme/assets/css/alert.css" rel="stylesheet">
<link href="~/AdminTheme/assets/notifications/notification.css" rel="stylesheet" />
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="~/AdminTheme/assets/css/helper.css" rel="stylesheet" type="text/css" />
<link href="~/AdminTheme/assets/css/style.css?ver=@Version.AdminVersion" rel="stylesheet" type="text/css" />
<script src="~/AdminTheme/assets/js/modernizr.min.js"></script>
<link href="~/admintheme/css/admin.css" rel="stylesheet" />
<link href="~/lib/select2/css/select2.css" rel="stylesheet" />
@* <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> *@
@RenderSection("Styles", false)
</head>
<body class="fixed-left">
@RenderBody()
<!-- jQuery -->
@*<script src="~/lib/jquery/dist/jquery.min.js"></script>*@
<script src="~/AdminTheme/assets/js/jquery.min.js"></script>
<script src="~/AdminTheme/assets/js/bootstrap.min.js"></script>
<script src="~/AdminTheme/assets/js/waves.js"></script>
<script src="~/AdminTheme/assets/js/wow.min.js"></script>
<script src="~/AdminTheme/assets/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="~/AdminTheme/assets/js/jquery.scrollTo.min.js"></script>
<script src="~/AdminTheme/assets/chat/moment-2.2.1.js"></script>
<script src="~/AdminTheme/assets/jquery-sparkline/jquery.sparkline.min.js"></script>
<script src="~/AdminTheme/assets/jquery-detectmobile/detect.js"></script>
<script src="~/AdminTheme/assets/fastclick/fastclick.js"></script>
<script src="~/AdminTheme/assets/jquery-slimscroll/jquery.slimscroll.js"></script>
<script src="~/AdminTheme/assets/jquery-blockui/jquery.blockUI.js"></script>
<!-- sweet alerts -->
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.init.js"></script>
<!-- flot Chart -->
@*<script src="~/AdminTheme/assets/flot-chart/jquery.flot.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.time.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.tooltip.min.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.resize.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.pie.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.selection.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.stack.js"></script>
<script src="~/AdminTheme/assets/flot-chart/jquery.flot.crosshair.js"></script>*@
<!-- Counter-up -->
<script src="~/AdminTheme/assets/counterup/waypoints.min.js" type="text/javascript"></script>
<script src="~/AdminTheme/assets/counterup/jquery.counterup.min.js" type="text/javascript"></script>
@*<script src="~/AdminTheme/js/jquery.min360.js"></script>*@
<!-- CUSTOM JS -->
<script src="~/lib/jquery/dist/jquery.app.js"></script>
<!-- Dashboard -->
<script src="~/AdminTheme/js/jquery.dashboard.js"></script>
<!-- Chat -->
<script src="~/AdminTheme/assets/js/jquery.chat.js"></script>
<!-- Todo -->
<script src="~/AdminTheme/assets/js/jquery.todo.js"></script>
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
<script src="~/AdminTheme/assets/notifications/notify.min.js"></script>
<script src="~/AdminTheme/assets/notifications/notify-metro.js"></script>
<script src="~/AdminTheme/assets/notifications/notifications.js"></script>
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.init.js"></script>
@RenderSection("Script", false)
</body>
</html>

View File

@@ -1,26 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=100vw">
<meta name="description" content="A fully featured employer website which can be used to build CRM, CMS, etc">
<meta name="author" content="gozareshgir">
<title> حضور و غیاب @ViewData["Title"]</title>
<meta charset="utf-8">
<meta name="viewport" content="width=100vw">
<meta name="description" content="A fully featured employer website which can be used to build CRM, CMS, etc">
<meta name="author" content="gozareshgir">
<title> حضور و غیاب @ViewData["Title"]</title>
<link rel="icon" type="image/x-icon" href="~/AssetsClient/images/favicon.ico">
<link rel="icon" type="image/x-icon" href="~/AssetsClient/images/favicon.ico">
<!-- Base Css Files -->
<link href="~/bootstrp5.3.2/css/bootstrap.rtl.css" rel="stylesheet"/>
<!-- Base Css Files -->
<link href="~/bootstrp5.3.2/css/bootstrap.rtl.css" rel="stylesheet" />
<link rel="stylesheet" href="~/bootstrap-icons-1.11.2/font/bootstrap-icons.css" asp-append-version="true"/>
<link rel="stylesheet" href="~/bootstrap-icons-1.11.2/font/bootstrap-icons.css" asp-append-version="true" />
<!-- Font Icons -->
<!-- Font Icons -->
<link href="~/admintheme/css/publicfinancial.css" rel="stylesheet"/>
<link href="~/admintheme/css/publicfinancial.css" rel="stylesheet" />
<style>
<style>
.sweet-alert {
font-family: 'IranSans' !important
}
@@ -31,13 +37,16 @@
<body class="fixed-left" dir="rtl">
<!-- Begin page -->
<div class="form-setup">
<!-- Begin page -->
<div class="form-setup">
@RenderBody()
@RenderBody()
</div>
</div>
</body>

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=100vw">
@* <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1"> *@
@* <meta name="viewport" content="width=device-width, initial-scale=1.0"> *@
<title> گزارشگیر @ViewData["Title"]</title>
<link rel="icon" type="image/x-icon" href="~/AssetsClient/images/favicon.ico">
<link rel="stylesheet" href="~/AssetsClient/css/bootstrap.rtl.css">
@RenderSection("Styles", false)
@* <style>
body, html {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
</style> *@
</head>
<body>
<div id="container">
<div id="display1">
@RenderBody()
</div>
</div>
<script src="~/AssetsClient/js/jquery-3.7.1.min.js"></script>
<script src="~/AssetsClient/js/bootstrap.bundle.min.js"></script>
@RenderSection("Script", false)
</body>
</html>

View File

@@ -1,2 +1,2 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>

View File

@@ -1,3 +1,3 @@
@using ServiceHost
@namespace ServiceHost.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -1,3 +1,3 @@
@{
Layout = "_CameraLayout";
}
Layout = "_Layout";
}

View File

@@ -35,15 +35,38 @@
border-radius: 7px;
}
@@media (max-width: 767px) {
.table-rollcall .width2 {
width: 35% !important;
overflow: hidden;
}
.goToTop {
position: fixed;
bottom: -10px;
margin-right: 100px;
z-index: 100;
color: #fff;
background-color: #25acacd6;
}
.goToTop:hover {
color: #fff;
background-color: #2ca4a4;
}
@@media screen and (max-width: 767px) {
.table-rollcall .width2 {
width: 35% !important;
overflow: hidden;
}
.sticky {
top: 48px !important;
}
.goToTop {
position: fixed;
bottom: 54px;
margin-right: 39%;
z-index: 100;
color: #fff;
background-color: #25acac70;
}
}
</style>
}
@@ -79,6 +102,16 @@
</div>
</div>
<button class="btn btn-rounded mb-5 goToTop">
<div class="d-flex align-items-center">
<span>برو بالا</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
</svg>
</div>
</button>
<div class="container-fluid">
<div class="row px-2">
<div class="col-12 p-0 mb-2 d-none d-md-block">

View File

@@ -46,7 +46,7 @@
<div class="container-fluid">
<div class="row p-lg-2">
<div class="col-8 ps-0 d-none d-md-block">
<div class="card" style="height: 785px;">
<div class="card">
<div class="wrapper table-rollcall">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
@@ -60,99 +60,102 @@
<div class="Rtable-cell column-heading width7 text-start">تجمیع در خروج</div>
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
</div>
@if (@Model.RollCallViewModels.PresentEmployees.Any())
{
@foreach (var item in Model.RollCallViewModels.PresentEmployees)
<div class="w-100" style="height: 731px; overflow-y: scroll">
<div></div>
@if (@Model.RollCallViewModels.PresentEmployees.Any())
{
<div class="Rtable-row align-items-center position-relative openAction @(item.RollCallTimesList.Last().EndDate != null ? "existTimeRollCall" : "")">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(index++)
@foreach (var item in Model.RollCallViewModels.PresentEmployees)
{
<div class="Rtable-row align-items-center position-relative openAction @(item.RollCallTimesList.Last().EndDate != null ? "existTimeRollCall" : "")">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(index++)
</div>
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4 position-relative bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell width5 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت ورود</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.StartDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell width6 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت خروج</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.EndDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell position-relative width7 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تجمیع در خروج: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell position-relative width8 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
<div class="d-flex ms-1">
@if (item.RollCallTimesList.Last().EndDate == null)
{
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE"/>
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE"/>
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
}
else
{
@item.TotalWorkingHours
}
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4 position-relative bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell width5 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت ورود</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.StartDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell width6 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت خروج</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.EndDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell position-relative width7 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تجمیع در خروج: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell position-relative width8 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
<div class="d-flex ms-1">
@if (item.RollCallTimesList.Last().EndDate == null)
{
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE"/>
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE"/>
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
}
else
{
@item.TotalWorkingHours
}
</div>
</div>
</div>
</div>
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
@@ -160,7 +163,7 @@
<div class="col-4 ps-0 d-none d-md-block">
<div class="row p-0 g-3">
<div class="col-12">
<div class="card" style="height: 384px;">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
@@ -173,51 +176,55 @@
</div>
</div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
<div class="w-100" style="height: 303px; overflow-y: scroll">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave))
{
if (!item.HasLeave)
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
<div class="Rtable-row align-items-center position-relative absenceItem">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
if (!item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative absenceItem">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexAbsent++)
</div>
</div>
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexAbsent++)
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
</div>
}
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card" style="height: 384px;">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
@@ -231,52 +238,55 @@
</div>
</div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
<div class="w-100" style="height: 303px; overflow-y: scroll">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave))
{
if (item.HasLeave)
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
<div class="Rtable-row align-items-center position-relative leaveItem">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
if (item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative leaveItem">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexLeave++)
</div>
</div>
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexLeave++)
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none"></div>
<div class="d-flex ms-1">@item.Reason</div>
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none"></div>
<div class="d-flex ms-1">@item.Reason</div>
</div>
</div>
</div>
}
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>

View File

@@ -68,7 +68,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
}
public IActionResult OnGetCurrentDayAjax(string type)
{
var workshopHash = User.FindFirstValue("WorkshopSlug");

View File

@@ -74,7 +74,7 @@
<path d="M19.5 10.5C19.5 11.3284 18.8284 12 18 12C17.1716 12 16.5 11.3284 16.5 10.5C16.5 9.67157 17.1716 9 18 9C18.8284 9 19.5 9.67157 19.5 10.5Z" fill="white"></path>
<path stroke-width="1.5" d="M18 24.75V17.25C18 15.8358 18 15.1287 17.5607 14.6893C17.1213 14.25 16.4142 14.25 15 14.25V14.25M18 24.75H20.25M18 24.75H15.75" stroke="white"></path>
</svg>
<p class="m-0 ms-2">تعداد پرسنل سرویس خریداری شده: @Model.MaxPersonValid</p>
<p class="m-0 ms-2">تعداد پرسنل سرویس خریداری شده: @(Model.MaxPersonValid == -1 ? "نامحدود" : Model.MaxPersonValid)</p>
</div>
</div>
<div class="col-12 col-md-4 text-center text-md-center">

View File

@@ -79,49 +79,53 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public IActionResult OnGetCheckModalTakeImage()
{
var mess = "";
var workshopHash = User.FindFirstValue("WorkshopSlug");
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
if (workshopId > 0)
if (workshopId <= 0)
{
var plan = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
if (plan != null)
return new JsonResult(new
{
if (plan.IsActiveString == "true")
{
var maxValid = plan.MaxPersonValid;
var activedPerson = _rollCallEmployeeApplication.activedPerson(workshopId);
if (activedPerson < maxValid)
{
return new JsonResult(new
{
isSuccedded = true,
message = "موفق"
});
}
else
{
mess = "محدودیت افزودن پرسنل";
}
}
else
{
mess = "سرویس شما فعال نیست";
}
}
else
{
mess = "شما سرویس خریداری شده ندارید";
}
isSuccedded = false,
message = "کارگاه شما یافت نشده است"
});
}
else
var plan = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
if (plan == null)
{
mess = "کارگاه شما یافت نشده است";
return new JsonResult(new
{
isSuccedded = false,
message = "شما سرویس خریداری شده ندارید"
});
}
if (plan.IsActiveString != "true")
{
return new JsonResult(new
{
isSuccedded = false,
message = "سرویس شما فعال نیست"
});
}
var maxValid = plan.MaxPersonValid;
if (maxValid == -1 || _rollCallEmployeeApplication.activedPerson(workshopId) < maxValid)
{
return new JsonResult(new
{
isSuccedded = true,
message = "موفق"
});
}
return new JsonResult(new
{
isSuccedded = false,
message = mess,
message = "محدودیت افزودن پرسنل"
});
}
@@ -144,13 +148,26 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
if (employeeDetails != null)
employeeName = employeeDetails.EmployeeFullName;
string pic1 = "";
string pic2 = "";
if (hasPicture)
{
byte[] fileContent1 = System.IO.File.ReadAllBytes($"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{1}.jpg");
pic1 = Convert.ToBase64String(fileContent1);
byte[] fileContent2 = System.IO.File.ReadAllBytes($"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{2}.jpg");
pic2 = Convert.ToBase64String(fileContent2);
}
var res = new TakePictureModel()
{
HasPicture = hasPicture,
EmployeeId = employeeId,
WorkshopId = workshopId,
Name = employeeName
Name = employeeName,
Pic1 = pic1,
Pic2 = pic2,
};
return Partial("ModalTakeImages", res);
}
@@ -196,19 +213,14 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
HasUploadedImage = "true",
};
result = _rollCallEmployeeApplication.Create(createCommand);
}
_rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus()
{ RollCallEmployeeId = result.SendId });
}
else
{
result = new OperationResult()
{
IsSuccedded = true,
Message = "عملیات با موفقیت انجام شده است"
};
result = _rollCallEmployeeApplication.UploadedImage(employeeId, workshopId);
}
_rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus()
{ RollCallEmployeeId = result.SendId });
if (result.IsSuccedded)
{
return new JsonResult(new
@@ -232,7 +244,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
return new JsonResult(new
{
IsSuccedded = false,
});
Message = e.Message,
});
}
}

View File

@@ -130,7 +130,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
return new JsonResult(new
{
Success = result.IsSuccedded,
message = result.Message,
message = result.IsSuccedded ? "نام کاربری با مورد تاییداست" : result.Message,
});
}
}

View File

@@ -33,22 +33,25 @@
<div class="container p-0 m-0">
<div class="row">
<div class="col-12">
<div class="form-group text-start my-2">
<label for="username">حساب کاربری</label>
<div class="position-relative">
<div class="form-group text-start my-2">
<label for="username">حساب کاربری</label>
<div class="position-relative">
<input type="text" class="form-control" id="username" asp-for="Username" placeholder="" style="direction: ltr;" />
<div class="position-absolute top-0 start-0 m-1 bg-transparent">
<svg id="successSvg" class="d-none" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="14" cy="14" r="10.5" stroke="#65A30D" stroke-width="1.5" />
<path d="M9.33342 14L12.8334 17.5L18.6667 10.5" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" />
<div class="spinner-border spinner-border-sm m-1 d-none" id="loadingSpinner" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<svg id="successSvg" class="d-none" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="14" cy="14" r="10.5" stroke="#65A30D" stroke-width="1.5"/>
<path d="M9.33342 14L12.8334 17.5L18.6667 10.5" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round"/>
</svg>
<svg id="errorSvg" class="d-none" width="28" height="28" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke="#ef4444" stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
<svg id="errorSvg" class="d-none" width="28" height="28" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke="#ef4444" stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
</svg>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="form-group text-start my-2">
@@ -155,4 +158,4 @@
var checkAccountAjax = `@Url.Page("./Index", "CheckAccount")`;
var saveCameraAccountAjax = `@Url.Page("./Index", "SaveCameraAccount")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/modalcameraaccount.js"></script>
<script src="~/assetsclient/pages/rollcall/js/modalcameraaccount.js?ver=123"></script>

View File

@@ -11,7 +11,7 @@
<div id="desktopDisplay">
<div class="modal-header d-block text-center mb-2">
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h5 class="modal-title" id="startBuyLabel">آپلود عکس پرسنل</h5>
<h5 class="modal-title" id="startBuyLabel">بارگذاری عکس پرسنل</h5>
<h6 class="mb-2">@Model.Name</h6>
</div>
<div class="modal-body">
@@ -55,7 +55,7 @@
<div id="mobileDisplay">
<div class="modal-header d-block text-center mb-2">
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h5 class="modal-title" id="startBuyLabel">آپلود عکس پرسنل</h5>
<h5 class="modal-title" id="startBuyLabel">بارگذاری عکس پرسنل</h5>
<h6 class="mb-2">@Model.Name</h6>
</div>
@@ -92,18 +92,18 @@
<div id="result1" style="margin-bottom: 5px;"></div>
<div id="result2" style="margin-bottom: 5px;"></div>
<div id="demoResult1" class="image-show">
<button type="button" class="upload-image1">آپلود عکس اول</button>
<button type="button" class="upload-image1">بارگذاری عکس اول</button>
@if (Model.HasPicture)
{
<img style="width: 100%; height: 100%; border-radius:10px;" data-uri="" src="@Url.Page("./EmployeeUploadPicture","LoadFirstImage",new {employeeId=Model.EmployeeId,workshopId=Model.WorkshopId})"/>
<img style="width: 100%; height: 100%; border-radius:10px;" data-uri="data:image/jpeg;base64,@Model.Pic1" id="pic1" src="data:image/jpeg;base64,@Model.Pic1" />
}
</div>
<div id="demoResult2" class="image-show">
<button type="button" class="upload-image2">آپلود عکس دوم</button>
<button type="button" class="upload-image2">بارگذاری عکس دوم</button>
@if (Model.HasPicture)
{
<img style="width: 100%; height: 100%; border-radius:10px;" data-uri="" src="@Url.Page("./EmployeeUploadPicture","LoadSecondImage", new {employeeId=Model.EmployeeId,workshopId=Model.WorkshopId})" />
<img style="width: 100%; height: 100%; border-radius:10px;" id="pic2" data-uri="data:image/jpeg;base64,@Model.Pic2" src="data:image/jpeg;base64,@Model.Pic2" />
}
</div>
<button type="button" onclick="set()" class="btn btn-success">ذخیره</button>
@@ -179,4 +179,4 @@
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var takePictureAjax = `@Url.Page("./EmployeeUploadPicture", "TakePicture")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/modaltakeimages.js"></script>
<script src="~/assetsclient/pages/rollcall/js/modaltakeimages.js?ver=000"></script>

Binary file not shown.

Binary file not shown.

View File

@@ -108,6 +108,11 @@
<None Include="Areas\Admin\Pages\Company\PersonnelInfo\Index.cshtml" />
<None Include="Areas\Admin\Pages\Company\PersonnelInfo\PrintAll.cshtml" />
<None Include="Areas\Admin\Pages\Company\Reports\Index.cshtml" />
<None Include="Areas\Camera\Pages\Index.cshtml" />
<None Include="Areas\Camera\Pages\Shared\_CameraLayout.cshtml" />
<None Include="Areas\Camera\Pages\Shared\_ValidationScriptsPartial.cshtml" />
<None Include="Areas\Camera\Pages\_ViewImports.cshtml" />
<None Include="Areas\Camera\Pages\_ViewStart.cshtml" />
<None Include="Areas\Client\Pages\Company\Checkouts\alert.cshtml" />
<None Include="Areas\Client\Pages\Company\Checkouts\CheckoutPrintAll.cshtml" />
<None Include="Areas\Client\Pages\Company\Checkouts\CustomSet.cshtml" />
@@ -249,6 +254,7 @@
<None Include="wwwroot\AssetsAdminNew\Tasks\js\Index.js" />
<None Include="wwwroot\AssetsAdminNew\Tasks\js\OperationModal.js" />
<None Include="wwwroot\AssetsAdminNew\Tasks\js\OperationRequestModal.js" />
<None Include="wwwroot\AssetsAdminNew\Tasks\js\OperationRequestModalOld.js" />
<None Include="wwwroot\AssetsAdminNew\Ticket\js\detailTicketModal.js" />
<None Include="wwwroot\AssetsAdmin\fonts\BKoodakBold.afm" />
<None Include="wwwroot\AssetsAdmin\fonts\BKoodakBold.svg" />

View File

@@ -12,10 +12,10 @@
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
//server
// "MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
//local
"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
//"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
},
"GoogleRecaptchaV3": {
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",

View File

@@ -1,4 +1,7 @@
.boxShadowDiagram {
}
.infoTxt1,
.infoTxt2,
.infoTxt3,

View File

@@ -715,6 +715,10 @@
font-size: 12px;
}
.titleTaskList {
font-size: 14px;
font-weight: 500;
}
@media(max-width: 1366px) {
.btn-register, .btn-cancel2 {
@@ -843,13 +847,15 @@
width: 100%;
}
/* .tm-gray .btn-taskmanager-more {
width: 28px;
.btn-taskmanager-more {
width: 28px !important;
}
.tm-gray .btn-taskmanager-more span{
margin: 0 !important;
}*/
.titleTaskList {
font-size: 12px;
}
}
@media (max-width:580px) {

View File

@@ -636,7 +636,8 @@ function uploadFile(file, id, boxClass) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total) * 100;
//$('#progressBar').text(Math.round(percentComplete) + '%');
loading.css('width', Math.round(percentComplete) + '%');
let h = Math.round(percentComplete);
loading.css('width', `${h}%`);
}
});

View File

@@ -669,7 +669,7 @@ function loadMore(type) {
</svg>
</span>
</button>
<button class="btn-taskmanager-more position-relative d-md-none d-block" style="width: 28px;">
<button class="btn-taskmanager-more position-relative d-md-none d-block">
<span class="align-items-center d-flex justify-content-center">
<p class="my-0"></p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
@@ -707,9 +707,9 @@ function loadMore(type) {
<path d="M3.3335 4.66797V4.66797C3.3335 5.28795 3.3335 5.59794 3.40164 5.85227C3.58658 6.54246 4.12567 7.08155 4.81586 7.26649C5.07019 7.33464 5.38018 7.33464 6.00016 7.33464H9.3335" stroke="white"/>
</svg>
</button>
<button class="btn-taskmanager-more position-relative" onclick="Detail(${item.id})" style="width: 28px;>
<button class="btn-taskmanager-more position-relative" onclick="Detail(${item.id})">
<span class="mx-1 align-items-center d-flex justify-content-center">
<p class="my-0 mx-1 d-none d-md-block">مشاهده</p>
<p class="my-0 d-none d-md-block">مشاهده</p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
@@ -1017,6 +1017,34 @@ function loadMoreRequest(type) {
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--content ">${item.endTaskTime} ${item.endTaskDateFA}</div>
</div>
<div class="d-md-none d-block width4">
<div class="Rtable-cell--content text-center">
<div class="tooltipfull-container">
<p class="m-0 ellipsed">
<span>${item.assigner}</span>
</p>
</div>
<span class="tooltipfull" >
${item.assigner}
</span>
</div>
</div>
<div class="d-md-none d-block width4">
<div class="Rtable-cell--content text-center">
<div class="tooltipfull-container">
<p class="m-0 ellipsed">
<span>${item.assignedReceiverViewModel.assignedName}</span>
</p>
</div>
<span class="tooltipfull" >
${item.assignedReceiverViewModel.assignedName}
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width4">
<div class="Rtable-cell--content">
<div class="tooltipfull-container">
@@ -1030,18 +1058,28 @@ function loadMoreRequest(type) {
</div>
</div>
<div class="Rtable-cell d-md-block width5">
<div class="Rtable-cell--content">
<div class="tooltipfull-container">
<p class="m-0 ellipsed">
<span>${item.name}</span>
</p>
<span class="tooltipfull" >
${item.name}
</span>
</div>
</div>
</div>`;
<div class="Rtable-cell d-md-block d-flex width5 text-start">
<div class="Rtable-cell--content">
<div class="tooltipfull-container">
<p class="m-0 ellipsed">
<span>${item.name}</span>
</p>
<span class="tooltipfull" >
${item.name}
</span>
</div>
<div class="tooltipfull-container d-md-none d-block">
<p class="m-0 ellipsed">
<span style="font-size: 10px; !important">${item.contractingPartyName}</span>
</p>
<span class="tooltipfull" style="font-size: 10px; !important">
${item.contractingPartyName}
</span>
</div>
</div>
</div>`;
html += `<div class="Rtable-cell width7">
<div class="Rtable-cell--content align-items-center d-flex justify-content-end">`;
@@ -1049,8 +1087,13 @@ function loadMoreRequest(type) {
html += `${item.canCheckRequests && CheckRequestPermission === `True` ? `<button permission="90120" class="btn-taskmanager-more position-relative" onclick="OperationRequest(${item.id}, '${operation}')">
<span class="mx-1 align-items-center d-flex justify-content-center">
<p class="m-1">بررسی</p>
<span class="mx-1 align-items-center d-flex justify-content-between">
<p class="my-0 ps-1 d-none d-md-block">بررسی</p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"/>
</svg>
</span>
</button>`: ``}`;

View File

@@ -680,12 +680,14 @@ function uploadFile(file, id, boxClass) {
var xhr = new XMLHttpRequest();
xhr.open('POST', uploadFileModalAjax, true);
xhr.setRequestHeader('RequestVerificationToken', antiForgeryToken);
console.log(loading);
xhr.upload.addEventListener('progress', function (e) {
if (e.lengthComputable) {
var percentComplete = (e.loaded / e.total) * 100;
//$('#progressBar').text(Math.round(percentComplete) + '%');
loading.css('width', Math.round(percentComplete) + '%');
let h = Math.round(percentComplete);
console.log(h);
loading.css('width', `${h}%`);
}
});

View File

@@ -139,7 +139,7 @@ function loadMessages() {
$.each(responseTickets.mediaViewModels, function (i, item) {
if (item.category === 'اسکرین شات') {
if (item.path.endsWith(".jpg") || item.path.endsWith(".jpeg") || item.path.endsWith(".png") || item.path.endsWith(".gif") || item.path.endsWith(".webp")) {
var urlPage1 = `/AdminNew/Company/Ticket/Index?handler=ShowPicture&filePath=${item.path}`;
var urlPage1 = `/AdminNew/Company/Task/Index?handler=ShowPicture&filePath=${item.path}`;
html += `<div class="${responseTickets.mediaViewModels.length > 0 ? `col-3 p-0` : `d-none`}">
<section class="gallery" style="height: 63px;">
<div class="lightbox_img_wrap h-100">
@@ -178,7 +178,7 @@ function loadMessages() {
if (item.category === "صوت") {
var voiceId = `waveform${item.id}`;
var playPauseId = `play-pause-${item.id}`;
var voiceSrc = `/AdminNew/Company/Ticket/Index?handler=ShowVoice&filePath=${item.path}`;
var voiceSrc = `/AdminNew/Company/Task/Index?handler=ShowVoice&filePath=${item.path}`;
html += `<div class="audio-playerShow" data-voice-src="${voiceSrc}">
<div id="${voiceId}" class="waveform"></div>
@@ -191,7 +191,7 @@ function loadMessages() {
$.each(responseTickets.mediaViewModels, function (i, item) {
if (item.category === "فایل") {
if (item.path.endsWith(".jpg") || item.path.endsWith(".jpeg") || item.path.endsWith(".png") || item.path.endsWith(".gif") || item.path.endsWith(".webp")) {
var urlPage1 = `/AdminNew/Company/Ticket/Index?handler=ShowPicture&filePath=${item.path}`;
var urlPage1 = `/AdminNew/Company/Task/Index?handler=ShowPicture&filePath=${item.path}`;
html += `<section class="gallery">
<div class="lightbox_img_wrap">
<img class="file-attach lightbox-enabled min-img" src="${urlPage1}" data-imgsrc="${urlPage1}" id="${responseTickets.id}" />
@@ -218,7 +218,7 @@ function loadMessages() {
</div>
</section>`;
} else {
var urlPage2 = `/AdminNew/Company/Ticket/Index?handler=GetFile&filePath=${item.path}&id=${TicketId}`;
var urlPage2 = `/AdminNew/Company/Task/Index?handler=GetFile&filePath=${item.path}&id=${TicketId}`;
var fileExtensions = [
".ai", ".avi", ".bmp", ".crd", ".csv", ".dll", ".doc", ".docx", ".dwg",
".eps", ".exe", ".flv", ".giff", ".html", ".iso", ".java", ".jpg", ".mdb",
@@ -258,7 +258,7 @@ function loadMessages() {
if (file.category === "صوت") {
var voiceId = `waveform${file.id}`;
var playPauseId = `play-pause-${file.id}`;
var voiceSrc = `/AdminNew/Company/Ticket/Index?handler=ShowVoice&filePath=${file.path}`;
var voiceSrc = `/AdminNew/Company/Task/Index?handler=ShowVoice&filePath=${file.path}`;
html += `<div class="audio-playerShow" data-voice-src="${voiceSrc}">
<div id="${voiceId}" class="waveform"></div>
@@ -273,7 +273,7 @@ function loadMessages() {
itemResponse.mediaViewModels.forEach(function (file) {
if (file.category === "فایل") {
if (file.path.endsWith(".jpg") || file.path.endsWith(".jpeg") || file.path.endsWith(".png") || file.path.endsWith(".gif") || file.path.endsWith(".webp")) {
var urlPage1 = `/AdminNew/Company/Ticket/Index?handler=ShowPicture&filePath=${file.path}`;
var urlPage1 = `/AdminNew/Company/Task/Index?handler=ShowPicture&filePath=${file.path}`;
html += `<section class="gallery">
<div class="lightbox_img_wrap">
<img class="file-attach lightbox-enabled min-img" src="${urlPage1}" data-imgsrc="${urlPage1}" id="${responseTickets.id}" />
@@ -301,7 +301,7 @@ function loadMessages() {
</section>`;
}
else {
var urlPage2 = `/AdminNew/Company/Ticket/Index?handler=GetFile&filePath=${file.path}&id=${TicketId}`;
var urlPage2 = `/AdminNew/Company/Task/Index?handler=GetFile&filePath=${file.path}&id=${TicketId}`;
var fileExtensions = [
".ai", ".avi", ".bmp", ".crd", ".csv", ".dll", ".doc", ".docx", ".dwg",
".eps", ".exe", ".flv", ".giff", ".html", ".iso", ".java", ".jpg", ".mdb",
@@ -341,7 +341,7 @@ function loadMessages() {
if (fileAdmin.category === "صوت") {
var voiceId = `waveform${fileAdmin.id}`;
var playPauseId = `play-pause-${fileAdmin.id}`;
var voiceSrc = `/AdminNew/Company/Ticket/Index?handler=ShowVoice&filePath=${fileAdmin.path}`;
var voiceSrc = `/AdminNew/Company/Task/Index?handler=ShowVoice&filePath=${fileAdmin.path}`;
html += `<div class="audio-playerShow" data-voice-src="${voiceSrc}">
<div id="${voiceId}" class="waveform"></div>
<button type="button" id="${playPauseId}" class="player-btn play"></button>
@@ -354,7 +354,7 @@ function loadMessages() {
itemResponse.mediaViewModels.forEach(function (fileAdmin) {
if (fileAdmin.category === "فایل") {
if (fileAdmin.path.endsWith(".jpg") || fileAdmin.path.endsWith(".jpeg") || fileAdmin.path.endsWith(".png") || fileAdmin.path.endsWith(".gif") || fileAdmin.path.endsWith(".webp")) {
var urlPage1 = `/AdminNew/Company/Ticket/Index?handler=ShowPicture&filePath=${fileAdmin.path}`;
var urlPage1 = `/AdminNew/Company/Task/Index?handler=ShowPicture&filePath=${fileAdmin.path}`;
html += `<section class="gallery">
<div class="lightbox_img_wrap">
<img class="file-attach lightbox-enabled min-img" src="${urlPage1}" data-imgsrc="${urlPage1}" id="${responseTickets.id}" />
@@ -382,7 +382,7 @@ function loadMessages() {
</section>`;
}
else {
var urlPage2 = `/AdminNew/Company/Ticket/Index?handler=GetFile&filePath=${fileAdmin.path}&id=${TicketId}`;
var urlPage2 = `/AdminNew/Company/Task/Index?handler=GetFile&filePath=${fileAdmin.path}&id=${TicketId}`;
var fileExtensions = [
".ai", ".avi", ".bmp", ".crd", ".csv", ".dll", ".doc", ".docx", ".dwg",
".eps", ".exe", ".flv", ".giff", ".html", ".iso", ".java", ".jpg", ".mdb",

View File

@@ -54,7 +54,7 @@
.table-rollcall .width5 {
width: 20% !important;
width: 35% !important;
}
.table-rollcall .Rtable-row.no-avatar {

View File

@@ -85,7 +85,8 @@
@media (max-width: 1366px) {
.alert-msg {
.alert-msg,
.alert-success-msg {
position: fixed;
bottom: 15px;
right: 15px;
@@ -102,7 +103,8 @@
@media (max-width: 992px) {
.alert-msg {
.alert-msg,
.alert-success-msg {
width: 45%;
}
@@ -112,14 +114,16 @@
font-weight: 600;
}
.alert-msg p {
.alert-msg p,
.alert-success-msg p {
font-size: 13px;
}
}
@media (max-width: 767px) {
.alert-msg {
.alert-msg,
.alert-success-msg {
width: 60%;
}
@@ -129,14 +133,16 @@
font-weight: 600;
}
.alert-msg p {
.alert-msg p,
.alert-success-msg p {
font-size: 13px;
}
}
@media (max-width: 576px) {
.alert-msg {
.alert-msg,
.alert-success-msg {
width: 70%;
}
@@ -145,7 +151,8 @@
font-weight: 400;
}
.alert-msg p {
.alert-msg p,
.alert-success-msg p {
font-size: 12px;
}
}

View File

@@ -635,22 +635,23 @@ if (hasData) {
loadUntilHeightExceeds();
}
//$(window).on('scroll', function () {
// if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
// caseHistoryLoadAjax();
// }
//});
$('.goToTop').on('click',function () {
$('html, body').animate({ scrollTop: 0 }, 360);
return false;
});
$(window).scroll(function () {
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
caseHistoryLoadAjax();
if (hasData) {
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
caseHistoryLoadAjax();
}
}
//if ($(this).scrollTop() > 100) {
// $('.goToTop').show().fadeIn();
//} else {
// $('.goToTop').fadeOut().hide();
//}
if ($(this).scrollTop() > 100) {
$('.goToTop').show().fadeIn();
} else {
$('.goToTop').fadeOut().hide();
}
});

View File

@@ -64,7 +64,7 @@ function deactivePersonnel(id) {
}
function activePersonnel(id, hasUploadedImage) {
if (hasUploadedImage === "true") {
if (hasUploadedImage) {
$.ajax({
async: false,
dataType: 'json',

View File

@@ -94,42 +94,42 @@ $(document).on('click','#accountModalModal button', function() {
function passFunction() {
var x = document.getElementById("signupInputPassword");
if (x.type === "password") {
x.type = "text";
eyeShow.hide();
eyeClose.show();
if (x.type === "password") {
x.type = "text";
eyeShow.hide();
eyeClose.show();
} else {
x.type = "password";
eyeShow.show();
eyeClose.hide();
x.type = "password";
eyeShow.show();
eyeClose.hide();
}
}
function rePassFunction() {
var x = document.getElementById("repeat_password");
if (x.type === "password") {
x.type = "text";
reEyeShow.hide();
reEyeClose.show();
if (x.type === "password") {
x.type = "text";
reEyeShow.hide();
reEyeClose.show();
} else {
x.type = "password";
reEyeShow.show();
reEyeClose.hide();
x.type = "password";
reEyeShow.show();
reEyeClose.hide();
}
}
function passwordCheck(password) {
if (password.length >= 8)
strength += 1;
if (password.match(/(?=.*[0-9])/))
strength += 1;
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
strength += 1;
if (password.match(/(?=.*[A-Z])/))
strength += 1;
strength += 1;
if (password.match(/(?=.*[0-9])/))
strength += 1;
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
strength += 1;
if (password.match(/(?=.*[A-Z])/))
strength += 1;
displayBar(strength);
displayBar(strength);
}
function displayBar(strength) {
@@ -138,59 +138,75 @@ function displayBar(strength) {
$("#signupInputPassword").keyup(function () {
strength = 0;
var password = $(this).val();
passwordCheck(password);
var password = $(this).val();
passwordCheck(password);
});
$(document).ready(function() {
$("#username").keyup(function () {
var username = $('#username').val();
$(document).ready(function () {
var typingTimer;
var typingInterval = 1500;
$("#username").on('keyup', function () {
clearTimeout(typingTimer);
var username = $('#username').val();
if (username.length >= 6) {
$.ajax({
async: false,
dataType: 'json',
type: 'GET',
url: checkAccountAjax,
data: { username: username },
success: function (response) {
if (response.success) {
$('#errorSvg').addClass("d-none");
$('#successSvg').removeClass("d-none");
$('.alert-success-msg').show();
$('.alert-success-msg p').text(response.message);
setTimeout(function () {
$('.alert-success-msg').hide();
$('.alert-success-msg p').text('');
}, 2000);
} else {
$('#successSvg').addClass("d-none");
$('#errorSvg').removeClass("d-none");
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 2000);
}
},
error: function (err) {
console.log(err);
}
});
$('#successSvg').addClass("d-none");
$('#errorSvg').addClass("d-none");
$('#loadingSpinner').removeClass("d-none");
typingTimer = setTimeout(function () {
$.ajax({
async: false,
dataType: 'json',
type: 'GET',
url: checkAccountAjax,
data: { username: username },
success: function (response) {
$('#loadingSpinner').addClass("d-none");
if (response.success) {
$('#errorSvg').addClass("d-none");
$('#successSvg').removeClass("d-none");
$('.alert-success-msg').show();
$('.alert-success-msg p').text(response.message);
setTimeout(function () {
$('.alert-success-msg').hide();
$('.alert-success-msg p').text('');
}, 2000);
} else {
$('#successSvg').addClass("d-none");
$('#errorSvg').removeClass("d-none");
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 2000);
}
},
error: function (err) {
$('#loadingSpinner').addClass("d-none");
console.log(err);
}
});
}, typingInterval);
} else {
$('.alert-msg').show();
$('.alert-msg p').text("نام کاربری حداقل باید 6 حرف باشد");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
$('#successSvg').addClass("d-none");
$('#errorSvg').removeClass("d-none");
}
});
$('.alert-msg').show();
$('.alert-msg p').text("نام کاربری حداقل باید 6 حرف باشد");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 4000);
$('#loadingSpinner').addClass("d-none");
$('#successSvg').addClass("d-none");
$('#errorSvg').removeClass("d-none");
}
});
});
function save() {
$.ajax({
async: false,
@@ -200,7 +216,7 @@ function save() {
headers: { "RequestVerificationToken": antiForgeryToken },
data: $('#create-form').serialize(),
success: function (response) {
if (response.Success) {
if (response.success) {
$('.alert-success-msg').show();
$('.alert-success-msg p').text(response.message);
setTimeout(function () {

View File

@@ -252,6 +252,7 @@
let pic2 = $("#pic2").attr('src');
let workshopId = Number($('#workshopId').val());
let employeeId = Number($('#employeeId').val());
if (pic1 != null && pic2 != null) {
$.ajax({
type: 'POST',
@@ -264,7 +265,7 @@
$('.alert-success-msg p').text(response.message);
setTimeout(function () {
$('.alert-success-msg').hide();
$('.alert-success-msg p').text('ثبت عکس با موفقیت انجام شد');
$('.alert-success-msg p').text('');
window.location.reload();
}, 2000);
} else {
@@ -272,7 +273,7 @@
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('خطایی پیش آمده است');
$('.alert-msg p').text('');
}, 3500);
}
},
@@ -282,10 +283,10 @@
});
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
$('.alert-msg p').text('گرفتن دو عکس الزامیست');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('گرفتن دو عکس الزامیست');
$('.alert-msg p').text('');
}, 3500);
}
}