Print checkout bug fix - task counter bug fixed - RollCalEmployeeUpload HasEmployee metof aded
@@ -8,14 +8,7 @@ namespace _0_Framework.Application;
|
||||
|
||||
public static class Version
|
||||
{
|
||||
static Version()
|
||||
{
|
||||
StyleVersion = "2.12.23";
|
||||
AdminVersion = "2.5.43";
|
||||
CameraVersion = "1.0.13";
|
||||
}
|
||||
|
||||
public static string StyleVersion { get; set; }
|
||||
public static string AdminVersion { get; set; }
|
||||
public static string CameraVersion { get; set; }
|
||||
public static string StyleVersion => Guid.NewGuid().ToString();
|
||||
public static string AdminVersion => Guid.NewGuid().ToString();
|
||||
public static string CameraVersion => Guid.NewGuid().ToString();
|
||||
}
|
||||
@@ -1736,16 +1736,45 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
|
||||
public int OverdueTasksCount(long userId)
|
||||
{
|
||||
var account = _accountRepository.GetIncludePositions(userId);
|
||||
var positionValue = account.Position.PositionValue;
|
||||
DateTime now = DateTime.Now;
|
||||
var overdueTasksCount = _accountContext.Tasks.Include(x =>
|
||||
x.Assigns).Count(x => !x.Assigns.Any(a => a.IsCancel) && !x.Assigns.Any(a => a.IsCanceledRequest) && !x.Assigns.Any(a => a.IsDone) && !x.Assigns.Any(a => a.IsDoneRequest) && !x.Assigns.Any(a => a.TimeRequest)
|
||||
&& x.Assigns.Any(a => a.AssignedId == userId) && (x.Assigns.First(a => a.AssignedId == userId).EndTaskDate.Date <= DateTime.Now.Date));
|
||||
int overdueTasksCount;
|
||||
|
||||
if (positionValue == 1)
|
||||
{
|
||||
overdueTasksCount = _accountContext.Assigns.Include(x => x.Task).Where(x => x.AssignedId == userId &&
|
||||
x.AssignerId == userId && x.Task.Assigns.Count == 1 &&
|
||||
!x.IsCancel && !x.IsCanceledRequest &&
|
||||
!x.IsDone && !x.TimeRequest && !x.IsDoneRequest && x.EndTaskDate.Date <= DateTime.Now.Date)
|
||||
.GroupBy(x => x.TaskId).Select(x => x.First()).Count();
|
||||
|
||||
//overdueTasksCount = _accountContext.Tasks.Include(x =>
|
||||
// x.Assigns).Count(x => !x.Assigns.Any(a => a.IsCancel) && !x.Assigns.Any(a => a.IsCanceledRequest) &&
|
||||
// !x.Assigns.Any(a => a.IsDone) && !x.Assigns.Any(a => a.IsDoneRequest) &&
|
||||
// !x.Assigns.Any(a => a.TimeRequest)
|
||||
// && x.Assigns.Any(a => a.AssignedId == userId && a.AssignerId == userId) &&
|
||||
// (x.Assigns.First(a => a.AssignedId == userId && a.AssignerId == userId)
|
||||
// .EndTaskDate.Date <= DateTime.Now.Date) && x.Assigns.Count == 1);
|
||||
}
|
||||
|
||||
//overdueTasksCount = _accountContext.Tasks.Include(x =>
|
||||
// x.Assigns).Count(x => !x.Assigns.Any(a => a.IsCancel) && !x.Assigns.Any(a => a.IsCanceledRequest) &&
|
||||
// !x.Assigns.Any(a => a.IsDone) && !x.Assigns.Any(a => a.IsDoneRequest) &&
|
||||
// !x.Assigns.Any(a => a.TimeRequest)
|
||||
// && x.Assigns.Any(a => a.AssignedId == userId) &&
|
||||
// (x.Assigns.First(a => a.AssignedId == userId).EndTaskDate.Date <= DateTime.Now.Date));
|
||||
overdueTasksCount = _accountContext.Assigns.Include(x => x.Task).Where(x => x.AssignedId == userId &&
|
||||
!x.IsCancel && !x.IsCanceledRequest &&
|
||||
!x.IsDone && !x.TimeRequest && !x.IsDoneRequest && x.EndTaskDate.Date <= DateTime.Now.Date)
|
||||
.GroupBy(x => x.TaskId).Select(x => x.First()).Count();
|
||||
|
||||
|
||||
var overdueRequestsCount = _accountContext.Assigns.Include(x => x.Task)
|
||||
.Where(x => (x.IsCanceledRequest
|
||||
|| x.IsDoneRequest || x.TimeRequest) && !x.IsCancel && !x.IsDone &&
|
||||
x.Task.IsActiveString == "true" &&
|
||||
x.Task.SenderId == userId).GroupBy(x=>x.TaskId).Select(x=>x.First()).Count();
|
||||
x.Task.SenderId == userId).GroupBy(x => x.TaskId).Select(x => x.First()).Count();
|
||||
|
||||
return overdueTasksCount + overdueRequestsCount;
|
||||
}
|
||||
|
||||
36
Company.Domain/AndroidApkVersionAgg/AndroidApkVersion.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.AndroidApkVersionAgg;
|
||||
|
||||
public class AndroidApkVersion:EntityBase
|
||||
{
|
||||
private AndroidApkVersion () { }
|
||||
|
||||
public AndroidApkVersion( string versionName,string versionCode, IsActive isActive, string path)
|
||||
{
|
||||
|
||||
VersionName = versionName;
|
||||
VersionCode = versionCode;
|
||||
IsActive = isActive;
|
||||
Path = path;
|
||||
Title = $"Gozareshgir-{versionName}-{CreationDate:g}";
|
||||
}
|
||||
|
||||
public string Title { get; private set; }
|
||||
public string VersionName{ get; private set; }
|
||||
public string VersionCode{ get; private set; }
|
||||
public IsActive IsActive { get; private set; }
|
||||
public string Path { get; set; }
|
||||
|
||||
public void Active()
|
||||
{
|
||||
IsActive = IsActive.True;
|
||||
}
|
||||
|
||||
public void DeActive()
|
||||
{
|
||||
IsActive = IsActive.False;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework_b.Domain;
|
||||
|
||||
namespace Company.Domain.AndroidApkVersionAgg;
|
||||
|
||||
public interface IAndroidApkVersionRepository:IRepository<long,AndroidApkVersion>
|
||||
{
|
||||
IQueryable<AndroidApkVersion> GetActives();
|
||||
void Remove(AndroidApkVersion entity);
|
||||
System.Threading.Tasks.Task<string> GetLatestActiveVersionPath();
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public interface IRollCallEmployeeRepository : IRepository<long, RollCallEmploye
|
||||
#region Pooya
|
||||
|
||||
List<RollCallEmployeeViewModel> GetByEmployeeIdWithStatuses(long employeeId);
|
||||
bool HasEmployees(long workshopId);
|
||||
List<RollCallEmployeeViewModel> GetActivePersonnelByWorkshopId(long workshopId);
|
||||
List<RollCallEmployeeViewModel> GetEmployeeRollCalls(long workshopId);
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
|
||||
public interface IAndroidApkVersionApplication
|
||||
{
|
||||
Task<OperationResult> CreateAndActive(IFormFile file);
|
||||
Task<OperationResult> CreateAndDeActive(IFormFile file);
|
||||
Task<string> GetLatestActiveVersionPath();
|
||||
OperationResult Remove(long id);
|
||||
|
||||
bool HasAndroidApkToDownload();
|
||||
}
|
||||
@@ -22,6 +22,6 @@ public interface IRollCallEmployeeApplication
|
||||
|
||||
List<RollCallEmployeeViewModel> GetPersonnelRollCallListAll(long workshopId);
|
||||
|
||||
|
||||
bool HasEmployees(long workshopId);
|
||||
#endregion
|
||||
}
|
||||
134
CompanyManagment.Application/AndroidApkVersionApplication.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using AccountManagement.Domain.TaskAgg;
|
||||
using ApkReader;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class AndroidApkVersionApplication : IAndroidApkVersionApplication
|
||||
{
|
||||
private readonly IAndroidApkVersionRepository _androidApkVersionRepository;
|
||||
private readonly ITaskRepository _taskRepository;
|
||||
|
||||
public AndroidApkVersionApplication(IAndroidApkVersionRepository androidApkVersionRepository, ITaskRepository taskRepository)
|
||||
{
|
||||
_androidApkVersionRepository = androidApkVersionRepository;
|
||||
_taskRepository = taskRepository;
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateAndActive(IFormFile file)
|
||||
{
|
||||
OperationResult op = new OperationResult();
|
||||
|
||||
#region Validation
|
||||
if (file == null || file.Length == 0)
|
||||
return op.Failed("لطفا فایل خود را وارد کنید");
|
||||
|
||||
// Check if the uploaded file is an APK
|
||||
if (Path.GetExtension(file.FileName).ToLower() != ".apk")
|
||||
return op.Failed("لطفا فایلی با پسوند .apk وارد کنید");
|
||||
|
||||
#endregion
|
||||
|
||||
var activeApks = _androidApkVersionRepository.GetActives();
|
||||
|
||||
await activeApks.ExecuteUpdateAsync(setter => setter.SetProperty(e => e.IsActive, IsActive.False));
|
||||
_androidApkVersionRepository.SaveChanges();
|
||||
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Apk", "Android", "GozreshgirWebView");
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
|
||||
|
||||
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}.v{apk.VersionName}{Path.GetExtension(file.FileName)}";
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, uniqueFileName);
|
||||
|
||||
await using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
var entity = new AndroidApkVersion(apk.VersionName, apk.VersionCode, IsActive.True, filepath);
|
||||
_androidApkVersionRepository.Create(entity);
|
||||
_androidApkVersionRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateAndDeActive(IFormFile file)
|
||||
{
|
||||
OperationResult op = new OperationResult();
|
||||
|
||||
#region Validation
|
||||
if (file == null || file.Length == 0)
|
||||
return op.Failed("لطفا فایل خود را وارد کنید");
|
||||
|
||||
// Check if the uploaded file is an APK
|
||||
if (Path.GetExtension(file.FileName).ToLower() != ".apk")
|
||||
return op.Failed("لطفا فایلی با پسوند .apk وارد کنید");
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Apk", "Android", "GozreshgirWebView");
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
|
||||
|
||||
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}.v{apk.VersionName}{Path.GetExtension(file.FileName)}";
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, uniqueFileName);
|
||||
|
||||
await using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
var entity = new AndroidApkVersion(apk.VersionName, apk.VersionCode, IsActive.False, filepath);
|
||||
_androidApkVersionRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<string> GetLatestActiveVersionPath()
|
||||
{
|
||||
return await _androidApkVersionRepository.GetLatestActiveVersionPath();
|
||||
}
|
||||
|
||||
public OperationResult Remove(long id)
|
||||
{
|
||||
OperationResult op = new OperationResult();
|
||||
var entity = _androidApkVersionRepository.Get(id);
|
||||
if (entity == null)
|
||||
return op.Failed("چنین آیتمی وجود ندارد");
|
||||
var path = entity.Path;
|
||||
|
||||
|
||||
_androidApkVersionRepository.Remove(entity);
|
||||
|
||||
_androidApkVersionRepository.SaveChanges();
|
||||
if (System.IO.File.Exists(path))
|
||||
{
|
||||
System.IO.File.Delete(path);
|
||||
}
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public bool HasAndroidApkToDownload()
|
||||
{
|
||||
return _androidApkVersionRepository.Exists(x => x.IsActive == IsActive.True);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,10 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ApkReader" Version="2.0.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\0_Framework\0_Framework.csproj" />
|
||||
<ProjectReference Include="..\Company.Domain\Company.Domain.csproj" />
|
||||
|
||||
@@ -155,6 +155,12 @@ public class RollCallEmployeeApplication : IRollCallEmployeeApplication
|
||||
{
|
||||
return _rollCallEmployeeRepository.GetPersonnelRollCallListAll(workshopId);
|
||||
}
|
||||
|
||||
public bool HasEmployees(long workshopId)
|
||||
{
|
||||
return _rollCallEmployeeRepository.HasEmployees(workshopId);
|
||||
}
|
||||
|
||||
public OperationResult ChangeEmployeeRollCallName(long rollCallEmployeeId, string fName, string lName)
|
||||
{
|
||||
OperationResult result = new();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Company.Domain.BillAgg;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using Company.Domain.BillAgg;
|
||||
using Company.Domain.Board;
|
||||
using Company.Domain.BoardType;
|
||||
using Company.Domain.ChapterAgg;
|
||||
@@ -155,8 +156,13 @@ public class CompanyContext : DbContext
|
||||
public DbSet<SalaryAid> SalaryAids { get; set; }
|
||||
|
||||
public DbSet<Reward> Rewards { get; set; }
|
||||
#endregion
|
||||
public DbSet<CustomizeCheckout> CustomizeCheckouts { get; set; }
|
||||
|
||||
public DbSet<AndroidApkVersion> AndroidApkVersions { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public DbSet<CustomizeCheckout> CustomizeCheckouts { get; set; }
|
||||
public DbSet<TaxLeftWorkItem> TaxLeftWorkItems { get; set; }
|
||||
public DbSet<TaxLeftWorkCategory> TaxLeftWorkCategories { get; set; }
|
||||
public DbSet<TaxJobCategory> TaxJobCategories { get; set; }
|
||||
|
||||
28
CompanyManagment.EFCore/Mapping/AndroidApkVersionMapping.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using _0_Framework.Domain.CustomizeCheckoutValueObjects;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Hosting.Builder;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class AndroidApkVersionMapping:IEntityTypeConfiguration<AndroidApkVersion>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<AndroidApkVersion> builder)
|
||||
{
|
||||
builder.ToTable("AndroidApkVersions");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x=>x.IsActive).HasConversion(
|
||||
v => v.ToString("d"),
|
||||
v => (IsActive)Enum.Parse(typeof(IsActive), v)).HasMaxLength(1);
|
||||
|
||||
builder.Property(x => x.Title).HasMaxLength(50);
|
||||
builder.Property(x => x.VersionCode).HasMaxLength(20);
|
||||
builder.Property(x => x.VersionName).HasMaxLength(35);
|
||||
builder.Property(x => x.Path).HasMaxLength(255);
|
||||
|
||||
}
|
||||
}
|
||||
7602
CompanyManagment.EFCore/Migrations/20241029154919_AndroidApk.Designer.cs
generated
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AndroidApk : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AndroidApkVersions",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
VersionName = table.Column<string>(type: "nvarchar(35)", maxLength: 35, nullable: true),
|
||||
VersionCode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
IsActive = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false),
|
||||
Path = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AndroidApkVersions", x => x.id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AndroidApkVersions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,43 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Company.Domain.AndroidApkVersionAgg.AndroidApkVersion", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("IsActive")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1)
|
||||
.HasColumnType("nvarchar(1)");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("nvarchar(255)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VersionCode")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<string>("VersionName")
|
||||
.HasMaxLength(35)
|
||||
.HasColumnType("nvarchar(35)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("AndroidApkVersions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.BillAgg.EntityBill", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class AndroidApkVersionRepository:RepositoryBase<long, AndroidApkVersion>,IAndroidApkVersionRepository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
public AndroidApkVersionRepository( CompanyContext companyContext) : base(companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
}
|
||||
|
||||
public IQueryable<AndroidApkVersion> GetActives()
|
||||
{
|
||||
return _companyContext.AndroidApkVersions.Where(x => x.IsActive == IsActive.True);
|
||||
}
|
||||
|
||||
public async Task<string> GetLatestActiveVersionPath()
|
||||
{
|
||||
return (await _companyContext.AndroidApkVersions.OrderByDescending(x=>x.CreationDate).FirstOrDefaultAsync(x => x.IsActive == IsActive.True)).Path;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
@@ -17,8 +18,9 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
||||
private readonly CompanyContext _context;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private IRollCallEmployeeRepository _rollCallEmployeeRepositoryImplementation;
|
||||
|
||||
public RollCallEmployeeRepository(CompanyContext context, IPasswordHasher passwordHasher, IWebHostEnvironment webHostEnvironment) : base(context)
|
||||
public RollCallEmployeeRepository(CompanyContext context, IPasswordHasher passwordHasher, IWebHostEnvironment webHostEnvironment) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
_passwordHasher = passwordHasher;
|
||||
@@ -65,137 +67,96 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
||||
HasUploadedImage = x.HasUploadedImage
|
||||
}).FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<RollCallEmployeeViewModel> GetPersonnelRollCallListPaginate(RollCallEmployeeSearchModel command)
|
||||
{
|
||||
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))).OrderByDescending(x => x.id).AsQueryable().AsSplitQuery();
|
||||
if (!string.IsNullOrWhiteSpace(command.Name))
|
||||
rawQuery = rawQuery.Where(x => (x.FName + " " + x.LName).Contains(command.Name));
|
||||
|
||||
public List<RollCallEmployeeViewModel> GetPersonnelRollCallListPaginate(RollCallEmployeeSearchModel command)
|
||||
{
|
||||
var dateNow = DateTime.Now;
|
||||
var employeesQuery = _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))).OrderByDescending(x => x.id);
|
||||
var rollCallEmployees = _context.RollCallEmployees.Where(x => x.WorkshopId == command.WorkshopId);
|
||||
|
||||
|
||||
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 = 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();
|
||||
list.ForEach(x =>
|
||||
{
|
||||
|
||||
x.EmployeeSlug = _passwordHasher.SlugHasher(x.EmployeeId);
|
||||
if (x.HasUploadedImage == "true")
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", command.WorkshopId.ToString(), x.EmployeeId.ToString());
|
||||
var thumbnailPath = Path.Combine(path, "Thumbnail.jpg");
|
||||
if (System.IO.File.Exists(path))
|
||||
{
|
||||
var bytes = System.IO.File.ReadAllBytes(thumbnailPath);
|
||||
var image = Convert.ToBase64String(bytes);
|
||||
x.ImagePath = image;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var thumbnail = Tools.ResizeImage(Path.Combine(path, "1.jpg"), 150, 150);
|
||||
System.IO.File.WriteAllBytes(thumbnailPath, Convert.FromBase64String(thumbnail));
|
||||
x.ImagePath = thumbnail;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//rawQuery = rawQuery.Where(x => rollCallEmployees.Any(y => y.EmployeeId == x.id));
|
||||
|
||||
var joinedQuery = from employee in employeesQuery
|
||||
join rollCallEmployee in rollCallEmployees
|
||||
on employee.id equals rollCallEmployee.EmployeeId into grp
|
||||
from joinedRollCall in grp.DefaultIfEmpty()
|
||||
select new RollCallEmployeeViewModel()
|
||||
{
|
||||
WorkshopId = command.WorkshopId,
|
||||
EmployeeId = employee.id,
|
||||
Id = joinedRollCall == null ? 0 : joinedRollCall.id,
|
||||
EmployeeFullName = joinedRollCall == null ? employee.FullName : joinedRollCall.EmployeeFullName,
|
||||
NationalCode = employee.NationalCode,
|
||||
IsActiveString = joinedRollCall == null ? "false" : joinedRollCall.IsActiveString,
|
||||
HasUploadedImage = joinedRollCall == null ? "false" : joinedRollCall.HasUploadedImage
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//var joinedQuery = from e in employeesQuery
|
||||
// join r in rollCallEmployees on e.id equals r.EmployeeId into er
|
||||
// from rollCallEmployee in er.DefaultIfEmpty()
|
||||
// select new RollCallEmployeeViewModel
|
||||
// {
|
||||
// WorkshopId = command.WorkshopId,
|
||||
// EmployeeId = e.id,
|
||||
// Id = rollCallEmployee?.id ?? 0,
|
||||
// EmployeeFullName = rollCallEmployee == null ? e.FullName : rollCallEmployee.EmployeeFullName,
|
||||
// NationalCode = e.NationalCode,
|
||||
// IsActiveString = rollCallEmployee == null ? "false" : rollCallEmployee.IsActiveString,
|
||||
// HasUploadedImage = rollCallEmployee == null ? "false" : rollCallEmployee.HasUploadedImage
|
||||
// };
|
||||
|
||||
//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();
|
||||
|
||||
|
||||
//IQueryable<RollCallEmployeeViewModel> joinedQuery = employeesQuery.Select(x => {
|
||||
// var rollCallEmployee = rollCallEmployees.FirstOrDefault(r => r.EmployeeId == x.id);
|
||||
// return new RollCallEmployeeViewModel
|
||||
// {
|
||||
// WorkshopId = command.WorkshopId,
|
||||
// EmployeeId = x.id,
|
||||
// Id = rollCallEmployee?.id ?? 0,
|
||||
// EmployeeFullName = rollCallEmployee == null ? x.FullName : rollCallEmployee.EmployeeFullName,
|
||||
// NationalCode = x.NationalCode,
|
||||
// IsActiveString = rollCallEmployee == null ? "false" : rollCallEmployee.IsActiveString,
|
||||
// HasUploadedImage = rollCallEmployee == null ? "false" : rollCallEmployee.HasUploadedImage
|
||||
// };
|
||||
//});
|
||||
var joinedEnumerable = joinedQuery.AsSplitQuery().AsEnumerable();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(command.Name))
|
||||
joinedEnumerable = joinedEnumerable.Where(x => x.EmployeeFullName.Contains(command.Name));
|
||||
var list = joinedEnumerable.OrderBy(x=>x.PersonelCode).ThenBy(x=>x.IsActiveString!="true").Skip(command.PageIndex).Take(30).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
//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))).OrderByDescending(x => x.id).Skip(command.PageIndex).Take(30);
|
||||
|
||||
//var rollCallEmployees = _context.RollCallEmployees.Where(x => x.WorkshopId == command.WorkshopId);
|
||||
//if (!string.IsNullOrWhiteSpace(command.Name))
|
||||
// rollCallEmployees = rollCallEmployees.Where(x => x.EmployeeFullName.Contains(command.Name));
|
||||
|
||||
//rawQuery = rawQuery.Where(x => rollCallEmployees.Any(y => y.EmployeeId == x.id));
|
||||
//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 = employee.id,
|
||||
// Id = joinedRollCall == null ? 0 : joinedRollCall.id,
|
||||
// EmployeeFullName = joinedRollCall.EmployeeFullName,
|
||||
// NationalCode = employee.NationalCode,
|
||||
// IsActiveString = joinedRollCall == null ? "false" : joinedRollCall.IsActiveString,
|
||||
// HasUploadedImage = joinedRollCall == null ? "false" : joinedRollCall.HasUploadedImage
|
||||
// };
|
||||
//var list = joinedQuery.AsSplitQuery().ToList();
|
||||
|
||||
|
||||
//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.OrderBy(x => x.PersonelCode).ToList();
|
||||
|
||||
}
|
||||
|
||||
public RollCallEmployee GetWithRollCallStatus(long id)
|
||||
public RollCallEmployee GetWithRollCallStatus(long id)
|
||||
{
|
||||
return _context.RollCallEmployees.Include(x => x.EmployeesStatus)
|
||||
.FirstOrDefault(x => x.id == id);
|
||||
@@ -229,7 +190,20 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
||||
}).ToList(); ;
|
||||
}
|
||||
|
||||
public List<RollCallEmployeeViewModel> GetActivePersonnelByWorkshopId(long workshopId)
|
||||
public bool HasEmployees(long workshopId)
|
||||
{
|
||||
var dateNow = DateTime.Now;
|
||||
return _context.Employees.Include(x => x.LeftWorks).Include(x => x.LeftWorkInsurances)
|
||||
.Any(x => x.LeftWorks.Any(y =>
|
||||
y.WorkshopId == workshopId && y.StartWorkDate <= dateNow &&
|
||||
y.LeftWorkDate > dateNow) ||
|
||||
x.LeftWorkInsurances.Any(y =>
|
||||
y.WorkshopId == workshopId && y.StartWorkDate <= dateNow &&
|
||||
(y.LeftWorkDate > dateNow || y.LeftWorkDate == null)));
|
||||
|
||||
}
|
||||
|
||||
public List<RollCallEmployeeViewModel> GetActivePersonnelByWorkshopId(long workshopId)
|
||||
{
|
||||
var rollCallEmployees = _context.RollCallEmployees.Where(x => x.WorkshopId == workshopId
|
||||
&& x.IsActiveString == "true" && x.HasUploadedImage == "true");
|
||||
|
||||
@@ -178,6 +178,8 @@ using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
using CompanyManagment.App.Contracts.SalaryAid;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
|
||||
namespace PersonalContractingParty.Config;
|
||||
|
||||
@@ -382,12 +384,16 @@ public class PersonalBootstrapper
|
||||
|
||||
services.AddTransient<IRewardApplication, RewardApplication>();
|
||||
services.AddTransient<IRewardRepository, RewardRepository>();
|
||||
#endregion
|
||||
//=========End Of Main====================================
|
||||
|
||||
//---File Project------------------------------------
|
||||
|
||||
services.AddTransient<IBoardApplication, BoardApplication>();
|
||||
services.AddTransient<IAndroidApkVersionRepository, AndroidApkVersionRepository>();
|
||||
services.AddTransient<IAndroidApkVersionApplication, AndroidApkVersionApplication>();
|
||||
#endregion
|
||||
//=========End Of Main====================================
|
||||
|
||||
//---File Project------------------------------------
|
||||
|
||||
services.AddTransient<IBoardApplication, BoardApplication>();
|
||||
services.AddTransient<IBoardRepository, BoardRepository>();
|
||||
|
||||
services.AddTransient<IFileApplication, FileApplication>();
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="309" class="check-btn"> <span style="bottom: 2px;position: relative"> مزد سنوات بیمه </span> </label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="311" class="check-btn"> <span style="bottom: 2px;position: relative"> مزد سنوات بیمه </span> </label>
|
||||
|
||||
</div>
|
||||
@* مزد سنوات بیمه*@
|
||||
@@ -536,12 +536,19 @@
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="306" class="check-btn"> <span style="bottom: 2px;position: relative"> مدیریت کاربران </span> </label>
|
||||
</div>
|
||||
@* تشخیص چهره *@
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="308" class="check-btn"> <span style="bottom: 2px;position: relative"> تشخیص چهره </span> </label>
|
||||
</div>
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="308" class="check-btn"> <span style="bottom: 2px;position: relative"> تشخیص چهره </span> </label>
|
||||
</div>
|
||||
@* گزارشات *@
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="309" class="check-btn"> <span style="bottom: 2px;position: relative"> گزارشات </span> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* پرونده *@
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="309" class="check-btn"> <span style="bottom: 2px;position: relative"> مزد سنوات </span> </label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="311" class="check-btn"> <span style="bottom: 2px;position: relative"> مزد سنوات </span> </label>
|
||||
|
||||
</div>
|
||||
@* مزد سنوات بیمه*@
|
||||
@@ -539,12 +539,19 @@
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="306" class="check-btn"> <span style="bottom: 2px;position: relative"> مدیریت کاربران </span> </label>
|
||||
</div>
|
||||
@* تشخیص چهره *@
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="308" class="check-btn"> <span style="bottom: 2px;position: relative"> تشخیص چهره </span> </label>
|
||||
</div>
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="308" class="check-btn"> <span style="bottom: 2px;position: relative"> تشخیص چهره </span> </label>
|
||||
</div>
|
||||
@* گزارشات *@
|
||||
<div class="child-check level2">
|
||||
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="309" class="check-btn"> <span style="bottom: 2px;position: relative"> گزارشات </span> </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* پرونده *@
|
||||
|
||||
@@ -400,9 +400,9 @@
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork صدیقه محمدنژاداسطلخ جان</span><span> </span>
|
||||
<span>@Model.LastDayOfWork </span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate 1359/07/01</span><span> </span>
|
||||
<span>@Model.LeftWorkDate </span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -399,9 +399,9 @@
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork صدیقه محمدنژاداسطلخ جان</span><span> </span>
|
||||
<span>@Model.LastDayOfWork</span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate 1359/07/01</span><span> </span>
|
||||
<span>@Model.LeftWorkDate</span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -366,6 +366,7 @@
|
||||
</script>*@
|
||||
|
||||
<script>
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function () { };
|
||||
$(document).ready(function () {
|
||||
$(".select-city").select2({
|
||||
language: "fa",
|
||||
|
||||
@@ -52,15 +52,26 @@
|
||||
<div id="sidebar-menu">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a asp-page="/Index" class="waves-effect btnDashboard">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> پیشخان </span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a asp-page="/Index" class="waves-effect btnDashboard">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> پیشخان </span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@if (User.Claims.FirstOrDefault(x => x.Type == "AccountId")?.Value== "2"){
|
||||
|
||||
<li>
|
||||
<a asp-area="AdminNew" asp-page="/Company/AndroidApk/Index" class="waves-effect btnDashboard">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> آپلود اپلیکیشن </span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
<li class="has_sub" permission="100">
|
||||
<a class="waves-effect MainMenuItem">
|
||||
<div class="menuTitle">
|
||||
@@ -166,13 +177,13 @@
|
||||
</svg>
|
||||
مقادیر سالانه </a>
|
||||
</li>
|
||||
<li permission="302"><a class="clik3" asp-page="/Company/ClassifiedSalary/Index">
|
||||
<li permission="311"><a class="clik3" asp-page="/Company/ClassifiedSalary/Index">
|
||||
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
|
||||
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
|
||||
</svg>
|
||||
مزد سنوات</a>
|
||||
</li>
|
||||
<li permission="302"><a class="clik3" asp-page="/Company/InsuranceYearlySalary/Index">
|
||||
<li permission="310"><a class="clik3" asp-page="/Company/InsuranceYearlySalary/Index">
|
||||
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
|
||||
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
|
||||
</svg>
|
||||
@@ -208,7 +219,7 @@
|
||||
</svg>
|
||||
تشخیص چهره </a>
|
||||
</li>
|
||||
<li permission="306"><a class="clik3" asp-page="/Company/Reports/Index">
|
||||
<li permission="309"><a class="clik3" asp-page="/Company/Reports/Index">
|
||||
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
|
||||
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
|
||||
</svg>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk.IndexModel
|
||||
@{
|
||||
ViewData["Title"] = "File Upload";
|
||||
}
|
||||
|
||||
<h1>Upload File</h1>
|
||||
<form asp-page-handler="Upload" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label asp-for="File">Choose a file:</label>
|
||||
<input asp-for="File" type="file" required>
|
||||
</div>
|
||||
<button type="submit">Upload</button>
|
||||
</form>
|
||||
|
||||
@if (ViewData["message"] != null)
|
||||
{
|
||||
<p>@ViewData["message"]</p>
|
||||
}
|
||||
|
||||
@* <script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#fileUploadForm').submit(function(e) {
|
||||
e.preventDefault(); // Prevent the default form submission
|
||||
|
||||
// Create FormData object
|
||||
var formData = new FormData();
|
||||
var fileInput = $('#FormFile')[0]; // Use the first element of the jQuery object
|
||||
|
||||
// Check if a file was selected
|
||||
if (fileInput.files.length === 0) {
|
||||
alert("Please select a file!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Append the file to the FormData object
|
||||
formData.append('file', fileInput.files[0]);
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false, // Prevent jQuery from automatically transforming the data into a query string
|
||||
contentType: false, // Tell jQuery not to set the content type
|
||||
url: `@Url.Page("./index", "Upload")`,
|
||||
headers: {
|
||||
"RequestVerificationToken": `@Html.AntiForgeryToken()`
|
||||
},
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
alert("File uploaded successfully!");
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script> *@
|
||||
@@ -0,0 +1,32 @@
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
||||
{
|
||||
[Authorize]
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IAndroidApkVersionApplication _application;
|
||||
|
||||
[BindProperty]
|
||||
public IFormFile File { get; set; }
|
||||
|
||||
public IndexModel(IAndroidApkVersionApplication application)
|
||||
{
|
||||
_application = application;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostUpload()
|
||||
{
|
||||
var result = await _application.CreateAndActive(File);
|
||||
ViewData["message"] = result.Message;
|
||||
return Page();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -378,9 +378,9 @@
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork صدیقه محمدنژاداسطلخ جان</span><span> </span>
|
||||
<span>@Model.LastDayOfWork</span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate 1359/07/01</span><span> </span>
|
||||
<span>@Model.LeftWorkDate</span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -365,9 +365,9 @@
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork صدیقه محمدنژاداسطلخ جان</span><span> </span>
|
||||
<span>@Model.LastDayOfWork</span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate 1359/07/01</span><span> </span>
|
||||
<span>@Model.LeftWorkDate</span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -56,13 +56,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
|
||||
MaxPersonValid = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId).MaxPersonValid;
|
||||
|
||||
var distinctEmployees = _rollCallEmployeeApplication.GetPersonnelRollCallListPaginate(new RollCallEmployeeSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
PageIndex = 0
|
||||
});
|
||||
|
||||
HasEmployees = distinctEmployees.Count > 0 ? true : false;
|
||||
|
||||
HasEmployees = _rollCallEmployeeApplication.HasEmployees(workshopId);
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,48 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model ServiceHost.Areas.Client.Pages.IndexModel
|
||||
@{
|
||||
<style>
|
||||
.btn-download-android {
|
||||
width: 100%;
|
||||
height: 76px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(-45deg, #30c1c1, #14b8a6, #059669, #0e7490);
|
||||
background-size: 600%;
|
||||
-webkit-animation: anime 16s linear infinite;
|
||||
animation: anime 16s linear infinite;
|
||||
}
|
||||
|
||||
.btn-download-android .btn-title {
|
||||
color: rgba(255,255,255,0.9);
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
padding: 0 6px 0 0;
|
||||
}
|
||||
|
||||
@@-webkit-keyframes anime {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
@@keyframes anime {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
@@ -46,7 +88,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.HasApkToDownload)
|
||||
{
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-3 col-xl-3 col-xxl-3 mt-3 d-md-none d-block">
|
||||
<div class="card p-0">
|
||||
<div class="card-section-btn bg-white">
|
||||
<div class="content btn-group">
|
||||
<a href="/apk/android" type="button" class="btn-download-android d-flex align-items-center justify-content-center">
|
||||
<svg width="30" height="30" fill="#ffffff" viewBox="-1 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
||||
<g id="SVGRepo_iconCarrier">
|
||||
<path d="m3.751.61 13.124 7.546-2.813 2.813zm-2.719-.61 12.047 12-12.046 12c-.613-.271-1.033-.874-1.033-1.575 0-.023 0-.046.001-.068v.003-20.719c-.001-.019-.001-.042-.001-.065 0-.701.42-1.304 1.022-1.571l.011-.004zm19.922 10.594c.414.307.679.795.679 1.344 0 .022 0 .043-.001.065v-.003c.004.043.007.094.007.145 0 .516-.25.974-.636 1.258l-.004.003-2.813 1.593-3.046-2.999 3.047-3.047zm-17.203 12.796 10.312-10.359 2.813 2.813z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<p class="btn-title text-nowrap m-0">دانلود اپلیکشن</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl-4 mt-3">
|
||||
<div class="card p-0">
|
||||
<div class="card-section-btn" id="btnCardLeaveIntro">
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Security.Claims;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using CompanyManagment.App.Contracts.ClientDashboard;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.HolidayItem;
|
||||
@@ -34,6 +35,7 @@ namespace ServiceHost.Areas.Client.Pages
|
||||
private readonly IHolidayItemApplication _holidayItemApplication;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
public string profilePicture { get; set; }
|
||||
public string AccountFullName { get; set; }
|
||||
public List<CalenderViewModel> CalenderViewModels;
|
||||
@@ -45,14 +47,15 @@ namespace ServiceHost.Areas.Client.Pages
|
||||
public List<LeaveMainViewModel> LeaveSearch;
|
||||
public string workshopId { get; set; }
|
||||
public int PageIndex;
|
||||
|
||||
public IndexModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ILeaveApplication leaveApplication, IEmployeeApplication employeeApplication, IPaymentToEmployeeItemApplication paymentToEmployeeItemApplication, IPaymentToEmployeeApplication paymentToEmployeeApplication, IHolidayItemApplication holidayItemApplication)
|
||||
public bool HasApkToDownload { get; set; }
|
||||
public IndexModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ILeaveApplication leaveApplication, IEmployeeApplication employeeApplication, IPaymentToEmployeeItemApplication paymentToEmployeeItemApplication, IPaymentToEmployeeApplication paymentToEmployeeApplication, IHolidayItemApplication holidayItemApplication, IAndroidApkVersionApplication androidApkVersionApplication)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_paymentToEmployeeItemApplication = paymentToEmployeeItemApplication;
|
||||
_paymentToEmployeeApplication = paymentToEmployeeApplication;
|
||||
_holidayItemApplication = holidayItemApplication;
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
_leaveApplication = leaveApplication;
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
@@ -63,7 +66,7 @@ namespace ServiceHost.Areas.Client.Pages
|
||||
profilePicture = _authHelper.CurrentAccountInfo().ProfilePhoto;
|
||||
AccountFullName = _authHelper.CurrentAccountInfo().Fullname;
|
||||
var todayGr = DateTime.Now;
|
||||
|
||||
HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload();
|
||||
#region TodayDate
|
||||
|
||||
var todayFa = todayGr.ToFarsi();
|
||||
|
||||
BIN
ServiceHost/Faces/11/1/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
ServiceHost/Faces/11/2008/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
ServiceHost/Faces/11/3056/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
ServiceHost/Faces/11/3857/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
ServiceHost/Faces/11/41289/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
ServiceHost/Faces/11/41604/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
ServiceHost/Faces/11/42203/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
ServiceHost/Faces/11/42326/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
ServiceHost/Faces/11/42962/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
ServiceHost/Faces/11/42964/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
ServiceHost/Faces/11/42966/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
ServiceHost/Faces/11/42986/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
ServiceHost/Faces/11/7317/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
ServiceHost/Faces/11/7371/Thumbnail.jpg
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
21
ServiceHost/Pages/Apk/AndroidApk.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace ServiceHost.Pages.Apk;
|
||||
|
||||
public class AndroidApk : Controller
|
||||
{
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
|
||||
public AndroidApk(IAndroidApkVersionApplication androidApkVersionApplication)
|
||||
{
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
}
|
||||
|
||||
[Route("Apk/Android")]
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var path = await _androidApkVersionApplication.GetLatestActiveVersionPath();
|
||||
return PhysicalFile(path,"application/vnd.android.package-archive","Gozareshgir.apk");
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,21 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.HasApkToDownload)
|
||||
{
|
||||
<div class="position-fixed d-md-none d-block" style="bottom:18px;">
|
||||
<a href="/apk/android" type="button" class="btn-login d-block mx-auto w-100 text-white px-3 py-2 d-flex align-items-center">
|
||||
<svg width="18" height="18" fill="#ffffff" viewBox="-1 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
||||
<g id="SVGRepo_iconCarrier">
|
||||
<path d="m3.751.61 13.124 7.546-2.813 2.813zm-2.719-.61 12.047 12-12.046 12c-.613-.271-1.033-.874-1.033-1.575 0-.023 0-.046.001-.068v.003-20.719c-.001-.019-.001-.042-.001-.065 0-.701.42-1.304 1.022-1.571l.011-.004zm19.922 10.594c.414.307.679.795.679 1.344 0 .022 0 .043-.001.065v-.003c.004.043.007.094.007.145 0 .516-.25.974-.636 1.258l-.004.003-2.813 1.593-3.046-2.999 3.047-3.047zm-17.203 12.796 10.312-10.359 2.813 2.813z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<span class="mx-1">دانلود اپلیکشن</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Security.Claims;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using CompanyManagment.EFCore;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
|
||||
|
||||
namespace ServiceHost.Pages
|
||||
@@ -25,6 +26,8 @@ namespace ServiceHost.Pages
|
||||
[BindProperty]
|
||||
public string CaptchaResponse { get; set; }
|
||||
|
||||
public bool HasApkToDownload { get; set; }
|
||||
|
||||
private static Timer aTimer;
|
||||
public Login login;
|
||||
public AccountViewModel Search;
|
||||
@@ -36,7 +39,8 @@ namespace ServiceHost.Pages
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly ICameraAccountApplication _cameraAccountApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
public IndexModel(ILogger<IndexModel> logger, IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha, ISmsService smsService, IWorker worker, IAuthHelper authHelper, ICameraAccountApplication cameraAccountApplication, IWebHostEnvironment webHostEnvironment)
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
public IndexModel(ILogger<IndexModel> logger, IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha, ISmsService smsService, IWorker worker, IAuthHelper authHelper, ICameraAccountApplication cameraAccountApplication, IWebHostEnvironment webHostEnvironment, IAndroidApkVersionApplication androidApkVersionApplication)
|
||||
{
|
||||
_logger = logger;
|
||||
_accountApplication = accountApplication;
|
||||
@@ -46,12 +50,13 @@ namespace ServiceHost.Pages
|
||||
_authHelper = authHelper;
|
||||
_cameraAccountApplication = cameraAccountApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
}
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
|
||||
if (User.Identity is { IsAuthenticated: true })
|
||||
HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload();
|
||||
if (User.Identity is { IsAuthenticated: true })
|
||||
{
|
||||
if (User.FindFirstValue("IsCamera") == "true")
|
||||
{
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Areas\AdminNew\Pages\Company\AndroidApk\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\ContractingParties\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employees\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employers\Index.cshtml" />
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 436 KiB |
|
Before Width: | Height: | Size: 631 KiB |
|
Before Width: | Height: | Size: 377 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 378 KiB |
@@ -10,12 +10,17 @@
|
||||
"ConnectionStrings": {
|
||||
//تست
|
||||
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
|
||||
|
||||
|
||||
//server
|
||||
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
|
||||
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
|
||||
//local
|
||||
"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
|
||||
// "MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
|
||||
|
||||
|
||||
//teamwork
|
||||
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_dbTeamwork;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
|
||||
},
|
||||
"GoogleRecaptchaV3": {
|
||||
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",
|
||||
|
||||
@@ -99,7 +99,7 @@ $(document).ready(function () {
|
||||
|
||||
$('.btn-search-click').click(function () {
|
||||
|
||||
if ($('#StartDate').val().trim() !=='' && validDate === false) {
|
||||
if ($('#StartDate').val().trim() !== '' && validDate === false) {
|
||||
$('.date').addClass('errored');
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا تاریخ را بصورت صحیح وارد کنید.');
|
||||
@@ -273,8 +273,8 @@ function caseHistoryLoadAjax() {
|
||||
|
||||
$.each(caseHistoryEmployeeData.rollCalls, function (i, item) {
|
||||
|
||||
html += `
|
||||
<div class="Rtable-row align-items-center position-relative openAction ${caseHistoryEmployeeData.rollCalls.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryEmployeeData.rollCalls.length-1 ? "lastRadius" : ""} ${item.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!item.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
|
||||
html += `
|
||||
<div class="Rtable-row align-items-center position-relative openAction ${caseHistoryEmployeeData.rollCalls.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryEmployeeData.rollCalls.length - 1 ? "lastRadius" : ""} ${item.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!item.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
@@ -323,39 +323,39 @@ function caseHistoryLoadAjax() {
|
||||
|
||||
<div class="Rtable-cell width5 position-relative bg-filter text-center d-none d-md-block">`;
|
||||
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.startDate ?? `-`}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
html += `</div>
|
||||
|
||||
<div class="Rtable-cell width6 position-relative bg-filter text-center d-none d-md-block">`;
|
||||
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.endDate ?? `-`}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
html += `</div>
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center h-100">
|
||||
@@ -369,29 +369,6 @@ function caseHistoryLoadAjax() {
|
||||
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
|
||||
<div class="d-flex ms-1">${item.totalWorkingHours}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell position-relative width8 bg-filter d-none d-md-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center h-100">
|
||||
<div class="d-md-none d-none">عملیات: </div>
|
||||
<button data-edit-id="${item.id}" class="btn-edit position-relative d-md-block d-none">
|
||||
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1" />
|
||||
</svg>
|
||||
<span class="mx-1">ویرایش</span>
|
||||
</button>
|
||||
|
||||
<button data-remove-id="${item.id}" type="button" class="btn-delete removeReward d-md-block d-none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="width3 d-block d-md-none" style="width:1% !important;border-right: 1px dashed #CACACA;padding: 0 20px 0 7px;">-</div>`;
|
||||
@@ -433,8 +410,8 @@ function caseHistoryLoadAjax() {
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
if (!(!item.hasLeave && item.isAbsent)) {
|
||||
html += `<div class="operation-div d-md-none d-block w-100">
|
||||
if (!(!item.hasLeave && item.isAbsent)) {
|
||||
html += `<div class="operation-div d-md-none d-block w-100">
|
||||
<div class="operations-btns rollcall-operations-mobile">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-6">
|
||||
@@ -465,35 +442,12 @@ function caseHistoryLoadAjax() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-12 mt-2">
|
||||
<div class="d-flex">
|
||||
<button data-edit-id="${item.id}" class="btn-edit position-relative d-md-none d-flex justify-content-center align-items-center" style="width:100%">
|
||||
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1" />
|
||||
</svg>
|
||||
<span class="mx-1 d-block" style="color: #009EE2;">ویرایش</span>
|
||||
</button>
|
||||
<button data-remove-id="${item.id}" type="button" class="btn-delete removeReward d-md-none d-flex justify-content-center align-items-center" style="width:100%">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1 d-block" style="color: #FF5151;">حذف</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//dateIndex++;
|
||||
dateEmployeeIndex = caseHistoryEmployeeData.dateIndex;
|
||||
@@ -524,8 +478,8 @@ function caseHistoryLoadAjax() {
|
||||
|
||||
$.each(caseHistoryData.activeEmployees, function (i, item) {
|
||||
|
||||
html += `
|
||||
<div class="Rtable-row align-items-center position-relative openAction ${caseHistoryData.activeEmployees.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryData.activeEmployees.length-1 ? "lastRadius" : ""} ${caseHistoryData.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!caseHistoryData.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
|
||||
html += `
|
||||
<div class="Rtable-row align-items-center position-relative openAction ${caseHistoryData.activeEmployees.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryData.activeEmployees.length - 1 ? "lastRadius" : ""} ${caseHistoryData.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!caseHistoryData.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
@@ -560,39 +514,39 @@ function caseHistoryLoadAjax() {
|
||||
|
||||
<div class="Rtable-cell width5 position-relative bg-filter text-center d-none d-md-block h-100">`;
|
||||
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.startDate ?? `-`}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت ورود</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
html += `</div>
|
||||
|
||||
<div class="Rtable-cell width6 position-relative bg-filter text-center d-none d-md-block h-100">`;
|
||||
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.endDate ?? `-`}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
});
|
||||
} else {
|
||||
html += `<div class="Rtable-cell--heading d-md-none d-none">ساعت خروج</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
html += `</div>
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center h-100">
|
||||
@@ -606,73 +560,50 @@ function caseHistoryLoadAjax() {
|
||||
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
|
||||
<div class="d-flex ms-1">${item.totalWorkingHours}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell position-relative width9 bg-filter d-none d-md-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center h-100">
|
||||
<div class="d-md-none d-none">عملیات: </div>
|
||||
<button data-edit-id="${item.id}" class="btn-edit position-relative d-md-block d-none">
|
||||
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1" />
|
||||
</svg>
|
||||
<span class="mx-1">ویرایش</span>
|
||||
</button>
|
||||
|
||||
<button data-remove-id="${item.id}" type="button" class="btn-delete removeReward d-md-block d-none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1">حذف</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>`;
|
||||
</div>`;
|
||||
|
||||
|
||||
html += `<div class="width3 d-block d-md-none" style="width:1% !important;border-right: 1px dashed #CACACA;padding: 0 20px 0 7px;">-</div>`;
|
||||
html += `<div class="width3 d-block d-md-none" style="width:1% !important;border-right: 1px dashed #CACACA;padding: 0 20px 0 7px;">-</div>`;
|
||||
|
||||
html += `<div class="width4 d-block d-md-none" style="width:18% !important">`;
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `
|
||||
html += `<div class="width4 d-block d-md-none" style="width:18% !important">`;
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.startDate ?? "-"}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `
|
||||
});
|
||||
} else {
|
||||
html += `
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
html += `</div>`;
|
||||
}
|
||||
html += `</div>`;
|
||||
|
||||
html += `<div class="width4 d-block d-md-none" style="width:18% !important">`;
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `
|
||||
html += `<div class="width4 d-block d-md-none" style="width:18% !important">`;
|
||||
if (item.rollCallTimesList.length > 0) {
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>${itemTime.endDate ?? "-"}</div>
|
||||
</div>`;
|
||||
});
|
||||
} else {
|
||||
html += `
|
||||
});
|
||||
} else {
|
||||
html += `
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>-</div>
|
||||
</div>`;
|
||||
}
|
||||
html += `</div>`;
|
||||
}
|
||||
html += `</div>`;
|
||||
|
||||
html +=
|
||||
`<div class="width3 d-block d-md-none" style="width:1% !important;padding: 0 0 0 20px;">-</div>`;
|
||||
html +=
|
||||
`<div class="width3 d-block d-md-none" style="width:1% !important;padding: 0 0 0 20px;">-</div>`;
|
||||
|
||||
html += `</div>`;
|
||||
html += `</div>`;
|
||||
|
||||
if (!(!item.hasLeave && item.isAbsent)) {
|
||||
html += `<div class="operation-div d-md-none d-block w-100">
|
||||
if (!(!item.hasLeave && item.isAbsent)) {
|
||||
html += `<div class="operation-div d-md-none d-block w-100">
|
||||
<div class="operations-btns rollcall-operations-mobile">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-6">
|
||||
@@ -693,10 +624,10 @@ function caseHistoryLoadAjax() {
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
dateIndex++;
|
||||
$('#caseHistoryLoadData').append(html);
|
||||
@@ -713,7 +644,7 @@ function caseHistoryLoadAjax() {
|
||||
console.log(response);
|
||||
hasData = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadUntilHeightExceeds() {
|
||||
@@ -728,22 +659,22 @@ if (hasData) {
|
||||
loadUntilHeightExceeds();
|
||||
}
|
||||
|
||||
$('.goToTop').on('click',function () {
|
||||
$('.goToTop').on('click', function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if (hasData) {
|
||||
if (hasData) {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
caseHistoryLoadAjax();
|
||||
}
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1582,16 +1513,4 @@ if ($(window).width() < 768) {
|
||||
}
|
||||
}
|
||||
}
|
||||
//******************** نمایش تاریخ در موبایل ********************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function addWorkTime() {
|
||||
window.location.href = `#showmodal=/Client/Company/RollCall/CaseHistory?handler=Create`;
|
||||
}
|
||||
|
||||
function editWorkTime(groupId) {
|
||||
window.location.href = `#showmodal=/Client/Company/RollCall/CaseHistory?groupId=${groupId}&handler=EditGroup`;
|
||||
}
|
||||
//******************** نمایش تاریخ در موبایل ********************
|
||||