Task Changes And ReportRepository bug fixed
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.1.34" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
|
||||
<PackageReference Include="PersianTools.Core" Version="2.0.4" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ public class AuthHelper : IAuthHelper
|
||||
result.ClientAriaPermission =claims.FirstOrDefault(x => x.Type == "ClientAriaPermission").Value;
|
||||
result.AdminAreaPermission = claims.FirstOrDefault(x => x.Type == "AdminAreaPermission").Value;
|
||||
result.PositionValue = !string.IsNullOrWhiteSpace(claims.FirstOrDefault(x => x.Type == "PositionValue")?.Value) ? int.Parse(claims.FirstOrDefault(x => x.Type == "PositionValue")?.Value) : 0;
|
||||
result.WorkshopList = Tools.DeserializeFromBsonList<WorkshopClaim>(claims.FirstOrDefault(x => x is { Type: "workshopList" })?.Value);
|
||||
result.WorkshopSlug = claims.FirstOrDefault(x => x is { Type: "WorkshopSlug" }).Value;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -45,7 +47,7 @@ public class AuthHelper : IAuthHelper
|
||||
|
||||
var permissions = _contextAccessor.HttpContext.User.Claims.FirstOrDefault(x => x.Type == "permissions")
|
||||
?.Value;
|
||||
return JsonConvert.DeserializeObject<List<int>>(permissions);
|
||||
return Tools.DeserializeFromBsonList<int>(permissions); //Mahan
|
||||
}
|
||||
|
||||
public long CurrentAccountId()
|
||||
@@ -120,7 +122,14 @@ public class AuthHelper : IAuthHelper
|
||||
|
||||
public void Signin(AuthViewModel account)
|
||||
{
|
||||
var permissions = JsonConvert.SerializeObject(account.Permissions);
|
||||
#region MahanChanges
|
||||
|
||||
var permissions = account.Permissions is { Count: > 0 } ? Tools.SerializeToBson(account.Permissions) : "";
|
||||
var workshopBson = account.WorkshopList is { Count: > 0 } ? Tools.SerializeToBson(account.WorkshopList) : "";
|
||||
var slug = account.WorkshopSlug ?? "";
|
||||
|
||||
#endregion
|
||||
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
new Claim("AccountId", account.Id.ToString()),
|
||||
@@ -134,7 +143,11 @@ public class AuthHelper : IAuthHelper
|
||||
new Claim("AdminAreaPermission", account.AdminAreaPermission.ToString()),
|
||||
new Claim("ClientAriaPermission", account.ClientAriaPermission.ToString()),
|
||||
new Claim("IsCamera", "false"),
|
||||
new Claim("PositionValue",account.PositionValue.ToString())
|
||||
new Claim("PositionValue",account.PositionValue.ToString()),
|
||||
//mahanChanges
|
||||
new("workshopList",workshopBson),
|
||||
new("WorkshopSlug",slug)
|
||||
|
||||
};
|
||||
|
||||
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
@@ -15,7 +15,14 @@ public class AuthViewModel
|
||||
public List<int> Permissions { get; set; }
|
||||
public string AdminAreaPermission { get; set; }
|
||||
public string ClientAriaPermission { get; set; }
|
||||
|
||||
#region Mahan
|
||||
|
||||
public int? PositionValue { get; set; }
|
||||
public string WorkshopSlug { get; set; }
|
||||
public List<WorkshopClaim> WorkshopList { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public AuthViewModel(long id, long roleId, string fullname, string username, string mobile,string profilePhoto,
|
||||
List<int> permissions, string roleName, string adminAreaPermission, string clientAriaPermission, int? positionValue)
|
||||
|
||||
8
0_Framework/Application/IsActive.cs
Normal file
8
0_Framework/Application/IsActive.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
public enum IsActive
|
||||
{
|
||||
True,
|
||||
False,
|
||||
|
||||
}
|
||||
@@ -11,6 +11,8 @@ using PersianTools.Core;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
using Image = System.Drawing.Image;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Bson;
|
||||
|
||||
|
||||
namespace _0_Framework.Application;
|
||||
@@ -879,9 +881,9 @@ public static class Tools
|
||||
var newImage = new Bitmap(width, height);
|
||||
using (var graphics = Graphics.FromImage(newImage))
|
||||
{
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
graphics.CompositingQuality = CompositingQuality.HighSpeed;
|
||||
graphics.InterpolationMode = InterpolationMode.Bicubic;
|
||||
graphics.SmoothingMode = SmoothingMode.HighSpeed;
|
||||
graphics.DrawImage(srcImage, 0, 0, width, height);
|
||||
}
|
||||
|
||||
@@ -1210,15 +1212,44 @@ public static class Tools
|
||||
return "";
|
||||
}
|
||||
}
|
||||
public static string SerializeToBson(object obj)
|
||||
{
|
||||
using var memoryStream = new MemoryStream();
|
||||
using (BsonDataWriter bsonWriter = new BsonDataWriter(memoryStream))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.Serialize(bsonWriter, obj);
|
||||
}
|
||||
byte[] bsonData = memoryStream.ToArray();
|
||||
return Convert.ToBase64String(bsonData);
|
||||
}
|
||||
//بیسان هایی که بصورت لیست بودند استخراج میشود
|
||||
public static List<T> DeserializeFromBsonList<T>(string base64Data)
|
||||
{
|
||||
byte[] data = Convert.FromBase64String(base64Data);
|
||||
|
||||
#region DayOfWeekMethods
|
||||
using MemoryStream memoryStream = new MemoryStream(data);
|
||||
using BsonDataReader reader = new BsonDataReader(memoryStream);
|
||||
reader.ReadRootValueAsArray = true;
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
return serializer.Deserialize<List<T>>(reader);
|
||||
}
|
||||
//بیسان هایی که بصورت تکی بودند استخراج میشود
|
||||
public static T DeserializeFromBson<T>(string base64Data)
|
||||
{
|
||||
byte[] bsonData = Convert.FromBase64String(base64Data);
|
||||
using MemoryStream memoryStream = new MemoryStream(bsonData);
|
||||
using BsonDataReader bsonReader = new BsonDataReader(memoryStream);
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
return serializer.Deserialize<T>(bsonReader);
|
||||
}
|
||||
|
||||
public static DateTime GetNextDayOfWeek(this DateTime date, DayOfWeek dayOfWeek)
|
||||
{
|
||||
int numberOfNextDayOfWeek = ((int)dayOfWeek - (int)date.DayOfWeek + 7) % 7;
|
||||
return date.AddDays(numberOfNextDayOfWeek == 0 ? 7 : numberOfNextDayOfWeek);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
//این متد آخر همان روز را به صورت دیت تایم برمیگرداند
|
||||
public static DateTime ToGeorgianDateTime2(this string persianDate)
|
||||
|
||||
@@ -10,8 +10,8 @@ public static class Version
|
||||
{
|
||||
static Version()
|
||||
{
|
||||
StyleVersion = "2.12.14";
|
||||
AdminVersion = "2.5.34";
|
||||
StyleVersion = "2.12.16";
|
||||
AdminVersion = "2.5.36";
|
||||
CameraVersion = "1.0.7";
|
||||
}
|
||||
|
||||
|
||||
9
0_Framework/Application/WorkshopClaim.cs
Normal file
9
0_Framework/Application/WorkshopClaim.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
public class WorkshopClaim
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Slug { get; set; }
|
||||
public int PersonnelCount { get; set; }
|
||||
}
|
||||
5
0_Framework/libman.json
Normal file
5
0_Framework/libman.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": []
|
||||
}
|
||||
@@ -12,10 +12,12 @@ using _0_Framework.Application.Sms;
|
||||
using AccountManagement.Domain.AccountLeftWorkAgg;
|
||||
using AccountManagement.Domain.CameraAccountAgg;
|
||||
using AccountManagement.Domain.RoleAgg;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
using TaskManager.Domain.PositionAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
//using AccountManagement.Domain.RoleAgg;
|
||||
|
||||
namespace AccountManagement.Application;
|
||||
@@ -31,10 +33,11 @@ public class AccountApplication : IAccountApplication
|
||||
private readonly ICameraAccountRepository _cameraAccountRepository;
|
||||
private readonly IPositionRepository _positionRepository;
|
||||
private readonly IAccountLeftworkRepository _accountLeftworkRepository;
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
|
||||
|
||||
public AccountApplication(IAccountRepository accountRepository, IPasswordHasher passwordHasher,
|
||||
IFileUploader fileUploader, IAuthHelper authHelper, IRoleRepository roleRepository, IWorker worker, ISmsService smsService, ICameraAccountRepository cameraAccountRepository, IPositionRepository positionRepository, IAccountLeftworkRepository accountLeftworkRepository)
|
||||
IFileUploader fileUploader, IAuthHelper authHelper, IRoleRepository roleRepository, IWorker worker, ISmsService smsService, ICameraAccountRepository cameraAccountRepository, IPositionRepository positionRepository, IAccountLeftworkRepository accountLeftworkRepository, IWorkshopRepository workshopRepository)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_roleRepository = roleRepository;
|
||||
@@ -42,6 +45,7 @@ public class AccountApplication : IAccountApplication
|
||||
_cameraAccountRepository = cameraAccountRepository;
|
||||
_positionRepository = positionRepository;
|
||||
_accountLeftworkRepository = accountLeftworkRepository;
|
||||
_workshopRepository = workshopRepository;
|
||||
_fileUploader = fileUploader;
|
||||
_passwordHasher = passwordHasher;
|
||||
_accountRepository = accountRepository;
|
||||
@@ -137,8 +141,8 @@ public class AccountApplication : IAccountApplication
|
||||
return opreation.Failed("پر کردن تمامی فیلدها الزامی است");
|
||||
if (_accountRepository.Exists(x => x.Username == command.Username))
|
||||
return opreation.Failed("نام کاربری تکراری است");
|
||||
if (_accountRepository.Exists(x => x.Mobile == command.Mobile ||
|
||||
(x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(x.NationalCode))))
|
||||
if (_accountRepository.Exists(x => x.Mobile == command.Mobile && x.IsActiveString =="true"))
|
||||
|
||||
return opreation.Failed("مقادیر وارد شده تکراری است");
|
||||
|
||||
//var nationalCodeValidation = command.NationalCode.NationalCodeValid();
|
||||
@@ -223,6 +227,23 @@ public class AccountApplication : IAccountApplication
|
||||
var authViewModel = new AuthViewModel(account.id, account.RoleId, account.Fullname
|
||||
, account.Username, account.Mobile, account.ProfilePhoto, permissions, account.RoleName, account.AdminAreaPermission, account.ClientAriaPermission, positionValue);
|
||||
|
||||
if (account.ClientAriaPermission == "true" && account.AdminAreaPermission == "false" &&
|
||||
account.IsActiveString == "true")
|
||||
{
|
||||
var workshopList = _workshopRepository.SearchForClient(new WorkshopSearchModel() { AccountId = account.id })
|
||||
.OrderByDescending(x => x.PersonnelCount).ToList().Select(x => new WorkshopClaim()
|
||||
{
|
||||
Slug = _passwordHasher.SlugHasher(x.Id),
|
||||
Name = x.WorkshopFullName,
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Id = x.Id
|
||||
}
|
||||
).ToList();
|
||||
authViewModel.WorkshopList = workshopList;
|
||||
if (workshopList.Any())
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshopList.First().Id);
|
||||
}
|
||||
|
||||
_authHelper.Signin(authViewModel);
|
||||
|
||||
if ((account.AdminAreaPermission == "true" && account.ClientAriaPermission == "true" && account.IsActiveString == "true") || (account.AdminAreaPermission == "true" && account.ClientAriaPermission == "false" && account.IsActiveString == "true"))
|
||||
@@ -281,6 +302,23 @@ public class AccountApplication : IAccountApplication
|
||||
var authViewModel = new AuthViewModel(account.id, account.RoleId, account.Fullname
|
||||
, account.Username, account.Mobile, account.ProfilePhoto, permissions, account.RoleName, account.AdminAreaPermission, account.ClientAriaPermission, positionValue);
|
||||
|
||||
if (account.ClientAriaPermission == "true" && account.AdminAreaPermission == "false" &&
|
||||
account.IsActiveString == "true")
|
||||
{
|
||||
var workshopList = _workshopRepository.SearchForClient(new WorkshopSearchModel() { AccountId = account.id })
|
||||
.OrderByDescending(x => x.PersonnelCount).ToList().Select(x => new WorkshopClaim()
|
||||
{
|
||||
Slug = _passwordHasher.SlugHasher(x.Id),
|
||||
Name = x.WorkshopFullName,
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Id = x.Id
|
||||
}
|
||||
).ToList();
|
||||
authViewModel.WorkshopList = workshopList;
|
||||
if (workshopList.Any())
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshopList.First().Id);
|
||||
}
|
||||
|
||||
_authHelper.Signin(authViewModel);
|
||||
long idAutoriz = 0;
|
||||
if (account.AdminAreaPermission == "true" && account.ClientAriaPermission == "true" || account.AdminAreaPermission == "true" && account.ClientAriaPermission == "false")
|
||||
@@ -408,6 +446,17 @@ public class AccountApplication : IAccountApplication
|
||||
_authHelper.SignOut();
|
||||
var authViewModel = new AuthViewModel(account.id, account.RoleId, account.Fullname
|
||||
, account.Username, account.Mobile, account.ProfilePhoto, permissions, account.RoleName, "false", "true",null);
|
||||
authViewModel.WorkshopList = _workshopRepository.SearchForClient(new WorkshopSearchModel() { AccountId = account.id })
|
||||
.OrderByDescending(x => x.PersonnelCount).ToList().Select(x => new WorkshopClaim()
|
||||
{
|
||||
Slug = _passwordHasher.SlugHasher(x.Id),
|
||||
Name = x.WorkshopFullName,
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Id = x.Id
|
||||
}
|
||||
).ToList();
|
||||
if (authViewModel.WorkshopList.Any())
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(authViewModel.WorkshopList.First().Id);
|
||||
_authHelper.Signin(authViewModel);
|
||||
return operation.Succcedded(2);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace AccountManagement.Domain.AccountAgg
|
||||
Username = username;
|
||||
Password = password;
|
||||
Mobile = mobile;
|
||||
NationalCode = nationalCode;
|
||||
NationalCode = "";
|
||||
RoleId = 15;
|
||||
RoleName = "کارفرما";
|
||||
AdminAreaPermission = "false";
|
||||
|
||||
@@ -32,7 +32,7 @@ public class AccountLeftworkRepository : RepositoryBase<long, AccountLeftWork>,
|
||||
var initial = new DateTime(2150, 1, 1);
|
||||
string start = "";
|
||||
string end = "";
|
||||
var res = _accountContext.AccountLeftWorks.FirstOrDefault(x => x.AccountId == accountId);
|
||||
var res = _accountContext.AccountLeftWorks.Where(x => x.AccountId == accountId).OrderByDescending(x=>x.StartWorkGr).FirstOrDefault();
|
||||
if (res != null)
|
||||
{
|
||||
start = res.StartWorkGr != initial ? res.StartWorkGr.ToFarsi() : "";
|
||||
|
||||
209
Company.Domain/CustomizeCheckoutAgg/CustomizeCheckout.cs
Normal file
209
Company.Domain/CustomizeCheckoutAgg/CustomizeCheckout.cs
Normal file
@@ -0,0 +1,209 @@
|
||||
using _0_Framework.Domain;
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
|
||||
|
||||
namespace Company.Domain.CustomizeCheckoutAgg;
|
||||
/// <summary>
|
||||
/// تصفیه حساب دلخواه
|
||||
/// </summary>
|
||||
public class CustomizeCheckout : EntityBase
|
||||
{
|
||||
public CustomizeCheckout(DateTime contractStart, DateTime contractEnd, long employeeId, long workshopId, long? contractId, long employerId, double monthlySalary, double fridayPay, double overTimePay, double baseYearsPay, double bonusesPay, double nightWorkPay, double marriedAllowance, double shiftPay, double familyAllowance, double leavePay, double insuranceDeduction, double fineAbsenceDeduction, double lateToWorkDeduction, double earlyExitDeduction, double rewardPay, double salaryAidDeduction, double installmentDeduction, double fineDeduction, double taxDeduction, string sumOfWorkingDays, string totalClaims, string totalDeductions, double totalPayment)
|
||||
{
|
||||
YearInt = Convert.ToInt32(contractStart.ToFarsi().Substring(0,4));
|
||||
MonthInt = Convert.ToInt32(contractStart.ToFarsi().Substring(5, 2));
|
||||
ContractStart = contractStart;
|
||||
ContractEnd = contractEnd;
|
||||
EmployeeId = employeeId;
|
||||
WorkshopId = workshopId;
|
||||
EmployerId = employerId;
|
||||
MonthlySalary = monthlySalary;
|
||||
FridayPay = fridayPay;
|
||||
OverTimePay = overTimePay;
|
||||
BaseYearsPay = baseYearsPay;
|
||||
BonusesPay = bonusesPay;
|
||||
NightWorkPay = nightWorkPay;
|
||||
MarriedAllowance = marriedAllowance;
|
||||
ShiftPay = shiftPay;
|
||||
FamilyAllowance = familyAllowance;
|
||||
LeavePay = leavePay;
|
||||
InsuranceDeduction = insuranceDeduction;
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWorkDeduction = lateToWorkDeduction;
|
||||
EarlyExitDeduction = earlyExitDeduction;
|
||||
RewardPay = rewardPay;
|
||||
SalaryAidDeduction = salaryAidDeduction;
|
||||
InstallmentDeduction = installmentDeduction;
|
||||
FineDeduction = fineDeduction;
|
||||
TaxDeduction = taxDeduction;
|
||||
SumOfWorkingDays = sumOfWorkingDays;
|
||||
TotalClaims = totalClaims;
|
||||
TotalDeductions = totalDeductions;
|
||||
TotalPayment = totalPayment;
|
||||
ContractId = contractId;
|
||||
IsActiveString = IsActive.True;
|
||||
}
|
||||
|
||||
#region Getters
|
||||
/// <summary>
|
||||
/// سال به صورت استرینگ
|
||||
/// </summary>
|
||||
public string Year => $"{YearInt}";
|
||||
/// <summary>
|
||||
/// نام ماه شمسی
|
||||
/// </summary>
|
||||
public string Month => MonthInt.ToFarsiMonthByIntNumber();
|
||||
#endregion
|
||||
|
||||
#region DatabaseEntities
|
||||
|
||||
public IsActive IsActiveString { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره قرارداد
|
||||
/// </summary>
|
||||
public string ContractNo { get; private set; }
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int YearInt { get; private set; }
|
||||
/// <summary>
|
||||
/// ماه
|
||||
/// </summary>
|
||||
public int MonthInt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// حقوق ماهانه
|
||||
/// </summary>
|
||||
public double MonthlySalary { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شروع تصفیه حساب
|
||||
/// </summary>
|
||||
public DateTime ContractStart { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایان تصفیه حساب
|
||||
/// </summary>
|
||||
public DateTime ContractEnd { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جمعه کاری
|
||||
/// </summary>
|
||||
public double FridayPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// اضافه کاری
|
||||
/// </summary>
|
||||
public double OverTimePay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// سنوات
|
||||
/// </summary>
|
||||
public double BaseYearsPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// عیدی
|
||||
/// </summary>
|
||||
public double BonusesPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شب کاری
|
||||
/// </summary>
|
||||
public double NightWorkPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// حق تاهل
|
||||
/// </summary>
|
||||
public double MarriedAllowance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوبت کاری
|
||||
/// </summary>
|
||||
public double ShiftPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// حق اولاد(حق فرزند)ء
|
||||
/// </summary>
|
||||
public double FamilyAllowance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد مرخصی
|
||||
/// </summary>
|
||||
public double LeavePay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// حق بیمه
|
||||
/// </summary>
|
||||
public double InsuranceDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// جریمه غیبت
|
||||
/// </summary>
|
||||
public double FineAbsenceDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاخیر در ورود
|
||||
/// </summary>
|
||||
public double LateToWorkDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعجیل در خروج
|
||||
/// </summary>
|
||||
public double EarlyExitDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پاداش
|
||||
/// </summary>
|
||||
public double RewardPay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مساعده
|
||||
/// </summary>
|
||||
public double SalaryAidDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// قسط وام
|
||||
/// </summary>
|
||||
public double InstallmentDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// جریمه
|
||||
/// </summary>
|
||||
public double FineDeduction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مالیات
|
||||
/// </summary>
|
||||
public double TaxDeduction { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تعداد روزهای کارکرد
|
||||
/// </summary>
|
||||
public string SumOfWorkingDays { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموع مطالبات
|
||||
/// </summary>
|
||||
public string TotalClaims { get; private set; }
|
||||
/// <summary>
|
||||
/// مجموع کسورات
|
||||
/// </summary>
|
||||
public string TotalDeductions { get; private set; }
|
||||
/// <summary>
|
||||
/// مجموع پرداختی
|
||||
/// </summary>
|
||||
public double TotalPayment { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Relations
|
||||
public long EmployeeId { get; private set; }
|
||||
public long WorkshopId { get; private set; }
|
||||
public long EmployerId { get; private set; }
|
||||
public long? ContractId { get; private set; }
|
||||
#endregion
|
||||
}
|
||||
@@ -124,6 +124,9 @@ public class Employee : EntityBase
|
||||
public List<EmployeeInsuranceRecord> EmployeeInsuranceRecords { get; private set; }
|
||||
|
||||
public List<PersonnelCodeDomain> PersonnelCodeList { get; set; }
|
||||
|
||||
public string FullName => $"{FName} {LName}";
|
||||
|
||||
//public List<Checkout> Checkouts { get; set; }
|
||||
public Employee()
|
||||
{
|
||||
|
||||
@@ -4,7 +4,8 @@ namespace CompanyManagment.App.Contracts.RollCallEmployee
|
||||
{
|
||||
public class AdjustRollCallEmployeesWithEmployeeLeftWork
|
||||
{
|
||||
public long RollCallEmployeeId { get; set; }
|
||||
|
||||
public DateTime LeaveDate { get; set; }
|
||||
public long RollCallStatusId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,43 +596,38 @@ public class LeftWorkApplication : ILeftWorkApplication
|
||||
//این متد ترک کار های کارمند را با فعالیت حضور غیاب یکپارچه می کند
|
||||
private void IfEmployeeHasNewLeftWorkDateAddEndDateToRollCallStatus(long employeeId)
|
||||
{
|
||||
|
||||
//get all leftworks for employee
|
||||
var leftWorks = _leftWorkRepository.search(new LeftWorkSearchModel() { EmployeeId = employeeId }).GroupBy(x=>x.WorkshopId).Select(x=>
|
||||
//get last leftworks for employee in all workshops
|
||||
var leftWorks = _leftWorkRepository.search(new LeftWorkSearchModel() { EmployeeId = employeeId }).GroupBy(x => x.WorkshopId).Select(x =>
|
||||
{
|
||||
var leftwork = x.MaxBy(y => y.StartWorkDateGr);
|
||||
var leftWork = x.MaxBy(y => y.StartWorkDateGr);
|
||||
return new LeftWorkViewModel()
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = x.Key,
|
||||
LeftWorkDateGr = leftwork.LeftWorkDateGr,
|
||||
StartWorkDateGr = leftwork.StartWorkDateGr
|
||||
LeftWorkDateGr = leftWork.LeftWorkDateGr,
|
||||
StartWorkDateGr = leftWork.StartWorkDateGr
|
||||
};
|
||||
});
|
||||
|
||||
//get rollCallEmployee associated with those leftworks which have a higher end date than leftworkDate
|
||||
var rollCallsEmployee = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(employeeId).GroupBy(x=>x.WorkshopId).Select(
|
||||
x =>
|
||||
{
|
||||
var maxRollCall = x.MaxBy(y => y.Statuses);
|
||||
return new RollCallEmployeeViewModel()
|
||||
{
|
||||
WorkshopId = x.Key,
|
||||
EmployeeId = employeeId,
|
||||
Id=maxRollCall.Id,
|
||||
Statuses = maxRollCall.Statuses
|
||||
};
|
||||
})
|
||||
.Where(x => leftWorks.Any(y => y.WorkshopId == x.WorkshopId && x.Statuses.Any(z => z.StartDateGr < y.LeftWorkDateGr && z.EndDateGr > y.LeftWorkDateGr)));
|
||||
|
||||
//shaping up the list to send as parameter to repository
|
||||
var newRollCallRecords = rollCallsEmployee.Select(x => new AdjustRollCallEmployeesWithEmployeeLeftWork()
|
||||
{
|
||||
LeaveDate = leftWorks.FirstOrDefault(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId)!.LeftWorkDateGr,
|
||||
RollCallEmployeeId = x.Id
|
||||
}).ToList();
|
||||
|
||||
//get rollCallEmployee associated with those leftworks which have a higher end date than leftworkDate
|
||||
var rollCallsEmployee = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(employeeId)
|
||||
.Where(x => leftWorks.Any(y => y.WorkshopId == x.WorkshopId)).ToList();
|
||||
|
||||
var joinedList = rollCallsEmployee.Join(leftWorks, x => x.WorkshopId, y => y.WorkshopId, (x, y) => new
|
||||
{
|
||||
x.WorkshopId,
|
||||
x.EmployeeId,
|
||||
y.LeftWorkDateGr,
|
||||
Status = x.Statuses.OrderByDescending(z => z.StartDate).FirstOrDefault(z => z.StartDateGr < y.LeftWorkDateGr && z.EndDateGr > y.LeftWorkDateGr)
|
||||
});
|
||||
|
||||
//shaping up the list to send as parameter to repository
|
||||
var newRollCallRecords = joinedList.Where(x => x.Status != null).Select(x => new AdjustRollCallEmployeesWithEmployeeLeftWork()
|
||||
{
|
||||
LeaveDate = x.LeftWorkDateGr,
|
||||
RollCallStatusId = x.Status.Id
|
||||
}).ToList();
|
||||
if(newRollCallRecords.Count > 0)
|
||||
_rollCallEmployeeStatusRepository.AdjustRollCallStatusEndDates(newRollCallRecords);
|
||||
}
|
||||
|
||||
|
||||
17
CompanyManagment.EFCore/Mapping/CustomizeCheckoutMapping.cs
Normal file
17
CompanyManagment.EFCore/Mapping/CustomizeCheckoutMapping.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Company.Domain.CustomizeCheckoutAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class CustomizeCheckoutMapping : IEntityTypeConfiguration<CustomizeCheckout>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<CustomizeCheckout> builder)
|
||||
{
|
||||
builder.ToTable("CustomizeCheckouts");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.IsActiveString).HasConversion<string>().HasMaxLength(5);
|
||||
builder.Property(x => x.ContractNo).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,12 @@ public class EmployeeMapping : IEntityTypeConfiguration<Employee>
|
||||
.WithOne(x => x.Employee)
|
||||
.HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
#region Pooya
|
||||
|
||||
|
||||
builder.Ignore(x => x.FullName);
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId) && e.AccountIdList.Count > 0);
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId) && e.AccountIdList.Count > 0).AsSplitQuery();
|
||||
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
@@ -114,12 +114,12 @@ public class ReportRepository : IReportRepository
|
||||
CheckoutLeftIds = _context.InstitutionContractSet.Any(c => c.ContractingPartyId == x.ContractingPartId && c.ContractStartGr <= currentMonthStart && c.ContractEndGr >= currentMonthEnd) ? x.CheckoutLeftIds : new List<long>(),
|
||||
|
||||
#endregion
|
||||
});
|
||||
}).AsSplitQuery();
|
||||
//var wCount = workshops.Count();
|
||||
//var partyId = workshops.Select(x => x.ContractingPartId).ToList();
|
||||
|
||||
Console.WriteLine("Ripo query 1 >>>>>: " + watch.Elapsed);
|
||||
var res = workshopsList.ToList();
|
||||
var res = workshopsList.AsEnumerable();
|
||||
watch.Restart();
|
||||
var result = res.Select(x => new ActiveWorkshops
|
||||
{
|
||||
@@ -162,7 +162,7 @@ public class ReportRepository : IReportRepository
|
||||
(l.ContractEnd >= nextMonthStart && l.ContractEnd <= nextMonthEnd))
|
||||
: 0,
|
||||
|
||||
});
|
||||
}).AsEnumerable();
|
||||
|
||||
Console.WriteLine("Ripo query 2 >>>>>: " + watch.Elapsed);
|
||||
var contractAccountResult = result.Select(x => new ActiveWorkshops()
|
||||
@@ -182,7 +182,7 @@ public class ReportRepository : IReportRepository
|
||||
IsActiveString = x.IsActiveString,
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
|
||||
}).Where(x => x.AccountId != 0).ToList();
|
||||
}).Where(x => x.AccountId != 0 && x.ContractLeftWorkCount > 0).ToList();
|
||||
var checkoutAccountResult = result.Select(x => new ActiveWorkshops()
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -201,7 +201,7 @@ public class ReportRepository : IReportRepository
|
||||
IsActiveString = x.IsActiveString,
|
||||
WorkshopFullName = x.WorkshopFullName,
|
||||
|
||||
}).Where(x => x.AccountId != 0).ToList();
|
||||
}).Where(x => x.AccountId != 0 && x.CheckoutLeftWorkCount > 0).ToList();
|
||||
watch.Restart();
|
||||
//قرارداد هایی که باید اسجاد می شد
|
||||
var contractToBe = contractAccountResult.Sum(x => x.ContractLeftWorkCount);
|
||||
@@ -226,7 +226,7 @@ public class ReportRepository : IReportRepository
|
||||
AccountId = x.Key,
|
||||
AccountFullName = _accountContext.Accounts.FirstOrDefault(a=>a.id == x.Key)!.Fullname,
|
||||
|
||||
ContractDonePercent = (x.Sum(c => c.ContrctDoneCount) * 100) / x.Sum(c => c.ContractLeftWorkCount),
|
||||
ContractDonePercent = (x.Sum(c => c.ContrctDoneCount) * 100) / (x.Sum(c => c.ContractLeftWorkCount)),
|
||||
ContractSignPercent = x.Sum(c => c.ContrctDoneCount) > 0 ? (x.Sum(c => c.ContrctSignDoneCount) * 100) / (x.Sum(c => c.ContrctDoneCount)) : 0,
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ public class ReportRepository : IReportRepository
|
||||
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
@@ -488,7 +488,7 @@ public class ReportRepository : IReportRepository
|
||||
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -628,7 +628,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -761,7 +761,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -1087,7 +1087,7 @@ public class ReportRepository : IReportRepository
|
||||
(l.LeftWorkDateGr >= nextMonthStart && l.LeftWorkDateGr <= nextMonthEnd)).Select(l => l.EmployeeId).ToList(),
|
||||
#endregion
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -1221,7 +1221,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -1363,7 +1363,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -1493,7 +1493,7 @@ public class ReportRepository : IReportRepository
|
||||
#endregion
|
||||
|
||||
}).Where(e => blockContractingPartyIds.Contains(e.ContractingPartId))
|
||||
.Where(a => a.AccountIdList.Contains(accountId));
|
||||
.Where(a => a.AccountIdList.Contains(accountId)).AsSplitQuery();
|
||||
var workshopsList = workshops.Select(x => new ActiveWorkshops
|
||||
{
|
||||
Id = x.Id,
|
||||
|
||||
@@ -70,33 +70,54 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
||||
{
|
||||
var dateNow = DateTime.Now;
|
||||
var rawQuery = _context.Employees.Include(x => x.LeftWorks).Include(x => x.LeftWorkInsurances)
|
||||
.Where(x => x.LeftWorks.Any(y => y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow && y.LeftWorkDate > dateNow) ||
|
||||
x.LeftWorkInsurances.Any(y => y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
|
||||
(y.LeftWorkDate > dateNow || y.LeftWorkDate == null)));
|
||||
.Where(x => x.LeftWorks.Any(y =>
|
||||
y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
|
||||
y.LeftWorkDate > dateNow) ||
|
||||
x.LeftWorkInsurances.Any(y =>
|
||||
y.WorkshopId == command.WorkshopId && y.StartWorkDate <= dateNow &&
|
||||
(y.LeftWorkDate > dateNow || y.LeftWorkDate == null))).OrderByDescending(x => x.id).AsQueryable().AsSplitQuery();
|
||||
if (!string.IsNullOrWhiteSpace(command.Name))
|
||||
rawQuery = rawQuery.Where(x => (x.FName + " " + x.LName).Contains(command.Name));
|
||||
|
||||
var list = rawQuery.ToList();
|
||||
var res = list.Select(x => new RollCallEmployeeViewModel
|
||||
var rollCallEmployees = _context.RollCallEmployees.Where(x => x.WorkshopId == command.WorkshopId);
|
||||
|
||||
|
||||
var joinedQuery = from employee in rawQuery
|
||||
join rollCallEmployee in rollCallEmployees
|
||||
on employee.id equals rollCallEmployee.EmployeeId into grp
|
||||
from joinedRollCall in grp.DefaultIfEmpty()
|
||||
select new RollCallEmployeeViewModel()
|
||||
{
|
||||
WorkshopId = command.WorkshopId,
|
||||
EmployeeId = x.id,
|
||||
Id = _context.RollCallEmployees.Any(r => r.EmployeeId == x.id && r.WorkshopId == command.WorkshopId) ?
|
||||
_context.RollCallEmployees.FirstOrDefault(r => r.EmployeeId == x.id && r.WorkshopId == command.WorkshopId)!.id : 0,
|
||||
EmployeeFullName = $"{x.FName} {x.LName}",
|
||||
EmployeeSlug = _passwordHasher.SlugHasher(x.id),
|
||||
NationalCode = _context.Employees.FirstOrDefault(e => e.id == x.id)?.NationalCode,
|
||||
IsActiveString = _context.RollCallEmployees.Any(r => r.EmployeeId == x.id && r.WorkshopId == command.WorkshopId && r.IsActiveString == "true") ? "true" : "false",
|
||||
HasUploadedImage = _context.RollCallEmployees.Any(r => r.EmployeeId == x.id && r.WorkshopId == command.WorkshopId && r.HasUploadedImage == "true") ? "true" : "false",
|
||||
ImagePath = (System.IO.File.Exists(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", command.WorkshopId.ToString(), x.id.ToString(), "1.jpg")))
|
||||
? Tools.ResizeImage(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", command.WorkshopId.ToString(), x.id.ToString(), "1.jpg"), 150, 150)
|
||||
: "",
|
||||
}).OrderBy(x => x.PersonelCode)
|
||||
.Skip(command.PageIndex)
|
||||
.Take(30)
|
||||
.ToList();
|
||||
EmployeeId = employee.id,
|
||||
Id = joinedRollCall == null ? 0 : joinedRollCall.id,
|
||||
EmployeeFullName = employee.FullName,
|
||||
NationalCode = employee.NationalCode,
|
||||
IsActiveString = joinedRollCall == null ? "false" : joinedRollCall.IsActiveString,
|
||||
HasUploadedImage = joinedRollCall == null ? "false" : joinedRollCall.HasUploadedImage
|
||||
};
|
||||
var firstlist = joinedQuery.AsSplitQuery();
|
||||
var list = firstlist.OrderByDescending(x => x.IsActiveString == "true" ? 1 : 0)
|
||||
.ThenByDescending(x => x.HasUploadedImage == "true" ? 1 : 0)
|
||||
.Skip(command.PageIndex).Take(30).ToList();
|
||||
|
||||
return res;
|
||||
list = list.Select(x => new RollCallEmployeeViewModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Id = x.Id,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
NationalCode = x.NationalCode,
|
||||
IsActiveString = x.IsActiveString,
|
||||
HasUploadedImage = x.HasUploadedImage,
|
||||
EmployeeSlug = _passwordHasher.SlugHasher(x.EmployeeId),
|
||||
ImagePath = (System.IO.File.Exists(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", command.WorkshopId.ToString(), x.EmployeeId.ToString(), "1.jpg")))
|
||||
? Tools.ResizeImage(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", command.WorkshopId.ToString(), x.EmployeeId.ToString(), "1.jpg"), 150, 150) : ""
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public RollCallEmployee GetWithRollCallStatus(long id)
|
||||
|
||||
@@ -32,19 +32,17 @@ namespace CompanyManagment.EFCore.Repository
|
||||
}
|
||||
public void AdjustRollCallStatusEndDates(List<AdjustRollCallEmployeesWithEmployeeLeftWork> command)
|
||||
{
|
||||
var rollCallEmployeeIds = command.Select(y => y.RollCallEmployeeId);
|
||||
|
||||
var list = _context.RollCallEmployeesStatus.Where(x =>rollCallEmployeeIds.Any(y =>y == x.RollCallEmployeeId))
|
||||
.GroupBy(x => x.RollCallEmployeeId).AsEnumerable().Select(x=> new RollCallEmployeeStatusViewModel()
|
||||
var statusIds = command.Select(x => x.RollCallStatusId);
|
||||
var finalList = _context.RollCallEmployeesStatus.Where(x => statusIds.Contains(x.id)).AsEnumerable();
|
||||
finalList.Where(x => command.Any(y => !y.LeaveDate.IsDateUndefined() && y.LeaveDate < x.EndDate)).ToList().ForEach(
|
||||
z =>
|
||||
{
|
||||
Id = x.MaxBy(c=>c.StartDate).id,
|
||||
var cmd = command.FirstOrDefault(y => y.RollCallStatusId == z.id);
|
||||
|
||||
|
||||
}).Select(c=>c.Id);
|
||||
|
||||
var finalList = _context.RollCallEmployeesStatus.Where(x => list.Contains(x.id)).AsEnumerable();
|
||||
finalList.Where(x => command.Any(y => !y.LeaveDate.IsDateUndefined() && y.LeaveDate < x.EndDate)).ToList().ForEach(x =>
|
||||
x.Edit(x.StartDate, command.FirstOrDefault(y => y.RollCallEmployeeId == x.RollCallEmployeeId)!.LeaveDate)
|
||||
if (cmd!.LeaveDate >= z.StartDate)
|
||||
z.Edit(z.StartDate, cmd!.LeaveDate);
|
||||
}
|
||||
);
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
@@ -749,7 +749,7 @@ public class WorkshopRepository : RepositoryBase<long, Company.Domain.WorkshopAg
|
||||
|
||||
public List<WorkshopViewModel> SearchForClient(WorkshopSearchModel searchModel)
|
||||
{
|
||||
var acountID = _authHelper.CurrentAccountId();
|
||||
var acountID = searchModel.AccountId > 0 ? searchModel.AccountId : _authHelper.CurrentAccountId();
|
||||
var contracingPartyAcc = _context.ContractingPartyAccounts.FirstOrDefault(x => x.AccountId == acountID);
|
||||
if (contracingPartyAcc == null)
|
||||
{
|
||||
|
||||
@@ -338,7 +338,7 @@ public class IndexModel : PageModel
|
||||
Username = userPass,
|
||||
Password = userPass,
|
||||
Mobile = phone.PhoneNumber,
|
||||
NationalCode = conractingParty.IsLegal == "حقوقی" ? "حقوقی" : userPass
|
||||
NationalCode = userPass
|
||||
};
|
||||
var res = _accountApplication.RegisterClient(createAcc);
|
||||
if (res.IsSuccedded)
|
||||
|
||||
@@ -889,8 +889,7 @@
|
||||
asp-page="./AutoExtension" asp-route-id="@item.Id">
|
||||
<i class="fa fa-file-text-o"></i>
|
||||
</a>
|
||||
<a permission="10314" class="btn btn-table btn-warning pull-left rad @(item.HasBlockContractingParty?"disabled":"")" style="margin-left: 5px;"
|
||||
href="#showmodal=@Url.Page("./Index", "Edit", new {Id = item.Id})">
|
||||
<a permission="10314" asp-page="./EditWorkshop" asp-route-id="@item.Id" class="btn btn-table btn-warning pull-left rad @(item.HasBlockContractingParty?"disabled":"")" style="margin-left: 5px;">
|
||||
<i class="fa faSize fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-info rad printModal btn-table" href="#showmodal=@Url.Page("./Index", "AnnualConfirm", new {Id = item.Id})" style="background-color: #136576;border: 1px solid #136576;">
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
@model AccountManagement.Application.Contracts.Task.CreateTaskModal
|
||||
@* @model ServiceHost.Areas.AdminNew.Pages.Company.Task.CreateModel *@
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@using _0_Framework.Application
|
||||
|
||||
@{
|
||||
ViewData["title"] = " - وظیفه جدید";
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
ViewData["title"] = " - وظیفه جدید";
|
||||
}
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
@@ -334,4 +333,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
<script src="~/assetsadminnew/tasks/js/create.js?ver=@adminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/create.js"></script>
|
||||
@@ -1,8 +1,9 @@
|
||||
@model AccountManagement.Application.Contracts.Task.EditTask
|
||||
@using System.Security.Claims
|
||||
@using AccountManagement.Application.Contracts.Media
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
|
||||
MediaViewModel voice = null;
|
||||
var userId = Convert.ToInt64(User.FindFirstValue("AccountId"));
|
||||
|
||||
@@ -18,9 +19,9 @@
|
||||
int i = 1;
|
||||
|
||||
<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/detailmodal.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/detailmodal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
|
||||
|
||||
if (Model.AssignViewModels?.Count > 1)
|
||||
@@ -87,31 +88,31 @@
|
||||
<div class="chat-section">
|
||||
<div class="chat-card-main">
|
||||
<div class="row">
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7">@Model.ContractingPartyName</span>
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle justify-content-start row align-items-center mb-1">
|
||||
<span class="col-5 col-md-4 ps-0">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.ContractingPartyName</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7">@Model.Title</span>
|
||||
<h6 class="taskTitle justify-content-start row align-items-center">
|
||||
<span class="col-5 col-md-4 ps-0 ps-0">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.Title</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6">@Model.CreateDateFa</span>
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle text-end row align-items-center mb-1">
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6 col-md-7 justify-content-center">@Model.CreateDateFa</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ سررسید:</span>
|
||||
<span class="taskTitleSub text-center col-6" id="AssignEndTaskDateFa">@Model.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ سررسید:</span>
|
||||
<span class="taskTitleSub text-center col-6 col-md-7 justify-content-center" id="AssignEndTaskDateFa">@Model.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Description))
|
||||
{
|
||||
<div class="taskTitle">توضیحات :</div>
|
||||
<div class="taskDesc">
|
||||
<div>توضیحات :</div>
|
||||
@Html.Raw(Model.Description)
|
||||
</div>
|
||||
}
|
||||
@@ -211,11 +212,15 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mainChat">
|
||||
<div id="ajaxChatSection"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
@* && Model.ReceiverId.All(x => x == userId) || userId == Model.SenderId *@
|
||||
@if (!Model.IsDone && !Model.IsCancel)
|
||||
{
|
||||
<div class="actionBtnsection">
|
||||
@@ -269,7 +274,6 @@
|
||||
<button class="actionBtn" id="doneBtn">انجام شد</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -280,7 +284,7 @@
|
||||
<div class="modal-footer justify-content-center align-items-center p-2 pt-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2" data-bs-dismiss="modal">بستن</button>
|
||||
<button type="button" class="btn-cancel2 d-flex align-items-center justify-content-center" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
@if (!Model.IsDone)
|
||||
{
|
||||
@@ -313,9 +317,9 @@
|
||||
|
||||
@if (Convert.ToInt64(User.FindFirstValue("AccountId")) == Model.SenderId)
|
||||
{
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodalSender.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodalSender.js?ver=@adminVersion"></script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@adminVersion"></script>
|
||||
}
|
||||
|
||||
@@ -377,8 +377,8 @@
|
||||
<div class="">
|
||||
<div class="modal-header d-block text-center header-custom-color">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h6 class="modal-title" style="font-size: 14px;">جزئیات وظیفه</h6>
|
||||
<h6 class="modal-title" style="font-size: 14px;">@Model.EndTaskDate</h6>
|
||||
<h6 class="modal-title">جزئیات وظیفه</h6>
|
||||
<h6 class="modal-title">@Model.EndTaskDate</h6>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -410,36 +410,36 @@
|
||||
<div class="@(Model.AssignViewModels?.Count > 1 ? "col-9" : "col-12")">
|
||||
<div class="chat-section">
|
||||
<div class="chat-card-main">
|
||||
<div class="row mb-2">
|
||||
<div class="row">
|
||||
@* <h6 class="modal-title text-start text-white" style="font-size: 14px;">طرف حساب: @Model.ContractingPartyName</h6>
|
||||
<h6 class="modal-title text-start text-white" style="font-size: 14px;">عنوان وظیفه: @Model.Title</h6>
|
||||
*@
|
||||
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7">@Model.ContractingPartyName</span>
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle text-start row align-items-center mb-1">
|
||||
<span class="col-5 col-md-4 ps-0">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.ContractingPartyName</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7">@Model.Title</span>
|
||||
<span class="col-5 col-md-4 ps-0">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.Title</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6">@Model.CreateDateFa</span>
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle text-center row align-items-center mb-1">
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6 col-md-7">@Model.CreateDateFa</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ سررسید:</span>
|
||||
<span class="@(Model.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center col-6" id="AssignEndTaskDateFa">@Model.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
<h6 class="taskTitle text-center row align-items-center">
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ سررسید:</span>
|
||||
<span class="col-6 col-md-7 @(Model.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center" id="AssignEndTaskDateFa">@Model.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Description))
|
||||
{
|
||||
<div class="taskTitle">توضیحات:</div>
|
||||
<div class="taskDesc">
|
||||
<div>توضیحات :</div>
|
||||
@Html.Raw(Model.Description)
|
||||
</div>
|
||||
}
|
||||
@@ -534,10 +534,11 @@
|
||||
<span style="font-size: 11px">@Model.CreateDateFa</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mainChat">
|
||||
<div id="ajaxChatSection"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
@if (!Model.IsDone)
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
@model AccountManagement.Application.Contracts.Task.EditTask
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
<link href="~/assetsadminnew/tasks/css/diagramtaskmodal.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
|
||||
<link href="~/assetsadminnew/tasks/css/diagramtaskmodal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.modal-content {
|
||||
background-color: #eef3f3;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e8eef0' fill-opacity='0.67' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
.modal-body {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh; /* Ensure the modal takes full viewport height */
|
||||
overflow: hidden; /* Hide overflow to prevent content from expanding beyond viewport */
|
||||
}
|
||||
.modal-xl-taskTime {
|
||||
max-width: 600px;
|
||||
}
|
||||
@@ -59,8 +66,8 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-2">
|
||||
<div class="d-flex align-items-center justify-content-center h-100">
|
||||
<div class="tree-section w-100">
|
||||
<div class="d-flex align-items-center justify-content-center h-100 boxShadowDiagram">
|
||||
<div class="tree-section w-100" id="canvas-wrapper" style="cursor: grab;">
|
||||
<div id="tree">
|
||||
<div id="tree-container" class="branch">
|
||||
|
||||
@@ -82,4 +89,4 @@
|
||||
var assignments = @Html.Raw(Json.Serialize(Model.AssignViewModels));
|
||||
var senderId= @Model.SenderId;
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/DiagramTaskModal.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/DiagramTaskModal.js?ver=@adminVersion"></script>
|
||||
@@ -2,9 +2,10 @@
|
||||
@using System.Web
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@using File = System.IO.File
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
|
||||
var voice = Model.EditTask.medias.FirstOrDefault(x => x.Category == "صوت");
|
||||
string svgName = "unknow";
|
||||
string[] fileExtensions = new string[]
|
||||
@@ -18,10 +19,10 @@
|
||||
int fileIndex = 0;
|
||||
int i = 1;
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/edit.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/edit.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
}
|
||||
|
||||
@@ -371,4 +372,4 @@
|
||||
var voiceSrc = '@(voice == null ? "" : @Url.Page("./Index", "ShowVoice", new { filePath = voice?.Path }))';
|
||||
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/edit.js?ver=484"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/edit.js?ver=@adminVersion"></script>
|
||||
@@ -1,24 +1,24 @@
|
||||
@page
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Task.IndexModel
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@using _0_Framework.Application
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
var index = 1;
|
||||
}
|
||||
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<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?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" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/table-grid.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-list.css?ver=?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<!-- sweet alerts -->
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
@@ -306,7 +306,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="mb-2">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.AccountId" id="AccountIdMobile">
|
||||
<select class="form-select select2OptionMobile" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.AccountId" id="AccountIdMobile">
|
||||
<option value="0">پرسنل را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -377,8 +377,8 @@
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@adminVersion"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -399,5 +399,5 @@
|
||||
|
||||
var itemsYearList = @Html.Raw(Json.Serialize(Model.YearlyList.OrderBy(x => x)));
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/index.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/index.js?ver=@adminVersion"></script>
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using AccountManagement.Application.Contracts.Assign;
|
||||
using AccountManagement.Application.Contracts.Position;
|
||||
using AccountManagement.Application.Contracts.Task;
|
||||
using AccountManagement.Application.Contracts.Ticket;
|
||||
using AccountManagement.Domain.AssignAgg;
|
||||
using AccountManagement.Domain.MediaAgg;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
@@ -58,6 +59,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
public int UserPositionValue { get; set; }
|
||||
public List<string> YearlyList { get; set; }
|
||||
|
||||
|
||||
public override void OnPageHandlerExecuting(PageHandlerExecutingContext context)
|
||||
{
|
||||
bool hasAccessToTask = _positionApplication.HasPositionValue(_authHelper.CurrentAccountId());
|
||||
@@ -68,6 +70,11 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
base.OnPageHandlerExecuting(context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public IActionResult OnGet(TaskSearchModel searchModel)
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x => x == 901))
|
||||
@@ -373,17 +380,28 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
// برای باز کردن مودال عملیات درخواست تسک
|
||||
public IActionResult OnGetOperationRequestTask(long taskId, string type)
|
||||
{
|
||||
var accounts = _accountApplication.AccountsForAssign(taskId);
|
||||
var taskDetails = _taskApplication.GetRequestDetails(taskId);
|
||||
var model = new OperationModalViewModel()
|
||||
{
|
||||
//ModalTaskRequest = _taskApplication.GetRequestDetails(taskId),
|
||||
TaskId = taskId,
|
||||
Type = type,
|
||||
Accounts = _accountApplication.AccountsForAssign(taskId),
|
||||
TaskDetails = _taskApplication.GetRequestDetails(taskId)
|
||||
Accounts = accounts,
|
||||
TaskDetails = taskDetails,
|
||||
};
|
||||
return Partial("OperationRequestModal", model);
|
||||
}
|
||||
|
||||
public IActionResult OnGetOperationRequestTaskDetailsAjax(long taskId)
|
||||
{
|
||||
var taskDetails = _taskApplication.GetRequestDetails(taskId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = taskDetails
|
||||
});
|
||||
}
|
||||
|
||||
// برای باز کردن مودال جزئیات تسک مثل عنوان، تاریخ، توضیحات و ...
|
||||
public IActionResult OnGetDetailsTask(long taskId)
|
||||
{
|
||||
@@ -726,12 +744,16 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetChatMessageDetailsTask(long assignId)
|
||||
public IActionResult OnGetChatMessageDetailsTask(long assignId, long taskId)
|
||||
{
|
||||
var result = _taskApplication.GetTaskMessages(assignId);
|
||||
|
||||
var taskDetails = taskId > 0 ? _taskApplication.GetRequestDetails(taskId).AssignViewModels.First(x => x.Id == assignId) : null;
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = result,
|
||||
taskDetailsData = taskDetails
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
@model AccountManagement.Application.Contracts.Task.OperationModalViewModel
|
||||
@using System.Security.Claims
|
||||
@using AccountManagement.Application.Contracts.Media
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
|
||||
MediaViewModel voice = null;
|
||||
var userId = Convert.ToInt64(User.FindFirstValue("AccountId"));
|
||||
|
||||
@@ -19,10 +20,10 @@
|
||||
int i = 1;
|
||||
|
||||
<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/operationrequestmodal.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/detailmodal.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/operationrequestmodal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/detailmodal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
|
||||
if (Model.TaskDetails.AssignViewModels?.Count > 1)
|
||||
@@ -50,18 +51,18 @@
|
||||
<div class="topColor"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-start">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0;font-size: 14px;">جزئیات وظیفه</h6>
|
||||
<div class="col-5 col-md-4 text-start">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0;">جزئیات وظیفه</h6>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0; font-size: 14px;" id="AssignTaskName">
|
||||
<div class="col-6 col-md-4">
|
||||
<h6 class="modal-title" id="AssignTaskName">
|
||||
@(Model.TaskDetails.AssignViewModels.Count() == 1 ? Model.TaskDetails.AssignViewModels.First().AssignedName : "کل درخواستها")
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-2">
|
||||
<div class="modal-body p-2" style="overflow-y: auto;">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
@@ -132,33 +133,33 @@
|
||||
|
||||
<div id="chatSection" class="@(Model.TaskDetails.AssignViewModels?.Count > 0 && Model.TaskDetails.AssignViewModels?.Count != 1 ? "col-12 col-md-9" : "col-12") p-0">
|
||||
<div class="chat-section">
|
||||
<div class="chat-card-main">
|
||||
<div class="row mb-2">
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7">@Model.TaskDetails.ContractingPartyName</span>
|
||||
<div class="chat-card-main" style="height: 175px;position: sticky;top: 5px;z-index: 40;">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle text-start row align-items-center mb-1">
|
||||
<span class="col-5 col-md-4 p-0">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.TaskDetails.ContractingPartyName</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7">@Model.TaskDetails.Title</span>
|
||||
<span class="col-5 col-md-4 p-0">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7 col-md-8">@Model.TaskDetails.Title</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6">@Model.TaskDetails.CreateDateFa</span>
|
||||
<div class="col-6">
|
||||
<h6 class="taskTitle text-end row align-items-center mb-1">
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6 col-md-7 justify-content-center">@Model.TaskDetails.CreateDateFa</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ سررسید:</span>
|
||||
<span class="@(Model.TaskDetails.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center col-6" id="AssignEndTaskDateFa">@Model.TaskDetails.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
<span class="col-6 col-md-5 ps-0">تاریخ سررسید:</span>
|
||||
<span class="@(Model.TaskDetails.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center col-6 col-md-7 justify-content-center" id="AssignEndTaskDateFa">@Model.TaskDetails.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
@if (!String.IsNullOrWhiteSpace(Model.TaskDetails.Description))
|
||||
{
|
||||
<div class="taskTitle">توضیحات :</div>
|
||||
<div class="taskDesc">
|
||||
<div>توضیحات :</div>
|
||||
@Html.Raw(Model.TaskDetails.Description)
|
||||
</div>
|
||||
}
|
||||
@@ -254,80 +255,24 @@
|
||||
<span style="font-size: 11px">@Model.TaskDetails.CreateDateFa</span>
|
||||
</div>
|
||||
|
||||
<div id="ajaxChatSection"></div>
|
||||
<div id="mainChat" class="mainChat">
|
||||
<div id="LoadingCard">
|
||||
<div class="px-2">
|
||||
@for (int j = 0; j < 4; j++)
|
||||
{
|
||||
bool isOdd = j % 2 != 0;
|
||||
string marginStyle = isOdd ? "margin-right: auto;" : "margin-left: auto;";
|
||||
|
||||
<div class="admincardActionSection position-relative">
|
||||
@foreach (var assign in Model.TaskDetails.AssignViewModels!)
|
||||
{
|
||||
string typeMessage = "";
|
||||
string color = "";
|
||||
if (assign.IsCanceledRequest)
|
||||
{
|
||||
typeMessage = "درخواست انصراف ";
|
||||
color = "red";
|
||||
}
|
||||
else if (assign.TimeRequest)
|
||||
{
|
||||
typeMessage = "درخواست مهلت ";
|
||||
color = "orange";
|
||||
}
|
||||
else if (assign.IsDoneRequest)
|
||||
{
|
||||
typeMessage = "درخواست انجام شد ";
|
||||
color = "green";
|
||||
}
|
||||
<div class="admincardAction @color" id="Assign_@assign.Id">
|
||||
<div class="row">
|
||||
<div class="@(assign.TimeRequest ? "col-6" : "col-9")">
|
||||
<p class="mb-1 m-0">@assign.AssignedName @typeMessage از وظیفه داده است.</p>
|
||||
</div>
|
||||
@if (assign.TimeRequest)
|
||||
{
|
||||
<div class="col-3">
|
||||
<p class="mb-1 m-0 text-center">به تاریخ: @assign.RequestDateFa</p>
|
||||
</div>
|
||||
<div class="skeleton-loader" style="height: 90px; width: 330px; @marginStyle"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="@(assign.TimeRequest ? "col-6" : "col-9") pe-1">
|
||||
<textarea class="form-control" id="Description_@assign.AssignedId" placeholder="توضیحات" style="height: 40px; resize: none"></textarea>
|
||||
</div>
|
||||
@if (assign.TimeRequest)
|
||||
{
|
||||
<div class="col-3 px-0">
|
||||
<input type="text" id="dateTime_@assign.AssignedId" class="form-control text-center date" placeholder="تاریخ" style="height: 40px;" />
|
||||
</div>
|
||||
}
|
||||
<div class="col-3 mt-1 ps-1">
|
||||
<div class="btn-section">
|
||||
@{
|
||||
string onclickReject = string.Empty;
|
||||
string onclickAccept = string.Empty;
|
||||
|
||||
if (assign.IsCanceledRequest)
|
||||
{
|
||||
onclickReject = $"handleRejectCancel({assign.AssignedId},{assign.Id})";
|
||||
onclickAccept = $"handleAcceptCancel({assign.AssignedId},{assign.Id})";
|
||||
}
|
||||
else if (assign.TimeRequest)
|
||||
{
|
||||
onclickReject = $"handleRejectTimeRequest({assign.AssignedId},{assign.Id})";
|
||||
onclickAccept = $"handleAcceptTimeRequest({assign.AssignedId},{assign.Id})";
|
||||
}
|
||||
else if (assign.IsDoneRequest)
|
||||
{
|
||||
onclickReject = $"handleRejectComplete({assign.AssignedId},{assign.Id})";
|
||||
onclickAccept = $"handleAcceptComplete({assign.AssignedId},{assign.Id})";
|
||||
}
|
||||
}
|
||||
<button type="button" class="btn-submit" onclick="@onclickAccept">تایید</button>
|
||||
<button type="button" class="btn-reject" onclick="@onclickReject">عدم تایید</button>
|
||||
<div id="ajaxChatSection">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -338,7 +283,7 @@
|
||||
<div class="modal-footer justify-content-center align-items-center p-2 pt-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2" data-bs-dismiss="modal">بستن</button>
|
||||
<button type="button" class="btn-cancel2 d-flex align-items-center justify-content-center" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
@if (!Model.TaskDetails.IsDone)
|
||||
{
|
||||
@@ -369,10 +314,11 @@
|
||||
var taskId = Number(@Model.TaskDetails.Id);
|
||||
var UserId = @User.FindFirstValue("AccountId");
|
||||
var loadChatMessageAjax = '@Url.Page("./Index", "ChatMessageDetailsTask")';
|
||||
var loadOperationRequestTaskDetailsAjax = '@Url.Page("./Index", "OperationRequestTaskDetailsAjax")';
|
||||
var voiceSrc = '@(voice == null ? "" : @Url.Page("./Index", "ShowVoice", new { filePath = voice?.Path }))';
|
||||
|
||||
var btnAllRequestActive = @(Model.TaskDetails.AssignViewModels?.Count == 1 ? "true" : "false");
|
||||
var CountAssignViewModel = @(Model.TaskDetails.AssignViewModels?.Count);
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/operationrequestmodal.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/operationrequestmodal.js?ver=@adminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@adminVersion"></script>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Client.Pages.Company.Checkouts.CheckoutPrintAllModel
|
||||
@* @section Styles
|
||||
{
|
||||
<meta name="viewport" content="width=100vw">
|
||||
} *@
|
||||
|
||||
<link href="~/assetsclient/pages/checkouts/css/printonerollcall.css" rel="stylesheet" />
|
||||
@{
|
||||
<style>
|
||||
.modal .modal-dialog .modal-content {
|
||||
@@ -2649,7 +2647,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row p-0" style="margin-top:40px;">
|
||||
<div class="row p-0" @* style="margin-top:40px;" *@>
|
||||
<div classs="col-12" style="padding:0 !important">
|
||||
<span style="float: left; margin-left: 0px">امضاء و اثر انگشت</span>
|
||||
</div>
|
||||
|
||||
@@ -57,9 +57,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
#region FirstLoad-OnGet
|
||||
|
||||
public IActionResult OnGet(CheckoutSearchModel searchModel)
|
||||
{
|
||||
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
@@ -103,13 +100,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
return Redirect("error/401");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return Redirect("error/404");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -162,6 +152,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
{
|
||||
|
||||
var res = _checkoutApplication.PrintOne(id);
|
||||
if (res.HasRollCall)
|
||||
return Partial("PrintOneRollCall", res);
|
||||
|
||||
return Partial("PrintOneMobile", res);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@model CompanyManagment.App.Contracts.Checkout.CheckoutGroupPrintViewModel
|
||||
|
||||
@{
|
||||
<style>
|
||||
.modal .modal-dialog .modal-content {
|
||||
@@ -84,7 +85,7 @@
|
||||
|
||||
#printSection {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
}
|
||||
@@ -3169,7 +3170,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row p-0" style="margin-top:40px;">
|
||||
<div class="row p-0" @* style="margin-top:40px;" *@>
|
||||
<div classs="col-12" style="padding:0 !important">
|
||||
<span style="float: left; margin-left: 0px">امضاء و اثر انگشت</span>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<span> نام پدر: </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.FathersName))
|
||||
{
|
||||
<span style="visibility: hidden">"1111111111"</span>
|
||||
<span style="visibility: hidden">""</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -47,7 +47,7 @@
|
||||
<span>به کد ملی:</span> <span> </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
|
||||
{
|
||||
<span style="margin-left: 15px; visibility: hidden">222333111</span>
|
||||
<span style="margin-left: 15px; visibility: hidden"></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,32 +2,26 @@
|
||||
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
|
||||
|
||||
|
||||
|
||||
<div class="container container2" id="printThis">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-12 mt-30">
|
||||
<fieldset style="border: 1px solid black;
|
||||
padding: revert;
|
||||
border-radius: 10px;
|
||||
height: 28cm;
|
||||
margin: 3mm 5mm 0 5mm; ">
|
||||
margin: 3mm 5mm 0 5mm; position: relative;">
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-xs-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-xs-6 d-inline-block text-center">
|
||||
<p style="margin-top:10px !important;font-size: 18px; font-family: 'IranNastaliq' !important; ">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی و رسید پرداخت حقوق</p>
|
||||
<div class="col-3 d-inline-block"><fieldset style="border: 1px solid black;border-radius: 15px;padding: 1px 15px 1px 15px;margin-top: 5px;width: 70%;font-size: 12px;text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-6 d-inline-block text-center"><p style="margin-top:10px !important;font-size: 18px; font-family: 'IranNastaliq' !important; ">بسمه تعالی</p> <p style="font-size: 15px; font-weight: bold">فیش حقوقی و رسید پرداخت حقوق</p> </div>
|
||||
<div class="col-3 d-inline-block"></div>
|
||||
</div>
|
||||
<div class="col-xs-3 d-inline-block"></div>
|
||||
</div>
|
||||
<div class="row" style="padding: 0px 12px;font-size: 14px; margin-bottom: 10px; ">
|
||||
<div class="row">
|
||||
<span style="width: 280px;padding: 0px 10px 0px 0px !important; float:right"><span>اینجانب <span> </span> <span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.EmployeeFullName</span> </span></span>
|
||||
<div class="row" style="font-size: 14px; margin-bottom: 10px; ">
|
||||
<div class="col-12">
|
||||
<span style="width: 280px;padding: 0px 0px 0px 0px !important; float:right"><span>اینجانب <span> </span> <span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.EmployeeFullName</span> </span></span>
|
||||
<span style="margin-right: 5px; float:right">
|
||||
<span> نام پدر: </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.FathersName))
|
||||
{
|
||||
<span style="visibility: hidden">"1111111111"</span>
|
||||
<span style="visibility: hidden">""</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -40,7 +34,7 @@
|
||||
<span>به کد ملی:</span> <span> </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
|
||||
{
|
||||
<span style="margin-left: 15px; visibility: hidden">222333111</span>
|
||||
<span style="margin-left: 15px; visibility: hidden"></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -54,22 +48,21 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="margin-left: 10px; font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.DateOfBirth</span>
|
||||
<span style="margin-left: 0px; font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.DateOfBirth</span>
|
||||
}
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 14px; text-align: justify">
|
||||
<div class="col-12" style="font-size: 14px; text-align: justify">
|
||||
|
||||
@{
|
||||
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
||||
{
|
||||
<span> پـرسنل کارگاه<span> </span><span> </span><span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.WorkshopName</span> </span>
|
||||
<span> </span>
|
||||
<span>به کارفرمایی <span> </span> آقای/خانم</span>
|
||||
<span> </span>
|
||||
<span>به کارفرمایی <span> </span> آقای/خانم</span> <span> </span>
|
||||
|
||||
<span> </span>
|
||||
if (@Model.EmployerList.Count > 1)
|
||||
{
|
||||
@@ -80,14 +73,14 @@
|
||||
{
|
||||
<span>و غیره</span>
|
||||
}
|
||||
</span>
|
||||
<br />
|
||||
</span> <br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
@Model.EmployerList.FirstOrDefault().EmployerFullName
|
||||
</span>
|
||||
|
||||
<br />
|
||||
}
|
||||
|
||||
@@ -108,13 +101,10 @@
|
||||
<span> برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام. </span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||
<div class="row" style="margin-top: 10px;padding: 0 12px;">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
|
||||
@@ -298,9 +288,10 @@
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div style="padding: 0 10px;">
|
||||
<div class="row" style="margin-top: 8px; background-color: #F6F6F6 !important; border: 1px solid #000;border-radius: 10px;display: flex;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<div class="col-xs-6" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
|
||||
<div style="padding: 0 12px;">
|
||||
<div class="row" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));">
|
||||
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
@@ -330,7 +321,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-6" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
@@ -347,7 +338,7 @@
|
||||
}
|
||||
@foreach (var day in Model.MonthlyRollCall)
|
||||
{
|
||||
<tr style="@(day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() == "جمعه" ? "background-color: #BBBBBB !important;" : "background-color: #FFFFFF !important;")font-size: 8px;border-collapse: separate;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<tr style="@(day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() == "جمعه" ? "background-color: #BBBBBB !important;" : "background-color: #FFFFFF !important;") font-size: 8px;border-collapse: separate;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.DateTimeGr.ToFarsi() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate</td>
|
||||
@@ -385,13 +376,13 @@
|
||||
</div>
|
||||
<div class="row" style="padding: 0px 14px; font-size: 14px;">
|
||||
<div class="row">
|
||||
@*<div class="col-xs-3"><span>اینجانب <span> </span> <span> </span><span> </span><span style="font-weight: bold">@Model.EmployeeFullName</span> </span></div>
|
||||
<div class="col-xs-3"><span> نام پدر: <span> </span><span> </span> <span> </span><span style="font-weight: bold">@Model.FathersName</span></span></div>
|
||||
<div class="col-xs-3"><span>به کد ملی:<span> </span><span> </span><span style="font-weight: bold">@Model.NationalCode</span> </span></div>
|
||||
<div class="col-xs-3" style="direction: ltr"> متولد: <span> </span><span> </span><span> </span><span> </span><span style="font-weight: bold">@Model.DateOfBirth</span></div>*@
|
||||
@*<div class="col-3"><span>اینجانب <span> </span> <span> </span><span> </span><span style="font-weight: bold">@Model.EmployeeFullName</span> </span></div>
|
||||
<div class="col-3"><span> نام پدر: <span> </span><span> </span> <span> </span><span style="font-weight: bold">@Model.FathersName</span></span></div>
|
||||
<div class="col-3"><span>به کد ملی:<span> </span><span> </span><span style="font-weight: bold">@Model.NationalCode</span> </span></div>
|
||||
<div class="col-3" style="direction: ltr"> متولد: <span> </span><span> </span><span> </span><span> </span><span style="font-weight: bold">@Model.DateOfBirth</span></div>*@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 14px; text-align: justify">
|
||||
<div class="col-12" style="font-size: 14px; text-align: justify">
|
||||
@*<span> پـرسنل شـرکت<span> </span><span> </span><span style="font-weight: bold">@Model.WorkshopName</span> </span>
|
||||
<span> </span>
|
||||
<span>به کارفرمایی <span> </span> آقای/خانم/شرکت</span> <span> </span><span> </span>
|
||||
@@ -412,8 +403,8 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div classs="col-xs-12">
|
||||
<div style="float: left;display: flex;position: absolute;left: 26px;bottom: 12px;">
|
||||
<div classs="col-12">
|
||||
<div style="float: left;display: flex;position: absolute;left: 0px;/* bottom: 12px; */" class="signSection">
|
||||
<div style="margin-left: 15px; position: relative; width: 80px; border: 1px solid #000; height: 98px; border-radius: 10px;">
|
||||
<span style="position: absolute; top: -9px; right: 50%; transform: translate(50%, 0px); border-collapse: separate;background-color: #FFFFFF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; font-size: 12px;width: 55px;">اثر انگشت</span>
|
||||
</div>
|
||||
@@ -431,9 +422,6 @@
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -441,5 +429,3 @@
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
|
||||
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
#printSection {
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
page-break-after: auto !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
@foreach (var item in @Model.GroupPrintList)
|
||||
{
|
||||
<div class="container2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset style="border: 1px solid black;
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
#printSection {
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
page-break-after: auto !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
#printSection {
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
page-break-after: auto !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
#printSection {
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
page-break-after: auto !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.Application;
|
||||
using MD.PersianDateTime.Standard;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
@@ -28,6 +29,7 @@ using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
{
|
||||
[Authorize]
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
[TempData]
|
||||
@@ -66,8 +68,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
}
|
||||
|
||||
public IActionResult OnGet(EmployeeSearchModel searchModel)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
var id = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -105,15 +105,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetPrintAllPersonnelInfo(string idlist)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
long workshopId = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -146,15 +139,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetPrintAllPersonnelInfoMobile(long workshopID, string idlist)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
public IActionResult OnGetPrintAllPersonnelInfoMobile(string idlist)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
long workshopId = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -162,7 +148,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
{
|
||||
var search = new PersonnelInfoSearchModel()
|
||||
{
|
||||
WorkshopId = workshopID,
|
||||
WorkshopId = workshopId,
|
||||
};
|
||||
var result = _workshopApplication.GetPersonnelInfo(search)
|
||||
.GroupBy(x => x.FullName)
|
||||
@@ -187,11 +173,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetPrintAllDetailsPersonnelInfo(long workshopID, string idlist)
|
||||
{
|
||||
@@ -224,6 +205,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
{
|
||||
WorkshopId = workshopID,
|
||||
};
|
||||
|
||||
var result = _workshopApplication.GetPersonnelInfo(search)
|
||||
.GroupBy(x => x.FullName)
|
||||
.Select(x => x.First())
|
||||
@@ -244,8 +226,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
}
|
||||
|
||||
public IActionResult OnGetContractCheckoutStatus()
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
long workshopId = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -263,15 +243,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetContractCheckoutStatusAjax(long employeeId)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
long workshopId = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -365,15 +338,10 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeList()
|
||||
{
|
||||
var workshopSlug = User.FindFirst("WorkshopSlug").Value;
|
||||
var workshopSlug = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopSlug);
|
||||
if (workshopId > 0)
|
||||
{
|
||||
@@ -407,8 +375,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
}
|
||||
|
||||
public IActionResult OnGetLeaveCreate()
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -426,11 +392,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostLeaveSave(CreateLeave command)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.PersonnelInfoPrintViewModel
|
||||
@{
|
||||
int i = 1;
|
||||
<style>
|
||||
}
|
||||
|
||||
|
||||
<style>
|
||||
#MainModal {
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
@@ -9,7 +12,6 @@
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white;
|
||||
margin: 0 auto;
|
||||
// padding: 0px 30px 0 30px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
@@ -39,9 +41,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// #printThis {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
#printThis .modal-content {
|
||||
background-clip: padding-box;
|
||||
@@ -91,9 +90,7 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8;
|
||||
border-radius: 9px;
|
||||
// border-collapse: separate;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -105,7 +102,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@@ -113,7 +109,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -257,7 +252,6 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-radius: 9px !important;
|
||||
}
|
||||
|
||||
@@ -322,10 +316,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@page:first {
|
||||
margin-top: 0mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
@@page {
|
||||
size: A4;
|
||||
margin: 0mm;
|
||||
page-break-after: auto;
|
||||
margin-top: 20mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
@@ -343,24 +348,15 @@
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
max-width: 100%;
|
||||
width: 60cm;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#printSection, #printSection * {
|
||||
visibility: visible;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
/* width: 27.5cm; */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 0;
|
||||
@@ -368,6 +364,7 @@
|
||||
|
||||
#printThis {
|
||||
padding: 2rem 1rem;
|
||||
margin: 1rem auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -376,13 +373,15 @@
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
// #printThis .table-bordered {
|
||||
// // border-collapse: separate !important;
|
||||
// margin-bottom: 0;
|
||||
// table-layout: fixed;
|
||||
// width: 100%;
|
||||
// border: 0 !important;
|
||||
// }
|
||||
.titleH1 {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
|
||||
.titleLogo {
|
||||
font-size: 10px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > tr > th {
|
||||
font-size: 14px !important;
|
||||
@@ -390,7 +389,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
background: #ddd;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
@@ -404,7 +402,6 @@
|
||||
padding: 5px 0px;
|
||||
text-align: center;
|
||||
font-size: 10px !important;
|
||||
// border: 1px solid #94a3b8;
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > td:first-child {
|
||||
@@ -420,13 +417,11 @@
|
||||
}
|
||||
|
||||
#printThis .table {
|
||||
// border: 1px solid transparent !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #aaa !important;
|
||||
}
|
||||
|
||||
#printThis .table th, #printThis .table td {
|
||||
@@ -434,15 +429,6 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
// border-right: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
// #printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
#printThis .colgp-1 {
|
||||
@@ -494,7 +480,6 @@
|
||||
}
|
||||
|
||||
#printThis .titleSection {
|
||||
//border: 1px solid #94a3b8 !important;
|
||||
border-bottom: 0 !important;
|
||||
border-radius: 10px 10px 0 0 !important;
|
||||
background: #fff !important;
|
||||
@@ -545,7 +530,6 @@
|
||||
.titleSection {
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
//border: 1px solid #94a3b8;
|
||||
border-bottom: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
@@ -557,6 +541,10 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.lineS {
|
||||
margin: 4px 0 !important;
|
||||
}
|
||||
@@ -566,32 +554,19 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
vertical-align: middle !important;
|
||||
border: 1px solid #94a3b8 !important;
|
||||
font-size: 14px;
|
||||
// padding: 4px .5rem;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
.prof_table {
|
||||
border: 2px solid black;
|
||||
border-radius: 5px;
|
||||
@@ -609,8 +584,7 @@
|
||||
scrollbar-width: thin;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
<div class="modal-content" style="padding: 0 0 15px 0;">
|
||||
<form asp-page="./Index" asp-page-handler="Details"
|
||||
method="post"
|
||||
@@ -629,7 +603,7 @@
|
||||
<div class="table-container tbl-body print" id="printThis">
|
||||
@foreach (var item in Model.PersonnelInfoPrintList)
|
||||
{
|
||||
<table class="table" style="height: 9cm; margin: 5px 0 0 0;">
|
||||
<table class="table" style="height: 9cm; margin: 15px 0;">
|
||||
<tbody>
|
||||
<colgroup>
|
||||
<col class="colgp-1">
|
||||
@@ -650,7 +624,7 @@
|
||||
<tr>
|
||||
<th colspan="2" class="col-md-12" style="border-radius: 10px 10px 0 0;">
|
||||
<div class="row titleSection">
|
||||
<div class="col-2 text-start">
|
||||
<div class="col-3 text-start">
|
||||
<svg 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" width="55px">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
@@ -665,7 +639,7 @@
|
||||
<polyline class="cls-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="col-8 text-center">
|
||||
<div class="col-6 text-center">
|
||||
<div style="display: inline-block;">
|
||||
<div style="position: relative;text-align: center;bottom: 10px;">
|
||||
<span class="titleH1">موسسه نور دادمهر گستر کاسپین</span>
|
||||
@@ -673,9 +647,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 text-end">
|
||||
<p style="letter-spacing: 1.4px;font-size: 13px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="m-0" style="font-size: 13px;">سامانه هوشمند گزارشگیر</p>
|
||||
<div class="col-3 text-end">
|
||||
<p class="titleLogo" style="letter-spacing: 1.4px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="m-0 titleLogo">سامانه هوشمند گزارشگیر</p>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.PersonnelInfoPrintViewModel
|
||||
@{
|
||||
int i = 1;
|
||||
<style>
|
||||
}
|
||||
|
||||
|
||||
<style>
|
||||
#MainModal {
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
@@ -9,7 +12,6 @@
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white;
|
||||
margin: 0 auto;
|
||||
// padding: 0px 30px 0 30px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
@@ -39,10 +41,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// #printThis {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
#printThis .modal-content {
|
||||
background-clip: padding-box;
|
||||
background: black !important;
|
||||
@@ -91,9 +89,7 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8;
|
||||
border-radius: 9px;
|
||||
// border-collapse: separate;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -105,7 +101,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@@ -113,7 +108,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -322,10 +316,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@page:first {
|
||||
margin-top: 0mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
@@page {
|
||||
size: A4;
|
||||
margin: 0mm;
|
||||
page-break-after: auto;
|
||||
margin-top: 20mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
@@ -358,9 +363,9 @@
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
/* width: 27.5cm; */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 0;
|
||||
@@ -376,13 +381,6 @@
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
// #printThis .table-bordered {
|
||||
// // border-collapse: separate !important;
|
||||
// margin-bottom: 0;
|
||||
// table-layout: fixed;
|
||||
// width: 100%;
|
||||
// border: 0 !important;
|
||||
// }
|
||||
|
||||
#printThis .table-bordered > thead > tr > th {
|
||||
font-size: 14px !important;
|
||||
@@ -390,7 +388,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
background: #ddd;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
@@ -404,7 +401,6 @@
|
||||
padding: 5px 0px;
|
||||
text-align: center;
|
||||
font-size: 10px !important;
|
||||
// border: 1px solid #94a3b8;
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > td:first-child {
|
||||
@@ -420,13 +416,11 @@
|
||||
}
|
||||
|
||||
#printThis .table {
|
||||
// border: 1px solid transparent !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #aaa !important;
|
||||
}
|
||||
|
||||
#printThis .table th, #printThis .table td {
|
||||
@@ -434,16 +428,6 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
// border-right: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
// #printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
#printThis .colgp-1 {
|
||||
width: 20%;
|
||||
@@ -494,7 +478,6 @@
|
||||
}
|
||||
|
||||
#printThis .titleSection {
|
||||
//border: 1px solid #94a3b8 !important;
|
||||
border-bottom: 0 !important;
|
||||
border-radius: 10px 10px 0 0 !important;
|
||||
background: #fff !important;
|
||||
@@ -506,6 +489,15 @@
|
||||
display: table-header-group !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
.titleH1 {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 10px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.titleSection {
|
||||
@@ -545,7 +537,6 @@
|
||||
.titleSection {
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
//border: 1px solid #94a3b8;
|
||||
border-bottom: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
@@ -557,6 +548,10 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.lineS {
|
||||
margin: 4px 0 !important;
|
||||
}
|
||||
@@ -566,31 +561,19 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
vertical-align: middle !important;
|
||||
border: 1px solid #94a3b8 !important;
|
||||
font-size: 14px;
|
||||
// padding: 4px .5rem;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
//
|
||||
// }
|
||||
|
||||
.prof_table {
|
||||
border: 2px solid black;
|
||||
@@ -609,8 +592,8 @@
|
||||
scrollbar-width: thin;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="modal-content" style="padding: 0 0 15px 0;">
|
||||
<form asp-page="./Index" asp-page-handler="Details"
|
||||
method="post"
|
||||
@@ -629,7 +612,7 @@
|
||||
<div class="table-container tbl-body print" id="printThis">
|
||||
@foreach (var item in Model.PersonnelInfoPrintList)
|
||||
{
|
||||
<table class="table" style="height: 9cm; margin: 5px 0 0 0;">
|
||||
<table class="table" style="height: 9cm; margin: 15px 0;">
|
||||
<tbody>
|
||||
<colgroup>
|
||||
<col class="colgp-1">
|
||||
@@ -674,8 +657,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 text-end">
|
||||
<p style="letter-spacing: 1.4px;font-size: 13px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="m-0" style="font-size: 13px;">سامانه هوشمند گزارشگیر</p>
|
||||
<p class="titleLogo" style="letter-spacing: 1.4px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="titleLogo m-0">سامانه هوشمند گزارشگیر</p>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
@@ -4,25 +4,21 @@
|
||||
|
||||
@* <link href="~/assetsclient/css/insuranceprint.css?ver=@Version.StyleVersion" rel="stylesheet" /> *@
|
||||
|
||||
<style>
|
||||
|
||||
@{
|
||||
<style>
|
||||
|
||||
table{
|
||||
table {
|
||||
font-size: 12px;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
table span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@media screen {
|
||||
#printSection {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white !important;
|
||||
}
|
||||
@@ -44,9 +40,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.print:last-child {
|
||||
/* .print:last-child {
|
||||
page-break-after: auto !important;
|
||||
}
|
||||
} */
|
||||
|
||||
@@media print {
|
||||
body * {
|
||||
@@ -66,6 +62,15 @@
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
#printSection {
|
||||
/* width: 27.5cm; */
|
||||
position: absolute;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 2rem;
|
||||
}
|
||||
|
||||
#printThis {
|
||||
width: 100%;
|
||||
padding: 2rem 1rem;
|
||||
@@ -89,17 +94,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 3rem;
|
||||
}
|
||||
|
||||
#printThis .titleSection {
|
||||
//border: 1px solid #94a3b8 !important;
|
||||
border-bottom: 0 !important;
|
||||
border-radius: 10px 10px 0 0 !important;
|
||||
background: #fff !important;
|
||||
@@ -118,8 +113,23 @@
|
||||
print-color-adjust: exact !important;
|
||||
}
|
||||
|
||||
.print:last-child {
|
||||
page-break-after: always !important;
|
||||
}
|
||||
}
|
||||
@@page:first {
|
||||
margin-top: 0mm; /* Margin for the first page */
|
||||
margin-bottom: 0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
@@page {
|
||||
margin-top: 10mm; /* Larger margin for the second and subsequent pages */
|
||||
margin-bottom:0mm;
|
||||
margin-left: 0mm;
|
||||
margin-right: 0mm;
|
||||
}
|
||||
|
||||
.cls-1 {
|
||||
fill: url(#linear-gradient-2);
|
||||
@@ -155,7 +165,7 @@
|
||||
print-color-adjust: exact !important;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
/* border: 1px solid #94a3b8; */
|
||||
border-bottom: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
@@ -204,13 +214,13 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
/* border: 1px solid #94a3b8 !important; */
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
/* border: 1px solid #94a3b8 !important; */
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
@@ -218,17 +228,16 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
//
|
||||
}
|
||||
/* .table th:last-child, .table td:last-child {
|
||||
border-right: none !important;
|
||||
} */
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
//
|
||||
}
|
||||
</style>
|
||||
/* .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
border-bottom: none !important;
|
||||
} */
|
||||
</style>
|
||||
|
||||
@{
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
@@ -237,10 +246,10 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body print " id="printThis">
|
||||
<div class="modal-body print" id="printThis">
|
||||
<div class="row">
|
||||
<div class="col-12" style="overflow-y: auto; height:490px;">
|
||||
<div class="table-container table-responsive col-12">
|
||||
<div class="col-12">
|
||||
<th class="table-container table-responsive col-12">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
@@ -277,6 +286,11 @@
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="9" style="padding: 5px;">
|
||||
<p class="m-0">@Model.LeaveList.First().EmployeeFullName</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background: #80808033 !important;border-top-right-radius: 0px!important;-webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;">ردیف </th>
|
||||
<th style="background: #80808033 !important;-webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;"> سال </th>
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.PersonnelInfoPrintViewModel
|
||||
@{
|
||||
int i = 1;
|
||||
<style>
|
||||
}
|
||||
|
||||
<style>
|
||||
#MainModal {
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white;
|
||||
// padding: 0px 30px 0 30px;
|
||||
/* padding: 0px 30px 0 30px; */
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 1rem 0rem !important;
|
||||
}
|
||||
|
||||
// .modal-dialog {
|
||||
// width: 1200px !important;
|
||||
// }
|
||||
/* .modal-dialog {
|
||||
width: 1200px !important;
|
||||
} */
|
||||
|
||||
.printBtns {
|
||||
padding: 12px 2px 12px;
|
||||
@@ -94,9 +96,9 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8;
|
||||
/* border: 1px solid #94a3b8; */
|
||||
border-radius: 9px;
|
||||
// border-collapse: separate;
|
||||
/* border-collapse: separate; */
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -108,7 +110,7 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
/* border: 1px solid #c7c7c7 !important; */
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@@ -116,7 +118,7 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
/* border: 1px solid #c7c7c7 !important; */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -274,7 +276,7 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
/* border: 1px solid #94a3b8 !important; */
|
||||
border-radius: 9px !important;
|
||||
}
|
||||
|
||||
@@ -339,7 +341,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
|
||||
body * {
|
||||
visibility: hidden;
|
||||
page-break-after: auto;
|
||||
@@ -354,10 +361,10 @@
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
/* .modal-dialog {
|
||||
max-width: 100%;
|
||||
width: 60cm;
|
||||
}
|
||||
} */
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding: 0;
|
||||
@@ -369,23 +376,18 @@
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
/* width: 27.5cm; */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
#printThis {
|
||||
padding: 2rem 1rem;
|
||||
overflow-y: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border-collapse: separate !important;
|
||||
/* border-collapse: separate !important; */
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -398,7 +400,7 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
/* border: 1px solid #94a3b8; */
|
||||
background: #ddd;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
@@ -412,7 +414,7 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px !important;
|
||||
// border: 1px solid #94a3b8;
|
||||
/* border: 1px solid #94a3b8; */
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > td:first-child {
|
||||
@@ -428,13 +430,13 @@
|
||||
}
|
||||
|
||||
#printThis .table {
|
||||
// border: 1px solid transparent !important;
|
||||
/* border: 1px solid transparent !important; */
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #aaa !important;
|
||||
/* border: 1px solid #aaa !important; */
|
||||
}
|
||||
|
||||
#printThis .table th, #printThis .table td {
|
||||
@@ -442,13 +444,13 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
/* #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
// #printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
#printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
border-bottom: none !important;
|
||||
} */
|
||||
|
||||
|
||||
#printThis .colgp-1 {
|
||||
@@ -575,13 +577,13 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
/* border: 1px solid #94a3b8 !important; */
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
/* border: 1px solid #94a3b8 !important; */
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
@@ -589,13 +591,13 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
/* .table th:last-child, .table td:last-child {
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
.table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
border-bottom: none !important;
|
||||
} */
|
||||
|
||||
#divTablescrollbar {
|
||||
overflow-y: scroll;
|
||||
@@ -604,9 +606,7 @@
|
||||
scrollbar-width: thin;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="modal-content" style="padding: 0 0 15px 0;">
|
||||
<form asp-page="./Index" asp-page-handler="Details"
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.PersonnelInfoPrintViewModel
|
||||
@{
|
||||
int i = 1;
|
||||
<style>
|
||||
}
|
||||
|
||||
<style>
|
||||
#MainModal {
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white;
|
||||
// padding: 0px 30px 0 30px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 1rem 0rem !important;
|
||||
}
|
||||
|
||||
// .modal-dialog {
|
||||
// width: 1200px !important;
|
||||
// }
|
||||
|
||||
.printBtns {
|
||||
padding: 12px 2px 12px;
|
||||
border-top: unset;
|
||||
@@ -94,9 +91,7 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8;
|
||||
border-radius: 9px;
|
||||
// border-collapse: separate;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -108,7 +103,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@@ -116,7 +110,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -274,7 +267,6 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-radius: 9px !important;
|
||||
}
|
||||
|
||||
@@ -339,6 +331,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
body * {
|
||||
visibility: hidden;
|
||||
@@ -369,9 +365,9 @@
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
/* width: 27.5cm; */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 0;
|
||||
@@ -385,7 +381,6 @@
|
||||
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border-collapse: separate !important;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -398,7 +393,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
background: #ddd;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
@@ -412,7 +406,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px !important;
|
||||
// border: 1px solid #94a3b8;
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > td:first-child {
|
||||
@@ -428,13 +421,11 @@
|
||||
}
|
||||
|
||||
#printThis .table {
|
||||
// border: 1px solid transparent !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #aaa !important;
|
||||
}
|
||||
|
||||
#printThis .table th, #printThis .table td {
|
||||
@@ -442,13 +433,7 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
|
||||
// #printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
|
||||
|
||||
#printThis .colgp-1 {
|
||||
@@ -516,6 +501,15 @@
|
||||
display: table-header-group !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
.titleH1 {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 10px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.titleSection {
|
||||
@@ -567,6 +561,10 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
.lineS {
|
||||
margin: 4px 0 !important;
|
||||
}
|
||||
@@ -576,13 +574,11 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
@@ -590,16 +586,7 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
</style>
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="modal-body p-0 d-flex justify-content-center">
|
||||
<div class="modal-content" style="padding: 0 0 15px 0;">
|
||||
<form asp-page="./Index" asp-page-handler="Details"
|
||||
@@ -637,7 +624,7 @@
|
||||
<tr>
|
||||
<th colspan="13" class="col-md-12" style="border-radius: 10px 10px 0 0;">
|
||||
<div class="row titleSection">
|
||||
<div class="col-2 text-start">
|
||||
<div class="col-3 text-start">
|
||||
<svg 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" width="55px">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
@@ -652,7 +639,7 @@
|
||||
<polyline class="cls-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="col-8 text-center">
|
||||
<div class="col-6 text-center">
|
||||
<div style="display: inline-block;">
|
||||
<div style="position: relative;text-align: center;bottom: 10px;">
|
||||
<span class="titleH1">موسسه نور دادمهر گستر کاسپین</span>
|
||||
@@ -660,9 +647,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 text-end">
|
||||
<p style="letter-spacing: 1.4px;font-size: 13px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="m-0" style="font-size: 13px;">سامانه هوشمند گزارشگیر</p>
|
||||
<div class="col-3 text-end">
|
||||
<p class="titleLogo" style="letter-spacing: 1.4px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="titleLogo m-0">سامانه هوشمند گزارشگیر</p>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
@@ -707,8 +694,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.MaritalStatus
|
||||
;
|
||||
@item.MaritalStatus;
|
||||
}
|
||||
</td>
|
||||
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.LeavePrintViewModel
|
||||
|
||||
|
||||
<style>
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
max-width: 100%;
|
||||
width: 22.4cm;
|
||||
}
|
||||
|
||||
@@page {
|
||||
size: A4;
|
||||
margin: 0mm;
|
||||
@@ -28,19 +34,18 @@
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
#printSection, #printSection * {
|
||||
height: auto;
|
||||
visibility: visible;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
#printThis {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
@@ -60,10 +65,10 @@
|
||||
}
|
||||
|
||||
#printSection {
|
||||
/* position: absolute; */
|
||||
/* left: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
page-break-after: auto;
|
||||
top: 0; */
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.head {
|
||||
@@ -201,6 +206,27 @@
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.print-card {
|
||||
position: fixed;
|
||||
top: 130px;
|
||||
width: auto;
|
||||
z-index: 20;
|
||||
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
}
|
||||
|
||||
@@media screen and (max-width: 992px) {
|
||||
.wrapper {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.print-card {
|
||||
position: relative;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 20;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
@@ -354,7 +380,7 @@
|
||||
</form>
|
||||
|
||||
<!--<script src="~/AdminTheme/assets/js/workingHoursPrintable.js"></script>-->
|
||||
<script src="~/AdminTheme/assets/printjs/print.min.js"></script>
|
||||
@* <script src="~/AdminTheme/assets/printjs/print.min.js"></script> *@
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -5,11 +5,21 @@
|
||||
<link href="~/assetsclient/css/insuranceprint.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
@{
|
||||
<style>
|
||||
@@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
@@media screen {
|
||||
#printSection {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@media print {
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,26 @@
|
||||
|
||||
<link href="~/assetsclient/css/insuranceprint.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
@{
|
||||
<style>
|
||||
@@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
@@media screen {
|
||||
#printSection {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@media print {
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="modal-header" style="border-bottom: unset;margin-bottom: 15px;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
|
||||
<style>
|
||||
@@ -573,10 +574,24 @@
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2">
|
||||
@if (@Model.HasCheckoutReport)
|
||||
{
|
||||
<div class="card">
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="search-box bg-white p-1 d-flex d-md-none">
|
||||
<div class="col text-center">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
@if (@Model.HasCheckoutReport)
|
||||
{
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="d-flex align-items-center justify-content-between my-1 px-1">
|
||||
@@ -1018,17 +1033,17 @@
|
||||
|
||||
<!-- End List of Table -->
|
||||
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="empty text-center bg-white d-flex align-items-center justify-content-center">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="~/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1049,6 +1064,150 @@
|
||||
</div>
|
||||
<!--End Of Print Modal Main -->
|
||||
|
||||
<!-- Modal From Bottom For Advance Search -->
|
||||
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
|
||||
<form role="form" method="get" name="search-theme-form2" id="search-theme-form2" autocomplete="off">
|
||||
<div class="modal-header d-block text-center pb-0">
|
||||
<div class="iphone-line mx-auto mb-3"></div>
|
||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body pt-0 mb-3">
|
||||
<div class="container-fluid search-box">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div class="mb-2">
|
||||
<select id="getPersonneModal" class="form-select" asp-for="SearchModel.EmployeeId">
|
||||
<option value="0"> انتخاب پرسنل </option>
|
||||
@foreach (var person in @Model.Employees)
|
||||
{
|
||||
<option style="font-family: 'IranSans' !important;" value="@person.Id"> @person.EmployeeFullName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-start">
|
||||
<p class="mb-3">جستجو بر اساس سال و ماه</p>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<span class="form-control text-center persianDateInputYear" id="yearText">
|
||||
@{
|
||||
if (string.IsNullOrWhiteSpace(Model.SearchModel.Year))
|
||||
{
|
||||
<span>سال</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.SearchModel.Year
|
||||
}
|
||||
}
|
||||
</span>
|
||||
<input type="hidden" id="sendDropdownYearMobile" asp-for="SearchModel.Year" />
|
||||
@* <span asp-validation-for="DateOfYear" class="error"></span> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<span class="form-control text-center persianDateInputMonth" id="monthText">
|
||||
@{
|
||||
if (string.IsNullOrWhiteSpace(Model.SearchModel.Month))
|
||||
{
|
||||
<span>ماه</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@switch (@Model.SearchModel.Month)
|
||||
{
|
||||
case "01":
|
||||
<span>فروردین</span>
|
||||
break;
|
||||
case "02":
|
||||
<span>اردیبهشت</span>
|
||||
break;
|
||||
case "03":
|
||||
<span>خرداد</span>
|
||||
break;
|
||||
case "04":
|
||||
<span>تیر</span>
|
||||
break;
|
||||
case "05":
|
||||
<span>مرداد</span>
|
||||
break;
|
||||
case "06":
|
||||
<span>شهریور</span>
|
||||
break;
|
||||
case "07":
|
||||
<span>مهر</span>
|
||||
break;
|
||||
case "08":
|
||||
<span>آبان</span>
|
||||
break;
|
||||
case "09":
|
||||
<span>آذر</span>
|
||||
break;
|
||||
case "10":
|
||||
<span>دی</span>
|
||||
break;
|
||||
case "11":
|
||||
<span>بهمن</span>
|
||||
break;
|
||||
case "12":
|
||||
<span>اسفند</span>
|
||||
break;
|
||||
default:
|
||||
<span>ماه</span>
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</span>
|
||||
<input type="hidden" id="sendDropdownMonthMobile" asp-for="SearchModel.Month" />
|
||||
@* <span asp-validation-for="DateOfMonth" class="error"></span> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<a href="/Client/Company/Reports/CheckoutReport" class="btn-clear-filter py-2 text-center d-block w-100 mt-2 disable" id="filterRemove">
|
||||
<span class="w-100">حذف جستجو</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="submit" class="btn-search btn-search-click w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
|
||||
<input type="hidden" asp-for="@Model.PageIndex" id="pageIndex" />
|
||||
|
||||
@@ -1099,7 +1258,17 @@
|
||||
dir: "rtl"
|
||||
});
|
||||
|
||||
$('#getPersonnel, #dropdown-month, #dropdown-year').change(function () {
|
||||
|
||||
$("#getPersonneModal").select2({
|
||||
language: "fa",
|
||||
dir: "rtl",
|
||||
dropdownParent: $('#searchModal')
|
||||
});
|
||||
|
||||
// $('#getPersonnel, #dropdown-month, #dropdown-year').change(function () {
|
||||
// checkFilters();
|
||||
// });
|
||||
|
||||
checkFilters();
|
||||
});
|
||||
|
||||
@@ -1115,9 +1284,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
checkFilters();
|
||||
});
|
||||
|
||||
$('#searchBtn').click(function (event) {
|
||||
var yearSelected = $('#sendDropdownYear').val().trim();
|
||||
var monthSelected = $('#sendDropdownMonth').val().trim();
|
||||
@@ -1481,5 +1647,362 @@
|
||||
var url = '#showmodal=@Url.Page("/Company/Checkouts/Index", "PrintOneMobile")';
|
||||
window.location.href = url + parametr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//******************** نمایش سال و ماه در موبایل ********************
|
||||
if ($(window).width() < 768) {
|
||||
|
||||
var middleYearIndex = 2;
|
||||
var selectedMonth = 2;
|
||||
|
||||
//************* Year *************
|
||||
$('.persianDateInputYear').on('click',
|
||||
function () {
|
||||
$('#overlaySearchAdvance').addClass("overlaySearchAdvance");
|
||||
|
||||
var datepicker = $(this);
|
||||
if ($(this).parent().find('.datepicker-container-year').length) {
|
||||
return false;
|
||||
} else {
|
||||
$(this).parent().append(`
|
||||
<div class="datepicker-container-year">
|
||||
<div class="datepicker-container-date-div">
|
||||
<div class="date-container">
|
||||
<div id="years" class="scrollable-container"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around">
|
||||
<button type="button" class="btn-secondary" id="cancelYear" style="width:100px; font-size: 11px;">انصراف</button>
|
||||
<button type="button" class="btn-primary" id="confirmYear" style="width:100px; font-size: 11px;">تائید</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
|
||||
var datepickerContainer = $(this).parent().find('.datepicker-container-year');
|
||||
var years = datepickerContainer.find('#years');
|
||||
// datepickerContainer.width(datepicker.outerWidth());
|
||||
|
||||
var middleYearIndexArray = [];
|
||||
let yearlyList = [];
|
||||
yearlyList.push({ year: 1368 });
|
||||
yearlyList.push({ year: 1369 });
|
||||
@foreach (var items in Model.YearlyList.OrderBy(x => x))
|
||||
{
|
||||
@:yearlyList.push({ year: Number(@items) });
|
||||
}
|
||||
var yearIndex = yearlyList.length;
|
||||
yearIndex = yearIndex - 1;
|
||||
var no3 = yearlyList[yearIndex].year + 1;
|
||||
var no4 = yearlyList[yearIndex].year + 2;
|
||||
yearlyList.push({ year: no3 });
|
||||
yearlyList.push({ year: no4 });
|
||||
var i = 0;
|
||||
|
||||
for (var j = yearlyList[yearIndex + 2].year; j >= 1368; j--) {
|
||||
let y = { index: i, value: j };
|
||||
middleYearIndexArray.push(j);
|
||||
i++;
|
||||
|
||||
var formattedNumber = String(j).padStart(2, '0');
|
||||
if (j == no3 || j == no4) {
|
||||
years.append($('<span>').text('-').css('visibility', 'hidden'));
|
||||
} else if (j == 1368 || j == 1369) {
|
||||
years.append($('<span>').text(formattedNumber).css('visibility', 'hidden'));
|
||||
} else {
|
||||
years.append($('<span>').text(formattedNumber));
|
||||
}
|
||||
|
||||
// var middleYearIndex = Math.floor(years.children('span').length / 2) - 2;
|
||||
years.children('span').eq(middleYearIndex).addClass('chosen-date');
|
||||
var containerHeightYear = years.height();
|
||||
var optionHeightYear = years.children('span').outerHeight();
|
||||
var scrollOffsetYear = optionHeightYear * middleYearIndex;
|
||||
years.scrollTop(scrollOffsetYear - containerHeightYear / 2);
|
||||
}
|
||||
|
||||
// datepickerContainer.addClass("date-container");
|
||||
|
||||
var selectedYear = yearlyList[yearIndex].year;
|
||||
var yearsScrollTop;
|
||||
var scrollTimeout;
|
||||
|
||||
// Scroll event listener
|
||||
datepickerContainer.find('.scrollable-container').on('scroll',
|
||||
function () {
|
||||
var optionHeightYear = years.children('span').outerHeight();
|
||||
// var scrollTopYear = years.scrollTop() + (optionHeightYear * 2);
|
||||
var scrollTopYear = Math.round((years.scrollTop() + (optionHeightYear * 2)) / 10) * 10;
|
||||
var selectedIndexYear = Math.round(scrollTopYear / optionHeightYear);
|
||||
years.children('span').removeClass('chosen-date');
|
||||
years.children('span').eq(selectedIndexYear).addClass('chosen-date');
|
||||
yearsScrollTop = years.scrollTop();
|
||||
var selectedValueYear = years.children('span').eq(selectedIndexYear).text();
|
||||
|
||||
clearTimeout(scrollTimeout);
|
||||
scrollTimeout = setTimeout(function () {
|
||||
var scrollTopYearRounded = customRound(yearsScrollTop);
|
||||
|
||||
if (yearsScrollTop !== scrollTopYearRounded) {
|
||||
years.scrollTop(scrollTopYearRounded);
|
||||
}
|
||||
},
|
||||
250);
|
||||
|
||||
var containerId = $(this).attr('id');
|
||||
|
||||
if (containerId === 'years') {
|
||||
selectedYear = selectedValueYear;
|
||||
|
||||
index = middleYearIndexArray.indexOf(Number(selectedValueYear));
|
||||
middleYearIndex = index;
|
||||
}
|
||||
|
||||
if (selectedYear) {
|
||||
var formattedDate = selectedYear;
|
||||
datepicker.val(formattedDate);
|
||||
$('#sendDropdownYearMobile').val(formattedDate);
|
||||
$('#yearText').text(selectedYear);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click',
|
||||
'#confirmYear',
|
||||
function (event) {
|
||||
$('#sendDropdownYearMobile').val(selectedYear);
|
||||
$('#yearText').text(selectedYear);
|
||||
datepickerContainer.remove();
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
});
|
||||
|
||||
$(document).on('click',
|
||||
'#cancelYear',
|
||||
function (event) {
|
||||
$('#sendDropdownYearMobile').val('');
|
||||
$('#yearText').text('سال');
|
||||
middleYearIndex = 2;
|
||||
datepickerContainer.remove();
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
});
|
||||
|
||||
$(document).on('click',
|
||||
'.chosen-date',
|
||||
function () {
|
||||
// if (selectedYear == 0) {
|
||||
// $('#yearModal').val($(this).text());
|
||||
// console.log(selectedYear)
|
||||
// $('#yearText').text($(this).text());
|
||||
// } else {
|
||||
$('#sendDropdownYearMobile').val(selectedYear);
|
||||
$('#yearText').text(selectedYear);
|
||||
// }
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
datepickerContainer.remove();
|
||||
});
|
||||
});
|
||||
//************* End Year *************
|
||||
|
||||
|
||||
//************* Month *************
|
||||
$('.persianDateInputMonth').on('click',
|
||||
function () {
|
||||
$('#overlaySearchAdvance').addClass("overlaySearchAdvance");
|
||||
|
||||
var datepicker = $(this);
|
||||
if ($(this).parent().find('.datepicker-container-month').length) {
|
||||
return false;
|
||||
} else {
|
||||
$(this).parent().append(`
|
||||
<div class="datepicker-container-month">
|
||||
<div class="datepicker-container-date-div">
|
||||
<div class="date-container">
|
||||
<div id="months" class="scrollable-container"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around">
|
||||
<button type="button" class="btn-secondary" id="cancelMonth" style="width:100px; font-size: 11px;">انصراف</button>
|
||||
<button type="button" class="btn-primary" id="confirmMonth" style="width:100px; font-size: 11px;">تائید</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
if ($(this).val() != '') {
|
||||
let number = selectedMonth + 1;
|
||||
var middleMonthIndex = number;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var datepickerContainer = $(this).parent().find('.datepicker-container-month');
|
||||
var months = datepickerContainer.find('#months');
|
||||
|
||||
// Populate months
|
||||
var monthNames = ['-', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند', '-'];
|
||||
for (var j = 0; j < 14; j++) {
|
||||
var monthIndex = j;
|
||||
// var monthIndex = (j * 12) % 12;
|
||||
// var monthIndex = (j + i * 12) % 12;
|
||||
var monthName = monthNames[j];
|
||||
|
||||
if (j == 0) {
|
||||
months.append($('<span>').text('-').css('visibility', 'hidden'));
|
||||
months.append($('<span>').text('-').css('visibility', 'hidden'));
|
||||
} else if (j == 13) {
|
||||
months.append($('<span>').text('-').css('visibility', 'hidden'));
|
||||
months.append($('<span>').text('-').css('visibility', 'hidden'));
|
||||
|
||||
} else {
|
||||
months.append($('<span>').text(monthName));
|
||||
}
|
||||
|
||||
// var middleMonthIndex = selectedMonth;
|
||||
// var middleMonthIndex = Math.floor(months.children('span').length / 2) - 17;
|
||||
months.children('span').eq(selectedMonth).addClass('chosen-date');
|
||||
|
||||
var containerHeightMonth = months.height();
|
||||
var optionHeightMonth = months.children('span').outerHeight();
|
||||
var scrollOffsetMonth = optionHeightMonth * middleMonthIndex;
|
||||
months.scrollTop(scrollOffsetMonth - containerHeightMonth / 2);
|
||||
|
||||
}
|
||||
|
||||
var selectedMonthValue = "01";
|
||||
var selectedNumber = 2;
|
||||
var selectedMonthText = "فروردین";
|
||||
var monthScrollTop;
|
||||
var scrollTimeout;
|
||||
|
||||
// Scroll event listener
|
||||
datepickerContainer.find('.scrollable-container').on('scroll',
|
||||
function () {
|
||||
|
||||
var optionHeightMonth = months.children('span').outerHeight();
|
||||
var scrollTopMonth = Math.round((months.scrollTop() + (optionHeightMonth * 2)) / 10) * 10;
|
||||
var selectedIndexMonth = Math.round(scrollTopMonth / optionHeightMonth);
|
||||
months.children('span').removeClass('chosen-date');
|
||||
months.children('span').eq(selectedIndexMonth).addClass('chosen-date');
|
||||
monthScrollTop = months.scrollTop();
|
||||
var selectedValueMonth = months.children('span').eq(selectedIndexMonth).text();
|
||||
|
||||
clearTimeout(scrollTimeout);
|
||||
scrollTimeout = setTimeout(function () {
|
||||
var scrollTopMonthRounded = customRound(monthScrollTop);
|
||||
|
||||
if (monthScrollTop !== scrollTopMonthRounded) {
|
||||
months.scrollTop(scrollTopMonthRounded);
|
||||
}
|
||||
},
|
||||
250);
|
||||
|
||||
var containerId = $(this).attr('id');
|
||||
|
||||
if (containerId === 'months') {
|
||||
if (selectedValueMonth === 'فروردین') {
|
||||
selectedMonthValue = '01';
|
||||
selectedNumber = 1;
|
||||
selectedMonthText = "فروردین";
|
||||
} else if (selectedValueMonth === 'اردیبهشت') {
|
||||
selectedMonthValue = '02';
|
||||
selectedNumber = 2;
|
||||
selectedMonthText = "اردیبهشت";
|
||||
} else if (selectedValueMonth === 'خرداد') {
|
||||
selectedMonthValue = '03';
|
||||
selectedNumber = 3;
|
||||
selectedMonthText = "خرداد";
|
||||
} else if (selectedValueMonth === 'تیر') {
|
||||
selectedMonthValue = '04';
|
||||
selectedNumber = 4;
|
||||
selectedMonthText = "تیر";
|
||||
} else if (selectedValueMonth === 'مرداد') {
|
||||
selectedMonthValue = '05';
|
||||
selectedNumber = 5;
|
||||
selectedMonthText = "مرداد";
|
||||
} else if (selectedValueMonth === 'شهریور') {
|
||||
selectedMonthValue = '06';
|
||||
selectedNumber = 6;
|
||||
selectedMonthText = "شهریور";
|
||||
} else if (selectedValueMonth === 'مهر') {
|
||||
selectedMonthValue = '07';
|
||||
selectedNumber = 7;
|
||||
selectedMonthText = "مهر";
|
||||
} else if (selectedValueMonth === 'آبان') {
|
||||
selectedMonthValue = '08';
|
||||
selectedNumber = 8;
|
||||
selectedMonthText = "آبان";
|
||||
} else if (selectedValueMonth === 'آذر') {
|
||||
selectedMonthValue = '09';
|
||||
selectedNumber = 9;
|
||||
selectedMonthText = "آذر";
|
||||
} else if (selectedValueMonth === 'دی') {
|
||||
selectedMonthValue = '10';
|
||||
selectedNumber = 10;
|
||||
selectedMonthText = "دی";
|
||||
} else if (selectedValueMonth === 'بهمن') {
|
||||
selectedMonthValue = '11';
|
||||
selectedNumber = 11;
|
||||
selectedMonthText = "بهمن";
|
||||
} else if (selectedValueMonth === 'اسفند') {
|
||||
selectedMonthValue = '12';
|
||||
selectedNumber = 12;
|
||||
selectedMonthText = "اسفند";
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedMonthValue) {
|
||||
var formattedDate = selectedMonthValue;
|
||||
datepicker.val(formattedDate);
|
||||
$('#month').val(formattedDate);
|
||||
$('#monthText').text(selectedMonthText);
|
||||
selectedMonth = selectedNumber;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click',
|
||||
'#confirmMonth',
|
||||
function (event) {
|
||||
$('#sendDropdownMonthMobile').val(selectedMonthValue);
|
||||
$('#monthText').text(selectedMonthText);
|
||||
selectedMonth = selectedNumber;
|
||||
datepickerContainer.remove();
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
});
|
||||
|
||||
$(document).on('click',
|
||||
'#cancelMonth',
|
||||
function (event) {
|
||||
$('#sendDropdownMonthMobile').val('');
|
||||
$('#monthText').text('ماه');
|
||||
selectedMonth = 2;
|
||||
datepickerContainer.remove();
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
});
|
||||
|
||||
$(document).on('click',
|
||||
'.chosen-date',
|
||||
function () {
|
||||
$('#sendDropdownMonthMobile').val(selectedMonthValue);
|
||||
$('#monthText').text(selectedMonthText);
|
||||
selectedMonth = selectedNumber;
|
||||
$('#overlaySearchAdvance').removeClass("overlaySearchAdvance");
|
||||
datepickerContainer.remove();
|
||||
});
|
||||
});
|
||||
//************* End Month *************
|
||||
|
||||
//Pixel of height for Span in date
|
||||
//For example: datepicker-container-date .years span
|
||||
function customRound(number) {
|
||||
var roundedNumber = Math.round(number);
|
||||
var remainder = roundedNumber % 60; //60px
|
||||
if (remainder <= 10) {
|
||||
return roundedNumber - remainder;
|
||||
} else {
|
||||
return roundedNumber + (60 - remainder);
|
||||
}
|
||||
}
|
||||
}
|
||||
//******************** نمایش سال و ماه در موبایل ********************
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
@@media print {
|
||||
@@page {
|
||||
size: landscape;
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
th, td {
|
||||
@@ -989,13 +989,25 @@
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
$('.loading').hide();
|
||||
})
|
||||
});
|
||||
|
||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
||||
$(document).ready(function() {
|
||||
window.onbeforeprint = (event) => {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
document.getElementById("MainModal").style.visibility = "hidden";
|
||||
setTimeout(function () {
|
||||
printElement(document.getElementById("printThis"));
|
||||
},500);
|
||||
});
|
||||
} else {
|
||||
document.getElementById("btnPrint").onclick = function () {
|
||||
printElement(document.getElementById("printThis"));
|
||||
}
|
||||
}
|
||||
|
||||
function printElement(elem) {
|
||||
var domClone = elem.cloneNode(true);
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Client.Pages.Company.RollCall.EmployeeUploadPictureModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
Layout = "Shared/_ClientLayout";
|
||||
ViewData["title"] = " - آپلود عکس پرسنل";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/rollcall-list.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/rollcall-list.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<div id="loadingSkeleton" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 2px 0; !important"></div>
|
||||
<div class="skeleton-loader" style="margin: 2px 0 !important;"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<input type="hidden" asp-for="@Model.HasEmployees" value="@Model.HasEmployees" id="hasEmployee" />
|
||||
@section Script {
|
||||
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var loadEmployeeUploadDataAjax = `@Url.Page("EmployeeUploadPicture", "EmployeeUploadDataAjax")`;
|
||||
@@ -185,5 +185,5 @@
|
||||
var deActivePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "DeActivePersonnel")`;
|
||||
var activePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "ActivePersonnel")`;
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/employeeuploadpicture.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/employeeuploadpicture.js?ver=@clientVersion"></script>
|
||||
}
|
||||
@@ -63,6 +63,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
});
|
||||
|
||||
HasEmployees = distinctEmployees.Count > 0 ? true : false;
|
||||
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.TakePictureModel
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
int index = 1;
|
||||
<link href="~/assetsclient/pages/rollcall/css/modaltakeimages.css" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/rollcall/css/modaltakeimages.css?ver=@clientVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
@@ -92,7 +93,11 @@
|
||||
<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">
|
||||
<p class="textUpload @(Model.HasPicture ? "textUploaded" : "")">
|
||||
@(Model.HasPicture ? "عکس اول" : "بارگذاری عکس اول")
|
||||
</p>
|
||||
</button>
|
||||
@* <div class="loadingImage" id="loadingImage1">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
@@ -104,7 +109,11 @@
|
||||
}
|
||||
</div>
|
||||
<div id="demoResult2" class="image-show">
|
||||
<button type="button" class="upload-image2">بارگذاری عکس دوم</button>
|
||||
<button type="button" class="upload-image2">
|
||||
<p class="textUpload @(Model.HasPicture ? "textUploaded" : "")">
|
||||
@(Model.HasPicture ? "عکس دوم" : "بارگذاری عکس دوم")
|
||||
</p>
|
||||
</button>
|
||||
@* <div class="loadingImage" id="loadingImage2">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
@@ -112,7 +121,7 @@
|
||||
</div> *@
|
||||
@if (Model.HasPicture)
|
||||
{
|
||||
<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" />
|
||||
<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>
|
||||
|
||||
@@ -215,10 +224,11 @@
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var takePictureAjax = `@Url.Page("./EmployeeUploadPicture", "TakePicture")`;
|
||||
var hasPicture = `@(Model.HasPicture)` === "True" ? true : false;
|
||||
var checkFace1 = `@(Model.HasPicture)` === "True" ? true : false;
|
||||
var checkFace2 = `@(Model.HasPicture)` === "True" ? true : false;
|
||||
var hasErrorPic1 = false;
|
||||
var hasErrorPic2 = false;
|
||||
</script>
|
||||
<script src="~/weights/face-api.js"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/modaltakeimages.js"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/modaltakeimages.js?ver=@clientVersion"></script>
|
||||
@@ -38,15 +38,26 @@ namespace ServiceHost.Areas.Client.Pages.Company.Ticket
|
||||
_workshopApplication = workshopApplication;
|
||||
}
|
||||
|
||||
public void OnGet(TicketSearchModel searchModel)
|
||||
public IActionResult OnGet(TicketSearchModel searchModel)
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
|
||||
if (workshopId > 0)
|
||||
{
|
||||
HasListTickets = _ticketApplication.GetTicketsForClients(searchModel).Count > 0;
|
||||
//searchModel.PageIndex = 0;
|
||||
//TicketList = _ticketApplication.GetTicketsForClients(searchModel);
|
||||
//PageIndex = TicketList.Count;
|
||||
var workshopId = _passwordHasher.SlugDecrypt(User.FindFirstValue("WorkshopSlug"));
|
||||
|
||||
WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName;
|
||||
TypesCountOfTicketViewModel = _ticketApplication.GetTypesCountOfTicketForClient(workshopId);
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetTicketDataAjax(int pageIndex, string status, string ticketNumber, string generalSearch)
|
||||
|
||||
@@ -4,9 +4,11 @@ using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Pages.Company.Workshop
|
||||
{
|
||||
[Authorize]
|
||||
public class EmployeesModel : PageModel
|
||||
{
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
@@ -27,8 +29,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Workshop
|
||||
}
|
||||
|
||||
public void OnGet(EmployeeSearchModel searchModel)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlugCliam = User.FindFirstValue("WorkshopSlug");
|
||||
var id = _passwordHasher.SlugDecrypt(workshopSlugCliam);
|
||||
@@ -65,11 +65,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.Workshop
|
||||
NotFound();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetPrintOnePersonnelInfo(long employeeId)
|
||||
{
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
@model CompanyManagment.App.Contracts.Employee.EditEmployee
|
||||
@{
|
||||
int i = 1;
|
||||
<style>
|
||||
}
|
||||
|
||||
<style>
|
||||
#MainModal {
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
width:470px;
|
||||
width: 470px;
|
||||
background-color: white;
|
||||
margin:0 auto;
|
||||
margin: 0 auto;
|
||||
// padding: 0px 30px 0 30px;
|
||||
}
|
||||
|
||||
@@ -92,9 +94,7 @@
|
||||
}
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border: 1px solid #94a3b8;
|
||||
border-radius: 9px;
|
||||
// border-collapse: separate;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -106,7 +106,6 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@@ -114,7 +113,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
// border: 1px solid #c7c7c7 !important;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -363,9 +361,9 @@
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 27.5cm;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
padding: 2rem 0;
|
||||
@@ -378,7 +376,6 @@
|
||||
|
||||
|
||||
#printThis .table-bordered {
|
||||
// border-collapse: separate !important;
|
||||
margin-bottom: 0;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@@ -391,12 +388,20 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
// border: 1px solid #94a3b8;
|
||||
background: #ddd;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
}
|
||||
|
||||
.titleH1 {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
|
||||
.titleLogo {
|
||||
font-size: 11px !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#printThis tr:nth-child(2n) td {
|
||||
background: #f0f0f0 !important;
|
||||
}
|
||||
@@ -405,7 +410,6 @@
|
||||
padding: 8px 2px;
|
||||
text-align: center;
|
||||
font-size: 10px !important;
|
||||
// border: 1px solid #94a3b8;
|
||||
}
|
||||
|
||||
#printThis .table-bordered > thead > td:first-child {
|
||||
@@ -421,13 +425,11 @@
|
||||
}
|
||||
|
||||
#printThis .table {
|
||||
// border: 1px solid transparent !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #aaa !important;
|
||||
}
|
||||
|
||||
#printThis .table th, #printThis .table td {
|
||||
@@ -435,13 +437,6 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// #printThis .table th:last-child, #printThis .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
|
||||
// #printThis .table tbody tr:last-child th, #printThis .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
|
||||
|
||||
#printThis .colgp-1 {
|
||||
@@ -497,7 +492,6 @@
|
||||
}
|
||||
|
||||
#printThis .titleSection {
|
||||
//border: 1px solid #94a3b8 !important;
|
||||
border-bottom: 0 !important;
|
||||
border-radius: 10px 10px 0 0 !important;
|
||||
background: #fff !important;
|
||||
@@ -548,7 +542,6 @@
|
||||
.titleSection {
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
//border: 1px solid #94a3b8;
|
||||
border-bottom: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
@@ -560,6 +553,10 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.titleLogo {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.lineS {
|
||||
margin: 4px 0 !important;
|
||||
}
|
||||
@@ -569,13 +566,11 @@
|
||||
}
|
||||
|
||||
.table {
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
border-collapse: separate !important;
|
||||
overflow: hidden !important;
|
||||
border-spacing: 0 !important;
|
||||
border-radius: 10px !important;
|
||||
text-align: center !important;
|
||||
// border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
@@ -583,13 +578,6 @@
|
||||
border: 1px solid #94a3b8 !important;
|
||||
}
|
||||
|
||||
// .table th:last-child, .table td:last-child {
|
||||
// border-right: none !important;
|
||||
// }
|
||||
|
||||
// .table tbody tr:last-child th, .table tbody tr:last-child td {
|
||||
// border-bottom: none !important;
|
||||
// }
|
||||
|
||||
.prof_table {
|
||||
border: 2px solid black;
|
||||
@@ -606,9 +594,7 @@
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -681,7 +667,7 @@
|
||||
<tr>
|
||||
<th colspan="2" class="col-md-12" style="border-radius: 10px 10px 0 0;">
|
||||
<div class="row titleSection">
|
||||
<div class="col-2 text-start">
|
||||
<div class="col-3 text-start">
|
||||
<svg 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" width="55px">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
@@ -696,7 +682,7 @@
|
||||
<polyline class="cls-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="col-8 text-center">
|
||||
<div class="col-6 text-center">
|
||||
<div style="display: inline-block;">
|
||||
<div style="position: relative;text-align: center;bottom: 10px;">
|
||||
<span class="titleH1">موسسه نور دادمهر گستر کاسپین</span>
|
||||
@@ -704,9 +690,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 text-end">
|
||||
<p style="letter-spacing: 1.4px;font-size: 13px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="m-0" style="font-size: 13px;">سامانه هوشمند گزارشگیر</p>
|
||||
<div class="col-3 text-end">
|
||||
<p class="titleLogo" style="letter-spacing: 1.4px;margin: 0 0 2px 0;">www.gozareshgir.ir</p>
|
||||
<p class="titleLogo m-0">سامانه هوشمند گزارشگیر</p>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
@@ -2,34 +2,12 @@
|
||||
@using CompanyManagment.App.Contracts.Workshop
|
||||
@using System.Security.Claims
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@inject CompanyManagment.App.Contracts.Workshop.IWorkshopApplication _workshopApplication;
|
||||
@{
|
||||
var currentAccount = AuthHelper.CurrentAccountInfo();
|
||||
var searchModel = new WorkshopSearchModel();
|
||||
var workshopList = _workshopApplication.SearchForClient(searchModel).OrderByDescending(x => x.PersonnelCount).ToList();
|
||||
var workshopSelected = "";
|
||||
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
var workshopSlug = User.FindFirstValue("WorkshopSlug");
|
||||
|
||||
if (workshopSlug != null)
|
||||
{
|
||||
var selectedWorkshop = workshopList.FirstOrDefault(x => x.Slug == workshopSlug);
|
||||
if (selectedWorkshop != null)
|
||||
{
|
||||
workshopSelected = selectedWorkshop.WorkshopFullName;
|
||||
}
|
||||
}
|
||||
else if (workshopList.Any())
|
||||
{
|
||||
var firstWorkshop = workshopList.First();
|
||||
AuthHelper.UpdateWorkshopSlugClaim(firstWorkshop.Slug);
|
||||
workshopSelected = firstWorkshop.WorkshopFullName;
|
||||
}
|
||||
}
|
||||
var workshopSelected = currentAccount.WorkshopList?.FirstOrDefault(x => x.Slug == User.FindFirstValue("WorkshopSlug"))?.Name;
|
||||
}
|
||||
|
||||
|
||||
<div class="dropdown d-flex d-lg-none" style="padding: 0 !important;position: sticky;width: 100%;top: 0;z-index: 99;">
|
||||
<div class="workshop-box" style="width: 100%;">
|
||||
<button class="profile-box d-flex align-items-center justify-content-between" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="width: 100%;padding: 8px;border-radius: 0px;">
|
||||
@@ -49,12 +27,14 @@
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu" id="workshopLoad" style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate(0px, 49px);border-radius: 0 0 25px 25px !important;">
|
||||
@foreach (var workshopItem in workshopList)
|
||||
@if (currentAccount.WorkshopList?.Count > 0)
|
||||
{
|
||||
<li onclick="SelectWorkshop('@workshopItem.Slug')" class='@(workshopSelected == workshopItem.WorkshopFullName ? "workshopActive" : "")'>
|
||||
@foreach (var workshopItem in currentAccount.WorkshopList)
|
||||
{
|
||||
<li onclick="SelectWorkshop('@workshopItem.Slug')" class='@(workshopSelected == workshopItem.Name ? "workshopActive" : "")'>
|
||||
<a class="dropdown-item w-100 selectLi" style="padding: 4px;">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span>@workshopItem.WorkshopFullName</span>
|
||||
<span>@workshopItem.Name</span>
|
||||
<div class="d-flex align-items-center justify-content-start me-1">
|
||||
<span class="me-1">@workshopItem.PersonnelCount</span>
|
||||
<i class="md md-group" style="font-size: 20px; color: #25acac; margin: 0 0 0 5px;"></i>
|
||||
@@ -63,7 +43,20 @@
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<li>
|
||||
<a class="dropdown-item w-100 selectLi" style="padding: 4px;">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span>بدون کارگاه</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -124,12 +117,14 @@
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu" id="workshopLoad">
|
||||
@foreach (var workshopItem in workshopList)
|
||||
@if (currentAccount.WorkshopList?.Count > 0)
|
||||
{
|
||||
<li onclick="SelectWorkshop('@workshopItem.Slug')" class='@(workshopSelected == workshopItem.WorkshopFullName ? "workshopActive" : "")'>
|
||||
@foreach (var workshopItem in currentAccount.WorkshopList)
|
||||
{
|
||||
<li onclick="SelectWorkshop('@workshopItem.Slug')" class='@(workshopSelected == workshopItem.Name ? "workshopActive" : "")'>
|
||||
<a class="dropdown-item w-100 selectLi" style="padding: 4px;">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span>@workshopItem.WorkshopFullName</span>
|
||||
<span>@workshopItem.Name</span>
|
||||
<div class="d-flex align-items-center justify-content-start me-1">
|
||||
<span class="me-1">@workshopItem.PersonnelCount</span>
|
||||
<i class="md md-group" style="font-size: 20px; color: #25acac; margin: 0 0 0 5px;"></i>
|
||||
@@ -138,7 +133,19 @@
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<li>
|
||||
<a class="dropdown-item w-100 selectLi" style="padding: 4px;">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span>بدون کارگاه</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
"logo": "https://gozareshgir.ir"
|
||||
}
|
||||
</script>
|
||||
<script src="https://www.google.com/recaptcha/api.js?hl=fa&render=6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH"></script>
|
||||
@* <script src="https://www.google.com/recaptcha/api.js?hl=fa&render=6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH"></script> *@
|
||||
|
||||
}
|
||||
@* <input type="hidden" name="CaptchaRes" id="captchaRes" value="" /> *@
|
||||
<script>
|
||||
@* <script>
|
||||
window.grecaptcha.ready(function () {
|
||||
window.grecaptcha.execute('6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH',
|
||||
{ action: 'submit' }).then(function (response) {
|
||||
$('#captchaResult').val(response);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script> *@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
@@ -709,7 +709,14 @@
|
||||
}
|
||||
}
|
||||
//******************** عملیات ورود با موبایل و دریافت کد ********************
|
||||
$("#btn-login").on("click", function () {
|
||||
const username = $("#username").val();
|
||||
const password = $("#password").val();
|
||||
|
||||
Android.saveCredentials(username, password);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ namespace ServiceHost.Pages
|
||||
{
|
||||
|
||||
bool captchaResult = true;
|
||||
if (!_webHostEnvironment.IsDevelopment())
|
||||
captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
//if (!_webHostEnvironment.IsDevelopment())
|
||||
// captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
|
||||
|
||||
if (captchaResult)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
"sqlDebugging": true,
|
||||
"dotnetRunMessages": "true",
|
||||
"nativeDebugging": true,
|
||||
//"applicationUrl": "https://localhost:5004;http://localhost:5003;http://192.168.0.118:82;https://192.168.0.118:83",
|
||||
"applicationUrl": "https://localhost:5004;http://localhost:5003",
|
||||
"applicationUrl": "https://localhost:5004;http://localhost:5003;",
|
||||
//"applicationUrl": "https://localhost:5004;http://localhost:5003;http://192.168.0.118:82;https://192.168.0.118:83;",
|
||||
"jsWebView2Debugging": false,
|
||||
"hotReloadEnabled": true
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//"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;"
|
||||
|
||||
@@ -49,19 +49,29 @@
|
||||
|
||||
.taskTitle {
|
||||
color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
margin: auto auto 0;
|
||||
}
|
||||
|
||||
.taskTitleSub {
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
font-weight: 500;
|
||||
/*width: 65%;*/
|
||||
/* width: 65%; */
|
||||
display: inline-block;
|
||||
padding: 3px 6px;
|
||||
overflow-x: scroll;
|
||||
white-space: nowrap;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.taskTitleSub::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.taskDesc {
|
||||
@@ -72,7 +82,7 @@
|
||||
background-color: #ffffff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 5px;
|
||||
height: 90px;
|
||||
height: 75px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -401,7 +411,7 @@
|
||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.assigns_section .btnAssignList {
|
||||
.assigns_section .btnAssignList {
|
||||
background: #F0F0F0;
|
||||
width: 100%;
|
||||
margin: 3px 0;
|
||||
@@ -411,7 +421,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.assigns_section .btnAssignList.active {
|
||||
border: 2px solid #29D0D0;
|
||||
@@ -440,9 +451,6 @@
|
||||
/*border: 1px solid #EBEBEB;*/
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
height: 580px;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.chat-section .chat-card-main {
|
||||
@@ -454,6 +462,16 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mainChat {
|
||||
height: 510px;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
#ajaxChatSection {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
@@ -636,6 +654,10 @@
|
||||
background: #ffdede;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
|
||||
.modal-xl-DetailModal {
|
||||
@@ -646,8 +668,26 @@
|
||||
/*width: 820px;*/
|
||||
}
|
||||
|
||||
.chat-section {
|
||||
height: 400px;
|
||||
.modal-title {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.taskTitle {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.taskTitleSub {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.taskDesc {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.mainChat {
|
||||
height: 220px;
|
||||
}
|
||||
.actionBtnsection .actionBtn {
|
||||
font-size: 10px;
|
||||
@@ -688,13 +728,18 @@
|
||||
max-width: auto;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
/*width: 700px;*/
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.chat-section {
|
||||
height: 350px;
|
||||
.mainChat {
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
.assigns_section .btnAssignList {
|
||||
@@ -710,13 +755,39 @@
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.modal-content {
|
||||
height: 100vh; /* Full screen */
|
||||
max-height: 94vh;
|
||||
/*overflow-y: auto;*/
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
max-height: calc(100vh - 100px); /* Subtracting space for header and footer */
|
||||
/*overflow-y: auto;*/
|
||||
}
|
||||
|
||||
.modal-header .btn-close {
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
.assigns_section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
overflow-x: scroll;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.assigns_section .btnAssignList {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.admincardActionSection .admincardAction .btn-section .btn-submit,
|
||||
.admincardActionSection .admincardAction .btn-section .btn-reject {
|
||||
font-size: 9px;
|
||||
font-weight: 600;
|
||||
}
|
||||
#ajaxChatSection .chat-card-receiver,
|
||||
#ajaxChatSection .chat-card-sender {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,13 @@
|
||||
.boxShadowDiagram {
|
||||
|
||||
background-color: #eef3f3;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e8eef0' fill-opacity='0.67' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
|
||||
border-radius: 10px;
|
||||
border: 1px solid #cccccc;
|
||||
max-height: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.infoTxt1,
|
||||
@@ -64,12 +72,29 @@
|
||||
}
|
||||
|
||||
.tree-section {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: auto; /* Ensures overflow is scrollable if content is too wide */
|
||||
max-width: 100%; /* Prevents horizontal overflow */
|
||||
max-height: 100%; /* Prevents vertical overflow */
|
||||
}
|
||||
|
||||
#canvas-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; /* Prevent overflowing */
|
||||
position: relative;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
#tree {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(1); /* Center and default scale */
|
||||
transform-origin: center center; /* Ensure scaling happens from the center */
|
||||
transition: transform 0.3s ease; /* Smooth transitions for zooming */
|
||||
}
|
||||
|
||||
#tree * {
|
||||
@@ -84,6 +109,13 @@
|
||||
margin-right: 170px;
|
||||
}
|
||||
|
||||
|
||||
#tree-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#tree .branch:not(:first-child):after {
|
||||
content: "";
|
||||
width: 20px;
|
||||
@@ -191,3 +223,28 @@
|
||||
border-color: #a6a6a6;
|
||||
}
|
||||
|
||||
|
||||
/* Disable selection during drag */
|
||||
#canvas-wrapper.dragging {
|
||||
cursor: grabbing;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Responsive scaling */
|
||||
@media screen and (max-width: 1200px) {
|
||||
#tree {
|
||||
transform: translate(-50%, -50%) scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
#tree {
|
||||
transform: translate(-50%, -50%) scale(0.6);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
#tree {
|
||||
transform: translate(-50%, -50%) scale(0.5);
|
||||
}
|
||||
}
|
||||
@@ -698,10 +698,8 @@
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: $ffffff;
|
||||
margin: auto 4px auto 1px;
|
||||
color: #ffffff;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
@@ -10,56 +10,96 @@ $(document).ready(function () {
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
//$('.actionBtn').click(function () {
|
||||
// $('.actionBtn').removeClass('active');
|
||||
// $('#save').removeClass('disable');
|
||||
// $(this).addClass('active');
|
||||
|
||||
// $('#save').removeClass('disable');
|
||||
// $(this).addClass('active');
|
||||
|
||||
// $('.input-form').show();
|
||||
|
||||
// switch ($(this).attr('id')) {
|
||||
// case "deadlineBtn":
|
||||
// $('.select-time-section').show();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// break;
|
||||
// case "notPossibleBtn":
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// break;
|
||||
// case "doneBtn":
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// break;
|
||||
// case "AssignBtn":
|
||||
// $('#Desc-Time-Area').hide();
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').show();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleAssignClick ()');
|
||||
// }
|
||||
|
||||
// // if ($(this).attr('id') === "deadlineBtn") {
|
||||
// // $('.select-time-section').show();
|
||||
// // $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// // $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// // } else if ($(this).attr('id') === "notPossibleBtn") {
|
||||
// // $('.select-time-section').hide();
|
||||
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// // $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// // } else if ($(this).attr('id') === "doneBtn") {
|
||||
// // $('.select-time-section').hide();
|
||||
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// // $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// // }
|
||||
//});
|
||||
|
||||
$('.actionBtn').click(function () {
|
||||
var isActive = $(this).hasClass('active');
|
||||
|
||||
$('.actionBtn').removeClass('active');
|
||||
$('#save').removeClass('disable');
|
||||
$(this).addClass('active');
|
||||
$('.input-form').hide();
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
|
||||
$('#save').removeClass('disable');
|
||||
if (!isActive) {
|
||||
$(this).addClass('active');
|
||||
|
||||
$('.input-form').show();
|
||||
|
||||
switch ($(this).attr('id')) {
|
||||
case "deadlineBtn":
|
||||
$('.select-time-section').show();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
$('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
break;
|
||||
case "notPossibleBtn":
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
break;
|
||||
case "doneBtn":
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleDoneClick()');
|
||||
break;
|
||||
case "AssignBtn":
|
||||
$('#Desc-Time-Area').hide();
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').show();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleAssignClick ()');
|
||||
$('#save').attr('onclick', 'handleAssignClick()');
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass('active');
|
||||
$('.input-form').hide();
|
||||
}
|
||||
|
||||
// if ($(this).attr('id') === "deadlineBtn") {
|
||||
// $('.select-time-section').show();
|
||||
// $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// } else if ($(this).attr('id') === "notPossibleBtn") {
|
||||
// $('.select-time-section').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// } else if ($(this).attr('id') === "doneBtn") {
|
||||
// $('.select-time-section').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// }
|
||||
});
|
||||
|
||||
$('.select2Member').select2({
|
||||
@@ -99,12 +139,14 @@ $(document).ready(function () {
|
||||
}).mask("0000/00/00");
|
||||
|
||||
setTimeout(function () {
|
||||
$('.chat-section').animate({
|
||||
scrollTop: $('.chat-section').get(0).scrollHeight
|
||||
$('.modal-body').animate({
|
||||
scrollTop: $('.modal-body').get(0).scrollHeight
|
||||
}, 1200);
|
||||
}, 900);
|
||||
});
|
||||
|
||||
|
||||
|
||||
function updateDateInput(daysToAdd) {
|
||||
var today = new Date();
|
||||
today.setDate(today.getDate() + daysToAdd);
|
||||
@@ -224,7 +266,10 @@ function saveAjax(url, data) {
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
document.location.reload();
|
||||
// document.location.reload();
|
||||
$(`.section-btns-task button.active`).click();
|
||||
|
||||
$('#MainModal').modal('toggle');
|
||||
}, 1500);
|
||||
|
||||
|
||||
@@ -362,6 +407,26 @@ function loadChatMessage(id) {
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
if (Number(UserId) !== item.receiverId && Number(UserId) !== item.senderId) {
|
||||
html += `
|
||||
<div class="chat-card-${i % 2 === 0 ? `receiver` : `sender`} ${color}" style="">
|
||||
<h6 class="m-0" style="padding:0 0 0 0;">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="mb-0 mt-2" style="word-break: break-word; padding:0 0 0 0;">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0" style="padding:0 0 0 0;">${item.creationDate}</p>
|
||||
<div class="chat-tag" style="left: 0;right: auto;">
|
||||
<span>
|
||||
${textType}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#ajaxChatSection').append(html);
|
||||
|
||||
@@ -10,56 +10,96 @@ $(document).ready(function () {
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
//$('.actionBtn').click(function () {
|
||||
// $('.actionBtn').removeClass('active');
|
||||
// $('#save').removeClass('disable');
|
||||
// $(this).addClass('active');
|
||||
|
||||
// $('#save').removeClass('disable');
|
||||
// $(this).addClass('active');
|
||||
|
||||
// $('.input-form').show();
|
||||
|
||||
// switch ($(this).attr('id')) {
|
||||
// case "deadlineBtn":
|
||||
// $('.select-time-section').show();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// break;
|
||||
// case "notPossibleBtn":
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// break;
|
||||
// case "doneBtn":
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// break;
|
||||
// case "AssignBtn":
|
||||
// $('#Desc-Time-Area').hide();
|
||||
// $('.select-time-section').hide();
|
||||
// $('#select2MemberList').show();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleAssignClick ()');
|
||||
// }
|
||||
|
||||
// // if ($(this).attr('id') === "deadlineBtn") {
|
||||
// // $('.select-time-section').show();
|
||||
// // $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// // $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// // } else if ($(this).attr('id') === "notPossibleBtn") {
|
||||
// // $('.select-time-section').hide();
|
||||
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// // $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// // } else if ($(this).attr('id') === "doneBtn") {
|
||||
// // $('.select-time-section').hide();
|
||||
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// // $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// // }
|
||||
//});
|
||||
|
||||
$('.actionBtn').click(function () {
|
||||
var isActive = $(this).hasClass('active');
|
||||
|
||||
$('.actionBtn').removeClass('active');
|
||||
$('#save').removeClass('disable');
|
||||
$(this).addClass('active');
|
||||
$('.input-form').hide();
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
|
||||
$('#save').removeClass('disable');
|
||||
if (!isActive) {
|
||||
$(this).addClass('active');
|
||||
|
||||
$('.input-form').show();
|
||||
|
||||
switch ($(this).attr('id')) {
|
||||
case "deadlineBtn":
|
||||
$('.select-time-section').show();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
$('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
break;
|
||||
case "notPossibleBtn":
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
break;
|
||||
case "doneBtn":
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').hide();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleDoneClick()');
|
||||
break;
|
||||
case "AssignBtn":
|
||||
$('#Desc-Time-Area').hide();
|
||||
$('.select-time-section').hide();
|
||||
$('#select2MemberList').show();
|
||||
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
$('#save').attr('onclick', 'handleAssignClick ()');
|
||||
$('#save').attr('onclick', 'handleAssignClick()');
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass('active');
|
||||
$('.input-form').hide();
|
||||
}
|
||||
|
||||
// if ($(this).attr('id') === "deadlineBtn") {
|
||||
// $('.select-time-section').show();
|
||||
// $('.textarea-col').removeClass('col-12').addClass('col-8');
|
||||
// $('#save').attr('onclick', 'handleDeadlineClick()');
|
||||
// } else if ($(this).attr('id') === "notPossibleBtn") {
|
||||
// $('.select-time-section').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleNotPossibleClick()');
|
||||
// } else if ($(this).attr('id') === "doneBtn") {
|
||||
// $('.select-time-section').hide();
|
||||
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
||||
// $('#save').attr('onclick', 'handleDoneClick()');
|
||||
// }
|
||||
});
|
||||
|
||||
$('.select2Member').select2({
|
||||
@@ -99,8 +139,8 @@ $(document).ready(function () {
|
||||
}).mask("0000/00/00");
|
||||
|
||||
setTimeout(function () {
|
||||
$('.chat-section').animate({
|
||||
scrollTop: $('.chat-section').get(0).scrollHeight
|
||||
$('.modal-body').animate({
|
||||
scrollTop: $('.modal-body').get(0).scrollHeight
|
||||
}, 1200);
|
||||
}, 900);
|
||||
});
|
||||
@@ -224,7 +264,11 @@ function saveAjax(url, data) {
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
document.location.reload();
|
||||
//document.location.reload();
|
||||
$(`.section-btns-task button.active`).click();
|
||||
|
||||
|
||||
$('#MainModal').modal('toggle');
|
||||
}, 1500);
|
||||
|
||||
|
||||
|
||||
@@ -121,4 +121,57 @@ $(document).ready(function () {
|
||||
|
||||
const diagramContainer = document.getElementById('tree-container');
|
||||
renderTree(treeData, diagramContainer);
|
||||
|
||||
|
||||
|
||||
const canvasWrapper = document.getElementById("canvas-wrapper");
|
||||
const tree = document.getElementById("tree");
|
||||
let isDragging = false;
|
||||
let startX, startY;
|
||||
let translateX = -50, translateY = -50;
|
||||
let scale = 1;
|
||||
let dragSensitivity = 0.4;
|
||||
|
||||
canvasWrapper.addEventListener("mousedown", (e) => {
|
||||
isDragging = true;
|
||||
startX = e.clientX;
|
||||
startY = e.clientY;
|
||||
canvasWrapper.classList.add("dragging");
|
||||
});
|
||||
|
||||
canvasWrapper.addEventListener("mousemove", (e) => {
|
||||
if (!isDragging) return;
|
||||
|
||||
const dx = (e.clientX - startX) * dragSensitivity / scale;
|
||||
const dy = (e.clientY - startY) * dragSensitivity / scale;
|
||||
|
||||
translateX += dx;
|
||||
translateY += dy;
|
||||
|
||||
tree.style.transform = `translate(${translateX}%, ${translateY}%) scale(${scale})`;
|
||||
|
||||
startX = e.clientX;
|
||||
startY = e.clientY;
|
||||
});
|
||||
|
||||
document.addEventListener("mouseup", () => {
|
||||
isDragging = false;
|
||||
canvasWrapper.classList.remove("dragging");
|
||||
});
|
||||
|
||||
canvasWrapper.addEventListener("wheel", (e) => {
|
||||
e.preventDefault();
|
||||
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
||||
|
||||
scale = Math.min(Math.max(0.2, scale + delta), 3);
|
||||
|
||||
tree.style.transform = `translate(${translateX}%, ${translateY}%) scale(${scale})`;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ function loadMore(type) {
|
||||
|
||||
var successSend = item.status == "موفق" ? "successSend" : "";
|
||||
|
||||
html += `<div class="Rtable-row align-items-center position-relative openAction tm-${item.color}" style="cursor: pointer;">
|
||||
html += `<div id="DivRtable_${item.id}" class="Rtable-row align-items-center position-relative openAction tm-${item.color}" style="cursor: pointer;">
|
||||
<div class="Rtable-cell d-md-block d-flex width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center span-number">
|
||||
@@ -727,7 +727,7 @@ function loadMore(type) {
|
||||
|
||||
|
||||
if (!item.isDone && !item.isCancel) {
|
||||
html += `<div class="tm-${item.color}-operation operation-div w-100">
|
||||
html += `<div id="OperationDiv_${item.id}" class="tm-${item.color}-operation operation-div w-100">
|
||||
<div class="operations-btns">
|
||||
<div class="row p-0">
|
||||
<div class="col-md-12 col-12 p-1">
|
||||
@@ -1729,6 +1729,12 @@ $(document).ready(function () {
|
||||
dir: "rtl",
|
||||
});
|
||||
|
||||
$(".select2OptionMobile").select2({
|
||||
language: "fa",
|
||||
dir: "rtl",
|
||||
dropdownParent: $('#searchModal'),
|
||||
});
|
||||
|
||||
function formatSelection(val) {
|
||||
return val.id;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
if (btnAllRequestActive) {
|
||||
var firstButton = $('#btnAssignList').first();
|
||||
var firstDataId = firstButton.data('id');
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
loadChatMessageRequest(Number(firstDataId));
|
||||
}, 1000);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
loadAllRequest();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
$('.btnAssignList').click(function () {
|
||||
@@ -16,7 +20,7 @@
|
||||
$(this).removeClass('error-valid');
|
||||
});
|
||||
|
||||
showAllRequestAction();
|
||||
//showAllRequestAction();
|
||||
});
|
||||
|
||||
$(".date").on('input', function () {
|
||||
@@ -31,9 +35,106 @@ function showAllRequestAction() {
|
||||
$('#ajaxChatSection').html('');
|
||||
$('.admincardActionSection').addClass('position-relative');
|
||||
$('.admincardAction').show();
|
||||
loadAllRequest();
|
||||
}
|
||||
|
||||
function loadAllRequest() {
|
||||
$('#LoadingCard').show();
|
||||
$('#ajaxChatSection').html('');
|
||||
var html = '';
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadOperationRequestTaskDetailsAjax,
|
||||
data: { 'taskId': taskId },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function(response) {
|
||||
var assignViewModels = response.data.assignViewModels;
|
||||
|
||||
//var taskDetailsData = response.taskDetailsData;
|
||||
|
||||
html += `<div class="admincardActionSection position-relative">`;
|
||||
|
||||
|
||||
if (assignViewModels.length > 0) {
|
||||
|
||||
assignViewModels.forEach(function(taskDetailsData) {
|
||||
var typeMessage = "";
|
||||
var color = "";
|
||||
if (taskDetailsData.isCanceledRequest) {
|
||||
typeMessage = "درخواست انصراف ";
|
||||
color = "red";
|
||||
} else if (taskDetailsData.timeRequest) {
|
||||
typeMessage = "درخواست مهلت ";
|
||||
color = "orange";
|
||||
} else if (taskDetailsData.isDoneRequest) {
|
||||
typeMessage = "درخواست انجام شد ";
|
||||
color = "green";
|
||||
}
|
||||
|
||||
html += `
|
||||
<div class="admincardAction ${color}" id="Assign_${taskDetailsData.id}">
|
||||
<div class="row">
|
||||
<div class="${taskDetailsData.timeRequest ? `col-6` : `col-9`}">
|
||||
<p class="mb-1 m-0">${taskDetailsData.assignedName} ${typeMessage} از وظیفه داده است.</p>
|
||||
</div>`;
|
||||
if (taskDetailsData.timeRequest) {
|
||||
html += `<div class="col-3">
|
||||
<p class="mb-1 m-0 text-center">به تاریخ: ${taskDetailsData.requestDateFa}</p>
|
||||
</div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="${taskDetailsData.timeRequest ? `col-6` : `col-9`} pe-1">
|
||||
<textarea class="form-control" id="Description_${taskDetailsData.assignedId}" placeholder="توضیحات" style="height: 40px; resize: none"></textarea>
|
||||
</div>`;
|
||||
if (taskDetailsData.timeRequest) {
|
||||
html += `<div class="col-3 px-0">
|
||||
<input type="text" id="dateTime_${taskDetailsData.assignedId}" class="form-control text-center date" placeholder="تاریخ" style="height: 40px;"/>
|
||||
</div>`;
|
||||
}
|
||||
html += `<div class="col-3 mt-1 ps-1">
|
||||
<div class="btn-section gap-1">`;
|
||||
var onclickReject = '';
|
||||
var onclickAccept = '';
|
||||
|
||||
if (taskDetailsData.isCanceledRequest) {
|
||||
onclickReject = `handleRejectCancel(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptCancel(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
else if (taskDetailsData.timeRequest) {
|
||||
onclickReject = `handleRejectTimeRequest(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptTimeRequest(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
else if (taskDetailsData.isDoneRequest) {
|
||||
onclickReject = `handleRejectComplete(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptComplete(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
|
||||
html += `<button type="button" class="btn-submit" onclick="${onclickAccept}">تایید</button>
|
||||
<button type="button" class="btn-reject" onclick="${onclickReject}">عدم تایید</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
$('#LoadingCard').hide();
|
||||
$('#ajaxChatSection').append(html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadChatMessageRequest(id) {
|
||||
$('#LoadingCard').show();
|
||||
|
||||
//$('.admincardActionSection').css('position', 'absolute');
|
||||
|
||||
$('#AssignTaskName').text($(`#AssignedName_${id}`).text());
|
||||
@@ -51,10 +152,10 @@ function loadChatMessageRequest(id) {
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: `${loadChatMessageAjax}`,
|
||||
data: { 'assignId': Number(id) },
|
||||
data: { 'assignId': Number(id), 'taskId': taskId },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
$.each(response.data, function (i, item) {
|
||||
var color = "";
|
||||
var textType = "";
|
||||
@@ -105,8 +206,70 @@ function loadChatMessageRequest(id) {
|
||||
<p class="m-0 mt-2" style="word-break: break-word; ${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0" style="word-break: break-word; ${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">${item.creationDate}</p>
|
||||
<div class="chat-tag" style="${Number(UserId) === item.receiverId ? 'right: 0;left: auto;' : ''}">
|
||||
<p class="date-time pt-3 m-0" style="word-break: break-word; ${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">${item.creationDate}</p>`;
|
||||
|
||||
|
||||
if (response.data.length === i + 1) {
|
||||
html += `<div class="admincardActionSection position-relative">`;
|
||||
var taskDetailsData = response.taskDetailsData;
|
||||
|
||||
if (taskDetailsData != null) {
|
||||
|
||||
var typeMessage = "";
|
||||
var color = "";
|
||||
if (taskDetailsData.isCanceledRequest) {
|
||||
typeMessage = "درخواست انصراف ";
|
||||
color = "#F87171";
|
||||
} else if (taskDetailsData.timeRequest) {
|
||||
typeMessage = "درخواست مهلت ";
|
||||
color = "#FBBF24";
|
||||
} else if (taskDetailsData.isDoneRequest) {
|
||||
typeMessage = "درخواست انجام شد ";
|
||||
color = "#84CC16";
|
||||
}
|
||||
|
||||
html += `<div class="admincardAction" style="background: transparent; border: none;margin: 5px 12px 0 -6px;border-top: 1px solid ${color};border-radius: 0; padding: 7px 7px 3px;" id="Assign_${taskDetailsData.id}">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-8 pe-1">
|
||||
<textarea class="form-control" id="Description_${taskDetailsData.assignedId}" placeholder="توضیحات" style="height: ${taskDetailsData.timeRequest ? `53px` : `40px`}; resize: none"></textarea>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="col-4 mt-1 ps-1">`;
|
||||
if (taskDetailsData.timeRequest) {
|
||||
html += `<div class="px-0">
|
||||
<input type="text" id="dateTime_${taskDetailsData.assignedId}" class="form-control text-center date mb-1" style="height: 25px;" placeholder="تاریخ" />
|
||||
</div>`;
|
||||
}
|
||||
html += `<div class="btn-section gap-1">`;
|
||||
var onclickReject = '';
|
||||
var onclickAccept = '';
|
||||
|
||||
if (taskDetailsData.isCanceledRequest) {
|
||||
onclickReject = `handleRejectCancel(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptCancel(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
else if (taskDetailsData.timeRequest) {
|
||||
onclickReject = `handleRejectTimeRequest(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptTimeRequest(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
else if (taskDetailsData.isDoneRequest) {
|
||||
onclickReject = `handleRejectComplete(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
onclickAccept = `handleAcceptComplete(${taskDetailsData.assignedId},${taskDetailsData.id})`;
|
||||
}
|
||||
|
||||
html += `<button type="button" class="btn-submit" onclick="${onclickAccept}" style="height: 24px;">تایید</button>
|
||||
<button type="button" class="btn-reject" onclick="${onclickReject}" style="height: 24px;">عدم تایید</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
html += `</div>`;
|
||||
}
|
||||
|
||||
|
||||
html += `<div class="chat-tag" style="${Number(UserId) === item.receiverId ? 'right: 0;left: auto;' : ''}">
|
||||
<span>
|
||||
${item.typeOfMessage}
|
||||
</span>
|
||||
@@ -128,8 +291,11 @@ function loadChatMessageRequest(id) {
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#LoadingCard').hide();
|
||||
$('#ajaxChatSection').append(html);
|
||||
|
||||
},
|
||||
@@ -273,7 +439,8 @@ function saveRequestAjax(url, data, assignId) {
|
||||
else if (countAssign === 0) {
|
||||
/*window.location.reload();*/
|
||||
$('#MainModal').modal('toggle');
|
||||
$('#btnTaskRequest').click();
|
||||
//$('#btnTaskRequest').click();
|
||||
$(`.section-btns-task button.active`).click();
|
||||
loadRequestCount();
|
||||
}
|
||||
|
||||
|
||||
@@ -680,13 +680,12 @@ 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) + '%');
|
||||
let h = Math.round(percentComplete);
|
||||
console.log(h);
|
||||
loading.css('width', `${h}%`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -92,10 +92,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
console.log(idlist);
|
||||
|
||||
var workshop_ID = Number(workshopId);
|
||||
var goTo = `#showmodal=/Client/Company/Employees/Index?workshopID=${workshop_ID}&idlist=${idlist}&handler=PrintAllDetailsPersonnelInfoMobile`;
|
||||
var goTo = `#showmodal=/Client/Company/Employees/Index?workshopID=${workshop_ID}&idlist=${idlistidlist}&handler=PrintAllDetailsPersonnelInfoMobile`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ svg {
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
padding: 0.5rem !important;
|
||||
/*padding: 0.5rem !important;*/
|
||||
}
|
||||
|
||||
.wrapper-dropdown .dropdown li:hover {
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
.step-progress p {
|
||||
font-size: 11px;
|
||||
font-weight: 200;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.line {
|
||||
@@ -1588,7 +1588,7 @@
|
||||
/* Progress Step */
|
||||
.step-progress p {
|
||||
font-size: 10px;
|
||||
font-weight: 300;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.line {
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
|
||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
||||
$(document).ready(function() {
|
||||
window.onbeforeprint = (event) => {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
document.getElementById("MainModal").style.visibility = "hidden";
|
||||
setTimeout(function () {
|
||||
printElement(document.getElementById("printThis"));
|
||||
},500);
|
||||
});
|
||||
} else {
|
||||
document.getElementById("btnPrint").onclick = function () {
|
||||
printElement(document.getElementById("printThis"));
|
||||
}
|
||||
}
|
||||
|
||||
function printElement(elem) {
|
||||
function printElement(elem) {
|
||||
var domClone = elem.cloneNode(true);
|
||||
|
||||
var $printSection = document.getElementById("printSection");
|
||||
@@ -17,4 +29,4 @@
|
||||
$printSection.innerHTML = "";
|
||||
$printSection.appendChild(domClone);
|
||||
window.print();
|
||||
}
|
||||
}
|
||||
|
||||
377
ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/Group.css
Normal file
377
ServiceHost/wwwroot/AssetsClient/pages/RollCall/css/Group.css
Normal file
@@ -0,0 +1,377 @@
|
||||
/* ----------------------------------------------------------------- table RollCall group 1 list */
|
||||
.table-rollcall-group1 .width1 {
|
||||
width: 8% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width2 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width3 {
|
||||
width: 25% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width4 {
|
||||
width: 25% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width5 {
|
||||
width: 27% !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.infoGroupBox {
|
||||
background-color: #ffffff;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.infoGroup1 {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #696969;
|
||||
}
|
||||
|
||||
.infoGroup2 {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #65A30D;
|
||||
}
|
||||
|
||||
.infoGroup3 {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #EF4444;
|
||||
}
|
||||
|
||||
|
||||
#loadAccountItems {
|
||||
height: 620px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 1px 6px;
|
||||
outline: 2px solid #55D1D1;
|
||||
}
|
||||
|
||||
.loadAccountItems .Rtable-cell--content {
|
||||
color: #716969;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
.row-index1 {
|
||||
background: #B5EDED;
|
||||
color: #8C8C8C;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.row-index2 {
|
||||
background: #A7EAEA;
|
||||
color: #716969;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title-group1 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: #696969;
|
||||
}
|
||||
|
||||
.title-group2 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: #716969;
|
||||
}
|
||||
|
||||
.time-set-title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.group-task-section .card-group .title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.group-task-section .card-group .title h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.btn-delete1 {
|
||||
background-color: #F9BABA;
|
||||
border: 1px solid #F63D3D;
|
||||
color: #ffffff;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
margin: auto 1px auto 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
|
||||
.btn-delete1:hover {
|
||||
background-color: #e3adad
|
||||
}
|
||||
|
||||
.btn-delete2 {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
|
||||
.btn-delete2:hover {
|
||||
background: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
|
||||
.group-task-section .card-group p {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.group-task-section .list-personnel {
|
||||
grid-column: span 8 / span 7;
|
||||
}
|
||||
|
||||
.btnPosition {
|
||||
background-color: #E5FCFC;
|
||||
outline: 1px solid #CAD4D4;
|
||||
cursor: pointer;
|
||||
margin: 0 0 6px 0;
|
||||
transition: ease .3s;
|
||||
height: 76px;
|
||||
}
|
||||
|
||||
.btnPosition:hover {
|
||||
background-color: #FFFFFF;
|
||||
outline: 1px solid #55D1D1;
|
||||
}
|
||||
|
||||
.btnPosition.active {
|
||||
background-color: #FFFFFF;
|
||||
outline: 2px solid #55D1D1;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
background-color: #84CC16;
|
||||
color: #ffffff;
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: 5px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
|
||||
.btn-add:hover {
|
||||
background-color: #629b0c;
|
||||
}
|
||||
|
||||
|
||||
.btn-register {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btn-register:hover {
|
||||
background-color: #5f9213;
|
||||
}
|
||||
|
||||
.btn-cancel2 {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #1F2937;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btn-cancel2:hover {
|
||||
background-color: #121820;
|
||||
}
|
||||
|
||||
.items {
|
||||
border: 1px solid #D9D9D9;
|
||||
padding: 5px;
|
||||
border-radius: 8px;
|
||||
margin: 4px 0;
|
||||
cursor: pointer;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
|
||||
.items:hover {
|
||||
border: 1px solid #148989;
|
||||
}
|
||||
|
||||
.items.checked-item {
|
||||
border: 1px solid #148989;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
color: #797979;
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 7px;
|
||||
background-color: #F6F6F6;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.btnCreateNew {
|
||||
}
|
||||
|
||||
.btnCreateNew {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btnCreateNew:hover {
|
||||
background-color: #5f9213;
|
||||
}
|
||||
|
||||
.operation-div .operations-btns {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
@media(max-width: 1366px) {
|
||||
#loadAccountItems {
|
||||
height: 310px;
|
||||
}
|
||||
|
||||
.title-group1,
|
||||
.title-group2 {
|
||||
font-size: 15px;
|
||||
color: #353232;
|
||||
}
|
||||
|
||||
.row-index1 {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.row-index2 {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
font-size: 12px;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
padding: 6px 12px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.title-group {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.title-group h4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.btnPosition {
|
||||
background-color: #FFFFFF;
|
||||
outline: 0;
|
||||
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.btnPosition.active {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--heading,
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
color: #716969;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.widthMobile1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.widthMobile2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.widthMobile3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row {
|
||||
margin: 10px 0px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
padding: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
font-size: 12px;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
#loadAccountItems {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
padding: 6px 7px;
|
||||
}
|
||||
|
||||
.infoGroupBox {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -110,18 +110,54 @@ video {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-show button {
|
||||
.image-show .closeImage {
|
||||
background-color: #fff;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
z-index: 30;
|
||||
position: absolute;
|
||||
top: -18px;
|
||||
right: -20px;
|
||||
border-radius: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.image-show .closeImage svg {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
z-index: 30;
|
||||
color: #ef4444;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image-show button {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #17909040;
|
||||
font-family: inherit;
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
color: #fff;
|
||||
font-weight: 900;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.image-show button .textUpload {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #148b8b;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.image-show button .textUploaded {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.camera_close {
|
||||
position: fixed;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var pageIndexMain = 0
|
||||
var pageIndexMain = 0;
|
||||
var searchName = '';
|
||||
|
||||
$(document).ready(function () {
|
||||
@@ -8,16 +8,17 @@ $(document).ready(function () {
|
||||
loadingDiv.show();
|
||||
});
|
||||
|
||||
$('.desktop-btn, .mobile-btn').on('click', function () {
|
||||
var id = $(this).attr('id').split('_')[1];
|
||||
var isActive = $(this).hasClass('btn-deactive') ? 'deactive' : 'active';
|
||||
togglePersonnelStatus(id, isActive);
|
||||
});
|
||||
|
||||
loadInfoCount();
|
||||
loadDataAjax();
|
||||
});
|
||||
|
||||
$(document).on('click', '.desktop-btn, .mobile-btn', function () {
|
||||
var id = $(this).attr('id').split('_')[1];
|
||||
var isActive = $(this).hasClass('btn-deactive') ? 'deactive' : 'active';
|
||||
togglePersonnelStatus(id, isActive);
|
||||
});
|
||||
|
||||
$('.btn-search-click').on('click', function () {
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ $('.btn-search-click').on('click', function () {
|
||||
$('.alert-msg p').text('');
|
||||
$('#personnelSearch').removeClass('errored');
|
||||
}, 3500);
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,8 +97,12 @@ function loadDataAjax() {
|
||||
<div class="Rtable-cell--content">`;
|
||||
|
||||
if (item.hasUploadedImage === "true") {
|
||||
if (item.imagePath === "") {
|
||||
html += `<img id="ImageEmployee_${item.employeeId}" src="/AssetsClient/images/Credits.png" class="img-avatar border border-2 border-danger" alt="">`;
|
||||
} else {
|
||||
html += `<img id="ImageEmployee_${item.employeeId}" src="data:image/jpeg;base64,${item.imagePath}" class="img-avatar" />`;
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += `<img id="ImageEmployee_${item.employeeId}" src="/AssetsClient/images/Credits.png" class="img-avatar" alt="">`;
|
||||
}
|
||||
@@ -122,7 +127,7 @@ function loadDataAjax() {
|
||||
<div class="Rtable-cell d-md-block d-none width5">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">`;
|
||||
var isActive = item.isActiveString === "true" ? "deactive" : "active";
|
||||
html += `<button class="desktop-btn ${(item.isActiveString === "true"
|
||||
html += `<button class="desktop-btn btnAvticeAction_${item.employeeId} ${(item.isActiveString === "true"
|
||||
? `btn-deactive`
|
||||
: item.hasUploadedImage === "false"
|
||||
? `btn-active disable`
|
||||
@@ -130,7 +135,7 @@ function loadDataAjax() {
|
||||
type="button"
|
||||
style="width: 95px;"
|
||||
id="togglePersonnelStatus_${item.id}_desktop">
|
||||
<div id="IsActiveString_${item.id}_desktop">
|
||||
<div id="IsActiveString_${item.id}_desktop" class="IsActiveStringFind_${item.employeeId}">
|
||||
${item.isActiveString === "true" ? `غیر فعال کردن` : `فعال کردن`}
|
||||
</div>
|
||||
</button>
|
||||
@@ -152,8 +157,12 @@ function loadDataAjax() {
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="mx-2">`;
|
||||
if (item.hasUploadedImage === "true") {
|
||||
if (item.imagePath === "") {
|
||||
html += `<img id="ImageEmployeeMobile_${item.employeeId}" src="/AssetsClient/images/Credits.png" class="img-avatar border border-2 border-danger" alt="">`;
|
||||
} else {
|
||||
html += `<img id="ImageEmployeeMobile_${item.employeeId}" src="data:image/jpeg;base64,${item.imagePath}" class="img-avatar" />`;
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += `<img id="ImageEmployeeMobile_${item.employeeId}" src="/AssetsClient/images/Credits.png" class="img-avatar" alt="">`;
|
||||
}
|
||||
@@ -179,11 +188,11 @@ function loadDataAjax() {
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="mobile-btn text-nowrap mt-1 w-100 ${item.isActiveString === "true" ? `btn-deactive` : item.hasUploadedImage === "false" ? `btn-active disable` : `btn-active`}"
|
||||
class="mobile-btn text-nowrap mt-1 w-100 btnAvticeActionMobile_${item.employeeId} ${item.isActiveString === "true" ? `btn-deactive` : item.hasUploadedImage === "false" ? `btn-active disable` : `btn-active`}"
|
||||
type="button"
|
||||
id="togglePersonnelStatus_${item.id}_mobile"
|
||||
style="padding: 9px 8px; font-weight: 600; font-size: 10px;">
|
||||
<div id="IsActiveString_${item.id}_mobile">
|
||||
<div id="IsActiveString_${item.id}_mobile" class="IsActiveStringFindMobile_${item.employeeId}">
|
||||
${item.isActiveString === "true" ? `غیر فعال کردن` : `فعال کردن`}
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@@ -216,7 +216,22 @@ function take_snapshot1() {
|
||||
var dataUri = cameraPhoto.getDataUri(config);
|
||||
cropAndResizeImage(dataUri, 1800, 1800).then((resizedDataUri) => {
|
||||
document.getElementById('result1').innerHTML = '<img style="display:none; object-fit: cover;" id="pic1" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
document.getElementById('demoResult1').innerHTML = '<button type="button" class="upload-image1">آپلود عکس اول</button><div class="loadingImage" id="loadingImage1"><div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div></div><img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
document.getElementById('demoResult1').innerHTML =
|
||||
'<div class="closeImage" onclick="closeImage(\'image1\')">' +
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">' +
|
||||
'<path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z" clip-rule="evenodd" />' +
|
||||
'</svg>' +
|
||||
'</div>' +
|
||||
'<button type="button" class="upload-image1">' +
|
||||
'<p class="textUpload textUploaded">عکس اول</p>' +
|
||||
'</button>' +
|
||||
'<div class="loadingImage" id="loadingImage1">' +
|
||||
'<div class="spinner-border" role="status">' +
|
||||
'<span class="visually-hidden">Loading...</span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
//document.getElementById('demoResult1').innerHTML = '<div class="closeImage" onclick="closeImage("image1")"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z" clip-rule="evenodd" /></svg></div><button type="button" class="upload-image1"><p class="textUpload textUploaded">عکس اول</p></button><div class="loadingImage" id="loadingImage1"><div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div></div><img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
$('#loadingImage1').css('display', 'flex');
|
||||
runCheckFace1();
|
||||
}).catch((error) => {
|
||||
@@ -243,7 +258,22 @@ function take_snapshot2() {
|
||||
var dataUri = cameraPhoto.getDataUri(config);
|
||||
cropAndResizeImage(dataUri, 1800, 1800).then((resizedDataUri) => {
|
||||
document.getElementById('result2').innerHTML = '<img style="display:none; object-fit: cover;" id="pic2" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
document.getElementById('demoResult2').innerHTML = '<button type="button" class="upload-image2">آپلود عکس دوم</button><div class="loadingImage" id="loadingImage2"><div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div></div><img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
document.getElementById('demoResult2').innerHTML =
|
||||
'<div class="closeImage" onclick="closeImage(\'image2\')">' +
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">' +
|
||||
'<path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z" clip-rule="evenodd" />' +
|
||||
'</svg>' +
|
||||
'</div>' +
|
||||
'<button type="button" class="upload-image2">' +
|
||||
'<p class="textUpload textUploaded">عکس دوم</p>' +
|
||||
'</button>' +
|
||||
'<div class="loadingImage" id="loadingImage2">' +
|
||||
'<div class="spinner-border" role="status">' +
|
||||
'<span class="visually-hidden">Loading...</span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
//document.getElementById('demoResult2').innerHTML = '<div class="closeImage" onclick="closeImage("image2")"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z" clip-rule="evenodd" /></svg></div><button type="button" class="upload-image2"><p class="textUpload textUploaded">عکس دوم</p></button><div class="loadingImage" id="loadingImage2"><div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div></div><img style="width: 100%; height: 100%; border-radius:10px; object-fit: cover;" data-uri="' + resizedDataUri + '" src="' + resizedDataUri + '"/>';
|
||||
$('#loadingImage2').css('display', 'flex');
|
||||
runCheckFace2();
|
||||
}).catch((error) => {
|
||||
@@ -254,6 +284,26 @@ function take_snapshot2() {
|
||||
stopCamera();
|
||||
}
|
||||
|
||||
function closeImage(type) {
|
||||
if (type === "image1") {
|
||||
$('#demoResult1').html('');
|
||||
$('#demoResult1').html('<button type="button" class="upload-image1"><p class="textUpload">بارگذاری عکس اول</p></button>');
|
||||
$('#demoResult1').removeAttr('style');
|
||||
} else if (type === "image2") {
|
||||
$('#demoResult2').html('');
|
||||
$('#demoResult2').html('<button type="button" class="upload-image2"><p class="textUpload">بارگذاری عکس دوم</p></button>');
|
||||
$('#demoResult2').removeAttr('style');
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('خطایی رخ داده است.');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
}
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
}
|
||||
|
||||
async function set() {
|
||||
let pic1 = $("#pic1").attr('src');
|
||||
@@ -315,7 +365,6 @@ async function set() {
|
||||
success: function (response) {
|
||||
let elapsedTime = Date.now() - startTime;
|
||||
let delay = Math.max(1000 - elapsedTime, 0);
|
||||
console.log(response);
|
||||
|
||||
setTimeout(function () {
|
||||
if (response.isSuccedded) {
|
||||
@@ -330,6 +379,20 @@ async function set() {
|
||||
$(`#TextUpload_${employeeId}`).text("عکس پرسنل آپلود شده است").removeClass('text-danger');
|
||||
$(`#TextUploadMobile_${employeeId}`).text("عکس پرسنل آپلود شده است").removeClass('text-danger');
|
||||
|
||||
if (!hasPicture) {
|
||||
$(`.btnAvticeAction_${employeeId}`)
|
||||
.removeClass('disable')
|
||||
.addClass('btn-deactive')
|
||||
.attr('id', `togglePersonnelStatus_${response.idRollCall}_desktop`);
|
||||
$(`.IsActiveStringFind_${employeeId}`).attr('id', `IsActiveString_${response.idRollCall}_desktop`).text("غیر فعال کردن");
|
||||
|
||||
$(`.btnAvticeActionMobile_${employeeId}`)
|
||||
.removeClass('disable')
|
||||
.addClass('btn-deactive')
|
||||
.attr('id', `togglePersonnelStatus_${response.idRollCall}_mobile`);
|
||||
$(`.IsActiveStringFindMobile_${employeeId}`).attr('id', `IsActiveString_${response.idRollCall}_mobile`).text("غیر فعال کردن");
|
||||
}
|
||||
|
||||
$(`#uploadMobileBTN_${employeeId}`).text("ویرایش عکس");
|
||||
$(`#uploadMobileBTNMobile_${employeeId}`).text("ویرایش عکس");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user