RollCall Control For client in admin - checkoutPrint change
This commit is contained in:
@@ -18,7 +18,7 @@ public interface ICameraAccountApplication
|
||||
OperationResult DeActive(long id);
|
||||
OperationResult ChangePass(ChangePassword command);
|
||||
bool HasCameraAccount(long workshopId, long accountId);
|
||||
List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops);
|
||||
|
||||
|
||||
OperationResult CheckUsername(string username);
|
||||
#region Safa
|
||||
@@ -26,4 +26,13 @@ public interface ICameraAccountApplication
|
||||
EditCameraAccount GetDetailsByWorkshop(long workshopId);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Pooya
|
||||
|
||||
List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops);
|
||||
|
||||
List<CameraAccountViewModel> GetAllByWorkshopId(long workshopId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -59,21 +59,8 @@ public class CameraAccountApplication : ICameraAccountApplication
|
||||
return _cameraAccountRepository.Exists(x => x.WorkshopId == workshopId && x.AccountId == accountId);
|
||||
}
|
||||
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops)
|
||||
{
|
||||
var cameraAccounts = _cameraAccountRepository.GetAllByAccountId(accountId);
|
||||
|
||||
return cameraAccounts.Select(x => new CameraAccountViewModel()
|
||||
{
|
||||
AccountId = x.AccountId,
|
||||
Id = x.Id,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Username = x.Username,
|
||||
Mobile = x.Mobile,
|
||||
WorkshopId = x.WorkshopId,
|
||||
WorkshopName = workshops.FirstOrDefault(y => x.WorkshopId == y.Id).Name
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
public OperationResult CheckUsername(string username)
|
||||
{
|
||||
@@ -135,4 +122,27 @@ public class CameraAccountApplication : ICameraAccountApplication
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pooya
|
||||
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopIdAndAccountId(long accountId, List<(long Id, string Name)> workshops)
|
||||
{
|
||||
var cameraAccounts = _cameraAccountRepository.GetAllByAccountId(accountId);
|
||||
|
||||
return cameraAccounts.Select(x => new CameraAccountViewModel()
|
||||
{
|
||||
AccountId = x.AccountId,
|
||||
Id = x.Id,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Username = x.Username,
|
||||
Mobile = x.Mobile,
|
||||
WorkshopId = x.WorkshopId,
|
||||
WorkshopName = workshops.FirstOrDefault(y => x.WorkshopId == y.Id).Name
|
||||
}).ToList();
|
||||
}
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopId(long workshopId)
|
||||
{
|
||||
return _cameraAccountRepository.GetAllByWorkshopId(workshopId);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -15,9 +15,9 @@ namespace AccountManagement.Domain.CameraAccountAgg
|
||||
CameraAccount GetBy(string username);
|
||||
CameraAccount GetById(long id);
|
||||
EditCameraAccount GetDetails(long id);
|
||||
|
||||
#region Pooya
|
||||
List<CameraAccountViewModel> GetAllByAccountId(long accountId);
|
||||
List<CameraAccountViewModel> GetAllByWorkshopId(long workshopId);
|
||||
#endregion
|
||||
|
||||
#region Safa
|
||||
|
||||
@@ -46,6 +46,7 @@ public class CameraAccountRepository : RepositoryBase<long, CameraAccount>, ICam
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
#region Pooya
|
||||
public List<CameraAccountViewModel> GetAllByAccountId(long accountId)
|
||||
{
|
||||
return _context.CameraAccounts.Where(x => x.AccountId == accountId)
|
||||
@@ -61,6 +62,23 @@ public class CameraAccountRepository : RepositoryBase<long, CameraAccount>, ICam
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public List<CameraAccountViewModel> GetAllByWorkshopId(long workshopId)
|
||||
{
|
||||
return _context.CameraAccounts.Where(x => x.WorkshopId == workshopId)
|
||||
.Select(x => new CameraAccountViewModel()
|
||||
{
|
||||
AccountId = x.AccountId,
|
||||
Id = x.id,
|
||||
IsActiveString = x.IsActiveSting,
|
||||
Username = x.Username,
|
||||
Mobile = x.Mobile,
|
||||
WorkshopId = x.WorkshopId,
|
||||
WorkshopName = x.WorkshopName
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Safa
|
||||
|
||||
|
||||
@@ -8,9 +8,11 @@ namespace CompanyManagment.App.Contracts.RollCall
|
||||
public class CheckoutDailyRollCallViewModel
|
||||
{
|
||||
public string RollCallDateFa { get; set; }
|
||||
public string StartDate { get; set; }
|
||||
public string EndDate { get; set; }
|
||||
public DateTime DateTimeGr { get; set; }
|
||||
public string StartDate1 { get; set; }
|
||||
public string EndDate1 { get; set; }
|
||||
public string StartDate2 { get; set; }
|
||||
public string EndDate2 { get; set; }
|
||||
public DateTime DateTimeGr { get; set; }
|
||||
//منقطع بودن شیفت کاری
|
||||
public bool IsSliced { get; set; }
|
||||
public TimeSpan TotalhourseSpan { get; set; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
@@ -57,4 +58,6 @@ public interface IWorkshopApplication
|
||||
List<PrintListWorkshop> PrintWorkshopList(WorkshopSearchModel searchModel);
|
||||
|
||||
#endregion
|
||||
|
||||
AccountViewModel GetClientAccountByWorkshopId(long workshopId);
|
||||
}
|
||||
@@ -721,6 +721,12 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
return _workshopRepository.PrintWorkshopList(searchModel);
|
||||
}
|
||||
|
||||
public AccountViewModel GetClientAccountByWorkshopId(long workshopId)
|
||||
{
|
||||
var contractingParty = _workshopRepository.GetPersonalContractingPartyByWorkshopId(workshopId);
|
||||
return _personalContractingPartyRepository.GetAccountByPersonalContractingParty(contractingParty.id);
|
||||
}
|
||||
|
||||
//public List<ConnectedPersonnelViewModel> GetConnectedPersonnelsForMain(long workshopId)
|
||||
//{
|
||||
// return _workshopRepository.GetConnectedPersonnelsForMain(workshopId);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
|
||||
|
||||
var rollCalls = _context.RollCalls.Where(x =>
|
||||
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null &&
|
||||
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&
|
||||
x.StartDate.Value.Date >= startMonthDay && x.StartDate.Value.Date <= endMonthDay).ToList();
|
||||
|
||||
|
||||
@@ -138,29 +138,41 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
.ExceptBy(rollCalls.Select(x => x.StartDate!.Value.Date), y => y.Date.Date)
|
||||
.Select(x => new CheckoutDailyRollCallViewModel()
|
||||
{
|
||||
StartDate = null,
|
||||
EndDate = null,
|
||||
StartDate1 = null,
|
||||
EndDate1 = null,
|
||||
DateTimeGr = x.Date.Date,
|
||||
DayOfWeek = x.Date.DayOfWeek.ToString(),
|
||||
RollCallDateFa = x.Date.ToFarsi()
|
||||
});
|
||||
|
||||
var presentDays = rollCalls.GroupBy(x => x.StartDate!.Value.Date).Select(x => new CheckoutDailyRollCallViewModel()
|
||||
var presentDays = rollCalls.GroupBy(x => x.StartDate!.Value.Date).Select(x =>
|
||||
{
|
||||
StartDate = x.Min(y => y.StartDate)!.Value.ToString("HH:mm"),
|
||||
EndDate = x.Max(y => y.EndDate)!.Value.ToString("HH:mm"),
|
||||
TotalhourseSpan = new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks)),
|
||||
DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(),
|
||||
RollCallDateFa = x.Key.Date.ToFarsi(),
|
||||
DateTimeGr = x.Key.Date,
|
||||
IsSliced = x.Count() > 1
|
||||
var orderedRollcalls = x.OrderBy(y => y.StartDate!.Value);
|
||||
return new CheckoutDailyRollCallViewModel()
|
||||
{
|
||||
StartDate1 = orderedRollcalls.FirstOrDefault().StartDate.Value.ToString("HH:mm"),
|
||||
EndDate1 = orderedRollcalls.FirstOrDefault().EndDate.Value.ToString("HH:mm"),
|
||||
|
||||
StartDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.StartDate?.ToString("HH:mm") ?? "",
|
||||
EndDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.EndDate?.ToString("HH:mm") ?? "",
|
||||
|
||||
TotalhourseSpan =
|
||||
new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks)),
|
||||
DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(),
|
||||
RollCallDateFa = x.Key.Date.ToFarsi(),
|
||||
DateTimeGr = x.Key.Date,
|
||||
IsSliced = x.Count() > 1
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
presentDays = presentDays.Select(x => new CheckoutDailyRollCallViewModel
|
||||
{
|
||||
StartDate = x.StartDate,
|
||||
EndDate = x.EndDate,
|
||||
TotalWorkingHours = $"{(int)x.TotalhourseSpan.TotalHours}:{(x.TotalhourseSpan.Minutes):00}",
|
||||
StartDate1 = x.StartDate1,
|
||||
EndDate1 = x.EndDate1,
|
||||
EndDate2 = x.EndDate2,
|
||||
StartDate2 = x.StartDate2,
|
||||
TotalWorkingHours = $"{(int)(x.TotalhourseSpan.TotalHours)}:{x.TotalhourseSpan.Minutes.ToString("00")}",
|
||||
DayOfWeek = x.DayOfWeek,
|
||||
RollCallDateFa = x.RollCallDateFa,
|
||||
DateTimeGr = x.DateTimeGr,
|
||||
@@ -172,6 +184,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
|
||||
}
|
||||
|
||||
|
||||
//جستجوی سوابق حضور غیاب بر اساس کارمند
|
||||
public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId,
|
||||
DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? dateIndex)
|
||||
@@ -252,11 +265,19 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
x.IsAccepted &&
|
||||
x.EndLeave >= selectedMonthFirstDay && x.StartLeave < nextMonthFirstDay && x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||
|
||||
var rollCalls = _context.RollCalls.Where(x =>
|
||||
x.EmployeeId == employeeId && !leavesQuery.Any(y =>
|
||||
y.StartLeave.Date <= x.StartDate.Value.Date && y.EndLeave.Date >= x.StartDate.Value.Date) &&
|
||||
x.WorkshopId == workshopId && x.StartDate != null &&
|
||||
x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
|
||||
//var rollCalls = _context.RollCalls.Where(x =>
|
||||
// x.EmployeeId == employeeId && !leavesQuery.Any(y =>
|
||||
// y.StartLeave.Date <= x.StartDate.Value.Date && y.EndLeave.Date >= x.StartDate.Value.Date) &&
|
||||
// x.WorkshopId == workshopId && x.StartDate != null &&
|
||||
// x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
|
||||
|
||||
//changeByfarrokhi
|
||||
#region changeByfarrokhi
|
||||
var rollCalls = _context.RollCalls.Where(x =>
|
||||
x.EmployeeId == employeeId &&
|
||||
x.WorkshopId == workshopId && x.StartDate != null &&
|
||||
x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
|
||||
#endregion
|
||||
|
||||
var personnelCode =
|
||||
_context.PersonnelCodeSet.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId)?.PersonnelCode;
|
||||
|
||||
@@ -56,21 +56,27 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WorkFlow", "WorkFlow", "{FE
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{D1803DC6-4FA6-4500-9C3C-5F7AC1AEE187}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Application", "WorkFlow\Application\WorkFlow.Application\WorkFlow.Application.csproj", "{BA69B1F4-2D53-4FAC-A658-FD59EB552269}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Application", "WorkFlow\Application\WorkFlow.Application\WorkFlow.Application.csproj", "{BA69B1F4-2D53-4FAC-A658-FD59EB552269}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Application.Contracts", "WorkFlow\Application\WorkFlow.Application.Contracts\WorkFlow.Application.Contracts.csproj", "{BA6933AF-C104-4271-ADEA-999E1BFC5A6C}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Application.Contracts", "WorkFlow\Application\WorkFlow.Application.Contracts\WorkFlow.Application.Contracts.csproj", "{BA6933AF-C104-4271-ADEA-999E1BFC5A6C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{486CBA92-3B91-4761-A853-2A856B1D1159}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Domain", "WorkFlow\Domain\WorkFlow.Domain\WorkFlow.Domain.csproj", "{AFE354B3-CCDF-4810-9FFF-6F10B49757B8}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Domain", "WorkFlow\Domain\WorkFlow.Domain\WorkFlow.Domain.csproj", "{AFE354B3-CCDF-4810-9FFF-6F10B49757B8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{09517B4E-C699-4D57-8590-0B773228820A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Infrastructure.EfCore", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.EfCore\WorkFlow.Infrastructure.EfCore.csproj", "{9643E1D4-A2FE-4CA1-A303-1A499CDB6D87}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Infrastructure.EfCore", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.EfCore\WorkFlow.Infrastructure.EfCore.csproj", "{9643E1D4-A2FE-4CA1-A303-1A499CDB6D87}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Infrastructure.ACL", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.ACL\WorkFlow.Infrastructure.ACL.csproj", "{3CDCCA2F-79F1-43FD-B9C4-211279624148}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Infrastructure.ACL", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.ACL\WorkFlow.Infrastructure.ACL.csproj", "{3CDCCA2F-79F1-43FD-B9C4-211279624148}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkFlow.Infrastructure.Config", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.Config\WorkFlow.Infrastructure.Config.csproj", "{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkFlow.Infrastructure.Config", "WorkFlow\Infrastructure\WorkFlow.Infrastructure.Config\WorkFlow.Infrastructure.Config.csproj", "{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Query", "Query", "{708E8D7E-F190-47C5-B78E-F43131FB7D6D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Query", "Query\Query.csproj", "{339E05B6-E99F-4403-AFDF-CD0540E96C8D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Query.Bootstrapper", "Query.Bootstrapper\Query.Bootstrapper.csproj", "{02892882-2A02-484B-BAF9-7E63F6BDCFA0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -158,6 +164,14 @@ Global
|
||||
{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{339E05B6-E99F-4403-AFDF-CD0540E96C8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{339E05B6-E99F-4403-AFDF-CD0540E96C8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{339E05B6-E99F-4403-AFDF-CD0540E96C8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{339E05B6-E99F-4403-AFDF-CD0540E96C8D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02892882-2A02-484B-BAF9-7E63F6BDCFA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02892882-2A02-484B-BAF9-7E63F6BDCFA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02892882-2A02-484B-BAF9-7E63F6BDCFA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02892882-2A02-484B-BAF9-7E63F6BDCFA0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -189,6 +203,8 @@ Global
|
||||
{9643E1D4-A2FE-4CA1-A303-1A499CDB6D87} = {09517B4E-C699-4D57-8590-0B773228820A}
|
||||
{3CDCCA2F-79F1-43FD-B9C4-211279624148} = {09517B4E-C699-4D57-8590-0B773228820A}
|
||||
{0E6A32F1-1BCB-45A1-BB1A-A5B8AFA8F551} = {09517B4E-C699-4D57-8590-0B773228820A}
|
||||
{339E05B6-E99F-4403-AFDF-CD0540E96C8D} = {708E8D7E-F190-47C5-B78E-F43131FB7D6D}
|
||||
{02892882-2A02-484B-BAF9-7E63F6BDCFA0} = {708E8D7E-F190-47C5-B78E-F43131FB7D6D}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E6CFB3A7-A7C8-4E82-8F06-F750408F0BA9}
|
||||
|
||||
18
Query.Bootstrapper/Query.Bootstrapper.csproj
Normal file
18
Query.Bootstrapper/Query.Bootstrapper.csproj
Normal file
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Query\Query.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
17
Query.Bootstrapper/QueryBootstrapper.cs
Normal file
17
Query.Bootstrapper/QueryBootstrapper.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Query.AdminReports.Handlers;
|
||||
using Query.ClientReports.Handler;
|
||||
|
||||
namespace Query.Bootstrapper
|
||||
{
|
||||
public class QueryBootstrapper
|
||||
{
|
||||
public static void Configure(IServiceCollection services)
|
||||
{
|
||||
services.AddTransient<NotSignedContractEmployeesQueryHandler>();
|
||||
services.AddTransient<IGetWorkshopWithRollCallHandler, GetWorkshopWithRollCallHandler>();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using Company.Domain.RollCallAgg;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Query.AdminReports.Models;
|
||||
using System.Data;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace Query.AdminReports.Handlers
|
||||
{
|
||||
public interface IGetWorkshopWithRollCallHandler
|
||||
{
|
||||
List<WorkshopWithRollCallServiceQueryModel> Handle(WorkshopWithRollCallServiceQueryParameters parameters);
|
||||
}
|
||||
|
||||
public class GetWorkshopWithRollCallHandler: IGetWorkshopWithRollCallHandler
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
|
||||
public GetWorkshopWithRollCallHandler(CompanyContext companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
}
|
||||
|
||||
public List<WorkshopWithRollCallServiceQueryModel> Handle(WorkshopWithRollCallServiceQueryParameters parameters)
|
||||
{
|
||||
var now = DateTime.Now.Date;
|
||||
var lastWeek = now.AddDays(-7);
|
||||
|
||||
|
||||
//workshop filter by parameters
|
||||
var rollCallServiceQuery = _companyContext.RollCallServices
|
||||
.Where(x => x.StartService.Date <= DateTime.Now.Date && x.EndService.Date >= DateTime.Now.Date);
|
||||
var allWorkshops = _companyContext.Workshops.Select(x => new { x.id, x.WorkshopFullName });
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(parameters.WorkshopName))
|
||||
allWorkshops = allWorkshops.Where(x => x.WorkshopFullName.Contains(parameters.WorkshopName));
|
||||
if (!string.IsNullOrWhiteSpace(parameters.RollCallServiceType))
|
||||
rollCallServiceQuery = rollCallServiceQuery.Where(x => x.ServiceType == parameters.RollCallServiceType);
|
||||
|
||||
var workshopsWithService = rollCallServiceQuery.Join(allWorkshops, x => x.WorkshopId, y => y.id, (rcs, workshop) =>
|
||||
new WorkshopWithRollCallServiceQueryModel()
|
||||
{
|
||||
WorkshopId = workshop.id,
|
||||
RollCallServiceType = rcs.ServiceType,
|
||||
WorkshopName = workshop.WorkshopFullName
|
||||
});
|
||||
|
||||
|
||||
//workshop population
|
||||
var workshopLeftWorks = _companyContext.Workshops.Where(x => workshopsWithService.Any(y => y.WorkshopId == x.id)).Include(x => x.LeftWorks).Include(x => x.LeftWorkInsurances)
|
||||
.Select(x => new
|
||||
{
|
||||
WorkshopId = x.id,
|
||||
LeftWorks = x.LeftWorks.Where(y => y.StartWorkDate <= lastWeek && y.LeftWorkDate > now).Select(y => y.EmployeeId),
|
||||
LeftWorkInsurances = x.LeftWorkInsurances.Where(y => y.StartWorkDate <= lastWeek && (y.LeftWorkDate > now || y.LeftWorkDate == null)).Select(y => y.EmployeeId)
|
||||
}).ToList();
|
||||
|
||||
var workshopsWorkingEmployeesList = workshopLeftWorks
|
||||
.Select(x => new { x.WorkshopId, TotalWorkingEmployeesCount = x.LeftWorks.Concat(x.LeftWorkInsurances).Distinct().Count() }).ToList();
|
||||
|
||||
|
||||
|
||||
var activeEmployees = _companyContext.RollCallEmployees.Include(x => x.EmployeesStatus).Where(x => x.EmployeesStatus.Any(y =>
|
||||
y.EndDate.Date >= now) && workshopsWithService.Any(y => y.WorkshopId == x.WorkshopId)).Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||
|
||||
var lastWeekRollCalls = _companyContext.RollCalls.Where(x => x.StartDate.HasValue && x.StartDate.Value >= lastWeek
|
||||
&& workshopsWithService.Any(y => y.WorkshopId == x.WorkshopId)).GroupBy(x => x.EmployeeId).Select(x => x.Key);
|
||||
|
||||
|
||||
var leaves = _companyContext.LeaveList.Where(x => x.StartLeave <= lastWeek && x.EndLeave >= now && (x.LeaveType == "استعلاجی" || x.PaidLeaveType == "روزانه")
|
||||
&& workshopsWithService.Any(y => y.WorkshopId == x.WorkshopId)).Select(x => x.EmployeeId);
|
||||
|
||||
|
||||
var activeEmployeesList = activeEmployees.ToList();
|
||||
var lastWeekRollCallsList = lastWeekRollCalls.ToList();
|
||||
var leavesList = leaves.ToList();
|
||||
var workshopsWithServiceList = workshopsWithService.ToList();
|
||||
return workshopsWithServiceList.Select(x => new WorkshopWithRollCallServiceQueryModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
RollCallServiceType = x.RollCallServiceType,
|
||||
WorkshopName = x.WorkshopName,
|
||||
ActiveEmployeesCount = activeEmployeesList.Count(y => y.WorkshopId == x.WorkshopId),
|
||||
ActiveEmployeesWithRollCallInLastWeekCount = activeEmployeesList.Count(y => y.WorkshopId == x.WorkshopId &&
|
||||
lastWeekRollCalls.Contains(y.EmployeeId) && !leavesList.Contains(y.EmployeeId)),
|
||||
TotalEmployeesCount = workshopsWorkingEmployeesList.FirstOrDefault(y => y.WorkshopId == x.WorkshopId).TotalWorkingEmployeesCount
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Query.AdminReports.Models;
|
||||
|
||||
public class WorkshopWithRollCallServiceQueryParameters
|
||||
{
|
||||
public string WorkshopName { get; set; }
|
||||
public string RollCallServiceType { get; set; }
|
||||
}
|
||||
24
Query/AdminReports/Models/WorkshopWithRollCallViewModel.cs
Normal file
24
Query/AdminReports/Models/WorkshopWithRollCallViewModel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Query.AdminReports.Models
|
||||
{
|
||||
public class WorkshopWithRollCallServiceQueryModel
|
||||
{
|
||||
public string WorkshopName { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
public string RollCallServiceType { get; set; }
|
||||
|
||||
public int TotalEmployeesCount { get; set; }
|
||||
|
||||
public int ActiveEmployeesCount { get; set; }
|
||||
|
||||
public int ActiveEmployeesWithRollCallInLastWeekCount { get; set; }
|
||||
|
||||
|
||||
public float ActiveEmployeesWithRollCallPercentage
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((float)ActiveEmployeesWithRollCallInLastWeekCount / ActiveEmployeesCount) * 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Globalization;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Query.ClientReports.Models;
|
||||
|
||||
namespace Query.ClientReports.Handler
|
||||
{
|
||||
public class NotSignedContractEmployeesQueryHandler
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
|
||||
public NotSignedContractEmployeesQueryHandler(CompanyContext companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
}
|
||||
|
||||
public List<NotSignedContractEmployeesQueryModel> Handle(long workshopId, int yearFa, int monthFa)
|
||||
{
|
||||
var date = new DateTime(yearFa, monthFa, 1, new PersianCalendar());
|
||||
|
||||
int nextMonth;
|
||||
int nextMonthYear;
|
||||
if (monthFa == 12)
|
||||
{
|
||||
nextMonthYear = yearFa + 1;
|
||||
nextMonth = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nextMonth = monthFa + 1;
|
||||
nextMonthYear = yearFa;
|
||||
}
|
||||
|
||||
var nextMonthDate = new DateTime(nextMonthYear, nextMonth, 1, new PersianCalendar());
|
||||
var query = _companyContext.Employees.Include(x => x.Contracts).Where(x =>
|
||||
!x.Contracts.Any(y => y.ContarctStart < nextMonthDate && y.ContractEnd >= date && y.Signature == "0"));
|
||||
|
||||
return query.Select(x => new NotSignedContractEmployeesQueryModel()
|
||||
{
|
||||
MonthFa = monthFa,
|
||||
YearFa = yearFa,
|
||||
EmployeeFullName = x.FName + " " + x.LName,
|
||||
EmployeeId = x.id
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
namespace Query.ClientReports.Models
|
||||
{
|
||||
public class NotSignedContractEmployeesQueryModel
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
public string EmployeeFullName { get; set; }
|
||||
public int YearFa { get; set; }
|
||||
public int MonthFa { get; set; }
|
||||
}
|
||||
}
|
||||
13
Query/Query.csproj
Normal file
13
Query/Query.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CompanyManagment.EFCore\CompanyManagment.EFCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -308,21 +308,25 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < 15; i++)
|
||||
{
|
||||
<tr style="@(Model.MonthlyRollCall[i].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; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (@Model.MonthlyRollCall[i].IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
@@ -345,11 +349,13 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -359,10 +365,12 @@
|
||||
@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;">
|
||||
<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>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;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.StartDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</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.StartDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (day.IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
|
||||
@@ -305,21 +305,25 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < 15; i++)
|
||||
{
|
||||
<tr style="@(Model.MonthlyRollCall[i].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; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (@Model.MonthlyRollCall[i].IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
@@ -342,11 +346,13 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -356,10 +362,12 @@
|
||||
@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;">
|
||||
<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>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;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.StartDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</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.StartDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (day.IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
|
||||
@@ -173,10 +173,17 @@
|
||||
</a>
|
||||
<ul class="list-unstyled sdf3">
|
||||
<li permission="307"><a class="clik3" asp-page="/Company/InstitutionContracts/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>
|
||||
<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="308">
|
||||
<a class="clik3" asp-area="AdminNew" asp-page="/Company/RollCall/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="306"><a class="clik3" asp-page="/Company/SmsResult/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;">
|
||||
@@ -232,12 +239,7 @@
|
||||
</svg>
|
||||
مدیریت کاربران </a>
|
||||
</li>
|
||||
<li permission="308"><a class="clik3" asp-page="/Company/FaceRecognition/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="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"/>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="~/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,204 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.CameraAccountsModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
ViewData["Title"] = " - " + "تنظیمات حساب کاربری دوربین";
|
||||
int index = 1;
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<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/rollcall-list-table.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
|
||||
<link href="~/AssetsAdminNew/rollcall/css/cameraAccounts.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsAdminNew/rollcall/css/cameraaccounts.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.stickyMain {
|
||||
position: sticky;
|
||||
top: 5px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 43px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.is-sticky {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 43px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: -10px;
|
||||
margin-right: 100px;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acacd6;
|
||||
}
|
||||
|
||||
.goToTop:hover {
|
||||
color: #fff;
|
||||
background-color: #2ca4a4;
|
||||
}
|
||||
|
||||
.textListTitle {
|
||||
color: #1A1A1A;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX' !important;
|
||||
}
|
||||
|
||||
@@media screen and (max-width: 767px) {
|
||||
.table-rollcall .width2 {
|
||||
width: 35% !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
top: 48px !important;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 54px;
|
||||
margin-right: 39%;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acac70;
|
||||
}
|
||||
|
||||
.textListTitle {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 576px) {
|
||||
.form-control {
|
||||
margin: 0px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/account-camera.png" alt="" class="img-fluid mx-1" width="45px" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">تنظیمات حساب کاربری دوربین</h4>
|
||||
<div class="title d-flex align-items-center">@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/RollCall/Options" asp-route-workshopId="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop">
|
||||
<div class="d-flex align-items-center">
|
||||
<span>برو بالا</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid" id="containerHeight">
|
||||
<div class="row mt-2">
|
||||
|
||||
<div class="card" style="margin: 0 0 60px 0;">
|
||||
<!-- Advance Search Box -->
|
||||
<div class="search-box bg-white d-block d-md-none p-1">
|
||||
<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>
|
||||
<!-- End Advance Search Box -->
|
||||
<div class="wrapper bg-white my-1 list-box table-rollcall-account">
|
||||
|
||||
<div class="Rtable Rtable--collapse">
|
||||
<div class="Rtable-row Rtable-row--head d-flex align-items-center sticky">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام کارگاه</div>
|
||||
<div class="Rtable-cell column-heading width3 d-none d-sm-block">نام کاربری</div>
|
||||
<div class="Rtable-cell column-heading width5 d-none d-md-block text-center">وضعیت</div>
|
||||
<div class="Rtable-cell column-heading width6 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingSkeletonCameraAccount" style="display: contents;">
|
||||
@for (int j = 0; j < 8; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 4px 0 !important;"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse w-100" id="ajaxCameraAccountDataLoad">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" data-bs-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog modal-md modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js"></script>
|
||||
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@adminVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var loadCameraAccountsAjax = `@Url.Page("CameraAccounts", "CameraAccounts")`;
|
||||
var changeCameraAccountStatusAjax = `@Url.Page("./CameraAccounts", "CameraAccountChangeStatus")`;
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/RollCall/js/CameraAccounts.js?ver=@adminVersion"></script>
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using AccountManagement.Application.Contracts.SubAccount;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class CameraAccountsModel : PageModel
|
||||
{
|
||||
public string Mess { get; set; }
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly ICameraAccountApplication _cameraAccountApplication;
|
||||
private readonly IHttpContextAccessor _contextAccessor;
|
||||
private readonly ISubAccountApplication _subAccountApplication;
|
||||
public long WorkshopId;
|
||||
|
||||
private readonly long _workshopId;
|
||||
public string WorkshopFullName;
|
||||
|
||||
public CameraAccountsModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, ICameraAccountApplication cameraAccountApplication, IAccountApplication accountApplication, IWorkshopApplication workshopApplication, IHttpContextAccessor contextAccessor, ISubAccountApplication subAccountApplication)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
_cameraAccountApplication = cameraAccountApplication;
|
||||
_accountApplication = accountApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
_contextAccessor = contextAccessor;
|
||||
_subAccountApplication = subAccountApplication;
|
||||
}
|
||||
|
||||
public void OnGet(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName;
|
||||
}
|
||||
|
||||
public IActionResult OnPostSendSms()
|
||||
{
|
||||
var accountInfo = _authHelper.CurrentAccountInfo();
|
||||
if (accountInfo.SubAccountId == 0)
|
||||
{
|
||||
var accountId = accountInfo.Id;
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Id = accountId }).FirstOrDefault();
|
||||
if (result != null)
|
||||
{
|
||||
_accountApplication.SendVerifyCodeToChangingPass(result.Mobile, accountId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = _subAccountApplication.GetDetails(accountInfo.SubAccountId);
|
||||
if (result != null && result != default)
|
||||
{
|
||||
_subAccountApplication.SendVerifyCodeForPasswordChange(result.PhoneNumber, accountInfo.SubAccountId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostCheckCode(string code)
|
||||
{
|
||||
var accountInfo = _authHelper.CurrentAccountInfo();
|
||||
if (accountInfo.SubAccountId == 0)
|
||||
{
|
||||
var accountId = accountInfo.Id;
|
||||
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Id = accountId }).FirstOrDefault();
|
||||
var verfiyResult = _accountApplication.GetByVerifyCode(code, result.Mobile);
|
||||
if (verfiyResult != null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var subAccountId = accountInfo.SubAccountId;
|
||||
|
||||
var result = _subAccountApplication.GetDetails(accountInfo.SubAccountId);
|
||||
if (result != null && result != default)
|
||||
{
|
||||
var verfiyResult = _subAccountApplication.GetByVerifyCodeAndPhoneNumber(code, result.PhoneNumber);
|
||||
if (verfiyResult != null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
}
|
||||
|
||||
#region Camera Account
|
||||
public IActionResult OnGetCameraAccounts(long workshopId)
|
||||
{
|
||||
var account = _workshopApplication.GetClientAccountByWorkshopId(workshopId);
|
||||
|
||||
if (account == null)
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "خطایی رخ داده است"
|
||||
});
|
||||
|
||||
|
||||
var result = _cameraAccountApplication.GetAllByWorkshopId(workshopId);
|
||||
|
||||
// var authModel = _authHelper.CurrentAccountInfo();
|
||||
//var accountId = _workshopApplication.GetClientAccountByWorkshopId(workshopId);
|
||||
//var authModel =
|
||||
//List<(long Id, string Name)> workshops = authModel.WorkshopList.Select(x => (x.Id, x.Name)).ToList();
|
||||
|
||||
//var result = _cameraAccountApplication.GetAllByWorkshopIdAndAccountId(accountId.Id, );
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = result
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetChangeCameraPassword(long id)
|
||||
{
|
||||
var camera = _cameraAccountApplication.GetDetails(id);
|
||||
var command = new CameraAccountViewModel()
|
||||
{
|
||||
Id = id,
|
||||
Username = camera.Username,
|
||||
WorkshopName = camera.WorkshopName,
|
||||
};
|
||||
return Partial("ModalCameraAccountChangePassword", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostChangeCameraPassword(ChangePassword command)
|
||||
{
|
||||
var result = _cameraAccountApplication.ChangePass(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCameraValidation(string password, string rePassword)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(rePassword))
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "رمز عبور و تکرار آن نباید خالی باشد"
|
||||
});
|
||||
}
|
||||
|
||||
if (password != rePassword)
|
||||
{
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "رمز عبور یکسان نیست",
|
||||
});
|
||||
}
|
||||
|
||||
if (password.Length < 8)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "رمز عبور نمی تواند کمتر از 8 کاراکتر باشد",
|
||||
});
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostCameraAccountChangeStatus(long id, string type)
|
||||
{
|
||||
OperationResult result = type == "active" ? _cameraAccountApplication.Active(id) : _cameraAccountApplication.DeActive(id);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.CaseHistoryModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
ViewData["Title"] = " - " + "سوابق حضور و غیاب";
|
||||
int index = 1;
|
||||
int i = 0;
|
||||
|
||||
<style>
|
||||
.stickyMain {
|
||||
position: sticky;
|
||||
top: 5px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 43px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.is-sticky {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 43px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: -10px;
|
||||
margin-right: 100px;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acacd6;
|
||||
}
|
||||
|
||||
.goToTop:hover {
|
||||
color: #fff;
|
||||
background-color: #2ca4a4;
|
||||
}
|
||||
|
||||
.textListTitle {
|
||||
color: #1A1A1A;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX' !important;
|
||||
}
|
||||
|
||||
@@media screen and (max-width: 767px) {
|
||||
.table-rollcall .width2 {
|
||||
width: 35% !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
top: 48px !important;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 54px;
|
||||
margin-right: 39%;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acac70;
|
||||
}
|
||||
|
||||
.textListTitle {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 576px) {
|
||||
.form-control {
|
||||
margin: 0px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<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/rollcall-list-table.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
<link href="~/AssetsAdminNew/rollcall/css/casehistory.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/rollcall-history.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">سوابق حضور و غیاب</h4>
|
||||
<div class="title d-flex align-items-center" id="caseHistoryWorkshopFullname">@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/RollCall/Options" asp-route-workshopId="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop">
|
||||
<div class="d-flex align-items-center">
|
||||
<span>برو بالا</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
<div class="col-3 col-xl-2">
|
||||
<div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<span class="selected-display">تاریخ براساس یک روز</span>
|
||||
<svg id="drp-arrow" class="arrow transition-all ml-auto rotate-180" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<ul class="dropdown-normal dropdown-days boxes">
|
||||
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
|
||||
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div>
|
||||
<input type="text" class="form-control date start-date text-center" id="StartDate" placeholder="تاریخ">
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center d-none" id="endDateRollcall">
|
||||
<div class="me-2 elay">الی</div>
|
||||
<input type="text" class="form-control date end-date text-center" id="EndDate" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-xl-2">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." id="employeeSelect">
|
||||
<option value="0">انتخاب پرسنل ...</option>
|
||||
@foreach (var itemEmployee in Model.RollCallEmployeeList)
|
||||
{
|
||||
<option value="@itemEmployee.EmployeeId">@itemEmployee.EmployeeFullName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<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>
|
||||
<a asp-page="/Company/RollCall/CaseHistory" asp-route-workshopId="@Model.WorkshopId" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
|
||||
<span>حذف جستجو</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid" id="containerHeight">
|
||||
<div class="row p-lg-2">
|
||||
|
||||
<div class="card" style="margin: 0 0 60px 0;">
|
||||
@if (@Model.RollCallViewModels.ActiveEmployees.Any())
|
||||
{
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="search-box bg-white d-block d-md-none p-1">
|
||||
<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>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
|
||||
<div class="d-flex align-items-center mb-1 p-1">
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="d-flex align-items-center gap-1">
|
||||
<button type="button" class="btn-search text-nowrap d-flex align-items-center justify-content-center" onclick="addWorkTime()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 25 25" fill="none">
|
||||
<circle cx="12.5" cy="12.5" r="8.775" stroke="white" stroke-width="2" stroke-opacity="0.84"></circle>
|
||||
<path d="M12.5 8.3335L12.5 16.6668" stroke="white" stroke-width="2" stroke-linecap="round"></path>
|
||||
<path d="M16.6667 12.5L8.33342 12.5" stroke="white" stroke-width="2" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
<span class="mx-1">افزودن حضور و غیاب</span>
|
||||
</button>
|
||||
|
||||
<div class="col-6 col-xl-6 position-relative">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-none d-md-block text-center">
|
||||
<span class="textListTitle">لیست سوابق حضور و غیاب</span>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-none d-md-block">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper table-rollcall">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex stickyMain d-none d-md-flex">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading width3" id="dateFaEmployee">تاریخ</div>
|
||||
<div class="Rtable-cell column-heading width4 text-end">تاخیر در ورود</div>
|
||||
<div class="Rtable-cell column-heading width5 text-center">ورود</div>
|
||||
<div class="Rtable-cell column-heading width6 text-center">خروج</div>
|
||||
<div class="Rtable-cell column-heading width7 text-start">تجمیع در خروج</div>
|
||||
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
|
||||
<div class="Rtable-cell column-heading width9 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 rollcall-list Rtable Rtable--5cols Rtable--collapse" id="caseHistoryLoadData">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<partial name="Company/Partial/_EmptySection" />
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 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">
|
||||
<div class="modal-content">
|
||||
|
||||
<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" style="overflow-y: inherit;">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-xl-12">
|
||||
<div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<span class="selected-display">تاریخ براساس یک روز</span>
|
||||
<svg id="drp-arrow" class="arrow transition-all ml-auto rotate-180" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<ul class="dropdown-normal dropdown-days boxes">
|
||||
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
|
||||
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-2">
|
||||
<span class="form-control text-center persianDateInputStartDate" id="start-date">تاریخ شروع</span>
|
||||
<input type="hidden" class="form-control date start-date" id="StartDateMobile" placeholder="تاریخ شروع">
|
||||
</div>
|
||||
|
||||
<div class="d-block d-none" id="endDateRollcallMobile">
|
||||
<div class="mb-2">
|
||||
<div class="mx-auto text-center elay">الی</div>
|
||||
<span class="form-control text-center persianDateInputEndDate" id="end-date">تاریخ پایان</span>
|
||||
<input type="hidden" class="form-control date end-date text-center" id="EndDateMobile" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select class="form-select select2OptionMobile" aria-label="انتخاب پرسنل ..." id="employeeSelectMobile">
|
||||
<option value="0">انتخاب پرسنل ...</option>
|
||||
@foreach (var itemEmployee in Model.RollCallEmployeeList)
|
||||
{
|
||||
<option value="@itemEmployee.EmployeeId">@itemEmployee.EmployeeFullName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-start">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a asp-page="/Company/RollCall/CaseHistory" asp-route-workshopId="@Model.WorkshopId" class="btn-clear-filter py-2 text-center d-block w-100 mt-2" id="filterRemoveMobile">
|
||||
<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="button" class="btn-search btn-search-click w-100" id="searchBtnMobile">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" data-bs-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog modal-md modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@adminVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var caseHistoryAjaxLoadData = `@Url.Page("./CaseHistory", "CaseHistoryRollCallAjax")`;
|
||||
var itemsYearList = @Html.Raw(Json.Serialize(Model.YearlyList.OrderBy(x => x)));
|
||||
// var dateIndex = 0;
|
||||
var deleteRollCallData = `@Url.Page("./CaseHistory", "RemoveEmployeeRollCallsInDate")`;
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/RollCall/js/CaseHistory.js?ver=@adminVersion"></script>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.Leave;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class CaseHistoryModel : PageModel
|
||||
{
|
||||
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly IRollCallApplication _rollCallApplication;
|
||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||
private readonly ILeaveApplication _leaveApplication;
|
||||
public long WorkshopId;
|
||||
|
||||
public RollCallsByDateViewModel RollCallViewModels { get; set; }
|
||||
public EmployeeRollCallsByMonthViewModel RollCallEmployeeViewModels { get; set; }
|
||||
public string WorkshopFullName { get; set; }
|
||||
public List<RollCallEmployeeViewModel> RollCallEmployeeList;
|
||||
|
||||
public RollCallSearchModel SearchModel { get; set; } = new();
|
||||
public List<string> YearlyList { get; set; }
|
||||
|
||||
public CaseHistoryModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IWorkshopApplication workshopApplication, IRollCallApplication rollCallApplication, IYearlySalaryApplication yearlySalaryApplication, ILeaveApplication leaveApplication)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
_rollCallApplication = rollCallApplication;
|
||||
_yearlySalaryApplication = yearlySalaryApplication;
|
||||
_leaveApplication = leaveApplication;
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
if (_rollCallEmployeeApplication.GetByWorkshopId(workshopId).Any())
|
||||
{
|
||||
RollCallEmployeeList = _rollCallEmployeeApplication.GetEmployeeRollCalls(workshopId);
|
||||
WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName;
|
||||
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId
|
||||
};
|
||||
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel);
|
||||
YearlyList = _yearlySalaryApplication.GetYears();
|
||||
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/AdminNew/Company/RollCall");
|
||||
}
|
||||
}
|
||||
public IActionResult OnGetCaseHistoryRollCallAjax(int dateIndex, string exactDateFa, string startDate, string endDate, long employeeId, string dateEmployeeIndex, long workshopId)
|
||||
{
|
||||
if (employeeId > 0)
|
||||
{
|
||||
RollCallEmployeeViewModels = _rollCallApplication.GetEmployeeRollCallsHistory(employeeId, workshopId, startDate, endDate, exactDateFa, dateEmployeeIndex);
|
||||
if (RollCallEmployeeViewModels == null)
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
DateIndex = dateIndex,
|
||||
ExactDateFa = exactDateFa,
|
||||
StarDateFa = startDate,
|
||||
EndDateFa = endDate,
|
||||
EmployeeId = employeeId
|
||||
};
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel);
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
data = RollCallViewModels,
|
||||
dataEmployee = RollCallEmployeeViewModels,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetEmployeeList(long workshopId)
|
||||
{
|
||||
var resultData = _rollCallEmployeeApplication.GetRollCallEmployeesByWorkshopId(workshopId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetCreate(long workshopId)
|
||||
{
|
||||
var command = new CreateOrEditEmployeeRollCall();
|
||||
command.WorkshopId = workshopId;
|
||||
return Partial("ModalAddRollCall", command);
|
||||
}
|
||||
|
||||
public IActionResult OnGetCheckEmployeeData(long employeeId, string date, long workshopId)
|
||||
{
|
||||
bool isSuccess = false;
|
||||
|
||||
List<RollCallViewModel> resultData = new List<RollCallViewModel>();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(date))
|
||||
{
|
||||
resultData = _rollCallApplication.GetWorkshopEmployeeRollCallsForDate(workshopId, employeeId, date);
|
||||
isSuccess = resultData.Any();
|
||||
}
|
||||
|
||||
var result = _leaveApplication.HasLeave(workshopId, employeeId, date);
|
||||
var isLeave = result.IsSuccedded ? result.Data : false;
|
||||
|
||||
var isNullEndDate = resultData.Any(x => x.EndDate == null);
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = isSuccess,
|
||||
data = resultData,
|
||||
hasLeave = isLeave,
|
||||
hasNullEndDate = isNullEndDate
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetEdit(long employeeId, string date, long workshopId)
|
||||
{
|
||||
if (workshopId < 1)
|
||||
{
|
||||
var resultError = new ErrorViewModel()
|
||||
{
|
||||
Message = "کارگاه شما یافت نشده است."
|
||||
};
|
||||
return Partial("../Error/_ErrorModal", resultError);
|
||||
}
|
||||
|
||||
|
||||
var result = _rollCallApplication.GetWorkshopEmployeeRollCallsForDate(workshopId, employeeId, date);
|
||||
|
||||
var name = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
var command = new EmployeeRollCallsViewModel()
|
||||
{
|
||||
EmployeeFullName = name.EmployeeFullName,
|
||||
EmployeeId = employeeId,
|
||||
DateFa = date,
|
||||
RollCalls = result
|
||||
};
|
||||
|
||||
return Partial("ModalEditRollCall", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostManualCreateOrEdit(CreateOrEditEmployeeRollCall command, long workshopId)
|
||||
{
|
||||
command.WorkshopId = workshopId;
|
||||
var result = _rollCallApplication.ManualEdit(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployeeRollCallsInDate(long employeeId, string date, long workshopId)
|
||||
{
|
||||
if (workshopId < 1)
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "هیچ کارگاهی یافت نشده است!",
|
||||
});
|
||||
|
||||
var result = _rollCallApplication.RemoveEmployeeRollCallsInDate(workshopId, employeeId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.CurrentDayModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
ViewData["Title"] = " - " + "لیست حضور و غیاب جاری";
|
||||
int index = 1;
|
||||
int indexAbsent = 1;
|
||||
int indexLeave = 1;
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<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/rollcall-list-table.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/assetsadminnew/rollcall/css/currentday.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/rollcall.png" alt="" class="img-fluid mx-1" width="45px" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">ساعات حضور و غیاب جاری</h4>
|
||||
<div class="title d-flex align-items-center">@Model.WorkshopFullName <span class="ms-3 d-none d-md-flex">تاریخ امروز @Model.NowDate</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/RollCall/Options" asp-route-workshopId="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-block text-center d-md-none">تاریخ امروز @Model.NowDate</div>
|
||||
</div>
|
||||
<div class="row px-2">
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
<div class="col-2 position-relative">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@* <button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<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>
|
||||
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
|
||||
<span>حذف جستجو</span>
|
||||
</a> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="widthRightCurrentDay ps-0 d-none d-md-block">
|
||||
<div class="card heightRightCurrentDay">
|
||||
<div class="wrapper table-rollcall">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky" style="outline: 6px solid white !important;">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading width4 text-end">تاخیر در ورود</div>
|
||||
<div class="Rtable-cell column-heading width5 text-center">ورود</div>
|
||||
<div class="Rtable-cell column-heading width6 text-center">خروج</div>
|
||||
<div class="Rtable-cell column-heading width7 text-start">تجمیع در خروج</div>
|
||||
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
|
||||
</div>
|
||||
|
||||
@if (@Model.RollCallViewModels.PresentEmployees.Any())
|
||||
{
|
||||
@foreach (var item in Model.RollCallViewModels.PresentEmployees)
|
||||
{
|
||||
<div class="Rtable-row align-items-center position-relative openAction employee-row @(Model.RollCallViewModels.PresentEmployees.Count() == 1 ? "radius" : "") @(index == 1 ? "firstRadius" : "") @(index == Model.RollCallViewModels.PresentEmployees.Count() ? "lastRadius" : "" ) @(item.RollCallTimesList.Last().EndDate != null ? "existTimeRollCall" : "")">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="d-flex justify-content-center align-items-center table-number">
|
||||
@(index++)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
@item.EmployeeFullName
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">شماره پرسنلی: </div>
|
||||
<div class="d-flex ms-1">@item.PersonnelCode</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width4 position-relative bg-filter">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">تاخیر در ورود: </div>
|
||||
<div class="d-flex ms-1">-</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width5 position-relative text-center">
|
||||
@foreach (var itemTime in item.RollCallTimesList)
|
||||
{
|
||||
<div class="Rtable-cell--heading">ساعت ورود</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>@(itemTime.StartDate ?? "-")</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width6 position-relative text-center">
|
||||
@foreach (var itemTime in item.RollCallTimesList)
|
||||
{
|
||||
<div class="Rtable-cell--heading">ساعت خروج</div>
|
||||
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
|
||||
<div>@(itemTime.EndDate ?? "-")</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">تجمیع در خروج: </div>
|
||||
<div class="d-flex ms-1">-</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell position-relative width8 h-100 bg-filter">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
|
||||
<div class="d-flex ms-1">
|
||||
@if (item.RollCallTimesList.Last().EndDate == null)
|
||||
{
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE" />
|
||||
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE" />
|
||||
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.TotalWorkingHours
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<partial name="Company/Partial/_EmptySection"></partial>
|
||||
}
|
||||
@* <div class="w-100" style="height: 731px; overflow-y: scroll">
|
||||
<div></div>
|
||||
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widthLeftCurrentDay ps-0 d-none d-md-block">
|
||||
<div class="row p-0 g-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="wrapper">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
|
||||
<div class="w-100 my-1">
|
||||
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 heightLeftCurrentDay">
|
||||
<div></div>
|
||||
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave))
|
||||
{
|
||||
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
|
||||
{
|
||||
if (!item.HasLeave)
|
||||
{
|
||||
<div class="Rtable-row align-items-center position-relative table-rollcall-absent absenceItem absenceItem-row">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="d-flex justify-content-center align-items-center table-number">
|
||||
@(indexAbsent++)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
@item.EmployeeFullName
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">شماره پرسنلی: </div>
|
||||
<div class="d-flex ms-1">@item.PersonnelCode</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<partial name="Company/Partial/_EmptySection"></partial>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="wrapper">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
|
||||
<div class="w-100 my-1">
|
||||
<div class="leaveHeadColorTop" style="border-radius: 10px 10px 0 0;">مرخصی</div>
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-leave leaveHeadColor">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading width4 text-center">نوع مرخصی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 heightLeftCurrentDay">
|
||||
<div></div>
|
||||
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave))
|
||||
{
|
||||
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
|
||||
{
|
||||
if (item.HasLeave)
|
||||
{
|
||||
<div class="Rtable-row align-items-center position-relative table-rollcall-leave leaveItem leaveItem-row">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="d-flex justify-content-center align-items-center table-number">
|
||||
@(indexLeave++)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
@item.EmployeeFullName
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">شماره پرسنلی: </div>
|
||||
<div class="d-flex ms-1">@item.PersonnelCode</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none"></div>
|
||||
<div class="d-flex ms-1">@item.Reason</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<partial name="Company/Partial/_EmptySection"></partial>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-lg-2 d-block d-md-none">
|
||||
<div class="card pt-2">
|
||||
<div class="col-12">
|
||||
<div class="btnsRollCallOnlline">
|
||||
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
|
||||
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
|
||||
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="rollcall-list-mobile Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
<div class="w-100" id="loadRollCallTypeAjax">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@adminVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var loadRollCallMoreAjax = "@Url.Page("./CurrentDay", "CurrentDayAjax")";
|
||||
var loadRollCallAbsentLeaveCountAjax = "@Url.Page("./CurrentDay", "CurrentAjaxCount")";
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/assetsadminnew/rollcall/js/currentday.js?ver=@adminVersion"></script>
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class CurrentDayModel : PageModel
|
||||
{
|
||||
public CurrentDayRollCall RollCallViewModels;
|
||||
public string WorkshopFullName;
|
||||
public string NowDate;
|
||||
public long WorkshopId;
|
||||
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly IRollCallApplication _rollCallApplication;
|
||||
|
||||
public CurrentDayModel(IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallApplication rollCallApplication, IWorkshopApplication workshopApplication)
|
||||
{
|
||||
_passwordHasher = passwordHasher;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_rollCallApplication = rollCallApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
}
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
if (_rollCallEmployeeApplication.GetByWorkshopId(workshopId).Any())
|
||||
{
|
||||
WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName;
|
||||
|
||||
var now = DateTime.Now.ToFarsi();
|
||||
NowDate = now;
|
||||
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
};
|
||||
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/AdminNew/Company/RollCall");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IActionResult OnGetCurrentDayAjax(string type, long workshopId)
|
||||
{
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
|
||||
|
||||
List<object> data = new();
|
||||
switch (type)
|
||||
{
|
||||
case "all":
|
||||
data.AddRange(RollCallViewModels.PresentEmployees);
|
||||
break;
|
||||
case "absent":
|
||||
data.AddRange(RollCallViewModels.AbsentEmployees.Where(x => !x.HasLeave));
|
||||
break;
|
||||
case "leave":
|
||||
data.AddRange(RollCallViewModels.AbsentEmployees.Where(x => x.HasLeave));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
data = data
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCurrentAjaxCount(long workshopId)
|
||||
{
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId);
|
||||
|
||||
var absentEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => !x.HasLeave);
|
||||
var leaveEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => x.HasLeave);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
absentEmployeesCount = absentEmployeesCount,
|
||||
leaveEmployeesCount = leaveEmployeesCount
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.EmployeeUploadPictureModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
Layout = "Shared/_Layout";
|
||||
ViewData["title"] = " - آپلود عکس پرسنل";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/rollcall-list.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/personalList.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">آپلود عکس پرسنل</h4>
|
||||
<div>@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/RollCall/Options" asp-route-workshopId="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop"> <i class="fa fa-chevron-up" style="font-size: 20px"></i> برو بالا</button>
|
||||
|
||||
|
||||
<div class="msg-note my-1">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 col-md-4 text-center text-md-start">
|
||||
<div class="d-flex align-items-center justify-content-center justify-content-md-start">
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="18" cy="18" r="13.5" fill="#2FC1C1"></circle>
|
||||
<path d="M19.5 10.5C19.5 11.3284 18.8284 12 18 12C17.1716 12 16.5 11.3284 16.5 10.5C16.5 9.67157 17.1716 9 18 9C18.8284 9 19.5 9.67157 19.5 10.5Z" fill="white"></path>
|
||||
<path stroke-width="1.5" d="M18 24.75V17.25C18 15.8358 18 15.1287 17.5607 14.6893C17.1213 14.25 16.4142 14.25 15 14.25V14.25M18 24.75H20.25M18 24.75H15.75" stroke="white"></path>
|
||||
</svg>
|
||||
<p class="m-0 ms-2">تعداد پرسنل سرویس خریداری شده: <span id="maxPersonValid"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-center text-md-center">
|
||||
<p class="m-0">تعداد افراد فعال: <span id="isTrueActiveCount"></span></p>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-center text-md-end">
|
||||
<p class="m-0 me-2">تعداد افراد غیرفعال: <span id="isFalseActiveCount"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="search-box card border-0">
|
||||
<div class="row align-items-center px-1">
|
||||
<div class="col-6 col-md-3 pe-1">
|
||||
<input type="text" id="personnelSearch" class="form-control" placeholder="جستجو پرسنل">
|
||||
</div>
|
||||
<div class="col-6 ps-1">
|
||||
<div class="d-flex gap-2">
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="button" onclick="handlerSearch()">
|
||||
<span>جستجو</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="20" height="20" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove">
|
||||
<span>حذف جستجو</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row px-lg-2 p-auto">
|
||||
<div class="wrapper bg-white my-1 list-box table-rollcall">
|
||||
@if (@Model.HasEmployees)
|
||||
{
|
||||
<div class="Rtable Rtable--collapse">
|
||||
<div class="Rtable-row Rtable-row--head align-items-center sticky">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام و نام خانوادگی</div>
|
||||
<div class="Rtable-cell column-heading width3">کد ملی</div>
|
||||
<div class="Rtable-cell column-heading width4">وضعیت عکس</div>
|
||||
<div class="Rtable-cell column-heading width5 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingSkeleton" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 2px 0 !important;"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse w-100" id="ajaxDataLoad">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<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 id="MainModal" class="modal fade personalListModal" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-md modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var loadEmployeeUploadDataAjax = `@Url.Page("EmployeeUploadPicture", "EmployeeUploadDataAjax")`;
|
||||
var loadInfoCountAjax = `@Url.Page("EmployeeUploadPicture", "LoadInfoCount")`;
|
||||
var checkModalTakeImageAjax = `@Url.Page("EmployeeUploadPicture", "CheckModalTakeImage")`;
|
||||
var deActivePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "DeActivePersonnel")`;
|
||||
var activePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "ActivePersonnel")`;
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/assetsadminnew/rollcall/js/EmployeeUploadPicture.js?ver=@adminVersion"></script>
|
||||
}
|
||||
@@ -0,0 +1,364 @@
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class EmployeeUploadPictureModel : PageModel
|
||||
{
|
||||
public string WorkshopFullName;
|
||||
public RollCallEmployeeViewModel Employees;
|
||||
public RollCallServiceViewModel RollCallService;
|
||||
public bool HasEmployees;
|
||||
public int MaxPersonValid;
|
||||
public long WorkshopId;
|
||||
public int PageIndex;
|
||||
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IRollCallEmployeeStatusApplication _rollCallEmployeeStatusApplication;
|
||||
public EmployeeUploadPictureModel(IWorkshopApplication workshopApplication, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallServiceApplication rollCallServiceApplication, IWebHostEnvironment webHostEnvironment, IEmployeeApplication employeeApplication, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_passwordHasher = passwordHasher;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_employeeApplication = employeeApplication;
|
||||
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
||||
}
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
RollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
|
||||
if (RollCallService == null)
|
||||
return Redirect("/AdminNew/Company/RollCall");
|
||||
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
|
||||
MaxPersonValid = RollCallService.MaxPersonValid;
|
||||
|
||||
//var distinctEmployees = _rollCallEmployeeApplication.GetPersonnelRollCallListPaginate(new RollCallEmployeeSearchModel()
|
||||
//{
|
||||
|
||||
//});
|
||||
WorkshopId = workshopId;
|
||||
PageIndex = 0;
|
||||
|
||||
HasEmployees = _rollCallEmployeeApplication.HasEmployees(workshopId);
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeUploadDataAjax(int pageIndex, string searchName, long workshopId)
|
||||
{
|
||||
//MaxPersonValid = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId).MaxPersonValid;
|
||||
var distinctEmployees = _rollCallEmployeeApplication.GetPersonnelRollCallListPaginate(new RollCallEmployeeSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
PageIndex = pageIndex,
|
||||
Name = searchName
|
||||
});
|
||||
|
||||
Employees = new RollCallEmployeeViewModel
|
||||
{
|
||||
PersonnelInfoViewModels = distinctEmployees
|
||||
};
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = true,
|
||||
data = Employees,
|
||||
pageIndex = Employees.PersonnelInfoViewModels.Count()
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetLoadInfoCount(long workshopId)
|
||||
{
|
||||
//var activeService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
//var maxPersonValid = activeService.MaxPersonValid;
|
||||
|
||||
var employeesCount = _rollCallEmployeeApplication.GetActiveAndDeActiveRollCallEmployees(workshopId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = true,
|
||||
maxPersonValid = MaxPersonValid == -1 ? "نامحدود" : MaxPersonValid.ToString(),
|
||||
isTrueActiveCount = employeesCount.activeEmployees,
|
||||
isFalseActiveCount = employeesCount.deActiveEmployees,
|
||||
message = "موفق"
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCheckModalTakeImage(long workshopId)
|
||||
{
|
||||
var plan = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
|
||||
if (plan == null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = false,
|
||||
message = "شما سرویس خریداری شده ندارید"
|
||||
});
|
||||
}
|
||||
|
||||
if (plan.IsActiveString != "true")
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = false,
|
||||
message = "سرویس شما فعال نیست"
|
||||
});
|
||||
}
|
||||
|
||||
//var maxValid = RollCallService.MaxPersonValid;
|
||||
|
||||
if (MaxPersonValid == -1 || _rollCallEmployeeApplication.activedPerson(workshopId) < MaxPersonValid)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = true,
|
||||
message = "موفق"
|
||||
});
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = false,
|
||||
message = "محدودیت افزودن پرسنل"
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetModalTakeImages(long employeeId, long workshopId)
|
||||
{
|
||||
var employeeWorkshopInfo = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
|
||||
bool hasPicture = false;
|
||||
if (employeeWorkshopInfo != null && !string.IsNullOrEmpty(employeeWorkshopInfo.HasUploadedImage))
|
||||
hasPicture = bool.Parse(employeeWorkshopInfo.HasUploadedImage);
|
||||
|
||||
var employeeDetails = _employeeApplication.GetDetails(employeeId);
|
||||
|
||||
string employeeName = string.Empty;
|
||||
if (employeeDetails != null)
|
||||
employeeName = employeeDetails.EmployeeFullName;
|
||||
|
||||
string pic1 = "";
|
||||
string pic2 = "";
|
||||
if (hasPicture)
|
||||
{
|
||||
string path1 = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{1}.jpg";
|
||||
string path2 = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{2}.jpg";
|
||||
|
||||
if (System.IO.File.Exists(path1))
|
||||
{
|
||||
byte[] fileContent1 = System.IO.File.ReadAllBytes(path1);
|
||||
pic1 = Convert.ToBase64String(fileContent1);
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists(path2))
|
||||
{
|
||||
byte[] fileContent2 = System.IO.File.ReadAllBytes(path2);
|
||||
pic2 = Convert.ToBase64String(fileContent2);
|
||||
}
|
||||
|
||||
//byte[] fileContent1 = System.IO.File.ReadAllBytes($"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{1}.jpg");
|
||||
//pic1 = Convert.ToBase64String(fileContent1);
|
||||
//byte[] fileContent2 = System.IO.File.ReadAllBytes($"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}\\{2}.jpg");
|
||||
//pic2 = Convert.ToBase64String(fileContent2);
|
||||
}
|
||||
|
||||
var res = new TakePictureModel()
|
||||
{
|
||||
HasPicture = hasPicture,
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
Name = employeeName,
|
||||
Pic1 = pic1,
|
||||
Pic2 = pic2,
|
||||
};
|
||||
|
||||
|
||||
return Partial("ModalTakeImages", res);
|
||||
}
|
||||
|
||||
public IActionResult OnPostTakePicture(string base64pic1, string base64pic2, long workshopId, long employeeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}";
|
||||
if (!Directory.Exists(directoryPath))
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
|
||||
var filePath1 = Path.Combine(directoryPath) + $@"\1.jpg";
|
||||
CreateImageFromBase64(base64pic1, filePath1);
|
||||
var filePath2 = Path.Combine(directoryPath) + $@"\2.jpg";
|
||||
CreateImageFromBase64(base64pic2, filePath2);
|
||||
|
||||
var employee = _employeeApplication.GetDetailsForClient(employeeId, workshopId);
|
||||
var rollCallEmployee = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
|
||||
var result = new OperationResult()
|
||||
{
|
||||
IsSuccedded = false,
|
||||
Message = "هنوز عملیاتی انجام نشده است"
|
||||
};
|
||||
if (rollCallEmployee == null)
|
||||
{
|
||||
var createCommand = new CreateRollCallEmployee()
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
EmployeeFullName = employee.EmployeeFullName,
|
||||
HasUploadedImage = "true",
|
||||
};
|
||||
result = _rollCallEmployeeApplication.Create(createCommand);
|
||||
_rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus()
|
||||
{ RollCallEmployeeId = result.SendId });
|
||||
}
|
||||
else
|
||||
{
|
||||
result = _rollCallEmployeeApplication.UploadedImage(employeeId, workshopId);
|
||||
}
|
||||
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
Message = result.Message,
|
||||
src = Tools.ResizeImage(Path.Combine(_webHostEnvironment.ContentRootPath, "Faces", workshopId.ToString(), employeeId.ToString(), "1.jpg"), 150, 150)
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
Message = result.Message,
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
Message = e.Message,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateImageFromBase64(string base64, string imagePathWithExtension)
|
||||
{
|
||||
var subBase64 = base64.Substring(base64.LastIndexOf(',') + 1);
|
||||
byte[] bytes = Convert.FromBase64String(subBase64);
|
||||
System.IO.File.WriteAllBytes(imagePathWithExtension, bytes);
|
||||
}
|
||||
|
||||
public IActionResult OnPostActivePersonnel(long id)
|
||||
{
|
||||
var hasRollCallEmployee = _rollCallEmployeeApplication.GetDetails(id);
|
||||
|
||||
if (hasRollCallEmployee == null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = false,
|
||||
message = "برای این پرسنل، هنوز هیچ عکسی آپلود نشده است. بعد از آپلود عکس بطور خودکار فعال خواهد شد",
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasRollCallEmployee.HasUploadedImage == "false")
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = false,
|
||||
message = "برای این پرسنل، هنوز هیچ عکسی آپلود نشده است. بعد از آپلود عکس بطور خودکار فعال خواهد شد",
|
||||
});
|
||||
|
||||
var result = _rollCallEmployeeApplication.Active(hasRollCallEmployee.Id);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostDeActivePersonnel(long id)
|
||||
{
|
||||
var result = _rollCallEmployeeApplication.DeActive(id);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetLoadFirstImage(long employeeId, long workshopId)
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}";
|
||||
var imageDir = Path.Combine(directoryPath, "1.jpg");
|
||||
return PhysicalFile(imageDir, "image/jpeg");
|
||||
}
|
||||
|
||||
public IActionResult OnGetLoadSecondImage(long employeeId, long workshopId)
|
||||
{
|
||||
var directoryPath = $"{_webHostEnvironment.ContentRootPath}\\Faces\\{workshopId}\\{employeeId}";
|
||||
var imageDir = Path.Combine(directoryPath, "2.jpg");
|
||||
return PhysicalFile(imageDir, "image/jpeg");
|
||||
}
|
||||
|
||||
public IActionResult OnGetModalChangeName(long employeeId, long workshopId)
|
||||
{
|
||||
var command = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
return Partial("ModalChangeName", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostChangeName(long rollCallEmployeeId, string fName, string lName)
|
||||
{
|
||||
var result = _rollCallEmployeeApplication.ChangeEmployeeRollCallName(rollCallEmployeeId, fName, lName);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.GroupingModel
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
ViewData["Title"] = " - " + "گروهبندی حضور و غیاب";
|
||||
int index = 1;
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?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="~/AssetsAdminNew/rollcall/css/group.css" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/workshop.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">عملیات گروهبندی حضور و غیاب</h4>
|
||||
<div class="title d-flex align-items-center">@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/RollCall/Options" asp-route-workshopId="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 p-0 mt-2">
|
||||
<button class="btnCreateNew" type="button" id="newCreateGroup">
|
||||
گروه جدید
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row px-lg-1">
|
||||
|
||||
<div class="col-12 col-md-5 p-0 pe-1">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group1">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-2 px-2 d-none d-md-flex">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام گروه</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
|
||||
<div class="Rtable-cell column-heading width5 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" id="ajaxDataMain"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 p-0 ps-1 d-none d-md-flex">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group2">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-2 px-3">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
|
||||
<div class="Rtable-cell column-heading text-end width5">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 overflow-auto" id="loadAccountItems"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="MainModal" class="modal fade personalListModal" aria-labelledby="myModalLabel" data-bs-backdrop="static" aria-hidden="true" tabindex="-1" style="display: none;">
|
||||
<div class="modal-dialog modal-md modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js"></script>
|
||||
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var loadWorkshopSettingsDataAjax = `@Url.Page("./Grouping", "WorkshopSettingsDataAjax")`;
|
||||
var loadEmployeesGroupAjax = `@Url.Page("./Grouping", "EmployeesGroupAjax")`;
|
||||
var removeGroupAjax = `@Url.Page("./Grouping", "DeleteGroup")`;
|
||||
var removeEmployeeFromGroupAjax = `@Url.Page("./Grouping", "RemoveEmployee")`;
|
||||
var workshopSettingId = Number((@Model.RollCallWorkshopSettings.Id));
|
||||
var isShiftChangedGlobal = false;
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/grouping.js?ver=aaadadminVersion"></script>
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class GroupingModel : PageModel
|
||||
{
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopSettingsApplication;
|
||||
private readonly IHttpContextAccessor _contextAccessor;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullName;
|
||||
public CustomizeWorkshopSettingsViewModel RollCallWorkshopSettings;
|
||||
|
||||
public GroupingModel(IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ICustomizeWorkshopSettingsApplication rollCallWorkshopSettingsApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, IAuthHelper authHelper)
|
||||
{
|
||||
_passwordHasher = passwordHasher;
|
||||
_workshopApplication = workshopApplication;
|
||||
_customizeWorkshopSettingsApplication = rollCallWorkshopSettingsApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_contextAccessor = contextAccessor;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
//if (_workshopId != 11)
|
||||
// return Redirect("/AdminNew/Company/RollCall");
|
||||
|
||||
WorkshopId = workshopId;
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
|
||||
var account = new AuthViewModel()
|
||||
{
|
||||
WorkshopList =
|
||||
[
|
||||
new WorkshopClaim
|
||||
{
|
||||
Id = workshop.Id,
|
||||
Name = workshop.WorkshopFullName,
|
||||
PersonnelCount = workshop.PersonnelCount,
|
||||
Slug = workshop.Slug }
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
RollCallWorkshopSettings = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
|
||||
if (RollCallWorkshopSettings.Id == 0)
|
||||
{
|
||||
return Redirect("/AdminNew/Company/RollCall");
|
||||
}
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopSettingsDataAjax(long workshopId)
|
||||
{
|
||||
//var account = _authHelper.CurrentAccountInfo();
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
var account = new AuthViewModel()
|
||||
{
|
||||
WorkshopList =
|
||||
[
|
||||
new WorkshopClaim
|
||||
{
|
||||
Id = workshop.Id,
|
||||
Name = workshop.WorkshopFullName,
|
||||
PersonnelCount = workshop.PersonnelCount,
|
||||
Slug = workshop.Slug }
|
||||
]
|
||||
};
|
||||
|
||||
var result = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = true,
|
||||
data = result
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeesGroupAjax(long groupId)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByGroupSettingsId(groupId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = result
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateGroup(long workshopSettingId)
|
||||
{
|
||||
var command = new CreateCustomizeWorkshopGroupSettings
|
||||
{
|
||||
CustomizeWorkshopSettingId = workshopSettingId
|
||||
};
|
||||
return Partial("ModalCreateGroup", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateGroup(CreateCustomizeWorkshopGroupSettings command)
|
||||
{
|
||||
command.Salary = "0";
|
||||
OperationResult result = _customizeWorkshopSettingsApplication.CreateGroupSettingsByRollCallWorkshopSettingId(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEditGroup(long groupId)
|
||||
{
|
||||
var command = _customizeWorkshopSettingsApplication.GetCustomizeWorkshopGroupSettingsDetails(groupId);
|
||||
|
||||
command.IsShiftChanged = _customizeWorkshopSettingsApplication
|
||||
.GetEmployeeSettingsByGroupSettingsId(groupId)
|
||||
.Any(x => x.IsSettingChanged == true);
|
||||
return Partial("ModalEditGroup", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostEditGroup(EditCustomizeWorkshopGroupSettings command)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.EditSimpleRollCallGroupSetting(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeIsChangeList(long groupId)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByGroupSettingsId(groupId)
|
||||
.Where(x => x.IsSettingChanged).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = result
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostDeleteGroup(long groupId)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.RemoveGroupSettings(groupId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeGroupAjax(long rollCallWorkshopSettingId)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.GetEmployeesWithoutGroup(rollCallWorkshopSettingId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = result
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateEmployee(long workshopSettingId, long groupId)
|
||||
{
|
||||
var command = new CreateCustomizeEmployeeSettings()
|
||||
{
|
||||
WorkshopSettingId = workshopSettingId,
|
||||
GroupId = groupId
|
||||
};
|
||||
|
||||
return Partial("ModalAddEmployeeToGroup", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateEmployee(CreateCustomizeEmployeeSettings command, long workshopId)
|
||||
{
|
||||
command.WorkshopId = workshopId;
|
||||
OperationResult result = _customizeWorkshopSettingsApplication.CreateEmployeeSettings(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployee(long employeeId, long groupId, long workshopId)
|
||||
{
|
||||
OperationResult result = _customizeWorkshopSettingsApplication.RemoveEmployeeFromRollCallWorkshopGroup(employeeId, groupId, workshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEditEmployee(long groupId, List<long> employeeId, long workshopId)
|
||||
{
|
||||
var employee = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByEmployeeIdGroupSettingsId(workshopId, employeeId.First());
|
||||
var command = new EditCustomizeEmployeeSettings()
|
||||
{
|
||||
Id = employee.Id,
|
||||
EmployeeIds = employeeId,
|
||||
EmployeeFullName = employee.EmployeeFullName,
|
||||
Salary = employee.Salary.ToMoney(),
|
||||
NameGroup = employee.Name,
|
||||
ShiftViewModel = employee.RollCallWorkshopShifts,
|
||||
BreakTime = employee.BreakTime,
|
||||
WorkshopShiftStatus = employee.WorkshopShiftStatus,
|
||||
IrregularShift = employee.IrregularShift
|
||||
};
|
||||
return Partial("ModalEditEmployeeFromGroup", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostChangeEditEmployee(EditCustomizeEmployeeSettings command, long workshopId)
|
||||
{
|
||||
command.WorkshopId = workshopId;
|
||||
OperationResult result = _customizeWorkshopSettingsApplication.EditSimpleRollCallEmployeeSetting(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
// public IActionResult OnGetGroupingSetting(long groupId)
|
||||
// {
|
||||
// var command = _customizeWorkshopSettingsApplication.GetCustomizeWorkshopGroupSettingsDetails(groupId);
|
||||
|
||||
// return Partial("ModalSettingGroup", command);
|
||||
//}
|
||||
|
||||
// public IActionResult OnPostGroupingSetting(EditCustomizeWorkshopGroupSettings command)
|
||||
// {
|
||||
// command.EmployeeIds = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByGroupSettingsId(command.Id).Select(x => x.EmployeeId).ToList();
|
||||
// OperationResult result = _customizeWorkshopSettingsApplication.EditRollCallGroupSetting(command);
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccess = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
//}
|
||||
|
||||
//public IActionResult OnGetGroupingEmployeeSetting(long customizeEmployeeId, List<long> employeeId)
|
||||
// {
|
||||
// var command = _customizeWorkshopSettingsApplication.GetCustomizeEmployeeSettingsDetails(customizeEmployeeId);
|
||||
// command.EmployeeIds = employeeId;
|
||||
|
||||
// return Partial("ModalSettingGroupEmployee", command);
|
||||
// }
|
||||
|
||||
// public IActionResult OnPostGroupingEmployeeSetting(EditCustomizeEmployeeSettings command)
|
||||
// {
|
||||
// command.WorkshopId = _workshopId;
|
||||
// OperationResult result = _customizeWorkshopSettingsApplication.EditRollCallEmployeeSettings(command);
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccess = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -1,88 +1,265 @@
|
||||
@page
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.IndexModel
|
||||
|
||||
@{
|
||||
var index = 1;
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<h6 class="mb-3">مدیریت حضور و غیاب</h6>
|
||||
@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" />
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class=" d-flex align-items-center justify-content-between">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="card-title">موسسه حقوقی نور دادمهر گستر کاسپین</div>
|
||||
</div>
|
||||
<link href="~/AssetsAdminNew/Ticket/css/ticket-list.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsAdminNew/Ticket/css/ticket-create.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsAdminNew/Ticket/css/ticket-message.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsAdminNew/Ticket/css/Index.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<button>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.19194 13.3081C4.07473 13.1908 3.91576 13.125 3.75 13.125C3.58424 13.125 3.42527 13.1908 3.30806 13.3081C3.19085 13.4253 3.125 13.5842 3.125 13.75C3.125 13.9158 3.19085 14.0747 3.30806 14.1919L5.80806 16.6919C5.92527 16.8092 6.08424 16.875 6.25 16.875C6.41576 16.875 6.57473 16.8092 6.69194 16.6919L9.19171 14.1922C9.30892 14.075 9.375 13.9158 9.375 13.75C9.375 13.5842 9.30915 13.4253 9.19194 13.3081C9.07473 13.1908 8.91576 13.125 8.75 13.125C8.58424 13.125 8.42527 13.1908 8.30806 13.3081L6.25 15.3661L4.19194 13.3081Z" fill="white" />
|
||||
<path d="M5.625 3.75V16.25C5.625 16.5952 5.90482 16.875 6.25 16.875C6.59518 16.875 6.875 16.5952 6.875 16.25V3.75C6.875 3.40482 6.59518 3.125 6.25 3.125C5.90482 3.125 5.625 3.40482 5.625 3.75Z" fill="white" />
|
||||
<path d="M15.8077 6.69162C15.9249 6.80883 16.0842 6.875 16.25 6.875C16.4158 6.875 16.5747 6.80915 16.6919 6.69194C16.8092 6.57473 16.875 6.41576 16.875 6.25C16.875 6.08424 16.8092 5.92527 16.6919 5.80806L14.1919 3.30806C14.0747 3.19085 13.9158 3.125 13.75 3.125C13.5842 3.125 13.4253 3.19085 13.3081 3.30806L10.8081 5.80806C10.6908 5.92527 10.625 6.08424 10.625 6.25C10.625 6.26001 10.6252 6.27002 10.6257 6.28002C10.6332 6.43522 10.6982 6.58207 10.8081 6.69194C10.9253 6.80915 11.0842 6.875 11.25 6.875C11.4158 6.875 11.5747 6.80915 11.6919 6.69194L13.75 4.63388L15.8077 6.69162Z" fill="white" />
|
||||
<path d="M14.375 16.25V3.75C14.375 3.40482 14.0952 3.125 13.75 3.125C13.4048 3.125 13.125 3.40482 13.125 3.75V16.25C13.125 16.5952 13.4048 16.875 13.75 16.875C14.0952 16.875 14.375 16.5952 14.375 16.25Z" fill="white" />
|
||||
</svg>
|
||||
</button>
|
||||
<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/filter-search.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
|
||||
<button>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.625 10C15.625 10.1658 15.5592 10.3247 15.4419 10.4419C15.3247 10.5592 15.1658 10.625 15 10.625H5C4.83424 10.625 4.67527 10.5592 4.55806 10.4419C4.44085 10.3247 4.375 10.1658 4.375 10C4.375 9.83424 4.44085 9.67527 4.55806 9.55806C4.67527 9.44085 4.83424 9.375 5 9.375H15C15.1658 9.375 15.3247 9.44085 15.4419 9.55806C15.5592 9.67527 15.625 9.83424 15.625 10ZM18.125 5.625H1.875C1.70924 5.625 1.55027 5.69085 1.43306 5.80806C1.31585 5.92527 1.25 6.08424 1.25 6.25C1.25 6.41576 1.31585 6.57473 1.43306 6.69194C1.55027 6.80915 1.70924 6.875 1.875 6.875H18.125C18.2908 6.875 18.4497 6.80915 18.5669 6.69194C18.6842 6.57473 18.75 6.41576 18.75 6.25C18.75 6.08424 18.6842 5.92527 18.5669 5.80806C18.4497 5.69085 18.2908 5.625 18.125 5.625ZM11.875 13.125H8.125C7.95924 13.125 7.80027 13.1908 7.68306 13.3081C7.56585 13.4253 7.5 13.5842 7.5 13.75C7.5 13.9158 7.56585 14.0747 7.68306 14.1919C7.80027 14.3092 7.95924 14.375 8.125 14.375H11.875C12.0408 14.375 12.1997 14.3092 12.3169 14.1919C12.4342 14.0747 12.5 13.9158 12.5 13.75C12.5 13.5842 12.4342 13.4253 12.3169 13.3081C12.1997 13.1908 12.0408 13.125 11.875 13.125Z" fill="white" />
|
||||
</svg>
|
||||
</button>
|
||||
<!-- sweet alerts -->
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
|
||||
<button>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.625 4.375C10.625 4.02982 10.3452 3.75 10 3.75C9.65482 3.75 9.375 4.02982 9.375 4.375V9.375H4.375C4.02982 9.375 3.75 9.65482 3.75 10C3.75 10.3452 4.02982 10.625 4.375 10.625H9.375V15.625C9.375 15.9702 9.65482 16.25 10 16.25C10.3452 16.25 10.625 15.9702 10.625 15.625V10.625H15.625C15.9702 10.625 16.25 10.3452 16.25 10C16.25 9.65482 15.9702 9.375 15.625 9.375H10.625V4.375Z" fill="white" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="search-table position-relative">
|
||||
<input type="text" class="border-0" placeholder="جستجو">
|
||||
<button class="position-absolute end-0 p-1">
|
||||
<svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.35 14.3563C14.2566 14.4483 14.131 14.4999 14 14.5001C13.8672 14.4995 13.7397 14.4481 13.6437 14.3563L10.9437 11.6501C9.80659 12.6052 8.34462 13.0845 6.86273 12.9879C5.38083 12.8913 3.99343 12.2264 2.98988 11.1317C1.98633 10.0371 1.44412 8.59729 1.47633 7.1126C1.50855 5.62791 2.11269 4.21298 3.16277 3.1629C4.21286 2.11282 5.62779 1.50867 7.11248 1.47645C8.59717 1.44424 10.037 1.98645 11.1316 2.99C12.2263 3.99355 12.8912 5.38095 12.9878 6.86285C13.0844 8.34474 12.6051 9.80671 11.65 10.9438L14.35 13.6438C14.3972 13.6904 14.4347 13.7458 14.4603 13.807C14.486 13.8681 14.4991 13.9338 14.4991 14.0001C14.4991 14.0664 14.486 14.132 14.4603 14.1932C14.4347 14.2544 14.3972 14.3098 14.35 14.3563ZM7.24997 12.0001C8.18944 12.0001 9.1078 11.7215 9.88893 11.1996C10.6701 10.6776 11.2789 9.93579 11.6384 9.06784C11.9979 8.19989 12.092 7.24483 11.9087 6.32342C11.7254 5.40201 11.273 4.55564 10.6087 3.89134C9.94443 3.22704 9.09806 2.77465 8.17665 2.59137C7.25524 2.40809 6.30018 2.50215 5.43223 2.86167C4.56428 3.22119 3.82243 3.83001 3.30049 4.61114C2.77856 5.39227 2.49997 6.31064 2.49997 7.2501C2.50163 8.50937 3.0026 9.71659 3.89304 10.607C4.78348 11.4975 5.9907 11.9984 7.24997 12.0001Z" fill="white" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
@@media (max-width: 767px) {
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 3px;
|
||||
z-index: 60;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="card p-0">
|
||||
<div class="">
|
||||
<div class="w-100">
|
||||
<table class="table table-hover table-transparent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ردیف</th>
|
||||
<th scope="col">نام پرسنل</th>
|
||||
<th scope="col">شماره پرسنلی</th>
|
||||
<th scope="col">ساعت ورود</th>
|
||||
<th scope="col">ساعت خروج</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td scope="row">1</td>
|
||||
<td>سعید اسلامی</td>
|
||||
<td>1</td>
|
||||
<td>08:00</td>
|
||||
<td>16:30</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row">1</td>
|
||||
<td>سعید اسلامی</td>
|
||||
<td>1</td>
|
||||
<td>08:00</td>
|
||||
<td>16:30</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pb-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex">
|
||||
<img src="~/AssetsClient/images/icons/headphone.png" alt="" class="img-fluid me-2" style="width: 45px;object-fit: cover;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">مدیریت حضور و غیاب</h4>
|
||||
<div class="title d-flex align-items-center">کارگاه نورداد مهر گستر کاسپین</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-rounded mb-5 goToTop"> <i class="fa fa-chevron-up" style="font-size: 20px"></i> برو بالا</button>
|
||||
|
||||
|
||||
@* <input type="hidden" asp-for="SearchModel.PageIndex" id="pageIndex" value="@Model.SearchModel.PageIndex" /> *@
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<div class="d-flex w-100 section-btns-task">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
|
||||
<div class="wrapper list-box table-ticket bg-white ">
|
||||
|
||||
<div class="Rtable Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky">
|
||||
<div class="Rtable-cell column-heading width1">
|
||||
<span class="d-flex justify-content-start text-white align-items-center">
|
||||
@* <input type="checkbox" class="form-check-input checkAll me-1" name="" id="checkAll2"> *@
|
||||
<label for="checkAll2">ردیف</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width2">نام کارگاه</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width3">نوع سرویس</div>
|
||||
<div class="Rtable-cell column-heading width4">تعداد پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width5">تعداد پرسنل فعال</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width6">تعداد پرسنل در حال حضور و غیاب</div>
|
||||
<div class="Rtable-cell column-heading width7 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<div class="ticket-list Rtable-row align-items-center position-relative openAction">
|
||||
<div class="Rtable-cell d-md-block d-flex width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center">
|
||||
@* <input type="checkbox" class="form-check-input " name="" id=""> *@
|
||||
@(index++)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width2">
|
||||
<div class="Rtable-cell--content">@item.WorkshopName</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
<div class="Rtable-cell--content">@item.RollCallServiceType</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="Rtable-cell--content text-start">@item.TotalEmployeesCount</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width5">
|
||||
<div class="Rtable-cell--content text-start">@item.ActiveEmployeesCount</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width6">
|
||||
<div class="Rtable-cell--content">@item.ActiveEmployeesWithRollCallInLastWeekCount</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width8 text-end">
|
||||
<div class="Rtable-cell--content align-items-center d-flex justify-content-end">
|
||||
<a asp-area="AdminNew" asp-page="./Options" asp-route-workshopId="@item.WorkshopId" type="button" class="btn-ticket-detail position-relative d-md-block d-none">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
|
||||
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
|
||||
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
|
||||
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
|
||||
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</a>
|
||||
|
||||
<button type="button" class="btn-ticket-delete 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-linecap="round" />
|
||||
<path d="M13.2917 13.2915L13.2917 10.5415" 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-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-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">حذف</span>
|
||||
</button>
|
||||
<button type="button" class="btn-ticket-more d-md-none d-block position-relative">
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
<p class="my-0 mx-1">عملیات</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)" />
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)" />
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="operation-div w-100">
|
||||
<div class="operations-btns">
|
||||
<div class="row p-0">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span class="span1">نام کارگاه</span>
|
||||
<span class="span1">@item.WorkshopName</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span class="span2">نوع سرویس</span>
|
||||
<span class="span2">@item.RollCallServiceType</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span class="span2">تعداد پرسنل</span>
|
||||
<span class="span2">@item.TotalEmployeesCount</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span class="span2">تعداد پرسنل فعال</span>
|
||||
<span class="span2">@item.ActiveEmployeesCount</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<span class="span2">تعداد پرسنل در حال حضور و غیاب</span>
|
||||
<span class="span2">@item.ActiveEmployeesWithRollCallInLastWeekCount</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-12">
|
||||
<button type="button" class="btn-ticket-detail position-relative d-md-none d-flex align-items-center justify-content-center w-100" onclick="OptionsRollCall(@item.WorkshopId)">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
|
||||
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
|
||||
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
|
||||
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
|
||||
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xl-messageModal modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
|
||||
<script>
|
||||
if ($(window).width() < 768) {
|
||||
$(document).on("click", ".openAction", function () {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click',
|
||||
function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
//ajaxDataWithoutEmployee();
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.goToTop').on('click',
|
||||
function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function OptionsRollCall(id) {
|
||||
var workshopId = Number(id);
|
||||
var goTo = `@Url.Page("/Company/RollCall/Options")`;
|
||||
window.location.href = goTo + workshopId;
|
||||
}
|
||||
|
||||
</script>
|
||||
}
|
||||
@@ -1,12 +1,23 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Query.AdminReports.Handlers;
|
||||
using Query.AdminReports.Models;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
private readonly IGetWorkshopWithRollCallHandler _workshopWithRollCallHandler;
|
||||
public List<WorkshopWithRollCallServiceQueryModel> Items { get; set; }
|
||||
|
||||
public IndexModel(IGetWorkshopWithRollCallHandler workshopWithRollCallHandler)
|
||||
{
|
||||
_workshopWithRollCallHandler = workshopWithRollCallHandler;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
Items = _workshopWithRollCallHandler.Handle(new WorkshopWithRollCallServiceQueryParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.CreateCustomizeEmployeeSettings
|
||||
@{
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
<div class="modal-content" style="height: 450px;">
|
||||
<div class="modal-header d-block text-center">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="createNewGroupLabel">افزودن اعضاء به گروه</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row g-2">
|
||||
<div class="col-12">
|
||||
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||
<div class="from-group">
|
||||
<input class="form-check-input selectAll" type="checkbox" name="selectAll" id="selectAll">
|
||||
<label class="form-check-label" for="selectAll">
|
||||
انتخاب همه
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="from-group">
|
||||
<input type="text" class="form-control" placeholder="جستجو" id="search" onkeyup="searchMember()">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" style="overflow: auto; height: 230px;" id="PersonnelList">
|
||||
<div id="loadingSkeleton">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 2px 0 !important;"></div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2" data-bs-dismiss="modal">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register" onclick="saveEmployeeData()">افزودن</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var loadEmployeeGroupAjax = `@Url.Page("./Grouping", "EmployeeGroupAjax")`;
|
||||
var saveEmployeeToGroupAjax = `@Url.Page("./Grouping", "CreateEmployee")`;
|
||||
var workshopSettingId = Number(@Model.WorkshopSettingId);
|
||||
var groupId = Number(@Model.GroupId);
|
||||
var workshopSettingId = Number(@Model.WorkshopSettingId);
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/modaladdemployeetogroup.js?ver=32"></script>
|
||||
@@ -0,0 +1,192 @@
|
||||
@model CompanyManagment.App.Contracts.RollCall.CreateOrEditEmployeeRollCall
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css?ver=@adminVersion">
|
||||
<link href="~/AssetsClient/css/select2.css" rel="stylesheet" />
|
||||
<style>
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.modal-dialog, .modal-content {
|
||||
height: 420px;
|
||||
}
|
||||
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBox .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.ShowMessage {
|
||||
position: absolute;
|
||||
background: #dfdfdf;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.heightControll {
|
||||
height: 190px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h4 class="textListTitle">افزودن ساعت حضور و غیاب</h4>
|
||||
<h6 class="textListTitle" id="modalWorkshopFullname"></h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body py-0">
|
||||
<div class="container p-0 m-0">
|
||||
<div class="row">
|
||||
<div class="col-12 my-1">
|
||||
<div class="select-alert">
|
||||
<select class="form-select select2OptionAddModal" aria-label="انتخاب پرسنل ..." name="Command.EmployeeId" id="employeeSelectAddModal">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1">
|
||||
<input class="form-control form-control-date text-center" name="Command.DateFa" placeholder="تاریخ" style="direction: ltr" />
|
||||
</div>
|
||||
|
||||
<div class="heightControll">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100" id="prev-step" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register w-100 position-relative" id="next-step">
|
||||
<span>ثبت</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var saveRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
|
||||
var employeeListAjax = `@Url.Page("./CaseHistory", "EmployeeList")`;
|
||||
|
||||
var checkEmployeeData = `@Url.Page("./CaseHistory", "CheckEmployeeData")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/ModalAddRollCall.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,184 @@
|
||||
@model AccountManagement.Application.Contracts.CameraAccount.CameraAccountViewModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/assetsclient/pages/profile/css/modalcameraaccountchangepassword.css" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form2" id="create-form2" autocomplete="off">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header d-block text-center">
|
||||
<svg width="56" height="56" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M57.5025 30.5801C57.5025 44.0276 47.74 56.6226 34.4025 60.3076C33.495 60.5551 32.505 60.5551 31.5975 60.3076C18.26 56.6226 8.4975 44.0276 8.4975 30.5801V18.5075C8.4975 16.2525 10.2025 13.695 12.32 12.8425L27.6375 6.57263C31.075 5.17013 34.9525 5.17013 38.39 6.57263L53.7075 12.8425C55.7975 13.695 57.53 16.2525 57.53 18.5075L57.5025 30.5801Z" stroke="url(#paint0_linear_320_3375)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M33 34.375C36.0376 34.375 38.5 31.9126 38.5 28.875C38.5 25.8374 36.0376 23.375 33 23.375C29.9624 23.375 27.5 25.8374 27.5 28.875C27.5 31.9126 29.9624 34.375 33 34.375Z" stroke="url(#paint1_linear_320_3375)" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M33 34.375V42.625" stroke="url(#paint2_linear_320_3375)" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_320_3375" x1="33.0138" y1="5.52075" x2="33.0138" y2="60.4932" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#2EC0C0" />
|
||||
<stop offset="1" stop-color="#087373" />
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_320_3375" x1="33" y1="23.375" x2="33" y2="34.375" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#2EC0C0" />
|
||||
<stop offset="1" stop-color="#087373" />
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_320_3375" x1="33.5" y1="34.375" x2="33.5" y2="42.625" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#087373" />
|
||||
<stop offset="1" stop-color="#2EC0C0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
<h5 class="modal-title text-center" id="profilePasswordModalLabel">تغییر رمز دوربین</h5>
|
||||
<h6 class="modal-title text-center">@Model.WorkshopName</h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="codeDiv" style="display: none">
|
||||
<div class="otp" style="display: none">
|
||||
<input type="text" id="n0" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" autofocus data-next="1">
|
||||
<input type="text" id="n1" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="2">
|
||||
<input type="text" id="n2" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="3">
|
||||
<input type="text" id="n3" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="4">
|
||||
<input type="text" id="n4" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="5">
|
||||
<input type="text" id="n5" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off">
|
||||
</div>
|
||||
<div class="text-center mt-2">
|
||||
<div id="msg">
|
||||
<p class="m-0">با کلیک بروی دکمه "دریافت کد"، کد یکبار مصرف برای شما ارسال میگردد.</p></div>
|
||||
<div class="align-items-center justify-content-center" id="timerCount" style="display: none">
|
||||
<div>
|
||||
<p class="m-0">برای تغییر رمز ابتدا کد دریافتی را وارد کنید</p></div>
|
||||
<p class="mx-1">زمان باقی مانده تا انقضاء کد دریافتی</p>
|
||||
<p class="countdown" id="timer"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center loading" style="display: none">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container p-0 m-0" id="form">
|
||||
<div class="row">
|
||||
|
||||
<input type="hidden" name="Command.Id" value="@Model.Id" />
|
||||
|
||||
<div class="col-12">
|
||||
<div class="d-flex align-items-center justify-content-between" style="background: #e8e8e8;padding: 7px; border: 1px solid #E1E1E1;border-radius: 10px;">
|
||||
<span style="font-size: 13px;color: #626262;">حساب کاربری</span>
|
||||
<span style="font-size: 13px;color: #626262;">@Model.Username</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="form-group text-start my-2">
|
||||
<label for="signupInputPassword">گذرواژه</label>
|
||||
<div class="position-relative">
|
||||
<input name="Command.Password" type="password" autocomplete="new-password" class="form-control mb-1" id="signupInputPassword" aria-describedby="passwordHelp" placeholder="رمز جدید" style="direction: ltr;" />
|
||||
|
||||
<button type="button" class="position-absolute top-0 start-0 m-1 bg-transparent" onclick="passFunction()">
|
||||
<svg class="eyeShow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.58 11.9999C15.58 13.9799 13.98 15.5799 12 15.5799C10.02 15.5799 8.42004 13.9799 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C13.98 8.41992 15.58 10.0199 15.58 11.9999Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 20.27C15.53 20.27 18.82 18.19 21.11 14.59C22.01 13.18 22.01 10.81 21.11 9.39997C18.82 5.79997 15.53 3.71997 12 3.71997C8.46997 3.71997 5.17997 5.79997 2.88997 9.39997C1.98997 10.81 1.98997 13.18 2.88997 14.59C5.17997 18.19 8.46997 20.27 12 20.27Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg class="eyeClose" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.53 9.46992L9.47004 14.5299C8.82004 13.8799 8.42004 12.9899 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C12.99 8.41992 13.88 8.81992 14.53 9.46992Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17.82 5.76998C16.07 4.44998 14.07 3.72998 12 3.72998C8.46997 3.72998 5.17997 5.80998 2.88997 9.40998C1.98997 10.82 1.98997 13.19 2.88997 14.6C3.67997 15.84 4.59997 16.91 5.59997 17.77" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8.42004 19.5299C9.56004 20.0099 10.77 20.2699 12 20.2699C15.53 20.2699 18.82 18.1899 21.11 14.5899C22.01 13.1799 22.01 10.8099 21.11 9.39993C20.78 8.87993 20.42 8.38993 20.05 7.92993" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M15.5099 12.7C15.2499 14.11 14.0999 15.26 12.6899 15.52" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.47 14.53L2 22" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M22 2L14.53 9.47" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="input-icon-right peek-password-button" data-peek-password="signupInputPassword">
|
||||
<span class="peek-password-icon icon-visibility d-none"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="password-strength-group" data-strength="">
|
||||
<div id="password-strength-meter" class="password-strength-meter" style="direction: ltr;">
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
</div>
|
||||
|
||||
<div class="password-strength-message">
|
||||
<div class="message-item">
|
||||
ضعیف
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
متوسط
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
خوب
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
عالی
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mt-3">
|
||||
<div class="position-relative">
|
||||
<input type="password" name="Command.RePassword" class="form-control" id="repeat_password" placeholder="تکرار گذرواژه" style="direction: ltr;"/>
|
||||
<button type="button" class="position-absolute top-0 start-0 m-1 bg-transparent" onclick="rePassFunction()">
|
||||
<svg class="reEyeShow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.58 11.9999C15.58 13.9799 13.98 15.5799 12 15.5799C10.02 15.5799 8.42004 13.9799 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C13.98 8.41992 15.58 10.0199 15.58 11.9999Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 20.27C15.53 20.27 18.82 18.19 21.11 14.59C22.01 13.18 22.01 10.81 21.11 9.39997C18.82 5.79997 15.53 3.71997 12 3.71997C8.46997 3.71997 5.17997 5.79997 2.88997 9.39997C1.98997 10.81 1.98997 13.18 2.88997 14.59C5.17997 18.19 8.46997 20.27 12 20.27Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg class="reEyeClose" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.53 9.46992L9.47004 14.5299C8.82004 13.8799 8.42004 12.9899 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C12.99 8.41992 13.88 8.81992 14.53 9.46992Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17.82 5.76998C16.07 4.44998 14.07 3.72998 12 3.72998C8.46997 3.72998 5.17997 5.80998 2.88997 9.40998C1.98997 10.82 1.98997 13.19 2.88997 14.6C3.67997 15.84 4.59997 16.91 5.59997 17.77" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8.42004 19.5299C9.56004 20.0099 10.77 20.2699 12 20.2699C15.53 20.2699 18.82 18.1899 21.11 14.5899C22.01 13.1799 22.01 10.8099 21.11 9.39993C20.78 8.87993 20.42 8.38993 20.05 7.92993" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M15.5099 12.7C15.2499 14.11 14.0999 15.26 12.6899 15.52" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.47 14.53L2 22" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M22 2L14.53 9.47" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div id="passwordErrorMessage" class="text-danger" style="text-align: start; font-size: 12px; position: absolute; bottom: -20px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowAccountMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel justify-content-center w-100" id="prev-step" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-primary w-100" id="sentCode" style="display: none" onclick="handleSmsReceiverClick()">دریافت کد مجدد</button>
|
||||
<button type="button" class="btn-primary w-100 disable" id="submit" style="display: none" onclick="changePasswordCameraAccount()">تایید کد</button>
|
||||
<button type="button" class="btn-primary w-100" id="btnSmsReceiver">ثبت ویرایش</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var saveCameraAccountPasswordChangeAjax = `@Url.Page("./CameraAccounts", "ChangeCameraPassword")`;
|
||||
var sendSmsAjax = `@Url.Page("./CameraAccounts", "SendSms")`;
|
||||
var checkCodeAjax = `@Url.Page("./CameraAccounts", "CheckCode")`;
|
||||
var ajaxCameraValidation = `@Url.Page("./CameraAccounts", "CameraValidation")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/RollCall/js/ModalCameraAccountChangePassword.js?ver=adssssminVersion"></script>
|
||||
@@ -0,0 +1,92 @@
|
||||
@model CompanyManagment.App.Contracts.RollCallEmployee.RollCallEmployeeViewModel
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.textLFontColor,
|
||||
.form-control {
|
||||
color: #797979;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.textLFontColor span {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.btnCreateNew {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btnCreateNew:hover {
|
||||
background-color: #5f9213;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header pb-0 d-flex align-items-center justify-content-center text-center">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div>
|
||||
<p class="m-0 pdHeaderTitle1">تغییر نام پرسنل</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<input type="hidden" name="rollCallEmployeeId" id="rollCallEmployeeId" value="@Model.Id" />
|
||||
<div class="col-12 my-1">
|
||||
<input class="form-control" name="fName" id="EmployeeFName" value="@Model.EmployeeFName" placeholder="نام" />
|
||||
</div>
|
||||
<div class="col-12 my-1">
|
||||
<input class="form-control" name="lName" id="EmployeeLName" value="@Model.EmployeeLName" placeholder="نام خانوادگی" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer d-block">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 w-100 d-flex align-items-center justify-content-center" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btnCreateNew w-100 d-flex align-items-center justify-content-center position-relative" id="createData">
|
||||
<span>تغییر</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<script src="~/assetsclient/js/site.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var saveChangeNameAjax = `@Url.Page("./EmployeeUploadPicture", "ChangeName")`;
|
||||
var employeeId = Number(@Model.EmployeeId);
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/RollCall/js/ModalChangeName.js?ver=963"></script>
|
||||
@@ -0,0 +1,310 @@
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.RollCall.AccountAndSettingViewModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css">
|
||||
<link href="~/assetsclient/pages/rollcall/css/modalcreateaccountsetting.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
|
||||
<input type="hidden" asp-for="@Model.HasCamera" />
|
||||
<input type="hidden" asp-for="@Model.HasGroupWorkshop" />
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div class="d-flex justify-content-center align-items-center" style="margin: 15px 0 0 0;">
|
||||
<div class="step-progress">
|
||||
<h5 class="d-flex justify-content-center align-items-center" id="step-1">1</h5>
|
||||
<p>ساخت اکانت جدید</p>
|
||||
</div>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step-progress">
|
||||
<h5 class="d-flex justify-content-center align-items-center not-step" id="step-2">2</h5>
|
||||
<p>ساعات کاری مجموعه</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container p-0 m-0" id="step-form1">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group text-start my-2">
|
||||
<label for="username">حساب کاربری</label>
|
||||
<div class="position-relative">
|
||||
<input type="text" class="form-control" id="username" asp-for="CreateCameraAccount.Username" placeholder="" style="direction: ltr;" />
|
||||
|
||||
<div class="position-absolute top-0 start-0 m-1 bg-transparent">
|
||||
<div class="spinner-border spinner-border-sm m-1 d-none" id="loadingSpinner" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<svg id="successSvg" class="d-none" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="14" cy="14" r="10.5" stroke="#65A30D" stroke-width="1.5" />
|
||||
<path d="M9.33342 14L12.8334 17.5L18.6667 10.5" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
<svg id="errorSvg" class="d-none" width="28" height="28" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke="#ef4444" stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group text-start my-2">
|
||||
<label for="signupInputPassword">گذرواژه</label>
|
||||
<div class="position-relative">
|
||||
<input asp-for="CreateCameraAccount.Password" type="password" class="form-control mb-1" id="signupInputPassword" aria-describedby="passwordHelp" placeholder="رمز جدید" style="direction: ltr;" />
|
||||
|
||||
<button type="button" class="position-absolute top-0 start-0 m-1 bg-transparent" onclick="passFunction()">
|
||||
<svg class="eyeShow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.58 11.9999C15.58 13.9799 13.98 15.5799 12 15.5799C10.02 15.5799 8.42004 13.9799 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C13.98 8.41992 15.58 10.0199 15.58 11.9999Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 20.27C15.53 20.27 18.82 18.19 21.11 14.59C22.01 13.18 22.01 10.81 21.11 9.39997C18.82 5.79997 15.53 3.71997 12 3.71997C8.46997 3.71997 5.17997 5.79997 2.88997 9.39997C1.98997 10.81 1.98997 13.18 2.88997 14.59C5.17997 18.19 8.46997 20.27 12 20.27Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="eyeClose" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.53 9.46992L9.47004 14.5299C8.82004 13.8799 8.42004 12.9899 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C12.99 8.41992 13.88 8.81992 14.53 9.46992Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M17.82 5.76998C16.07 4.44998 14.07 3.72998 12 3.72998C8.46997 3.72998 5.17997 5.80998 2.88997 9.40998C1.98997 10.82 1.98997 13.19 2.88997 14.6C3.67997 15.84 4.59997 16.91 5.59997 17.77" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M8.42004 19.5299C9.56004 20.0099 10.77 20.2699 12 20.2699C15.53 20.2699 18.82 18.1899 21.11 14.5899C22.01 13.1799 22.01 10.8099 21.11 9.39993C20.78 8.87993 20.42 8.38993 20.05 7.92993" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M15.5099 12.7C15.2499 14.11 14.0999 15.26 12.6899 15.52" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M9.47 14.53L2 22" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M22 2L14.53 9.47" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="input-icon-right peek-password-button" data-peek-password="signupInputPassword">
|
||||
<span class="peek-password-icon icon-visibility d-none"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="password-strength-group" data-strength="">
|
||||
<div id="password-strength-meter" class="password-strength-meter" style="direction: ltr;">
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
<div class="meter-block"></div>
|
||||
</div>
|
||||
|
||||
<div class="password-strength-message">
|
||||
<div class="message-item">
|
||||
ضعیف
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
متوسط
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
خوب
|
||||
</div>
|
||||
|
||||
<div class="message-item">
|
||||
عالی
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mt-3">
|
||||
<div class="position-relative">
|
||||
<input type="password" asp-for="CreateCameraAccount.RePassword" class="form-control" id="repeat_password" placeholder="تکرار گذرواژه" style="direction: ltr;" />
|
||||
<button type="button" class="position-absolute top-0 start-0 m-1 bg-transparent" onclick="rePassFunction()">
|
||||
<svg class="reEyeShow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.58 11.9999C15.58 13.9799 13.98 15.5799 12 15.5799C10.02 15.5799 8.42004 13.9799 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C13.98 8.41992 15.58 10.0199 15.58 11.9999Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 20.27C15.53 20.27 18.82 18.19 21.11 14.59C22.01 13.18 22.01 10.81 21.11 9.39997C18.82 5.79997 15.53 3.71997 12 3.71997C8.46997 3.71997 5.17997 5.79997 2.88997 9.39997C1.98997 10.81 1.98997 13.18 2.88997 14.59C5.17997 18.19 8.46997 20.27 12 20.27Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="reEyeClose" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.53 9.46992L9.47004 14.5299C8.82004 13.8799 8.42004 12.9899 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C12.99 8.41992 13.88 8.81992 14.53 9.46992Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M17.82 5.76998C16.07 4.44998 14.07 3.72998 12 3.72998C8.46997 3.72998 5.17997 5.80998 2.88997 9.40998C1.98997 10.82 1.98997 13.19 2.88997 14.6C3.67997 15.84 4.59997 16.91 5.59997 17.77" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M8.42004 19.5299C9.56004 20.0099 10.77 20.2699 12 20.2699C15.53 20.2699 18.82 18.1899 21.11 14.5899C22.01 13.1799 22.01 10.8099 21.11 9.39993C20.78 8.87993 20.42 8.38993 20.05 7.92993" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M15.5099 12.7C15.2499 14.11 14.0999 15.26 12.6899 15.52" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M9.47 14.53L2 22" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M22 2L14.53 9.47" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
<div id="passwordErrorMessage" class="text-danger" style="text-align: start;font-size: 12px;position: absolute;bottom: -20px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowAccountMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container p-0 m-0" id="step-form2" style="display: none">
|
||||
|
||||
<div class="p-0 m-0">
|
||||
<div class="d-flex flex-column align-items-center justify-content-center h-100">
|
||||
<div class="d-flex align-items-center justify-content-center mb-2">
|
||||
<p class="m-0">ساعات کاری مجموعه این کارگاه را مشخص نمائید</p>
|
||||
</div>
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center w-100">
|
||||
<input type="radio" value="Regular" name="CreateWorkshopSettings.WorkshopShiftStatus" id="organized" class="radio-workTimeOption">
|
||||
<label for="organized" class="radio-label-workTimeOption w-100">منقطع</label>
|
||||
|
||||
<input type="radio" value="Irregular" name="CreateWorkshopSettings.WorkshopShiftStatus" id="disorganized" class="radio-workTimeOption">
|
||||
<label for="disorganized" class="radio-label-workTimeOption w-100">مستمر</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" id="step_workTimeOption" style="height: 0">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
@if (Model.HasGroupWorkshop)
|
||||
{
|
||||
@for (var i = 0; i < Model.CreateWorkshopSettings.ShiftsList.Count(); i++)
|
||||
{
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="CreateWorkshopSettings.ShiftsList[0].Placement" value="@Model.CreateWorkshopSettings.ShiftsList[@i].Placement" disabled="disabled" />
|
||||
<div class="timeWorkTitle">
|
||||
@if (i == 0)
|
||||
{
|
||||
@("نوبت اول")
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
@("نوبت دوم")
|
||||
}
|
||||
else
|
||||
{
|
||||
@("نوبت سوم")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[0].StartTime" value="@Model.CreateWorkshopSettings.ShiftsList[@i].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[0].EndTime" value="@Model.CreateWorkshopSettings.ShiftsList[@i].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
@if (i == 0)
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M6.875 11H15.125" stroke="white" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="CreateWorkshopSettings.ShiftsList[0].Placement" value="First" />
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.HasGroupWorkshop)
|
||||
{
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
@if (Model.CreateWorkshopSettings.ShiftsList.Count() == 2)
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت سوم</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="step_workTimeOptionIrregular" style="display: none">
|
||||
<div class="show-disorganized mt-5">
|
||||
<p class="m-0">مجموعه بدون وقفه و بصورت مستمر فعال میباشد</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 justify-content-center w-100" id="prev-step">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register w-100" id="next-step">مرحله بعد</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var checkAccountAjax = `@Url.Page("./Index", "CheckAccount")`;
|
||||
var hasCamera = @(Model.HasCamera ? "true" : "false");
|
||||
var hasGroupWorkshop = @(Model.HasGroupWorkshop ? "true" : "false");
|
||||
var saveCameraAccountAndWorkshopSettingAjax = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/modalcameraaccount.js?ver=adminVersion"></script>
|
||||
@@ -0,0 +1,201 @@
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.CreateCustomizeWorkshopGroupSettings
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/AssetsAdminNew/rollcall/css/modalcreategroup.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2 pb-0">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h6>ایجاد گروه پرسنلی</h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
<input type="hidden" asp-for="@Model.CustomizeWorkshopSettingId" />
|
||||
<div class="container p-0 m-0">
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex align-items-center">
|
||||
<input type="text" class="form-control m-0" asp-for="@Model.Name" placeholder="نام گروه"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-0">
|
||||
<div class="d-flex flex-column align-items-center justify-content-center h-100">
|
||||
<div class="d-flex align-items-center justify-content-center mt-3 mb-1">
|
||||
<p class="m-0">ساعات کاری پرسنل این گروه را مشخص نمائید</p>
|
||||
</div>
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center w-100">
|
||||
<input type="radio" value="Regular" name="workshopShiftStatus" id="organized" class="radio-workTimeOption">
|
||||
<label for="organized" class="radio-label-workTimeOption w-100">منظم</label>
|
||||
|
||||
<input type="radio" value="Irregular" name="workshopShiftStatus" id="disorganized" class="radio-workTimeOption">
|
||||
<label for="disorganized" class="radio-label-workTimeOption w-100">مختلط</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" id="step_workTimeOption" style="height: 0; display: none">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="ShiftViewModel[0].Placement" id="Placement" value="First"/>
|
||||
<div class="timeWorkTitle">نوبت اول</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" id="startDateTime" name="ShiftViewModel[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" id="endDateTime" name="ShiftViewModel[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row p-0" id="step_workTimeOptionIrregular" style="height: 0; gap: 12px; display: none">
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center mt-4">
|
||||
<input type="radio" id="TwelveTwentyFour" value="@WorkshopIrregularShifts.TwelveTwentyFour" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption">
|
||||
<label for="TwelveTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 24 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourTwentyFour" value="@WorkshopIrregularShifts.TwentyFourTwentyFour" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption">
|
||||
<label for="TwentyFourTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 24 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center">
|
||||
<input type="radio" id="TwelveThirtySix" value="@WorkshopIrregularShifts.TwelveThirtySix" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption">
|
||||
<label for="TwelveThirtySix" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 36 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourFortyEight" value="@WorkshopIrregularShifts.TwentyFourFortyEight" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption">
|
||||
<label for="TwentyFourFortyEight" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 48 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="hrLine"></div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="groupBoxIrregular disable" id="irregularShiftsDateTime">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsStartDateTime" name="IrregularShift.StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsEndDateTime" name="IrregularShift.EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container my-2">
|
||||
<div class="row breack-time">
|
||||
<div>
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTimeFirst" name="BreakTime.hasBreakTimeValue" class="form-check-input">
|
||||
<label for="BreakTimeFirst" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت نامشخص با انتخاب این تیک پرسنل باید برای استراحت ورود و خروج ثبت کند.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-block">
|
||||
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTime" name="BreakTime.hasBreakTimeValue" class="form-check-input">
|
||||
<label for="BreakTime" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت ثابت روزانه می باشد که بصورت خودکار در فیش حقوقی محاسبه می گردد:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center my-1 mt-3 disable" id="computeTime">
|
||||
<div class="position-relative">
|
||||
<label for="hour" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">ساعت</label>
|
||||
<select id="hour" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="0" selected>انتخاب</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="mx-1">:</span>
|
||||
<div class="position-relative">
|
||||
<label for="min" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">دقیقه</label>
|
||||
<select id="min" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="00" selected>انتخاب</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="TimeOnly" name="BreakTime.BreakTimeValue"/>
|
||||
@* <span class="mx-1" id="computeTimeText"></span> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" id="btnSave" class="btn-register w-100" onclick="ajaxSaveData()">ثبت</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var ajaxCreateGroup = `@Url.Page("./Grouping", "CreateGroup")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/modalcreategroup.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,277 @@
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.EditCustomizeEmployeeSettings
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
int iteration = 0;
|
||||
int indexEmployee = 0;
|
||||
<link href="~/AssetsAdminNew/rollcall/css/modaleditemployeefromgroup.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2 pb-0">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h6>ویرایش ساعت کاری پرسنل @Model.EmployeeFullName</h6>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<form role="form" method="post" name="edit-employee-form" id="edit-employee-form" autocomplete="off">
|
||||
|
||||
<input type="hidden" name="Command.Id" value="@Model.Id" />
|
||||
|
||||
@foreach (var itemEmployee in Model.EmployeeIds)
|
||||
{
|
||||
<input type="hidden" name="Command.EmployeeIds[@indexEmployee]" value="@itemEmployee" />
|
||||
indexEmployee++;
|
||||
}
|
||||
|
||||
|
||||
<div class="container p-0 m-0">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex align-items-center">
|
||||
<input type="text" class="form-control m-0" value="@Model.NameGroup" placeholder="نام گروه" disabled="disabled"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-0">
|
||||
<div class="d-flex flex-column align-items-center justify-content-center h-100">
|
||||
<div class="d-flex align-items-center justify-content-center mt-3 mb-1">
|
||||
<p class="m-0">ساعات کاری پرسنل را مشخص نمائید</p>
|
||||
</div>
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center w-100">
|
||||
<input type="radio" value="Regular" name="Command.workshopShiftStatus" id="organized" class="radio-workTimeOption">
|
||||
<label for="organized" class="radio-label-workTimeOption w-100">منظم</label>
|
||||
|
||||
<input type="radio" value="Irregular" name="Command.workshopShiftStatus" id="disorganized" class="radio-workTimeOption">
|
||||
<label for="disorganized" class="radio-label-workTimeOption w-100">مختلط</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" id="step_workTimeOption" style="height: 0; display: none">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
|
||||
@if (Model.ShiftViewModel.Any())
|
||||
{
|
||||
@foreach (var item in Model.ShiftViewModel)
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="Command.ShiftViewModel[@iteration].Placement" value="@item.Placement"/>
|
||||
<div class="timeWorkTitle">
|
||||
@(item.Placement.ToString() == "First" ? "نوبت اول" : (item.Placement.ToString() == "Second" ? "نوبت دوم" : "نوبت سوم"))
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[@iteration].StartTime" value="@item.StartTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[@iteration].EndTime" value="@item.EndTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
@if (iteration == 0)
|
||||
{
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
iteration++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="Command.ShiftViewModel[0].Placement" value="First"/>
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[0].StartTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[0].EndTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
@if (Model.ShiftViewModel.Count() == 2)
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت سوم</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row p-0" id="step_workTimeOptionIrregular" style="height: 0; gap: 12px; @(Model.WorkshopShiftStatus == WorkshopShiftStatus.Regular ? "display: none" : "")">
|
||||
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center mt-4">
|
||||
<input type="radio" id="TwelveTwentyFour" value="@WorkshopIrregularShifts.TwelveTwentyFour" name="Command.IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwelveTwentyFour ? "checked" : "")>
|
||||
<label for="TwelveTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 24 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourTwentyFour" value="@WorkshopIrregularShifts.TwentyFourTwentyFour" name="Command.IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwentyFourTwentyFour ? "checked" : "")>
|
||||
<label for="TwentyFourTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 24 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center">
|
||||
<input type="radio" id="TwelveThirtySix" value="@WorkshopIrregularShifts.TwelveThirtySix" name="Command.IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwelveThirtySix ? "checked" : "")>
|
||||
<label for="TwelveThirtySix" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 36 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourFortyEight" value="@WorkshopIrregularShifts.TwentyFourFortyEight" name="Command.IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwentyFourFortyEight ? "checked" : "")>
|
||||
<label for="TwentyFourFortyEight" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 48 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="hrLine"></div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="groupBoxIrregular @(Model.WorkshopShiftStatus != WorkshopShiftStatus.Regular ? "" : "disable")" id="irregularShiftsDateTime">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsStartDateTime" value="@Model.IrregularShift.StartTime.ToString("HH:mm")" name="Command.IrregularShift.StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsEndDateTime" value="@Model.IrregularShift.EndTime.ToString("HH:mm")" name="Command.IrregularShift.EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container my-2">
|
||||
<div class="row breack-time">
|
||||
<div>
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTimeFirst" name="BreakTime.hasBreakTimeValue" class="form-check-input" @(Model.BreakTime.BreakTimeType == BreakTimeType.WithoutTime ? "checked" : "")>
|
||||
<label for="BreakTimeFirst" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت نامشخص با انتخاب این تیک پرسنل باید برای استراحت ورود و خروج ثبت کند.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-block">
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTime" name="BreakTime.hasBreakTimeValue" class="form-check-input" @(Model.BreakTime.BreakTimeType == BreakTimeType.WithTime ? "checked" : "")>
|
||||
<label for="BreakTime" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت ثابت روزانه می باشد که بصورت خودکار در فیش حقوقی محاسبه می گردد:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center my-1 mt-3 @(Model.BreakTime.BreakTimeType == BreakTimeType.None || Model.BreakTime.BreakTimeType == BreakTimeType.WithoutTime ? "disable" : "")" id="computeTime">
|
||||
<div class="position-relative">
|
||||
<label for="hour" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">ساعت</label>
|
||||
<select id="hour" asp-for="@Model.BreakTime.BreakTimeValue.Hour" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="0" selected>ساعت</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="mx-1">:</span>
|
||||
<div class="position-relative">
|
||||
<label for="min" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">دقیقه</label>
|
||||
<select id="min" asp-for="@Model.BreakTime.BreakTimeValue.Minute" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="00" selected>دقیقه</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" id="TimeOnly" name="Command.BreakTime.BreakTimeValue" value="@Model.BreakTime.BreakTimeValue.ToString("HH:mm")"/>
|
||||
@* <span class="mx-1" id="computeTimeText"></span> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" id="btnSave" class="btn-register w-100" onclick="ajaxEditEmployeeSaveData()">ثبت ویرایش</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var ajaxPostChangeEditEmployee = `@Url.Page("./Grouping", "ChangeEditEmployee")`;
|
||||
var indexShiftViewModel = Number(@iteration);
|
||||
|
||||
var IsRegularWorkshop = @(Model.WorkshopShiftStatus == WorkshopShiftStatus.Regular ? "true" : "false");
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/modaleditEmployeegroup.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,277 @@
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.EditCustomizeWorkshopGroupSettings
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
int indexShiftViewModel = 0;
|
||||
<link href="~/AssetsAdminNew/rollcall/css/modaleditgroup.css?var=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header d-block text-center mb-2 pb-0">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h6>ویرایش گروه</h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form role="form" method="post" name="edit-form" id="edit-form" autocomplete="off">
|
||||
<input type="hidden" asp-for="@Model.CustomizeWorkshopSettingId" />
|
||||
<div class="container p-0 m-0">
|
||||
<div class="row">
|
||||
<input type="hidden" id="CommandID" asp-for="@Model.Id"/>
|
||||
<div class="col-12 d-flex align-items-center">
|
||||
<input type="text" class="form-control m-0" asp-for="@Model.Name" placeholder="نام گروه"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-0">
|
||||
<div class="d-flex flex-column align-items-center justify-content-center h-100">
|
||||
<div class="d-flex align-items-center justify-content-center mt-3 mb-1">
|
||||
<p class="m-0">ساعات کاری پرسنل این گروه را مشخص نمائید</p>
|
||||
</div>
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center w-100">
|
||||
<input type="radio" value="Regular" name="workshopShiftStatus" id="organized" class="radio-workTimeOption">
|
||||
<label for="organized" class="radio-label-workTimeOption w-100">منظم</label>
|
||||
|
||||
<input type="radio" value="Irregular" name="workshopShiftStatus" id="disorganized" class="radio-workTimeOption">
|
||||
<label for="disorganized" class="radio-label-workTimeOption w-100">مختلط</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" id="step_workTimeOption" style="height: 0; display: none">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
|
||||
@if (Model.ShiftViewModel.Any())
|
||||
{
|
||||
@foreach (var item in Model.ShiftViewModel)
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="ShiftViewModel[@indexShiftViewModel].Placement" value="@item.Placement"/>
|
||||
<div class="timeWorkTitle">نوبت اول</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[@indexShiftViewModel].StartTime" value="@item.StartTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[@indexShiftViewModel].EndTime" value="@item.EndTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
@if (indexShiftViewModel == 0)
|
||||
{
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@{
|
||||
indexShiftViewModel++;
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="ShiftViewModel[0].Placement" value="First"/>
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[0].StartTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[0].EndTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
@if (Model.ShiftViewModel.Count() == 2)
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت سوم</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row p-0" id="step_workTimeOptionIrregular" style="height: 0; gap: 12px; @(Model.WorkshopShiftStatus == WorkshopShiftStatus.Regular ? "display: none" : "")">
|
||||
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center mt-4">
|
||||
<input type="radio" id="TwelveTwentyFour" value="@WorkshopIrregularShifts.TwelveTwentyFour" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwelveTwentyFour ? "checked" : "")>
|
||||
<label for="TwelveTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 24 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourTwentyFour" value="@WorkshopIrregularShifts.TwentyFourTwentyFour" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwentyFourTwentyFour ? "checked" : "")>
|
||||
<label for="TwentyFourTwentyFour" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 24 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center">
|
||||
<input type="radio" id="TwelveThirtySix" value="@WorkshopIrregularShifts.TwelveThirtySix" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwelveThirtySix ? "checked" : "")>
|
||||
<label for="TwelveThirtySix" class="radio-label-workTimeOption w-100 outlineDate">12 ساعت کار 36 ساعت استراحت</label>
|
||||
|
||||
<input type="radio" id="TwentyFourFortyEight" value="@WorkshopIrregularShifts.TwentyFourFortyEight" name="IrregularShift.WorkshopIrregularShifts" class="radio-workTimeOption" @(Model.IrregularShift.WorkshopIrregularShifts == WorkshopIrregularShifts.TwentyFourFortyEight ? "checked" : "")>
|
||||
<label for="TwentyFourFortyEight" class="radio-label-workTimeOption w-100 outlineDate">24 ساعت کار 48 ساعت استراحت</label>
|
||||
</div>
|
||||
|
||||
<div class="hrLine"></div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="groupBoxIrregular @(Model.WorkshopShiftStatus != WorkshopShiftStatus.Regular ? "" : "disable")" id="irregularShiftsDateTime">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsStartDateTime" value="@Model.IrregularShift.StartTime.ToString("HH:mm")" name="IrregularShift.StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTimeIrregular" id="irregularShiftsEndDateTime" value="@Model.IrregularShift.EndTime.ToString("HH:mm")" name="IrregularShift.EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container my-2">
|
||||
<div class="row breack-time">
|
||||
<div>
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTimeFirst" name="BreakTime.hasBreakTimeValue" class="form-check-input" @(Model.BreakTime.BreakTimeType == BreakTimeType.WithoutTime ? "checked" : "")>
|
||||
<label for="BreakTimeFirst" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت نامشخص با انتخاب این تیک پرسنل باید برای استراحت ورود و خروج ثبت کند.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-block">
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTime" name="BreakTime.hasBreakTimeValue" class="form-check-input" @(Model.BreakTime.BreakTimeType == BreakTimeType.WithTime ? "checked" : "")>
|
||||
<label for="BreakTime" class="lableCheckBreakTime">
|
||||
این پرسنل دارای ساعت استراحت ثابت روزانه می باشد که بصورت خودکار در فیش حقوقی محاسبه می گردد:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center my-1 mt-3 @(Model.BreakTime.BreakTimeType == BreakTimeType.None || Model.BreakTime.BreakTimeType == BreakTimeType.WithoutTime ? "disable" : "")" id="computeTime">
|
||||
<div class="position-relative">
|
||||
<label for="hour" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">ساعت</label>
|
||||
<select id="hour" asp-for="@Model.BreakTime.BreakTimeValue.Hour" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="0" selected>ساعت</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="mx-1">:</span>
|
||||
<div class="position-relative">
|
||||
<label for="min" class="position-absolute" style="bottom: 25px; font-size: 13px; font-weight: 700; right: 5px; background-color: #fff; padding: 0 4px;">دقیقه</label>
|
||||
<select id="min" asp-for="@Model.BreakTime.BreakTimeValue.Minute" name="selectCheckBreakTime" class="form-select selectCheckBreakTime">
|
||||
<option value="00" selected>دقیقه</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="15">15</option>
|
||||
<option value="20">20</option>
|
||||
<option value="25">25</option>
|
||||
<option value="30">30</option>
|
||||
<option value="35">35</option>
|
||||
<option value="40">40</option>
|
||||
<option value="45">45</option>
|
||||
<option value="50">50</option>
|
||||
<option value="55">55</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="TimeOnly" name="BreakTime.BreakTimeValue" value="@Model.BreakTime.BreakTimeValue.ToString("HH:mm")"/>
|
||||
@* <span class="mx-1" id="computeTimeText"></span> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 justify-content-center w-100">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" id="btnSave" class="btn-register w-100" onclick="ajaxEditGroupingSaveData()">ثبت ویرایش</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- مودال -->
|
||||
<div id="ConfirmEmployeeModal" style="display: none" data-bs-backdrop="static" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered ConfirmEmployeeSection">
|
||||
<div class="" id="ModalConfirmEmployeeChange">
|
||||
<partial name="_Partials/ConfirmEmployeeChangeModal" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- مودال -->
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var ajaxEditGroupSave = `@Url.Page("./Grouping", "EditGroup")`;
|
||||
|
||||
var indexShiftViewModel = Number(@indexShiftViewModel);
|
||||
var groupId = Number(@Model.Id);
|
||||
|
||||
var IsRegularWorkshop = @(Model.WorkshopShiftStatus == WorkshopShiftStatus.Regular ? "true" : "false");
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/modaleditgroup.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,320 @@
|
||||
@using CompanyManagment.EFCore.Migrations
|
||||
@model CompanyManagment.App.Contracts.RollCall.EmployeeRollCallsViewModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
var index = 0;
|
||||
var count = Model.RollCalls.Count;
|
||||
string countString;
|
||||
string txtString;
|
||||
|
||||
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css?ver=@adminVersion">
|
||||
<link href="~/AssetsClient/css/select2.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.modal-dialog, .modal-content {
|
||||
height: 420px;
|
||||
}
|
||||
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBox .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.ShowMessage {
|
||||
position: absolute;
|
||||
background: #dfdfdf;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.heightControll {
|
||||
height: 190px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="edit-form" id="edit-form" autocomplete="off">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h4 class="textListTitle">ویرایش ساعت حضور و غیاب</h4>
|
||||
<h6 class="textListTitle" id="modalWorkshopFullname"></h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body py-0">
|
||||
<div class="container p-0 m-0">
|
||||
<div class="row">
|
||||
<div class="col-12 my-1">
|
||||
<div class="select-alert">
|
||||
<input type="hidden" name="Command.EmployeeId" value="@Model.EmployeeId" />
|
||||
<input class="form-control disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1">
|
||||
<input type="hidden" name="Command.DateFa" value="@Model.DateFa" />
|
||||
<input class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
|
||||
</div>
|
||||
|
||||
<div class="heightControll">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
@if (@Model.RollCalls.Count > 0)
|
||||
{
|
||||
@foreach (var item in Model.RollCalls)
|
||||
{
|
||||
@switch (index)
|
||||
{
|
||||
case 1:
|
||||
txtString = "دوم";
|
||||
break;
|
||||
case 2:
|
||||
txtString = "سوم";
|
||||
break;
|
||||
case 3:
|
||||
txtString = "چهارم";
|
||||
break;
|
||||
case 4:
|
||||
txtString = "پنجم";
|
||||
break;
|
||||
case 5:
|
||||
txtString = "ششم";
|
||||
break;
|
||||
case 6:
|
||||
txtString = "هفتم";
|
||||
break;
|
||||
case 7:
|
||||
txtString = "هشتم";
|
||||
break;
|
||||
case 8:
|
||||
txtString = "نهم";
|
||||
break;
|
||||
case 9:
|
||||
txtString = "دهم";
|
||||
break;
|
||||
default:
|
||||
txtString = "اول";
|
||||
break;
|
||||
}
|
||||
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">
|
||||
نوبت @txtString
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
|
||||
</div>
|
||||
@if (index == 0)
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M6.875 11H15.125" stroke="white" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
|
||||
|
||||
@switch (count)
|
||||
{
|
||||
case 0:
|
||||
countString = "دوم";
|
||||
break;
|
||||
case 1:
|
||||
countString = "دوم";
|
||||
break;
|
||||
case 2:
|
||||
countString = "سوم";
|
||||
break;
|
||||
case 3:
|
||||
countString = "چهارم";
|
||||
break;
|
||||
case 4:
|
||||
countString = "پنجم";
|
||||
break;
|
||||
case 5:
|
||||
countString = "ششم";
|
||||
break;
|
||||
case 6:
|
||||
countString = "هفتم";
|
||||
break;
|
||||
case 7:
|
||||
countString = "هشتم";
|
||||
break;
|
||||
case 8:
|
||||
countString = "نهم";
|
||||
break;
|
||||
case 9:
|
||||
countString = "دهم";
|
||||
break;
|
||||
default:
|
||||
countString = "اول";
|
||||
break;
|
||||
}
|
||||
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت @countString</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100" id="prev-step" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register w-100 position-relative" id="next-step">
|
||||
<span>ثبت</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var saveRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
|
||||
var loadByEmployeeRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
|
||||
var employeeListAjax = `@Url.Page("./CaseHistory", "EmployeeList")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/ModalEditRollCall.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,189 @@
|
||||
|
||||
@using _0_Framework.Domain.CustomizeCheckoutShared.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.EditCustomizeWorkshopSettings
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
int i = 0;
|
||||
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css">
|
||||
<link href="~/assetsclient/pages/rollcall/css/modalsettingworktime.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h6>تنظیم ساعات کاری</h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container p-0 m-0">
|
||||
|
||||
<div class="row p-0 m-0">
|
||||
<div class="d-flex flex-column align-items-center justify-content-center h-100">
|
||||
<div class="d-flex align-items-center justify-content-center mb-2">
|
||||
<p class="m-0">ساعات کاری مجموعه این کارگاه را مشخص نمائید</p>
|
||||
</div>
|
||||
<div class="btn-workTimeOption-container align-items-center justify-content-center w-100">
|
||||
<input type="radio" value="Regular" name="workshopShiftStatus" id="organized" class="radio-workTimeOption">
|
||||
<label for="organized" class="radio-label-workTimeOption w-100">منقطع</label>
|
||||
|
||||
<input type="radio" value="Irregular" name="workshopShiftStatus" id="disorganized" class="radio-workTimeOption">
|
||||
<label for="disorganized" class="radio-label-workTimeOption w-100">مستمر</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="step_workTimeOption" style="height: 0">
|
||||
|
||||
<input type="hidden" name="customizeWorkshopSettingsId" id="customizeWorkshopSettingsId" value="@Model.Id"/>
|
||||
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
@if (Model.ShiftsList.Any())
|
||||
{
|
||||
@foreach (var item in Model.ShiftsList.OrderBy(x => x.Placement))
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<input type="hidden" name="shiftViewModels[@i].Placement" value="@item.Placement"/>
|
||||
<div class="timeWorkTitle">
|
||||
@if (item.Placement == ShiftPlacement.First)
|
||||
{
|
||||
@("نوبت اول")
|
||||
}
|
||||
else if (item.Placement == ShiftPlacement.Second)
|
||||
{
|
||||
@("نوبت دوم")
|
||||
}
|
||||
else
|
||||
{
|
||||
@("نوبت سوم")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[@i].StartTime" value="@item.StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[@i].EndTime" value="@item.EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
@if (i == 0)
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<input type="hidden" name="shiftViewModels[0].Placement" value="First" />
|
||||
<div class="timeWorkTitle">
|
||||
نوبت اول
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[0].StartTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[0].EndTime" value="" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork" style="visibility: hidden">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="ShowMessage d-none">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="step_workTimeOptionIrregular" style="display: none">
|
||||
<div class="show-disorganized mt-5">
|
||||
<p class="m-0">مجموعه بدون وقفه و بصورت مستمر فعال میباشد</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="container m-0">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2 justify-content-center w-100" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
@* <button type="button" onclick="actionForShowModalReplaceChange()" class="btn-register w-100">ثبت</button> *@
|
||||
<button type="button" onclick="saveEditSettingWorkTime()" class="btn-register w-100">ثبت</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- مودال -->
|
||||
@* <div id="ConfirmEmployeeModal" style="display: none" data-bs-backdrop="static" aria-hidden="true" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered ConfirmEmployeeSection">
|
||||
<div class="" id="ModalConfirmEmployeeChange">
|
||||
<partial name="_ModalWorkTimePartials/ConfirmReplaceGroupAndEmployee" />
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
<!-- مودال -->
|
||||
</form>
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var saveEditSettingWorkTimeAjax = `@Url.Page("./Options", "EditSettingWorkTime")`;
|
||||
var getGroupListAndEmployeeListAjax = `@Url.Page("./Options", "GroupListAndEmployeeList")`;
|
||||
|
||||
var IsRegularWorkshop = @(Model.WorkshopShiftStatus == WorkshopShiftStatus.Regular ? "true" : "false");
|
||||
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/rollcall/js/EditSettingWorkTime.js?ver=adminVersion"></script>
|
||||
@@ -0,0 +1,234 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.TakePictureModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
int index = 1;
|
||||
<link href="~/AssetsAdminNew/rollcall/css/modaltakeimages.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<div id="desktopDisplay">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="startBuyLabel">بارگذاری عکس پرسنل</h5>
|
||||
<h6 class="mb-2">@Model.Name</h6>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="d-flex flex-column justify-content-center h-75 text-center">
|
||||
<div>
|
||||
<svg width="100px" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 621.6 721.91">
|
||||
<defs>
|
||||
<style>
|
||||
.clsd-1 {
|
||||
fill: url(#linear-gradient-2);
|
||||
}
|
||||
|
||||
.clsd-2 {
|
||||
fill: url(#linear-gradient-3);
|
||||
}
|
||||
|
||||
.clsd-3 {
|
||||
fill: url(#linear-gradient);
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#30c1c1"/>
|
||||
<stop offset="1" stop-color="#087474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-2" x1="217.07" y1="187.47" x2="523.83" y2="187.47" xlink:href="#linear-gradient"/>
|
||||
<linearGradient id="linear-gradient-3" x1="1.3" y1="146.6" x2="395.56" y2="146.6" xlink:href="#linear-gradient"/>
|
||||
</defs>
|
||||
<polygon class="clsd-3" points="0 328.82 129.91 244.95 129.91 453.87 310.8 562.4 488.4 453.87 488.4 355.2 310.8 355.2 488.4 241.73 621.6 241.73 621.6 541.02 310.8 721.91 0 541.02 0 328.82"/>
|
||||
<polygon class="clsd-1" points="217.07 309.16 217.07 192.4 426.8 65.78 523.83 123.33 217.07 309.16"/>
|
||||
<polyline class="clsd-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0"/>
|
||||
</svg>
|
||||
<h5 class="mt-2 title-logo">سامانه هوشمند گزارشگیر</h5>
|
||||
</div>
|
||||
<div>
|
||||
<p>برای ساعات حضور و غیاب میباست از گوشی استفاده نمایید!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mobileDisplay">
|
||||
<div class="modal-header d-block text-center mb-2">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="startBuyLabel">بارگذاری عکس پرسنل</h5>
|
||||
<h6 class="mb-2">@Model.Name</h6>
|
||||
</div>
|
||||
|
||||
<div class="modal-body clearfix">
|
||||
|
||||
|
||||
@* <div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
عکس اول
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="my_camera" style="margin: auto; display: none"></div>
|
||||
<div id="video" style="margin: auto;"></div>
|
||||
|
||||
<div style="margin: 10px 0 0 0; text-align: center;">
|
||||
<input type="button" class="btn btn-success" value="گرفتن عکس اول" onclick="take_snapshot1()"/>
|
||||
<input type="button" class="btn btn-success" value="گرفتن عکس دوم" onclick="take_snapshot2()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<form asp-page="./Index" asp-page-handler="TakePicture" id="test"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="panel-body text-center">
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
</div> *@
|
||||
@if (Model.HasPicture)
|
||||
{
|
||||
<img style="width: 100%; height: 100%; border-radius:10px;" data-uri="data:image/jpeg;base64,@Model.Pic1" id="pic1" src="data:image/jpeg;base64,@Model.Pic1" />
|
||||
}
|
||||
</div>
|
||||
<div id="demoResult2" class="image-show">
|
||||
<button type="button" class="upload-image2">
|
||||
<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>
|
||||
</div>
|
||||
</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"/>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 position-relative overflow-hidden" style="height: 20px; direction: ltr;">
|
||||
<div class="spinner-loading-progress loading" style="display: none; border-radius: 6px; position: unset;">
|
||||
<span id="progressBar" style="color: #ffffff"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-6 text-end">
|
||||
@* <a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button"> *@
|
||||
<button class="w-100 btn-cancel text-white cancelAndRefresh" data-bs-dismiss="modal" aria-label="Close" type="button" style="display: block">
|
||||
<span>انصراف</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" onclick="set()" class="w-100 btn-primary disable position-relative overflow-auto" id="SaveImageEmployee">
|
||||
<span>ذخیره</span>
|
||||
|
||||
<div class="spinner-loading loading" style="display: none">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
@* <a href="#" id="save" class="btn-tm-save">ارسال</a> *@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="workshopId" asp-for="@Model.WorkshopId" value="@Model.WorkshopId" />
|
||||
<input type="hidden" id="employeeId" asp-for="@Model.EmployeeId" value="@Model.EmployeeId" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@* <div class="row m-t-10">
|
||||
<div class="col-md-9"></div>
|
||||
<div class="modal2-btns col-md-3">
|
||||
<a type="button" id="closeRotate" class="btn pull-left m-l-10" style="background-color: #e7f2f3; border-radius: 15px; box-shadow: 1px 1px 5px 2px rgb(0 0 0 / 19%);" data-dismiss="modal" data-parent-modal="#edit-modal">بستن</a>
|
||||
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
@* <div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2" id="prev-step">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register" id="next-step">مرحله بعد</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@* Camera Modal *@
|
||||
<div class="md-modal md-effect-12">
|
||||
<div class="md-content" style="width: 100%;">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body" style="width: 360px;height: 360px;text-align: center;margin: auto;">
|
||||
@*<div id="my_camera" style="margin: auto; display: none;"></div>*@
|
||||
@* <div id="video" style="margin: auto;"></div> *@
|
||||
@* <div id="video" style="margin: auto; width: 100%; height: 100%;"></div> *@
|
||||
<div style="display: block; position: relative; width: 360px; height: 360px;">
|
||||
@*<div id="video" style="position: absolute; top: 0px; right: 0; margin: auto; width: 100%; height: 100%;"></div>*@
|
||||
<video id="videoElement" autoplay></video>
|
||||
<img src="~/AssetsClient/images/face.png" style="position: absolute; top: 0; right: 0; width: 360px; transform: scale(1.006); border-radius: 10px;" />
|
||||
</div>
|
||||
|
||||
<div style="margin: 10px 0 0 0; text-align: center;">
|
||||
<input type="button" class="btn btn-success take_snapshot1" style="display: none;" value="گرفتن عکس اول" onclick="take_snapshot1()"/>
|
||||
<input type="button" class="btn btn-success take_snapshot2" style="display: none;" value="گرفتن عکس دوم" onclick="take_snapshot2()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="camera_close">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="35" height="35">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md-overlay"></div>
|
||||
|
||||
@* <script src="~/webcamjs/webcam.js"></script> *@
|
||||
<script src="~/AssetsClient/libs/jslib-html5-camera/jslib-html5-camera-photo.min.js"></script>
|
||||
<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="~/AssetsAdminNew/rollcall/js/modaltakeimages.js?ver=adminVersion"></script>
|
||||
306
ServiceHost/Areas/AdminNew/Pages/Company/RollCall/Options.cshtml
Normal file
306
ServiceHost/Areas/AdminNew/Pages/Company/RollCall/Options.cshtml
Normal file
@@ -0,0 +1,306 @@
|
||||
@page "{workshopId:long}"
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.OptionsModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = " - " + "حضور و غیاب - مدیر";
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
int index = 1;
|
||||
int i = 0;
|
||||
<link href="~/assetsclient/css/card.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
@@media (min-width: 1260px) {
|
||||
.col-60 {
|
||||
width: calc(100% / 6);
|
||||
}
|
||||
|
||||
.col-50 {
|
||||
width: calc(100% / 5);
|
||||
}
|
||||
|
||||
.col-30 {
|
||||
width: calc(100% / 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@media (min-width: 992px) {
|
||||
.col-30 {
|
||||
width: calc(100% / 3);
|
||||
}
|
||||
}
|
||||
|
||||
.tooltipfull-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tooltipfull {
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
color: #fff;
|
||||
display: grid;
|
||||
font-size: 12px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
background: #23a8a8;
|
||||
border: 1px solid #23a8a8;
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
-moz-transition: all .2s ease-in-out;
|
||||
-o-transition: all .2s ease-in-out;
|
||||
transition: all .2s ease-in-out;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: 30px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltipfull-container:hover .tooltipfull, a:hover .tooltipfull {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.tooltipfull:before, .tooltipfull:after {
|
||||
content: '';
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid #23a8a8;
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
|
||||
/* keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
} */
|
||||
.container,
|
||||
.main-example {
|
||||
text-align: center;
|
||||
margin: 100px 0 0;
|
||||
}
|
||||
|
||||
.container.container,
|
||||
.main-example.container {
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.container span,
|
||||
.main-example span {
|
||||
border: 1px solid gray;
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
.explanation {
|
||||
margin: 70px 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
code {
|
||||
color: rgba(0, 0, 180, 0.9);
|
||||
background: rgba(0, 0, 180, 0.1);
|
||||
display: inline-block;
|
||||
border: 1px solid rgba(0, 0, 180, 0.9);
|
||||
border-radius: 3px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/face-scan.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">حضور و غیاب</h4>
|
||||
<div>@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-area="AdminNew" asp-page="/Company/rollcall/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
@if (Model.CheckRollCallService)
|
||||
{
|
||||
<div class="row p-2">
|
||||
<div class="msg-note">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 text-start">
|
||||
<div class="d-flex align-items-center">
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="18" cy="18" r="13.5" fill="#2FC1C1"></circle>
|
||||
<path d="M19.5 10.5C19.5 11.3284 18.8284 12 18 12C17.1716 12 16.5 11.3284 16.5 10.5C16.5 9.67157 17.1716 9 18 9C18.8284 9 19.5 9.67157 19.5 10.5Z" fill="white"></path>
|
||||
<path stroke-width="1.5" d="M18 24.75V17.25C18 15.8358 18 15.1287 17.5607 14.6893C17.1213 14.25 16.4142 14.25 15 14.25V14.25M18 24.75H20.25M18 24.75H15.75" stroke="white"></path>
|
||||
</svg>
|
||||
<p class="m-0 ms-2">زمان باقی مانده سرویس: @Model.RollCallServiceDeadline</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row p-lg-2">
|
||||
<div class="d-grid card-area-rollcall gap-2 p-lg-0">
|
||||
|
||||
<div class="gwb-card disable">
|
||||
@* asp-page="/Company/RollCall/Plans" *@
|
||||
<a class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/boxes.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">
|
||||
@if (!Model.CheckRollCallService)
|
||||
{
|
||||
<span>خرید سرویس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>ارتقا یا تغییر سرویس</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card @(Model.CheckRollCallService && Model.HasCameraAccount == "true" ? "" : "disable")">
|
||||
<a asp-page="/Company/RollCall/EmployeeUploadPicture" asp-route-workshopId="@Model.WorkshopId" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/image-rollcall.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">آپلود عکس پرسنل</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card @(Model.RollCallServicePersonnelActive == "true" && Model.HasCameraAccount == "true" ? "" : "disable")">
|
||||
<a asp-page="/Company/RollCall/CurrentDay" asp-route-workshopId="@Model.WorkshopId" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/rollcall.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">حضور و غیاب جاری</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card @(Model.RollCallServicePersonnelActive == "true" && Model.HasCameraAccount == "true" ? "" : "disable")">
|
||||
<a asp-page="/Company/RollCall/CaseHistory" asp-route-workshopId="@Model.WorkshopId" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/rollcall-history.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">سوابق حضور و غیاب</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card @(Model.CheckRollCallService && Model.HasCameraAccount == "true" && Model.HasRollCallCustomizeWorkshopSetting == "true" ? "" : "disable")">
|
||||
<a asp-page="/Company/RollCall/Grouping" asp-route-workshopId="@Model.WorkshopId" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/grouping-rollcall.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">عملیات گروهبندی</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card @(Model.CheckRollCallService && Model.HasCameraAccount == "true" && Model.HasRollCallCustomizeWorkshopSetting == "true" ? "" : "disable")">
|
||||
<a href="#showmodal=@Url.Page("./Options", "EditSettingWorkTime", new { workshopId = Model.WorkshopId})" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/time-management.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">تنظیم ساعت فعالیت مجموعه</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="gwb-card @(Model.CheckRollCallService && Model.HasCameraAccount == "true" && Model.HasRollCallCustomizeWorkshopSetting == "true" ? "" : "disable")">
|
||||
<a asp-page="/Company/RollCall/CameraAccounts" asp-route-workshopId="@Model.WorkshopId" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/account-camera.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">تنظیمات حساب کاربری دوربین</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="MainModal" class="modal fade personalListModal" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" data-bs-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog modal-md modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var hasRollCallService = @(Model.CheckRollCallService == true ? "true" : "false");
|
||||
var hasCameraAccount = @Model.HasCameraAccount;
|
||||
var hasRollCallWorkshopSetting = @Model.HasRollCallWorkshopSetting;
|
||||
var saveCameraAccountUrl = `#showmodal=@Url.Page("./Options", "SaveCameraAccountAndWorkshopSetting")`;
|
||||
|
||||
var wpId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/index.js"></script>
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using System.Transactions;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
{
|
||||
public class OptionsModel : PageModel
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopSettingsApplication;
|
||||
private readonly ICameraAccountApplication _cameraAccountApplication;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullName;
|
||||
public bool CheckRollCallService;
|
||||
public string RollCallServicePersonnelActive;
|
||||
public string RollCallServiceDeadline;
|
||||
public string HasCameraAccount = "false";
|
||||
public string HasRollCallWorkshopSetting = "false";
|
||||
public string HasRollCallCustomizeWorkshopSetting = "false";
|
||||
|
||||
public OptionsModel(IWorkshopApplication workshopApplication, IRollCallServiceApplication rollCallServiceApplication, IRollCallEmployeeApplication rollCallEmployeeApplication, IPasswordHasher passwordHasher, ICameraAccountApplication cameraAccountApplication, IAuthHelper authHelper, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_passwordHasher = passwordHasher;
|
||||
_cameraAccountApplication = cameraAccountApplication;
|
||||
_authHelper = authHelper;
|
||||
_customizeWorkshopSettingsApplication = customizeWorkshopSettingsApplication;
|
||||
}
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
var rollCallWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopIdForAdmin(workshopId);
|
||||
HasRollCallWorkshopSetting = rollCallWorkshopSetting.ArePropertiesEqual(new CustomizeWorkshopSettingsViewModel()) ? "false" : "true";
|
||||
|
||||
var workshopInfo = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
WorkshopFullName = workshopInfo.WorkshopFullName;
|
||||
|
||||
HasRollCallCustomizeWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsDetails(workshopId).Id == 0 ? "false" : "true";
|
||||
|
||||
var hasBeforeService = _rollCallServiceApplication.GetAllServiceByWorkshopId(workshopId).Any();
|
||||
var rollCall = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
|
||||
if (rollCall != null)
|
||||
{
|
||||
AccountViewModel clientAccount = _workshopApplication.GetClientAccountByWorkshopId(workshopId);
|
||||
|
||||
var cameraAccount = _cameraAccountApplication.HasCameraAccount(workshopId, clientAccount.Id);
|
||||
|
||||
if (cameraAccount && hasBeforeService)
|
||||
HasCameraAccount = "true";
|
||||
|
||||
CheckRollCallService = true;
|
||||
RollCallServicePersonnelActive = _rollCallEmployeeApplication.activedPerson(workshopId) > 0 ? "true" : "false";
|
||||
RollCallServiceDeadline = rollCall.EndService.ToFarsi().ToFarsiDuration2();
|
||||
}
|
||||
else
|
||||
{
|
||||
HasCameraAccount = !hasBeforeService ? "true" : HasCameraAccount;
|
||||
CheckRollCallService = false;
|
||||
RollCallServiceDeadline = "سرویس خریداری نشده است";
|
||||
}
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetSaveCameraAccountAndWorkshopSetting(long workshopId)
|
||||
{
|
||||
//var account = _authHelper.CurrentAccountInfo();
|
||||
//var accountId = _authHelper.CurrentAccountId();
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
var accountInfo = _workshopApplication.GetClientAccountByWorkshopId(workshopId);
|
||||
|
||||
var account = new AuthViewModel()
|
||||
{
|
||||
WorkshopList =
|
||||
[
|
||||
new WorkshopClaim
|
||||
{
|
||||
Id = workshop.Id,
|
||||
Name = workshop.WorkshopFullName,
|
||||
PersonnelCount = workshop.PersonnelCount,
|
||||
Slug = workshop.Slug }
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var cameraAccount = _cameraAccountApplication.HasCameraAccount(workshopId, accountInfo.Id);
|
||||
var rollCallWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
|
||||
|
||||
var result = new AccountAndSettingViewModel()
|
||||
{
|
||||
HasCamera = cameraAccount,
|
||||
HasGroupWorkshop = !rollCallWorkshopSetting.ArePropertiesEqual(new CustomizeWorkshopSettingsViewModel()),
|
||||
CreateCameraAccount = _cameraAccountApplication.GetDetailsByWorkshop(workshopId),
|
||||
CreateWorkshopSettings = _customizeWorkshopSettingsApplication.GetWorkshopSettingsDetails(workshopId),
|
||||
};
|
||||
|
||||
return Partial("ModalCreateAccountSetting", result);
|
||||
}
|
||||
|
||||
public IActionResult OnPostSaveCameraAccountAndWorkshopSetting(AccountAndSettingViewModel command)
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
if (workshopId < 1)
|
||||
return new JsonResult(new
|
||||
{
|
||||
Success = false,
|
||||
message = "هیچ کارگاهی یافت نشد",
|
||||
});
|
||||
|
||||
|
||||
|
||||
string finalMessage = "";
|
||||
using (var transaction = new TransactionScope())
|
||||
{
|
||||
|
||||
if (!command.HasCamera)
|
||||
{
|
||||
var createAccountCommand = new CreateCameraAccount()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
AccountId = _authHelper.CurrentAccountId(),
|
||||
Username = command.CreateCameraAccount.Username,
|
||||
Password = command.CreateCameraAccount.Password,
|
||||
RePassword = command.CreateCameraAccount.RePassword,
|
||||
WorkshopName = _workshopApplication.GetDetails(workshopId).WorkshopFullName,
|
||||
IsActiveString = "true",
|
||||
};
|
||||
var result = _cameraAccountApplication.Create(createAccountCommand);
|
||||
finalMessage = result.Message;
|
||||
if (!result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
Success = false,
|
||||
message = finalMessage,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!command.HasGroupWorkshop)
|
||||
{
|
||||
var result = _customizeWorkshopSettingsApplication.CreateWorkshopSettings(command.CreateWorkshopSettings);
|
||||
finalMessage = result.Message;
|
||||
if (!result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
Success = false,
|
||||
message = finalMessage,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
transaction.Complete();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
Success = true,
|
||||
message = finalMessage,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnGetCheckAccount(string username)
|
||||
{
|
||||
var result = _cameraAccountApplication.CheckUsername(username);
|
||||
return new JsonResult(new
|
||||
{
|
||||
Success = result.IsSuccedded,
|
||||
message = result.IsSuccedded ? "نام کاربری با مورد تاییداست" : result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEditSettingWorkTime(long workshopId)
|
||||
{
|
||||
var command = _customizeWorkshopSettingsApplication.GetSimpleWorkshopSettings(workshopId);
|
||||
|
||||
if (command.Id == 0)
|
||||
{
|
||||
var resultError = new ErrorViewModel()
|
||||
{
|
||||
Message = "شما تنظیماتی مربوط به کارگاه را تنظیم نکرده اید."
|
||||
};
|
||||
return Partial("../Error/_ErrorModal", resultError);
|
||||
}
|
||||
|
||||
return Partial("ModalSettingWorkTime", command);
|
||||
}
|
||||
|
||||
public IActionResult OnGetGroupListAndEmployeeList(long customizeWorkshopSettingsId)
|
||||
{
|
||||
var resultData = _customizeWorkshopSettingsApplication.GetShiftChangesGroupAndEmployees(customizeWorkshopSettingsId);
|
||||
var success = resultData.Any();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = success,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostEditSettingWorkTime(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
||||
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus, long workshopId)
|
||||
{
|
||||
if (workshopId < 1)
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = false,
|
||||
message = "هیچ کارگاهی یافت نشد!",
|
||||
});
|
||||
|
||||
//Todo:Vafa!!
|
||||
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
||||
var result = _customizeWorkshopSettingsApplication.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetIrregularWorkshopHaveGroupedAllPersonnelValidation(long customizeWorkshopSettingsId, long workshopId)
|
||||
{
|
||||
var isWorkshopIrregular = _customizeWorkshopSettingsApplication
|
||||
.GetWorkshopSettingsDetails(customizeWorkshopSettingsId).WorkshopShiftStatus == WorkshopShiftStatus.Irregular;
|
||||
|
||||
if (isWorkshopIrregular == false)
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
|
||||
});
|
||||
|
||||
if (_customizeWorkshopSettingsApplication.GetEmployeesWithoutGroup(customizeWorkshopSettingsId).Any())
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
});
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
<link href="~/assetsclient/pages/RollCall/css/confirmemployeechange.css?ver=@clientVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start" id="btnSubjectCancel"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel" style="font-size: 19px;">تغییرات انجام شده آماده اعمال می باشد</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<p class="m-0">پرسنل زیر بصورت سفارشی قبلا تنظیم شده اند:</p>
|
||||
</div>
|
||||
<div class="employee-item">
|
||||
<ul id="loadEmployeeItem"></ul>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 d-flex align-items-center justify-content-between">
|
||||
<p class="m-0">آیا تغییرات کنونی شامل پرسنل بالا بشود؟</p>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.ChangeSettingEmployeeShiftIsChange" id="YesConfirm" class="form-check-input" value="true" />
|
||||
<label for="YesConfirm">بله</label>
|
||||
</div>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.ChangeSettingEmployeeShiftIsChange" id="NotConfirm" class="form-check-input" value="false" />
|
||||
<label for="NotConfirm">خیر</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row mt-3">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn-secondary w-100" data-bs-dismiss="modal">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="position-relative">
|
||||
<button type="button" class="btn-primary w-100 disable" id="finalSaveRollCallSetting" onclick="finalSaveRollCallSettingAjax()">ثبت نهایی</button>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,125 @@
|
||||
@model CompanyManagment.App.Contracts.CustomizeWorkshopSettings.EditCustomizeWorkshopSettings
|
||||
|
||||
<style>
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container p-0 m-0" id="WorkingTimeSetting">
|
||||
<div class="row">
|
||||
<div class="col-12" id="appendChildTimeWorkHtml">
|
||||
|
||||
@for (var i = 0; i < Model.ShiftsList.Count(); i++)
|
||||
{
|
||||
<div class="groupBox">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<input type="hidden" name="Command.ShiftsList[@i].Placement" value="@Model.ShiftsList[@i].Placement" />
|
||||
<div class="timeWorkTitle">
|
||||
@if (i == 0)
|
||||
{
|
||||
@("نوبت اول")
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
@("نوبت دوم")
|
||||
}
|
||||
else
|
||||
{
|
||||
@("نوبت سوم")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftsList[@i].StartTime" value="@Model.ShiftsList[@i].StartTime" placeholder="00:00" style="direction: ltr" />
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftsList[@i].EndTime" value="@Model.ShiftsList[@i].EndTime" placeholder="00:00" style="direction: ltr" />
|
||||
</div>
|
||||
@if (i == 0)
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M6.875 11H15.125" stroke="white" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
||||
<button type="button" class="btnAddTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
@if (Model.ShiftsList.Count() == 2)
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت سوم</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت دوم</div>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p class="m-0" id="ShowSettingMessage"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
<link href="~/assetsclient/pages/RollCall/css/confirmemployeechange.css?ver=@clientVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start closeConfirmModal"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel" style="font-size: 19px;">تغییرات انجام شده آماده اعمال می باشد</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<p class="m-0">پرسنل زیر بصورت سفارشی قبلا تنظیم شده اند:</p>
|
||||
</div>
|
||||
<div class="employee-item">
|
||||
<ul id="loadEmployeeItem"></ul>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 d-flex align-items-center justify-content-between">
|
||||
<p class="m-0">آیا تغییرات کنونی شامل پرسنل بالا بشود؟</p>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="ChangeSettingEmployeeShiftIsChange" id="YesConfirm" class="form-check-input" value="true" />
|
||||
<label for="YesConfirm">بله</label>
|
||||
</div>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="ChangeSettingEmployeeShiftIsChange" id="NotConfirm" class="form-check-input" value="false" />
|
||||
<label for="NotConfirm">خیر</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row mt-3">
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn-secondary w-100 closeConfirmModal">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="position-relative">
|
||||
<button type="button" class="btn-primary w-100 disable" id="finalSaveRollCallSetting" onclick="ajaxSaveSubmit()">ثبت نهایی</button>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var loadEmployeesIsSettingChangeAjax = '@Url.Page("./Grouping", "EmployeeIsChangeList")';
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/confirmemployeechange.js?ver=@clientVersion"></script>
|
||||
@@ -246,6 +246,13 @@
|
||||
قراردادهای موسسه
|
||||
</a>
|
||||
</li>
|
||||
<li permission="308">
|
||||
<a class="clik3" asp-area="AdminNew" asp-page="/Company/RollCall/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="306">
|
||||
<a class="clik3" asp-area="Admin" asp-page="/Company/SmsResult/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;">
|
||||
@@ -318,14 +325,6 @@
|
||||
مدیریت کاربران
|
||||
</a>
|
||||
</li>
|
||||
<li permission="308">
|
||||
<a class="clik3" asp-area="Admin" asp-page="/Company/FaceRecognition/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="309">
|
||||
<a class="clik3" asp-area="Admin" 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;">
|
||||
|
||||
@@ -3,366 +3,7 @@
|
||||
|
||||
<link href="~/assetsclient/pages/checkouts/css/printonerollcall.css" rel="stylesheet" />
|
||||
@{
|
||||
<style>
|
||||
.modal .modal-dialog .modal-content {
|
||||
background-color: white !important;
|
||||
}
|
||||
.btn-text-disable {
|
||||
color: #627a62 !important;
|
||||
background-color: #cdcdcd !important;
|
||||
border-color: #585757 !important;
|
||||
}
|
||||
.btncounter-text-disable {
|
||||
color: #bdc7bd !important;
|
||||
background-color: #727272 !important;
|
||||
border-color: #585757 !important;
|
||||
}
|
||||
.container2 {
|
||||
height: 297mm;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.container2:last-of-type {
|
||||
height: 280mm;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
max-width: 100%;
|
||||
width: 22.4cm;
|
||||
}
|
||||
/* @@page {
|
||||
size: 7in 9.25in;
|
||||
margin: 27mm 16mm 27mm 16mm;
|
||||
}*/
|
||||
@@page {
|
||||
size: A4;
|
||||
margin: 0mm;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
@@media screen {
|
||||
#printSection {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.print * {
|
||||
font-family: IranSans !important;
|
||||
}
|
||||
|
||||
.print:last-child {
|
||||
page-break-after: auto !important;
|
||||
}
|
||||
|
||||
@@media print {
|
||||
|
||||
body * {
|
||||
visibility: hidden;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#printSection, #printSection * {
|
||||
visibility: visible;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
footer {
|
||||
page-break-after: auto;
|
||||
display: none;
|
||||
}
|
||||
|
||||
header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#printSection {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
page-break-after: auto;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.head {
|
||||
background-color: #cccccc !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.week {
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.radio-info input[type="radio"]:checked + label::after {
|
||||
background-color: black !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.mt-30 {
|
||||
margin: 30px 0 0 0 !important;
|
||||
}
|
||||
|
||||
.restActive, .rest {
|
||||
pointer-events: none;
|
||||
font-size: 8px !important;
|
||||
width: 46px !important;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.col-4, .col-3, .col-9,
|
||||
.col-2, .col-10, .col-6,
|
||||
.col-8, .col-5, .col-7,
|
||||
.col-offset-1 {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
h5, h6 {
|
||||
margin: 5px 0px !important;
|
||||
}
|
||||
|
||||
body .modal {
|
||||
font-size: 11px;
|
||||
}
|
||||
label .modal {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.radio {
|
||||
display: inline-block;
|
||||
margin-top: -10px !important;
|
||||
}
|
||||
|
||||
.radio input[type=radio] {
|
||||
position: unset !important;
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
height: 100px !important;
|
||||
}
|
||||
|
||||
.fontBold {
|
||||
font-family: IranYekanEXBold !important;
|
||||
}
|
||||
|
||||
.fontNumber {
|
||||
font-family: IranText !important;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
height: 99%;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-right: -10px !important;
|
||||
margin-left: -10px !important;
|
||||
}
|
||||
|
||||
div span.week {
|
||||
/* border-radius: 5px;
|
||||
padding: 2px 8px;
|
||||
margin-right: 15px;
|
||||
pointer-events: none;*/
|
||||
}
|
||||
|
||||
#shanbeh, #yekshanbeh, #doshanbeh, #seshanbeh, #cheharshanbeh, #panjshanbeh, #jomeh {
|
||||
width: 80px;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
#shanbeh2, #yekshanbeh2, #doshanbeh2, #seshanbeh2, #cheharshanbeh2, #panjshanbeh2, #jomeh2 {
|
||||
width: 80px;
|
||||
background-color: #3ac53c !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
#Sh1, #Sh2, #Sh3, #Sh4, #Sh5, #Sh6, #Sh7, #Sh8 {
|
||||
width: 80px;
|
||||
margin-right: 30%;
|
||||
}
|
||||
|
||||
.week {
|
||||
width: 48px !important;
|
||||
border-radius: 5px;
|
||||
padding: 0px !important;
|
||||
font-size: 8px !important;
|
||||
pointer-events: none;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 8%;
|
||||
text-align: center;
|
||||
padding: 0px !important;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
pointer-events: none;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
font-size: 8px !important;
|
||||
}
|
||||
|
||||
.time2 {
|
||||
width: 8%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
pointer-events: none;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
font-size: 8px !important;
|
||||
}
|
||||
|
||||
.fild {
|
||||
border: 1px solid #878686 !important;
|
||||
background-color: #f7f7f7 !important;
|
||||
border-radius: 10px;
|
||||
// margin: 5px 10px !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
|
||||
.timeoff {
|
||||
width: 10%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
background-color: #e7e7e7 !important;
|
||||
pointer-events: none;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.fild2 {
|
||||
border: 1px solid #878686 !important;
|
||||
background-color: #d9d9d9 !important;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0 10px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 80%;
|
||||
margin-left: 15px;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.fild3 {
|
||||
border: 1px solid #878686 !important;
|
||||
background-color: #e7e7e7 !important;
|
||||
border-radius: 10px;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.call {
|
||||
background-color: #d2dbd2 !important;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.rest {
|
||||
pointer-events: none;
|
||||
font-size: 8px !important;
|
||||
width: 46px !important;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fildeWeek {
|
||||
height: 136px !important;
|
||||
width: 48% !important;
|
||||
display: inline-block;
|
||||
border: 1px solid #cfcfcf !important;
|
||||
background-color: #e7e5e5 !important;
|
||||
border-radius: 12px 0px 12px 12px;
|
||||
padding: 2px 15px !important;
|
||||
margin: 0 0 10px 0;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
.fildeWeek .row {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.weekName {
|
||||
margin-bottom: -18px !important;
|
||||
top: -18px;
|
||||
position: relative;
|
||||
margin-right: -16px;
|
||||
padding-right: 5px !important;
|
||||
font-size: 10px !important;
|
||||
border-bottom: 0px;
|
||||
color: #505458 !important;
|
||||
background-color: #bdd1be !important;
|
||||
border-radius: 15px 5px 0px 0px;
|
||||
width: 57px;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.btn-deactive {
|
||||
background-color: #bbbbbb !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.btn-active {
|
||||
background-color: #3ac53c !important;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
|
||||
.input-deactive {
|
||||
background-color: #dbd8d8 !important;
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
}
|
||||
|
||||
.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>
|
||||
<link href="~/assetsclient/pages/checkouts/css/checkoutprintall.css" rel="stylesheet" />
|
||||
|
||||
var btnActive = "btn-active";
|
||||
var btnDeactive = "btn-deactive";
|
||||
@@ -370,9 +11,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content-container">
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
|
||||
@@ -308,21 +308,25 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < 15; i++)
|
||||
{
|
||||
<tr style="@(Model.MonthlyRollCall[i].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; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (@Model.MonthlyRollCall[i].IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
@@ -345,11 +349,13 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -359,10 +365,12 @@
|
||||
@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;">
|
||||
<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>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;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.StartDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</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.StartDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (day.IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
|
||||
@@ -295,21 +295,25 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < 15; i++)
|
||||
{
|
||||
<tr style="@(Model.MonthlyRollCall[i].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; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (@Model.MonthlyRollCall[i].IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
@@ -332,11 +336,13 @@
|
||||
<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;">
|
||||
<th style="font-size: 8px !important;width: 33%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 19%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -346,10 +352,12 @@
|
||||
@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;">
|
||||
<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>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 0; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;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.StartDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</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.StartDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (day.IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
|
||||
@@ -83,26 +83,26 @@
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType1" id="BaseyearPay2" class="form-check-input Main-Radio main-checkbox"
|
||||
@((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ||
|
||||
Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "checked" : "" ) />
|
||||
<label for="BaseyearPay2">مبلغ عیدی تعیین شدن:</label>
|
||||
<label for="BaseyearPay2">مبلغ سنوات تعیین شدن:</label>
|
||||
|
||||
<div class="sub-group form-group my-1 ms-4 BaseyearPay2SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub1" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled" ) value="@((int)(BaseYearsPayType.Money))" />
|
||||
<label for="BaseyearPay2Sub1">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub1">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-currency" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub1">ریال در سال</label>
|
||||
</div>
|
||||
@* <div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub2" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.OneTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.OneTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub2">مبلغ عیدی یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub2">مبلغ سنوات یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub3" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.TwoTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.TwoTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub3">مبلغ عیدی 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub3">مبلغ سنوات 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div> *@
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub4" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") value="@((int)(BaseYearsPayType.PercentageOfSalary))" />
|
||||
<label for="BaseyearPay2Sub4">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub4">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-percent" maxlength="3" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub4">درصد از حقوق، ماهیانه پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
@@ -113,11 +113,11 @@
|
||||
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay3" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.YearlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.YearlyPay))" />
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ عیدی محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ سنوات محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
</div>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay4" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.MonthlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.MonthlyPay))" />
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ عیدی محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ سنوات محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,81 +32,13 @@
|
||||
<div class="titleSettingRollCall">جریمه غیبت</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" @(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() &&
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "")
|
||||
/>
|
||||
<label for="AbsentFine1">جریمه غیبت پرداخت نمیگردد و در فیش حقوقی محاسبه نگردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input Main-Radio main-checkbox WeekDayRadio" @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input"/>
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0"/>
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1"/>
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2"/>
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3"/>
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4"/>
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5"/>
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group form-group">
|
||||
<input type="checkbox" name="Command.FineAbsenceDeductionType" id="AbsentFine3" class="form-check-input Main-Radio main-checkbox"
|
||||
@@ -117,8 +49,10 @@
|
||||
<div class="sub-group form-group my-1 ms-4 AbsentFine3SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub1" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "")
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
<label for="AbsentFine3Sub1">به ازای هر روز غیبت </label>
|
||||
|
||||
<select class="form-control-select sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
@@ -131,14 +65,99 @@
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub2" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.Money))" />
|
||||
value="@((int)(FineAbsenceDeductionType.Money))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine3Sub2">به ازای هر روز غیبت </label>
|
||||
<input type="text" class="form-control-currency sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
value="@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? Model.FineAbsenceDeduction.Value : "")"
|
||||
@((Model.FineAbsenceDeduction.Value != 0 && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money) ? "" : "disabled") />
|
||||
<label for="AbsentFine3Sub2">ریال از حقوق پرسنل کسر گردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3 mb-2">
|
||||
<div class="lineMinHr"></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="checkbox" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input main-checkbox2 WeekDayCheckbox"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input" />
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0" />
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1" />
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2" />
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3" />
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4" />
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5" />
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,15 +168,33 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#AbsentFine1').on('click', function () {
|
||||
$('.main-checkbox2').prop('checked', false);
|
||||
$('.main-checkbox2').prop('disabled', true);
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
});
|
||||
|
||||
$('#AbsentFine3').on('click', function () {
|
||||
$('.main-checkbox2').prop('disabled', false);
|
||||
});
|
||||
|
||||
|
||||
//----------------------- WeekDays -----------------------
|
||||
$('.Main-Radio').on('change', function () {
|
||||
if ($(this).hasClass('WeekDayRadio')) {
|
||||
$('.main-checkbox2').on('change', function () {
|
||||
if ($(this).is(':Checked')) {
|
||||
$('.AbsentFineDaysDisable').removeClass('disable');
|
||||
} else {
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var JsonWeekDays = @Html.Raw(Json.Serialize(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels));
|
||||
|
||||
$('#AbsentFineAll').on('change', function () {
|
||||
|
||||
@@ -83,26 +83,26 @@
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType1" id="BaseyearPay2" class="form-check-input Main-Radio main-checkbox"
|
||||
@((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ||
|
||||
Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "checked" : "" ) />
|
||||
<label for="BaseyearPay2">مبلغ عیدی تعیین شدن:</label>
|
||||
<label for="BaseyearPay2">مبلغ سنوات تعیین شدن:</label>
|
||||
|
||||
<div class="sub-group form-group my-1 ms-4 BaseyearPay2SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub1" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled" ) value="@((int)(BaseYearsPayType.Money))" />
|
||||
<label for="BaseyearPay2Sub1">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub1">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-currency" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub1">ریال در سال</label>
|
||||
</div>
|
||||
@* <div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub2" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.OneTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.OneTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub2">مبلغ عیدی یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub2">مبلغ سنوات یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub3" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.TwoTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.TwoTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub3">مبلغ عیدی 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub3">مبلغ سنوات 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div> *@
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub4" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") value="@((int)(BaseYearsPayType.PercentageOfSalary))" />
|
||||
<label for="BaseyearPay2Sub4">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub4">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-percent" maxlength="3" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub4">درصد از حقوق، ماهیانه پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
@@ -113,11 +113,11 @@
|
||||
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay3" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.YearlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.YearlyPay))" />
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ عیدی محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ سنوات محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
</div>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay4" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.MonthlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.MonthlyPay))" />
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ عیدی محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ سنوات محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,81 +32,13 @@
|
||||
<div class="titleSettingRollCall">جریمه غیبت</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" @(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() &&
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "")
|
||||
/>
|
||||
<label for="AbsentFine1">جریمه غیبت پرداخت نمیگردد و در فیش حقوقی محاسبه نگردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input Main-Radio main-checkbox WeekDayRadio" @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input"/>
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0"/>
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1"/>
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2"/>
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3"/>
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4"/>
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5"/>
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group form-group">
|
||||
<input type="checkbox" name="Command.FineAbsenceDeductionType" id="AbsentFine3" class="form-check-input Main-Radio main-checkbox"
|
||||
@@ -117,8 +49,10 @@
|
||||
<div class="sub-group form-group my-1 ms-4 AbsentFine3SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub1" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "")
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
<label for="AbsentFine3Sub1">به ازای هر روز غیبت </label>
|
||||
|
||||
<select class="form-control-select sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
@@ -131,14 +65,99 @@
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub2" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.Money))" />
|
||||
value="@((int)(FineAbsenceDeductionType.Money))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine3Sub2">به ازای هر روز غیبت </label>
|
||||
<input type="text" class="form-control-currency sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
value="@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? Model.FineAbsenceDeduction.Value : "")"
|
||||
@((Model.FineAbsenceDeduction.Value != 0 && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money) ? "" : "disabled") />
|
||||
<label for="AbsentFine3Sub2">ریال از حقوق پرسنل کسر گردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3 mb-2">
|
||||
<div class="lineMinHr"></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="checkbox" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input main-checkbox2 WeekDayCheckbox"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input" />
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0" />
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1" />
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2" />
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3" />
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4" />
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5" />
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,15 +168,33 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#AbsentFine1').on('click', function () {
|
||||
$('.main-checkbox2').prop('checked', false);
|
||||
$('.main-checkbox2').prop('disabled', true);
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
});
|
||||
|
||||
$('#AbsentFine3').on('click', function () {
|
||||
$('.main-checkbox2').prop('disabled', false);
|
||||
});
|
||||
|
||||
|
||||
//----------------------- WeekDays -----------------------
|
||||
$('.Main-Radio').on('change', function () {
|
||||
if ($(this).hasClass('WeekDayRadio')) {
|
||||
$('.main-checkbox2').on('change', function () {
|
||||
if ($(this).is(':Checked')) {
|
||||
$('.AbsentFineDaysDisable').removeClass('disable');
|
||||
} else {
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var JsonWeekDays = @Html.Raw(Json.Serialize(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels));
|
||||
|
||||
$('#AbsentFineAll').on('change', function () {
|
||||
|
||||
@@ -83,26 +83,26 @@
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType1" id="BaseyearPay2" class="form-check-input Main-Radio main-checkbox"
|
||||
@((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ||
|
||||
Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "checked" : "" ) />
|
||||
<label for="BaseyearPay2">مبلغ عیدی تعیین شدن:</label>
|
||||
<label for="BaseyearPay2">مبلغ سنوات تعیین شدن:</label>
|
||||
|
||||
<div class="sub-group form-group my-1 ms-4 BaseyearPay2SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub1" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled" ) value="@((int)(BaseYearsPayType.Money))" />
|
||||
<label for="BaseyearPay2Sub1">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub1">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-currency" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub1">ریال در سال</label>
|
||||
</div>
|
||||
@* <div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub2" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.OneTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.OneTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub2">مبلغ عیدی یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub2">مبلغ سنوات یک پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub3" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.TwoTimeOfSalary ? "checked" : "") value="@((int)(BaseYearsPayType.TwoTimeOfSalary))" />
|
||||
<label for="BaseyearPay2Sub3">مبلغ عیدی 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
<label for="BaseyearPay2Sub3">مبلغ سنوات 2 برابر پایه حقوق پرداختی پرسنل محاسبه گردد.</label>
|
||||
</div> *@
|
||||
<div>
|
||||
<input type="radio" name="Command.BaseYearsPay.BaseYearsPayType" id="BaseyearPay2Sub4" class="form-check-input Sub-Radio" @(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? "checked" : "") @((Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.Money || Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") value="@((int)(BaseYearsPayType.PercentageOfSalary))" />
|
||||
<label for="BaseyearPay2Sub4">مبلغ عیدی </label>
|
||||
<label for="BaseyearPay2Sub4">مبلغ سنوات </label>
|
||||
<input type="text" class="sub-input form-control-percent" maxlength="3" name="Command.BaseYearsPay.Value" value="@(Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary ? Model.BaseYearsPay.Value : "")" @((Model.BaseYearsPay.Value != 0 && Model.BaseYearsPay.BaseYearsPayType == BaseYearsPayType.PercentageOfSalary) ? "" : "disabled") />
|
||||
<label for="BaseyearPay2Sub4">درصد از حقوق، ماهیانه پرسنل محاسبه گردد.</label>
|
||||
</div>
|
||||
@@ -113,11 +113,11 @@
|
||||
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay3" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.YearlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.YearlyPay))" />
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ عیدی محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay3">پرداخت سالانه (مبلغ سنوات محاسبه شده در فیش حقوقی اسفند ماه محاسبه گردد.)</label>
|
||||
</div>
|
||||
<div class="form-group my-1">
|
||||
<input type="radio" name="Command.BaseYearsPay.PaymentType" id="BaseyearPay4" class="form-check-input Main-Radio2" @(Model.BaseYearsPay.PaymentType == BaseYearsPaymentType.MonthlyPay ? "checked" : "") value="@((int)(BaseYearsPaymentType.MonthlyPay))" />
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ عیدی محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
<label for="BaseyearPay4">پرداخت ماهانه (مبلغ سنوات محاسبه شده بصورت ماهانه در فیش حقوقی محاسبه گردد.)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,81 +32,13 @@
|
||||
<div class="titleSettingRollCall">جریمه غیبت</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" @(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine1" class="form-check-input Main-Radio" value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(!Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() &&
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.None ? "checked" : "")
|
||||
/>
|
||||
<label for="AbsentFine1">جریمه غیبت پرداخت نمیگردد و در فیش حقوقی محاسبه نگردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="group form-group my-1">
|
||||
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input Main-Radio main-checkbox WeekDayRadio" @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "") value="@((int)(FineAbsenceDeductionType.None))" />
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input"/>
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0"/>
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1"/>
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2"/>
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3"/>
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4"/>
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5"/>
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group form-group">
|
||||
<input type="checkbox" name="Command.FineAbsenceDeductionType" id="AbsentFine3" class="form-check-input Main-Radio main-checkbox"
|
||||
@@ -117,8 +49,10 @@
|
||||
<div class="sub-group form-group my-1 ms-4 AbsentFine3SubDisable">
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub1" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ? "checked" : "")
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
value="@((int)(FineAbsenceDeductionType.MultipleTimesOfDailyWage))" />
|
||||
<label for="AbsentFine3Sub1">به ازای هر روز غیبت </label>
|
||||
|
||||
<select class="form-control-select sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
@@ -131,14 +65,99 @@
|
||||
<div>
|
||||
<input type="radio" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine3Sub2" class="form-check-input Sub-Radio"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.Money))" />
|
||||
value="@((int)(FineAbsenceDeductionType.Money))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine3Sub2">به ازای هر روز غیبت </label>
|
||||
<input type="text" class="form-control-currency sub-input" name="Command.FineAbsenceDeduction.Value"
|
||||
value="@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? Model.FineAbsenceDeduction.Value : "")"
|
||||
@((Model.FineAbsenceDeduction.Value != 0 && Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money) ? "" : "disabled") />
|
||||
<label for="AbsentFine3Sub2">ریال از حقوق پرسنل کسر گردد.</label>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3 mb-2">
|
||||
<div class="lineMinHr"></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="checkbox" name="Command.FineAbsenceDeduction.FineAbsenceDeductionType" id="AbsentFine2" class="form-check-input main-checkbox2 WeekDayCheckbox"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "checked" : "")
|
||||
value="@((int)(FineAbsenceDeductionType.None))"
|
||||
@(Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.MultipleTimesOfDailyWage ||
|
||||
Model.FineAbsenceDeduction.FineAbsenceDeductionType == FineAbsenceDeductionType.Money ? "" : "disabled")
|
||||
/>
|
||||
<label for="AbsentFine2">روزهایی که پرسنل اقدام به غیبت نماید جرائم ذیل شامل محاسبه میگردد.</label>
|
||||
|
||||
<div class="sub-group weeks-days AbsentFineDaysDisable @(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels.Any() ? "" : "disable")">
|
||||
|
||||
<input type="checkbox" id="AbsentFineAll" class="checkBox form-check-input" />
|
||||
<label class="labelDays" for="AbsentFineAll">همه روزه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Saturday"
|
||||
id="AbsentFineSat"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Saturday"
|
||||
data-index="6" />
|
||||
<label class="labelDays" for="AbsentFineSat">شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Sunday"
|
||||
id="AbsentFineSun"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Sunday"
|
||||
data-index="0" />
|
||||
<label class="labelDays" for="AbsentFineSun">یکشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Monday"
|
||||
id="AbsentFineMon"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Monday"
|
||||
data-index="1" />
|
||||
<label class="labelDays" for="AbsentFineMon">دوشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Tuesday"
|
||||
id="AbsentFineTue"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Tuesday"
|
||||
data-index="2" />
|
||||
<label class="labelDays" for="AbsentFineTue">سه شنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Wednesday"
|
||||
id="AbsentFineWed"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Wednesday"
|
||||
data-index="3" />
|
||||
<label class="labelDays" for="AbsentFineWed">چهارشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Thursday"
|
||||
id="AbsentFineThu"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Thursday"
|
||||
data-index="4" />
|
||||
<label class="labelDays" for="AbsentFineThu">پنجشنبه</label>
|
||||
|
||||
<input type="checkbox"
|
||||
value="Friday"
|
||||
id="AbsentFineFri"
|
||||
class="checkBox form-check-input"
|
||||
data-day="Friday"
|
||||
data-index="5" />
|
||||
<label class="labelDays" for="AbsentFineFri">جمعه</label>
|
||||
|
||||
|
||||
<div id="dynamicInputsContainer"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,15 +168,33 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#AbsentFine1').on('click', function () {
|
||||
$('.main-checkbox2').prop('checked', false);
|
||||
$('.main-checkbox2').prop('disabled', true);
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
});
|
||||
|
||||
$('#AbsentFine3').on('click', function () {
|
||||
$('.main-checkbox2').prop('disabled', false);
|
||||
});
|
||||
|
||||
|
||||
//----------------------- WeekDays -----------------------
|
||||
$('.Main-Radio').on('change', function () {
|
||||
if ($(this).hasClass('WeekDayRadio')) {
|
||||
$('.main-checkbox2').on('change', function () {
|
||||
if ($(this).is(':Checked')) {
|
||||
$('.AbsentFineDaysDisable').removeClass('disable');
|
||||
} else {
|
||||
$('.AbsentFineDaysDisable').addClass('disable');
|
||||
$('.AbsentFineDaysDisable input[type="checkbox"]').prop('checked', false);
|
||||
$('#dynamicInputsContainer').html('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var JsonWeekDays = @Html.Raw(Json.Serialize(Model.FineAbsenceDeduction.FineAbsenceDayOfWeekViewModels));
|
||||
|
||||
$('#AbsentFineAll').on('change', function () {
|
||||
|
||||
@@ -57,6 +57,35 @@
|
||||
</div>
|
||||
|
||||
<div class="col-12 group-container">
|
||||
<div class="titleSettingRollCall">تعلق گرفتن عیدی</div>
|
||||
<div class="form-group my-1 group">
|
||||
<input type="radio" name="Command.BonusesPaysInEndOfMonth" id="BonusesPaysInEndOfMonth1" class="form-check-input Main-Radio" @(Model.BonusesPaysInEndOfMonth == BonusesPaysInEndOfYear.EndOfYear ? "checked" : "") value="@((int)(BonusesPaysInEndOfYear.EndOfYear))" />
|
||||
<label for="BonusesPaysInEndOfMonth1">عیدی همیشه آخر سال تعلق گرفته شود</label>
|
||||
</div>
|
||||
<div class="form-group my-1 group">
|
||||
<input type="radio" name="Command.BonusesPaysInEndOfMonth" id="BonusesPaysInEndOfMonth2" class="form-check-input Main-Radio" @(Model.BonusesPaysInEndOfMonth == BonusesPaysInEndOfYear.WhenEverEmployeeLeftWork ? "checked" : "") value="@((int)(BonusesPaysInEndOfYear.WhenEverEmployeeLeftWork))" />
|
||||
<label for="BonusesPaysInEndOfMonth2">عیدی هم آخر سال تعلق گرفته شود و هم در زمان ترک کار</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="lineHr my-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 group-container">
|
||||
<div class="titleSettingRollCall">تعلق گرفتن سنوات</div>
|
||||
<div class="form-group my-1 group">
|
||||
<input type="radio" name="Command.BaseYearsPayInEndOfYear" id="BaseYearsPayInEndOfYear1" class="form-check-input Main-Radio" @(Model.BaseYearsPayInEndOfYear == BaseYearsPayInEndOfYear.EndOfYear ? "checked" : "") value="@((int)(BaseYearsPayInEndOfYear.EndOfYear))" />
|
||||
<label for="BaseYearsPayInEndOfYear1">سنوات همیشه آخر سال تعلق گرفته شود</label>
|
||||
</div>
|
||||
<div class="form-group my-1 group">
|
||||
<input type="radio" name="Command.BaseYearsPayInEndOfYear" id="BaseYearsPayInEndOfYear2" class="form-check-input Main-Radio" @(Model.BaseYearsPayInEndOfYear == BaseYearsPayInEndOfYear.WhenEverEmployeeLeftWork ? "checked" : "") value="@((int)(BaseYearsPayInEndOfYear.WhenEverEmployeeLeftWork))" />
|
||||
<label for="BaseYearsPayInEndOfYear2">سنوات هم آخر سال تعلق گرفته شود و هم در زمان ترک کار</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@* <div class="col-12 group-container">
|
||||
<div class="titleSettingRollCall">تعلق گرفتن عیدی</div>
|
||||
<div class="form-group my-1 group">
|
||||
|
||||
@@ -75,13 +104,13 @@
|
||||
<input type="checkbox" name="Command.BonusesPaysInEndOfMonth" id="BonusesPaysInEndOfMonth1" class="form-check-input Main-Radio" @(checkedValid == 1 ? "checked" : "") value="@checkedValid" />
|
||||
<label for="BonusesPaysInEndOfMonth1">آیا میخواهید عیدی همیشه آخر سال تعلق گرفته شود یا در زمان ترک کار؟</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<div class="col-12">
|
||||
<div class="lineHr my-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 group-container">
|
||||
@* <div class="col-12 group-container">
|
||||
<div class="titleSettingRollCall">تعلق گرفتن سنوات</div>
|
||||
<div class="form-group my-1 group">
|
||||
@{
|
||||
@@ -99,7 +128,7 @@
|
||||
<input type="checkbox" name="Command.BonusesPaysInEndOfMonth" id="BonusesPaysInEndOfMonth1" class="form-check-input Main-Radio" @(checkedBaseYearValid == 1 ? "checked" : "") value="@checkedBaseYearValid" />
|
||||
<label for="BonusesPaysInEndOfMonth1">آیا میخواهید سنوات همیشه آخر سال تعلق گرفته شود یا در زمان ترک کار؟</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<div class="col-12">
|
||||
<div class="lineHr my-3"></div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.CreateLeave
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
<link href="~/AssetsClient/css/select2.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
@@ -16,6 +17,10 @@
|
||||
.blackSelect {
|
||||
background-color: #cbd5e1;
|
||||
}
|
||||
|
||||
.modal-xxl {
|
||||
max-width: 900px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -39,7 +44,7 @@
|
||||
<div class="row form-morakhasi-estehghaghi">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 my-1">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="@Model.EmployeeId" id="employeeSelectList">
|
||||
<option value="">پرسنل را انتخاب کنید ...</option>
|
||||
@@ -105,15 +110,15 @@
|
||||
</div>
|
||||
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
|
||||
<div class="input-group">
|
||||
<label class="input-group-text" for="start_time">ساعت شروع</label>
|
||||
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center dateTime" id="StartHoures">
|
||||
<label class="input-group-text" for="StartHoures">ساعت شروع</label>
|
||||
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="StartHoures">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
|
||||
<div class="input-group">
|
||||
<label class="input-group-text" for="end_time">ساعت پایان</label>
|
||||
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center dateTime" id="EndHours">
|
||||
<label class="input-group-text" for="EndHours">ساعت پایان</label>
|
||||
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="EndHours">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -139,7 +144,7 @@
|
||||
<div class="col-12">
|
||||
<div class="position-relative blur" id="blur-div">
|
||||
<div class="position-absolute title-legend">دلیل عدم موافقت:</div>
|
||||
<textarea asp-for="Decription" disabled="disabled" id="descriptionAcceptedCheck" class="w-100 my-3 p-2" cols="10" rows="5"></textarea>
|
||||
<textarea asp-for="Decription" disabled="disabled" id="descriptionAcceptedCheck" class="w-100 mt-3 p-2" cols="10" rows="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,4 +193,4 @@
|
||||
var employeeListAjax = `@Url.Page("Index", "EmployeeList")`;
|
||||
</script>
|
||||
|
||||
<script src="~/assetsclient/pages/employees/js/createleave.js?ver=123"></script>
|
||||
<script src="~/assetsclient/pages/employees/js/createleave.js?ver=@clientVersion"></script>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
.hrTitle .hrDiv {
|
||||
position: absolute;
|
||||
border-bottom: 1px solid #26AFAF;
|
||||
border-bottom: 1px solid #D9D9D9;
|
||||
top: 10px;
|
||||
width: 99%;
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
<!-- Start Card Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="d-grid card-area-employees gap-2 p-0">
|
||||
<div class="d-grid card-area-employees-section gap-2 p-0">
|
||||
<div class="gwb-card">
|
||||
<a onclick="location.href='#showmodal=@Url.Page("./Index", "LeaveCreate")';" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
@@ -253,6 +253,14 @@
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVerion"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
|
||||
function printAllPersonnelInfo(workshopId) {
|
||||
var idlist = "";
|
||||
$('.idPersonnel').each(function () {
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
|
||||
var result = _workshopApplication.GetPersonnelInfo(personnelSearchModel);
|
||||
|
||||
|
||||
var r = result.GroupBy(x => x.EmployeeId).Select(x => x.First()).ToList();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.EmployeeFullName))
|
||||
@@ -401,7 +402,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
printid = result.SendId
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,14 @@
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.errored2 {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
border: 2px solid #eb3434 !important;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.wrapper-dropdown {
|
||||
@@ -298,11 +306,13 @@
|
||||
<div class="col-span-2 md-col-span-2"><input type="text" class="form-control date start-date" asp-for="SearchModel.StartLeave" placeholder="تاریخ شروع"></div>
|
||||
<div class="col-span-2 md-col-span-2"><input type="text" class="form-control date end-date" asp-for="SearchModel.EndLeave" placeholder="تاریخ پایان"></div>
|
||||
|
||||
<div class="col-span-2 md-col-span-3">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.EmployeeId" id="employeeSelect">
|
||||
<option value="">ابتدا کارگاه را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-span-2 md-col-span-3">
|
||||
<div class="employeeSelect">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.EmployeeId" id="employeeSelect">
|
||||
<option value="">ابتدا کارگاه را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 col-span-2">
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<span>جستجو</span>
|
||||
@@ -376,8 +386,8 @@
|
||||
<div class="title text-center">لیست مرخصی</div>
|
||||
</div>
|
||||
<div class="col-4 text-end p-0">
|
||||
@if (@Model.LeaveSearch.Count > 0)
|
||||
{
|
||||
@* @if (@Model.LeaveSearch.Count > 0)
|
||||
{ *@
|
||||
<button onclick="printAll()" class="btn-print-all" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" stroke="#1E293B" />
|
||||
@@ -398,7 +408,7 @@
|
||||
</svg>
|
||||
<span>پرینت لیستی</span>
|
||||
</button>
|
||||
}
|
||||
@* } *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -859,7 +869,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div class="mb-2">
|
||||
<div class="mb-2 employeeSelectMobile">
|
||||
<select class="form-select select2OptionMobile" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.EmployeeId" id="employeeSelectMobile">
|
||||
<option value="">ابتدا کارگاه را انتخاب کنید ...</option>
|
||||
</select>
|
||||
@@ -2288,7 +2298,7 @@
|
||||
|
||||
// if (!($('input:checkbox').is(":checked"))) {
|
||||
// $('.alert-msg').show();
|
||||
// $('.alert-msg p').text('هیچ موردی انتخاب نشده است.');
|
||||
// $('.alert-msg p').text('برای پرینت لطفا اسامی را انتخاب نمائید');
|
||||
// setTimeout(function () {
|
||||
// $('.alert-msg').hide();
|
||||
// $('.alert-msg p').text('');
|
||||
@@ -2296,6 +2306,32 @@
|
||||
// return
|
||||
// }
|
||||
|
||||
var monthValue = $('#month').val();
|
||||
var yearValue = $('#year').val();
|
||||
var employeeIdValue = $('#EmployeeIdSearch').val();
|
||||
|
||||
if (employeeIdValue === "0" || yearValue === "0") {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('برای پرینت ابتدا سال و نام پرسنل را انتخاب نموده و دکمه جستجو را کلیک نمایید');
|
||||
$('#dropdown-year').addClass("errored");
|
||||
$('.persianDateInputYear').addClass("errored");
|
||||
$('.employeeSelect').addClass("errored");
|
||||
$('.employeeSelectMobile').addClass("errored");
|
||||
$('.btn-search-click').addClass("errored2");
|
||||
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$('#dropdown-year').removeClass("errored");
|
||||
$('.persianDateInputYear').removeClass("errored");
|
||||
$('.employeeSelect').removeClass("errored");
|
||||
$('.employeeSelectMobile').removeClass("errored");
|
||||
$('.btn-search-click').removeClass("errored2");
|
||||
}, 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$('.foo').each(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
|
||||
@@ -2317,6 +2353,14 @@
|
||||
if (idlist != "") {
|
||||
var url = '@Url.Page("/Company/Employees/LeavePrintAll")';
|
||||
window.location.href = url + '?idlist=' + idlist;
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('اطلاعاتی وجود ندارد');
|
||||
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2326,7 +2370,7 @@
|
||||
|
||||
// if (!($('input:checkbox').is(":checked"))) {
|
||||
// $('.alert-msg').show();
|
||||
// $('.alert-msg p').text('هیچ موردی انتخاب نشده است.');
|
||||
// $('.alert-msg p').text('برای پرینت لطفا اسامی را انتخاب نمائید');
|
||||
// setTimeout(function () {
|
||||
// $('.alert-msg').hide();
|
||||
// $('.alert-msg p').text('');
|
||||
@@ -2334,6 +2378,31 @@
|
||||
// return
|
||||
// }
|
||||
|
||||
var monthValue = $('#month').val();
|
||||
var yearValue = $('#year').val();
|
||||
var employeeIdValue = $('#EmployeeIdSearch').val();
|
||||
|
||||
if (employeeIdValue === "0" || yearValue === "0") {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('برای پرینت ابتدا سال و نام پرسنل را انتخاب نموده و دکمه جستجو را کلیک نمایید');
|
||||
$('#dropdown-year').addClass("errored");
|
||||
$('.persianDateInputYear').addClass("errored");
|
||||
$('.employeeSelect').addClass("errored");
|
||||
$('.employeeSelectMobile').addClass("errored");
|
||||
$('.btn-search-click').addClass("errored2");
|
||||
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$('#dropdown-year').removeClass("errored");
|
||||
$('.persianDateInputYear').removeClass("errored");
|
||||
$('.employeeSelect').removeClass("errored");
|
||||
$('.employeeSelectMobile').removeClass("errored");
|
||||
$('.btn-search-click').removeClass("errored2");
|
||||
}, 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
$('.foo').each(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
|
||||
@@ -2353,9 +2422,17 @@
|
||||
}
|
||||
|
||||
if (idlist != "") {
|
||||
var parametr = '&idlist=' + idlist;
|
||||
var url = '#showmodal=@Url.Page("/Company/Employees/Leave", "LeavePrintAllList")';
|
||||
window.location.href = url + parametr;
|
||||
var parametr = '&idlist=' + idlist;
|
||||
var url = '#showmodal=@Url.Page("/Company/Employees/Leave", "LeavePrintAllList")';
|
||||
window.location.href = url + parametr;
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('اطلاعاتی وجود ندارد');
|
||||
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
//******************** عملیات مربوط به پرینت ********************
|
||||
@@ -2494,7 +2571,7 @@
|
||||
});
|
||||
|
||||
var workshopId = $('#WorkshopId').val();
|
||||
var employeeIdSelected = $('#employeeSelect').val();
|
||||
var employeeIdSelected = Number($('#EmployeeIdSearch').val());
|
||||
if (workshopId) {
|
||||
$.ajax({
|
||||
url: '@Url.Page("/Company/Employees/Leave", "EmployeeList")',
|
||||
@@ -2506,7 +2583,7 @@
|
||||
var employeeOptionsHtml = `<option value="" ${employeeIdSelected == 0 ? 'selected' : ''}>انتخاب پرسنل ...</option>`;
|
||||
employees.forEach(function (employee) {
|
||||
var black = employee.black ? "blackSelect" : "";
|
||||
employeeOptionsHtml += `<option class="${black}" value="${employee.employeeId}" ${employeeIdSelected == employee.employeeId ? 'selected' : ''}>${employee.personName}</option>`;
|
||||
employeeOptionsHtml += `<option class="${black}" value="${employee.employeeId}" ${employeeIdSelected === employee.employeeId ? 'selected' : ''}>${employee.personName}</option>`;
|
||||
});
|
||||
$('#employeeSelect').html(employeeOptionsHtml);
|
||||
$('#employeeSelectMobile').html(employeeOptionsHtml);
|
||||
|
||||
@@ -101,14 +101,14 @@
|
||||
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
|
||||
<div class="input-group">
|
||||
<label class="input-group-text" for="start_time">ساعت شروع</label>
|
||||
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center" id="StartHoures">
|
||||
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="StartHoures">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
|
||||
<div class="input-group">
|
||||
<label class="input-group-text" for="end_time">ساعت پایان</label>
|
||||
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center" id="EndHours">
|
||||
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="EndHours">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
<div class="d-flex justify-content-center">
|
||||
<a class="btn-cancel text-white w-25 mx-2" data-bs-dismiss="modal" aria-label="Close">انصراف</a>
|
||||
<a href="#" id="save" class="btn-primary text-white w-25 mx-2" style="padding: 10px 8px;font-size: 14px;">ثبت</a>
|
||||
@* <a id="printSingle" class="btn-blue text-white w-25 mx-2" style="display: none">پرینت</a> *@
|
||||
@* <input type="hidden" id="printSingleID" /> *@
|
||||
<a id="printSingle" class="btn-blue text-white w-25 mx-2" style="display: none">پرینت</a>
|
||||
<input type="hidden" id="printSingleID" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -163,9 +163,7 @@
|
||||
|
||||
</form>
|
||||
|
||||
@section Script {
|
||||
|
||||
}
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<style>
|
||||
.validTime {
|
||||
@@ -181,6 +179,8 @@
|
||||
|
||||
$('.loading').hide();
|
||||
|
||||
$(".modal-xxl").css('max-width', '900px');
|
||||
|
||||
document.getElementById("MainModal").style.visibility = "visible";
|
||||
|
||||
$(".select2Option").select2({
|
||||
@@ -313,11 +313,11 @@
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
$('#MainModal').modal('toggle');
|
||||
}, 2000);
|
||||
|
||||
// $('#printSingleID').val(response.printID);
|
||||
// $('#printSingle').show();
|
||||
//$('#MainModal').modal('toggle');
|
||||
$('#printSingleID').val(response.printID);
|
||||
$('#printSingle').show();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
@@ -341,12 +341,12 @@
|
||||
}
|
||||
});
|
||||
|
||||
// $('#printSingle').on('click', function () {
|
||||
// var id = $('#printSingleID').val();
|
||||
// var parametr = '&id=' + id;
|
||||
// var url = '#showmodal=@Url.Page("/Company/Employees/Index", "PrintOneMobile")';
|
||||
// location.href = url + parametr;
|
||||
// });
|
||||
$('#printSingle').on('click', function () {
|
||||
var id = $('#printSingleID').val();
|
||||
var parametr = '&id=' + id;
|
||||
var url = '#showmodal=@Url.Page("./Leave", "PrintOneMobile")';
|
||||
location.href = url + parametr;
|
||||
});
|
||||
|
||||
|
||||
// $(".date").mask("0000/00/00");
|
||||
@@ -647,34 +647,81 @@
|
||||
});
|
||||
|
||||
|
||||
$('#StartHoures').on("keyup",
|
||||
function () {
|
||||
var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
if (isValid) {
|
||||
$(this).addClass("validTime");
|
||||
$(this).removeClass("invalidTime");
|
||||
if ($('#EndHours').hasClass('validTime') && $('#EndHours').val() != null) {
|
||||
computeHourse();
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("validTime");
|
||||
$(this).addClass("invalidTime");
|
||||
}
|
||||
});
|
||||
$('#EndHours').on("keyup",
|
||||
function () {
|
||||
var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
if (isValid) {
|
||||
$(this).addClass("validTime");
|
||||
$(this).removeClass("invalidTime");
|
||||
if ($('#StartHoures').hasClass('validTime') && $('#StartHoures').val() != null) {
|
||||
computeHourse();
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("validTime");
|
||||
$(this).addClass("invalidTime");
|
||||
}
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
$("#StartHoures, #EndHours").on("keyup", validateTimeOrder);
|
||||
function parseTimeToMinutes(time) {
|
||||
const [hours, minutes] = time.split(':').map(Number);
|
||||
return hours * 60 + minutes;
|
||||
}
|
||||
|
||||
function validateTimeOrder() {
|
||||
const startTime = $("#StartHoures").val();
|
||||
const endTime = $("#EndHours").val();
|
||||
|
||||
if (startTime && endTime) {
|
||||
const startMinutes = parseTimeToMinutes(startTime);
|
||||
const endMinutes = parseTimeToMinutes(endTime);
|
||||
|
||||
if (startMinutes >= endMinutes) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text('ساعت شروع و پایان نامعتبر است');
|
||||
|
||||
$("#StartHoures, #EndHours").addClass("invalidTime").removeClass("validTime");
|
||||
|
||||
return false;
|
||||
} else {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
|
||||
$("#StartHoures, #EndHours").addClass("validTime").removeClass("invalidTime");
|
||||
|
||||
}
|
||||
|
||||
if ($("#StartHoures").val().length === 5 && $("#EndHours").val().length === 5) {
|
||||
computeHourse();
|
||||
}
|
||||
}else {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// $('#StartHoures').on("keyup",
|
||||
// function () {
|
||||
// var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
// if (isValid) {
|
||||
// $(this).addClass("validTime");
|
||||
// $(this).removeClass("invalidTime");
|
||||
// if ($('#EndHours').hasClass('validTime') && $('#EndHours').val() != null) {
|
||||
// computeHourse();
|
||||
// }
|
||||
// } else {
|
||||
// $(this).removeClass("validTime");
|
||||
// $(this).addClass("invalidTime");
|
||||
// }
|
||||
// });
|
||||
// $('#EndHours').on("keyup",
|
||||
// function () {
|
||||
// var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
// if (isValid) {
|
||||
// $(this).addClass("validTime");
|
||||
// $(this).removeClass("invalidTime");
|
||||
// if ($('#StartHoures').hasClass('validTime') && $('#StartHoures').val() != null) {
|
||||
// computeHourse();
|
||||
// }
|
||||
// } else {
|
||||
// $(this).removeClass("validTime");
|
||||
// $(this).addClass("invalidTime");
|
||||
// }
|
||||
// });
|
||||
|
||||
function computeHourse() {
|
||||
$('.res').remove();
|
||||
|
||||
@@ -153,6 +153,8 @@
|
||||
<div class="d-flex justify-content-center">
|
||||
<a class="btn-cancel text-white w-25 mx-2" data-bs-dismiss="modal" aria-label="Close">انصراف</a>
|
||||
<a href="#" id="save" class="btn-primary text-white w-25 mx-2" style="padding: 10px 8px;font-size: 14px;">ثبت</a>
|
||||
<a id="printSingle" class="btn-blue text-white w-25 mx-2" style="cursor: pointer; display: none">پرینت</a>
|
||||
<input type="hidden" id="printSingleID" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -162,7 +164,7 @@
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<style>
|
||||
.validTime {
|
||||
|
||||
@@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Query.Bootstrapper;
|
||||
using ServiceHost.Hubs;
|
||||
using ServiceHost.MiddleWare;
|
||||
using WorkFlow.Infrastructure.Config;
|
||||
@@ -29,6 +30,7 @@ var connectionString = builder.Configuration.GetConnectionString("MesbahDb");
|
||||
PersonalBootstrapper.Configure(builder.Services, connectionString);
|
||||
AccountManagementBootstrapper.Configure(builder.Services, connectionString);
|
||||
WorkFlowBootstrapper.Configure(builder.Services, connectionString);
|
||||
QueryBootstrapper.Configure(builder.Services);
|
||||
|
||||
|
||||
builder.Services.AddSingleton<IPasswordHasher, PasswordHasher>();
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
<ProjectReference Include="..\AccountManagement.Configuration\AccountManagement.Configuration.csproj" />
|
||||
<ProjectReference Include="..\backService\backService.csproj" />
|
||||
<ProjectReference Include="..\PersonalContractingParty.Config\PersonalContractingParty.Config.csproj" />
|
||||
<ProjectReference Include="..\Query.Bootstrapper\Query.Bootstrapper.csproj" />
|
||||
<ProjectReference Include="..\Query\Query.csproj" />
|
||||
<ProjectReference Include="..\WorkFlow\Application\WorkFlow.Application.Contracts\WorkFlow.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\WorkFlow\Infrastructure\WorkFlow.Infrastructure.Config\WorkFlow.Infrastructure.Config.csproj" />
|
||||
<ProjectReference Include="..\_0_Framework\_0_Framework_b.csproj" />
|
||||
@@ -87,6 +89,7 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employees\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employers\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\FileBackup\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Partial\_EmptySection.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\RollCall\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\Create.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\CreateCRUDTaskSubjectModal.cshtml" />
|
||||
@@ -110,6 +113,7 @@
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_Menu.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_validationAlert.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_ValidationScriptsPartial.cshtml" />
|
||||
<None Include="Areas\Admin\Pages\Company\Checkouts\_Partials\PrintDetailsRollCallRaw.cshtml" />
|
||||
<None Include="Areas\Admin\Pages\Company\PersonnelInfo\Index.cshtml" />
|
||||
<None Include="Areas\Admin\Pages\Company\PersonnelInfo\PrintAll.cshtml" />
|
||||
<None Include="Areas\Admin\Pages\Company\Reports\Index.cshtml" />
|
||||
@@ -359,6 +363,29 @@
|
||||
<None Include="wwwroot\AssetsAdminNew\libs\wavesurfer\wavesurfer.min.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Report\js\index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Report\js\PrintAll.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\CameraAccounts.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\CaseHistory.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ConfirmEmployeeChange.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\CurrentDay.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\EditSettingWorkTime.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\EmployeeUploadPicture.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\Grouping.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\Index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalAddEmployeeToGroup.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalAddRollCall.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalCameraAccount.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalCameraAccountChangePassword.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalChangeName.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\modalcreategroup.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalEditEmployeeGroup.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalEditGroup.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalEditRollCall.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalOTPAction.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalOTPActionFree.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalRollCallSetting.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalSettingWorkTime.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\ModalTakeImages.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\RollCall\js\Plans.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Sidbar_AdminNew\sidebar_admin.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Tasks\js\create.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Tasks\js\CreateCRUDTaskSubjectModal.js" />
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
.tooltipfull-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tooltipfull {
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
color: #fff;
|
||||
display: grid;
|
||||
font-size: 12px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
background: #23a8a8;
|
||||
border: 1px solid #23a8a8;
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
-moz-transition: all .2s ease-in-out;
|
||||
-o-transition: all .2s ease-in-out;
|
||||
transition: all .2s ease-in-out;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: 30px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltipfull-container:hover .tooltipfull, a:hover .tooltipfull {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.tooltipfull:before, .tooltipfull:after {
|
||||
content: '';
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid #23a8a8;
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
.sweet-alert {
|
||||
font-family: 'IranSans' !important
|
||||
}
|
||||
|
||||
#ConfirmEmployeeModal {
|
||||
width: 100%;
|
||||
background: #00000085;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.ConfirmEmployeeSection {
|
||||
max-width: max-content;
|
||||
}
|
||||
|
||||
.employee-item {
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
margin: 16px 0 0 0;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 10px;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.employee-item ul {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.employee-item ul li {
|
||||
list-style: decimal;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 7px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
transition: ease-in-out .3s;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
.btn-add:hover {
|
||||
background-color: #5f9213;
|
||||
}
|
||||
|
||||
|
||||
.btnPosition {
|
||||
outline: 1px solid #138989;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.active {
|
||||
outline: 1px solid transparent;
|
||||
}
|
||||
|
||||
.btn-register {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 60px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.searchItem {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #535353;
|
||||
}
|
||||
|
||||
.btn-edit-subject {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 4px auto 1px;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-edit-subject:hover {
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-remove-subject {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 4px auto 1px;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-remove-subject:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
.tooltipfull-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tooltipfull {
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
color: #fff;
|
||||
display: grid;
|
||||
font-size: 12px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
background: #23a8a8;
|
||||
border: 1px solid #23a8a8;
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
-moz-transition: all .2s ease-in-out;
|
||||
-o-transition: all .2s ease-in-out;
|
||||
transition: all .2s ease-in-out;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: 30px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltipfull-container:hover .tooltipfull, a:hover .tooltipfull {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.tooltipfull:before, .tooltipfull:after {
|
||||
content: '';
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid #23a8a8;
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
458
ServiceHost/wwwroot/AssetsAdminNew/RollCall/css/Group.css
Normal file
458
ServiceHost/wwwroot/AssetsAdminNew/RollCall/css/Group.css
Normal file
@@ -0,0 +1,458 @@
|
||||
/* ----------------------------------------------------------------- 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;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width1 {
|
||||
width: 8% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width2 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width3 {
|
||||
width: 32% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width4 {
|
||||
width: 25% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width5 {
|
||||
width: 20% !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: 105px;
|
||||
}
|
||||
.btn-group-operations {
|
||||
width: 110px !important;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
|
||||
button.btn-setting {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #64748b;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: #fff;
|
||||
background-color: rgba(100, 116, 139, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
button.btn-setting:hover {
|
||||
color: #ffffff;
|
||||
background-color: rgba(100, 116, 139, 0.40);
|
||||
}
|
||||
|
||||
button.btn-add {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #84cc16;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: #ffffff;
|
||||
background-color: rgba(132, 204, 22, 0.20);
|
||||
box-shadow: none;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
button.btn-add:hover {
|
||||
color: #ffffff;
|
||||
background-color: rgba(132, 204, 22, 0.40);
|
||||
}
|
||||
|
||||
button.btn-edit:hover {
|
||||
color: #009EE2;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
.table-rollcall-group1 .width3 {
|
||||
width: 38% !important;
|
||||
}
|
||||
.btn-group-operations {
|
||||
width: 100px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.table-rollcall-group1 .width2 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group1 .width5 {
|
||||
width: 35% !important;
|
||||
}
|
||||
|
||||
.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: 15% !important;
|
||||
}
|
||||
|
||||
.widthMobile2 {
|
||||
width: 45% !important;
|
||||
}
|
||||
|
||||
.widthMobile3 {
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row {
|
||||
margin: 10px 0px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* .Rtable .Rtable-row .Rtable-cell {
|
||||
width: auto !important;
|
||||
flex-grow: 0;
|
||||
}*/
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.modal-dialog, .modal-content {
|
||||
height: 610px;
|
||||
}
|
||||
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBox .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.groupBoxIrregular {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.btn-workTimeOption-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.radio-workTimeOption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #0F8080;
|
||||
background-color: #DDF4F4;
|
||||
text-align: center;
|
||||
padding: 8px 16px;
|
||||
border-radius: 9px;
|
||||
margin: auto 5px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #1c7474;
|
||||
border-color: #23A8A8;
|
||||
}
|
||||
|
||||
.radio-workTimeOption:checked + .radio-label-workTimeOption {
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(93.83deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%);
|
||||
}
|
||||
|
||||
.selectCheckBreakTime {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin: 0 10px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.hrLine {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(255, 255, 255);
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(202, 202, 202, 1) 45%, rgba(255, 255, 255, 1) 100%);
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.outlineDate {
|
||||
outline: 1px solid #1D9D9D;
|
||||
}
|
||||
|
||||
.breack-time {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px 0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
/************************ Radio Button Input () ************************/
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid #CFD3D4;
|
||||
background-color: white;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked,
|
||||
.form-check-input[type="checkbox"]:checked {
|
||||
background-color: #148989;
|
||||
border: 1px solid #ffffff !important;
|
||||
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="3"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /%3E%3C/svg%3E');
|
||||
background-size: 75%;
|
||||
}
|
||||
|
||||
.form-check-input[type=checkbox]:indeterminate {
|
||||
background-color: #148989;
|
||||
border-color: #ffffff;
|
||||
--bs-form-check-bg-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e);
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:focus,
|
||||
.form-check-input[type="checkbox"]:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"] + label,
|
||||
.form-check-input[type="checkbox"] + label {
|
||||
color: #83898C;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked + label,
|
||||
.form-check-input[type="checkbox"]:checked + label {
|
||||
color: #2B2F32;
|
||||
}
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.modal-dialog, .modal-content {
|
||||
height: 622px;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 10px;
|
||||
padding: 8px 8px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.modal-dialog, .modal-content {
|
||||
height: 610px;
|
||||
}
|
||||
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBox .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.groupBoxIrregular {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.btn-workTimeOption-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.radio-workTimeOption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #0F8080;
|
||||
background-color: #DDF4F4;
|
||||
text-align: center;
|
||||
padding: 8px 16px;
|
||||
border-radius: 9px;
|
||||
margin: auto 5px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #1c7474;
|
||||
border-color: #23A8A8;
|
||||
}
|
||||
|
||||
.radio-workTimeOption:checked + .radio-label-workTimeOption {
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(93.83deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%);
|
||||
}
|
||||
|
||||
.selectCheckBreakTime {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin: 0 10px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.hrLine {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(255, 255, 255);
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(202, 202, 202, 1) 45%, rgba(255, 255, 255, 1) 100%);
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.outlineDate {
|
||||
outline: 1px solid #1D9D9D;
|
||||
}
|
||||
|
||||
.breack-time {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px 0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
/************************ Radio Button Input () ************************/
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid #CFD3D4;
|
||||
background-color: white;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked,
|
||||
.form-check-input[type="checkbox"]:checked {
|
||||
background-color: #148989;
|
||||
border: 1px solid #ffffff !important;
|
||||
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="3"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /%3E%3C/svg%3E');
|
||||
background-size: 75%;
|
||||
}
|
||||
|
||||
.form-check-input[type=checkbox]:indeterminate {
|
||||
background-color: #148989;
|
||||
border-color: #ffffff;
|
||||
--bs-form-check-bg-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e);
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:focus,
|
||||
.form-check-input[type="checkbox"]:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"] + label,
|
||||
.form-check-input[type="checkbox"] + label {
|
||||
color: #83898C;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked + label,
|
||||
.form-check-input[type="checkbox"]:checked + label {
|
||||
color: #2B2F32;
|
||||
}
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.modal-dialog, .modal-content {
|
||||
height: 622px;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 10px;
|
||||
padding: 8px 8px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.modal-dialog, .modal-content {
|
||||
height: 610px;
|
||||
}
|
||||
|
||||
.btn-register {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.timeWorkTitle {
|
||||
color: #5C5C5C;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin: auto 0 auto 6px;
|
||||
}
|
||||
|
||||
|
||||
.form-control {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.groupBox {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBox .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBox .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.groupBoxIrregular {
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #E7E7E7;
|
||||
padding: 6px;
|
||||
margin: 6px 3px;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::placeholder {
|
||||
color: #bfbfbf;
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
.groupBoxIrregular .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.btnAddTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #84CC16;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.btnRemoveTimeWork {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #F87171;
|
||||
border-radius: 7px;
|
||||
padding: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.submit-is-change-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.submit-is-change-modal .modal-content {
|
||||
height: 520px;
|
||||
}
|
||||
|
||||
.overlay-black-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
background-color: #00000070;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
z-index: 26;
|
||||
}
|
||||
|
||||
.card-list-employee {
|
||||
height: 280px;
|
||||
background: #F5F5F5;
|
||||
border: 1px solid #E7E7E7;
|
||||
border-radius: 10px;
|
||||
padding: 6px 10px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.card-list-employee .card-employee {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4px 5px;
|
||||
background: #ECFFFF;
|
||||
border: 1px solid #EAEAEA;
|
||||
border-radius: 5px;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.card-list-employee .card-employee span {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-color: #A7EAEA;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.card-list-employee .card-employee p {
|
||||
font-size: 14px;
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
|
||||
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid #CFD3D4;
|
||||
background-color: white;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked,
|
||||
.form-check-input[type="checkbox"]:checked {
|
||||
background-color: #148989;
|
||||
border: 1px solid #ffffff !important;
|
||||
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="3"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /%3E%3C/svg%3E');
|
||||
background-size: 75%;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:focus,
|
||||
.form-check-input[type="checkbox"]:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"] + label,
|
||||
.form-check-input[type="checkbox"] + label {
|
||||
color: #83898C;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked + label,
|
||||
.form-check-input[type="checkbox"]:checked + label {
|
||||
color: #2B2F32;
|
||||
}
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
|
||||
|
||||
.btn-workTimeOption-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.radio-workTimeOption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #0F8080;
|
||||
background-color: #DDF4F4;
|
||||
text-align: center;
|
||||
padding: 8px 16px;
|
||||
border-radius: 9px;
|
||||
margin: auto 5px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #1c7474;
|
||||
border-color: #23A8A8;
|
||||
}
|
||||
|
||||
.radio-workTimeOption:checked + .radio-label-workTimeOption {
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(93.83deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%);
|
||||
}
|
||||
|
||||
.selectCheckBreakTime {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin: 0 10px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
.hrLine {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(255, 255, 255);
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(202, 202, 202, 1) 45%, rgba(255, 255, 255, 1) 100%);
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.outlineDate {
|
||||
outline: 1px solid #1D9D9D;
|
||||
}
|
||||
|
||||
.breack-time {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px 0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
/************************ Radio Button Input () ************************/
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid #CFD3D4;
|
||||
background-color: white;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked,
|
||||
.form-check-input[type="checkbox"]:checked {
|
||||
background-color: #148989;
|
||||
border: 1px solid #ffffff !important;
|
||||
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="3"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /%3E%3C/svg%3E');
|
||||
background-size: 75%;
|
||||
}
|
||||
|
||||
.form-check-input[type=checkbox]:indeterminate {
|
||||
background-color: #148989;
|
||||
border-color: #ffffff;
|
||||
--bs-form-check-bg-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e);
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:focus,
|
||||
.form-check-input[type="checkbox"]:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"] + label,
|
||||
.form-check-input[type="checkbox"] + label {
|
||||
color: #83898C;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked + label,
|
||||
.form-check-input[type="checkbox"]:checked + label {
|
||||
color: #2B2F32;
|
||||
}
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.modal-dialog, .modal-content {
|
||||
height: 622px;
|
||||
}
|
||||
|
||||
.radio-label-workTimeOption {
|
||||
font-size: 10px;
|
||||
padding: 8px 8px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#computeTime span,
|
||||
.lableCheckBreakTime {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
.modal-dialog, .modal-content {
|
||||
max-width: 840px;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
display: none;
|
||||
}
|
||||
|
||||
label {
|
||||
color: #5C5C5C;
|
||||
font-size: 12px;
|
||||
display: inline;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.createrAccountSetting {
|
||||
margin: 10px 120px;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.selectTextNone * {
|
||||
-webkit-user-select: none; /* Chrome, Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Standard */
|
||||
}
|
||||
|
||||
.borderBottomHeader {
|
||||
border-bottom: 1px solid #D9D9D9;
|
||||
}
|
||||
|
||||
.titleHead {
|
||||
color: #444444;
|
||||
font-weight: 600;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu {
|
||||
padding: 0;
|
||||
border-left: 1px solid #D9D9D9;
|
||||
/* height: 70vh; */
|
||||
width: 25%;
|
||||
transition: all ease-in .4s;
|
||||
}
|
||||
|
||||
.sidebarRollCallForm {
|
||||
padding: 0;
|
||||
/* height: 70vh; */
|
||||
width: 75%;
|
||||
transition: all ease-in .4s;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li {
|
||||
color: #444444;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
transition: all ease-in .4s;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li:hover {
|
||||
background-color: #EAFFFF;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li.complete {
|
||||
background-color: #F7FEE7;
|
||||
border-left: 2px solid #84CC16;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li.current {
|
||||
background-color: #EAFFFF;
|
||||
border-left: 2px solid #23A8A8;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li span {
|
||||
margin: auto 5px;
|
||||
transition: all ease-in .4s;
|
||||
}
|
||||
|
||||
.btn-header-close {
|
||||
margin: 0 0 0 15px;
|
||||
right: 0px;
|
||||
padding: 5px;
|
||||
background-size: 10px;
|
||||
border-radius: 50%;
|
||||
background-color: transparent;
|
||||
z-index: 25;
|
||||
}
|
||||
|
||||
.btn-header-close:hover {
|
||||
color: var(--bs-btn-close-color);
|
||||
text-decoration: none;
|
||||
opacity: var(--bs-btn-close-hover-opacity);
|
||||
}
|
||||
|
||||
.rollCallFormBox
|
||||
{
|
||||
padding: 6px 15px;
|
||||
height: 520px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.rollCallInfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #FF9A9A;
|
||||
border-radius: 10px;
|
||||
color: #2D2D2D;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
background-color: #FFE2E2;
|
||||
padding: 4px;
|
||||
box-shadow: 0px 4px 7px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.rollCallInfoSec {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #D7ECCE;
|
||||
border-radius: 10px;
|
||||
color: #2D2D2D;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
background-color: #E8F9E1;
|
||||
padding: 4px;
|
||||
box-shadow: 0px 4px 7px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.btn-primary,
|
||||
.btn-secondary {
|
||||
border-radius: 5px;
|
||||
padding: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.titleSettingRollCall {
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.titleSettingRollCallCheckbox {
|
||||
font-size: 11px;
|
||||
color: #646464;
|
||||
font-weight: 500;
|
||||
}
|
||||
.titleSettingRollCallCheckboxSubtitle {
|
||||
font-size: 10px;
|
||||
color: #9E9C9C;
|
||||
font-weight: 500;
|
||||
margin-right: 28px;
|
||||
}
|
||||
|
||||
.titleSettingRollCallInfo {
|
||||
font-size: 12px;
|
||||
color: #494949;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.titleSettingRollCallInfoSub {
|
||||
font-size: 10px;
|
||||
color: #9A9A9A;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.lineHr {
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
}
|
||||
|
||||
.lineMinHr {
|
||||
background: linear-gradient(-90deg, rgba(222, 222, 222, 1) 0%, rgba(255, 255, 255, 1) 60%);
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.form-control-percent {
|
||||
border: 1px solid #C6C6C6;
|
||||
border-radius: 6px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.form-control-currency {
|
||||
border: 1px solid #C6C6C6;
|
||||
border-radius: 6px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.form-control-select {
|
||||
border: 1px solid #C6C6C6;
|
||||
border-radius: 6px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
border: 1px solid #CFD3D4;
|
||||
background-color: white;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 8px;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked,
|
||||
.form-check-input[type="checkbox"]:checked{
|
||||
background-color: #148989;
|
||||
border: 1px solid #ffffff !important;
|
||||
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="3"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /%3E%3C/svg%3E');
|
||||
background-size: 75%;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:focus,
|
||||
.form-check-input[type="checkbox"]:focus{
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"] + label,
|
||||
.form-check-input[type="checkbox"] + label {
|
||||
color: #83898C;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"]:checked + label,
|
||||
.form-check-input[type="checkbox"]:checked + label {
|
||||
color: #2B2F32;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.checkBox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.labelDays {
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
margin: 3px;
|
||||
border: 1px solid #E6E6E6;
|
||||
border-radius: 6px;
|
||||
background-color: #F6F6F6;
|
||||
color: #4D4D4D;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
-webkit-user-select: none; /* Chrome, Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Standard */
|
||||
}
|
||||
|
||||
.checkBox:checked + .labelDays {
|
||||
background-color: #148989;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
color: #2B2F32;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.labelDays:hover {
|
||||
background-color: #EBEBEB;
|
||||
}
|
||||
|
||||
/************************ Radio Button Input (Like Checkbox appearance) ************************/
|
||||
|
||||
|
||||
|
||||
@media (max-width:1366px) {
|
||||
.modal-dialog, .modal-content {
|
||||
max-width: 780px;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.rollCallFormBox {
|
||||
height: 440px;
|
||||
}
|
||||
|
||||
.titleSettingRollCall {
|
||||
font-size: 13px;
|
||||
}
|
||||
.createrAccountSetting {
|
||||
margin: 10px 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:992px) {
|
||||
#rollCallSettingModalLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu {
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebarRollCallMenu ul li svg {
|
||||
width: 27px;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.sidebarRollCallForm {
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.titleSettingRollCall {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.rollCallFormBox {
|
||||
padding: 3px 6px;
|
||||
height: 500px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
label {
|
||||
font-size: 11px;
|
||||
}
|
||||
.form-check-input[type="radio"] {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.createrAccountSetting {
|
||||
margin: 10px 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:550px) {
|
||||
.sidebarRollCallMenu {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.sidebarRollCallForm {
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.createrAccountSetting {
|
||||
margin: 3px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:466px) {
|
||||
.sidebarRollCallMenu {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.sidebarRollCallForm {
|
||||
width: 91%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:395px) {
|
||||
.sidebarRollCallMenu {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.sidebarRollCallForm {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
.test {
|
||||
width: 55px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.panel-default > .panel-heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
video {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.modal-content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.md-modal {
|
||||
/* margin: auto;
|
||||
position: fixed;
|
||||
top: 100px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
max-width: 630px;
|
||||
min-width: 320px;
|
||||
height: auto;
|
||||
z-index: 2000;
|
||||
visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden; */
|
||||
|
||||
|
||||
margin: auto;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
z-index: 2000;
|
||||
visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.md-show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.md-overlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(228, 240, 227, 0.8);
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.md-show ~ .md-overlay {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.md-effect-12 .md-content {
|
||||
-webkit-transform: scale(0.8);
|
||||
-moz-transform: scale(0.8);
|
||||
-ms-transform: scale(0.8);
|
||||
transform: scale(0.8);
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.md-show.md-effect-12 ~ .md-overlay {
|
||||
background-color: #e4f0e3;
|
||||
}
|
||||
|
||||
.md-effect-12 .md-content h3,
|
||||
.md-effect-12 .md-content {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.md-show.md-effect-12 .md-content {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.image-show {
|
||||
margin: 0 auto 8px auto;
|
||||
border: 2px dashed #148b8b;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.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;
|
||||
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;
|
||||
top: -50px;
|
||||
right: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 50px;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
||||
}
|
||||
|
||||
/* video {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
} */
|
||||
|
||||
video {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: cover !important;
|
||||
}
|
||||
|
||||
.loadingImage {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 5;
|
||||
background: #75ffff99;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,407 @@
|
||||
#navbar-animmenu {
|
||||
width: 25%;
|
||||
padding: 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
background: #CAF5F5;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a i {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#navbar-animmenu li {
|
||||
list-style-type: none;
|
||||
z-index: 4;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
line-height: 60px;
|
||||
display: block;
|
||||
padding: 0px 20px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu > ul > li.active > a {
|
||||
color: #000000;
|
||||
background-color: transparent;
|
||||
transition: all 0.7s;
|
||||
}
|
||||
|
||||
/* Vertical selector styling */
|
||||
.verti-selector {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
right: 0px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
background-color: #fff;
|
||||
/* border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;*/
|
||||
height: 45px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.verti-selector .top,
|
||||
.verti-selector .bottom {
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.verti-selector .top {
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .bottom {
|
||||
top: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .top:before,
|
||||
.verti-selector .bottom:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #CAF5F5;
|
||||
}
|
||||
|
||||
.verti-selector .top.last-role::before {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.verti-selector .top:before {
|
||||
top: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
.verti-selector .bottom:before {
|
||||
bottom: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 75%;
|
||||
background-color: #ffffff;
|
||||
height: 750px;
|
||||
}
|
||||
|
||||
.createRoleBox {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
z-index: 6;
|
||||
display: block !important;
|
||||
position: relative;
|
||||
padding: 11px 6px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to left, #B1B1B1, #FFFFFF);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX';
|
||||
}
|
||||
|
||||
.btn-create {
|
||||
background: #84CC16;
|
||||
border-radius: 7px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.btn-create:hover {
|
||||
background: #71b112;
|
||||
}
|
||||
|
||||
.btn-pass {
|
||||
background-color: #B5F1F1;
|
||||
color: #009EE2;
|
||||
border-radius: 5px;
|
||||
padding: 5px 8px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
transition: all ease .3s;
|
||||
}
|
||||
|
||||
.btn-pass:hover {
|
||||
background-color: #9bd3d3;
|
||||
}
|
||||
|
||||
#hideCircle {
|
||||
transition: border-radius 0.5s ease;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.isActiveTxt {
|
||||
background-color: #ECFCCB;
|
||||
border: 1px solid #B3EB52;
|
||||
border-radius: 50px;
|
||||
padding: 3px 9px;
|
||||
color: #0B5959;
|
||||
font-size: 11px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-edit-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-edit-role:hover {
|
||||
color: #ffffff;
|
||||
/* background-color: #009EE2; */
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-delete-role {
|
||||
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-delete-role:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: #B4DBFD;
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
background-color: #a2c8e9
|
||||
}
|
||||
|
||||
.btn-info svg {
|
||||
color: #3B82F6;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row.SubAccountRowMobile {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
outline: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.roleTitle {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.roleName {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
/********************************** Sub Account Table **********************************/
|
||||
.rightHeaderMenu {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.leftHeaderMenu {
|
||||
width: 75%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.rightHeaderMenu .width1 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.rightHeaderMenu .width2 {
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width3,
|
||||
.leftList .width3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width4,
|
||||
.leftList .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width5,
|
||||
.leftList .width5 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width6,
|
||||
.leftList .width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width7,
|
||||
.leftList .width7 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.leftHeaderMenu .width8,
|
||||
.leftList .width8 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
|
||||
.roleSubaccountListMobile .width1 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width2 {
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width3 {
|
||||
width: 30% !important;
|
||||
}
|
||||
|
||||
|
||||
.bgSubRow {
|
||||
outline: transparent !important;
|
||||
background-color: #CEF4F4 !important;
|
||||
}
|
||||
/********************************** Sub Account Table **********************************/
|
||||
|
||||
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* Hide default HTML checkbox */
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* The slider */
|
||||
.sliderEUP {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Rounded slider */
|
||||
.sliderEUP:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Checked state */
|
||||
input:checked + .sliderEUP {
|
||||
background-color: #2FBFBF;
|
||||
}
|
||||
|
||||
/* Move the slider to the right when checked */
|
||||
input:checked + .sliderEUP:before {
|
||||
transform: translateX(16px);
|
||||
}
|
||||
|
||||
/* Disable state */
|
||||
.disable + .sliderEUP {
|
||||
background-color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.disable + .sliderEUP:before {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width:1366px) {
|
||||
#accountList {
|
||||
height: 440px;
|
||||
}
|
||||
}
|
||||
258
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CameraAccounts.js
Normal file
258
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CameraAccounts.js
Normal file
@@ -0,0 +1,258 @@
|
||||
$(document).ready(function () {
|
||||
loadDataCameraAccountAjax();
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 768px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
function loadDataCameraAccountAjax() {
|
||||
var html = '';
|
||||
|
||||
$('#ajaxCameraAccountDataLoad').html('');
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadCameraAccountsAjax,
|
||||
data: { workshopId: wpId },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
|
||||
console.log(response.data);
|
||||
|
||||
if (response.data.length > 0) {
|
||||
var n = 1;
|
||||
var dataLoad = response.data;
|
||||
|
||||
dataLoad.forEach(function (item) {
|
||||
html += `
|
||||
<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative openAction">
|
||||
<div class="Rtable-cell d-md-block d-flex width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center">
|
||||
${n}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-flex width2">
|
||||
<div class="Rtable-cell--content d-flex align-items-center text-start">
|
||||
<div id="EmployeeFullName_${item.workshopId}">${item.workshopName}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-md-block d-sm-flex d-none width3">
|
||||
<div class="Rtable-cell--content text-start">${item.username}</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex d-none justify-content-center width5">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex text-end me-3">
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<span class="mx-1 df">فعال</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox"
|
||||
id="toggleCameraAccountPersonnelStatus_${item.id}_desktop"
|
||||
${item.isActiveString === "true" ? `checked` : ``}
|
||||
class="toggle-camera-account-switch-desktop btnAvticeActionCameraAccount_${item.accountId}">
|
||||
<span class="sliderEUP"></span>
|
||||
</label>
|
||||
<span class="mx-1 df">غیر فعال</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex justify-content-end width6">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex justify-content-end">
|
||||
<button class="btn-pass ChangePassword d-none d-md-block" onclick="showModalCameraAccountChangePassword(${item.id})" id="CameraAccountChangePassword_${item.id}" type="button">
|
||||
<span class="spanTxt d-none">تغییر گذرواژه</span>
|
||||
<span class="spanSvg">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn-more position-relative d-md-none d-flex" style="width: 36px;padding: 0;height: 36px;align-items: center;justify-content: center;position: relative !important;">
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="operation-div w-100 d-block d-md-none">
|
||||
<div class="operations-btns">
|
||||
<div class="row p-0">
|
||||
<div class="d-flex align-items-center justify-content-between my-1">
|
||||
<span class="span1">نام حساب کاربری:</span>
|
||||
<span class="span1">${item.username}</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between my-1">
|
||||
<span class="span1">وضعیت:</span>
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<span class="span1 mx-1 df">فعال</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox"
|
||||
id="toggleCameraAccountPersonnelStatus_${item.id}_desktop"
|
||||
${item.isActiveString === "true" ? `checked` : ``}
|
||||
class="toggle-camera-account-switch-desktop btnAvticeActionCameraAccount_${item.employeeId}">
|
||||
<span class="sliderEUP"></span>
|
||||
</label>
|
||||
<span class="span1 mx-1 df">غیر فعال</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-12">
|
||||
|
||||
<button class="btn-upload me-1 ChangePhoneNumber d-none d-md-block" id="ChanePhoneNumber_${item.id}" type="button">
|
||||
<span class="spanTxt">شماره تماس</span>
|
||||
<span class="spanSvg">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button class="btn-pass ChangePassword w-100" onclick="showModalCameraAccountChangePassword(${item.id})" id="ChangePassword_${item.id}" type="button">
|
||||
<span class="spanTxt">تغییر گذرواژه</span>
|
||||
<span class="spanSvg">
|
||||
<svg width="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`;
|
||||
n += 1;
|
||||
});
|
||||
|
||||
$('#ajaxCameraAccountDataLoad').append(html);
|
||||
$('#loadingSkeletonCameraAccount').hide();
|
||||
|
||||
} else {
|
||||
html += `<div></div>
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#ajaxCameraAccountDataLoad').html(html);
|
||||
$('#loadingSkeletonCameraAccount').hide();
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showModalCameraAccountChangePassword(id) {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/CameraAccounts?id=${id}&handler=ChangeCameraPassword`;
|
||||
}
|
||||
|
||||
|
||||
$(document).on('change', '.toggle-camera-account-switch-desktop, .toggle-camera-account-switch-mobile', function () {
|
||||
var id = $(this).attr('id').split('_')[1];
|
||||
var isActive = $(this).is(':checked') ? 'active' : 'deactive';
|
||||
toggleCameraAccountStatus(id, isActive);
|
||||
});
|
||||
|
||||
function toggleCameraAccountStatus(id, type) {
|
||||
const toggleDesktop = $(`#toggleCameraAccountPersonnelStatus_${id}_desktop`);
|
||||
const toggleMobile = $(`#toggleCameraAccountPersonnelStatus_${id}_mobile`);
|
||||
|
||||
if (type === "deactive") {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا میخواهید غیر فعال نمائید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
toggleCameraAccountStatusAjax(id, type);
|
||||
} else {
|
||||
toggleDesktop.prop('checked', true);
|
||||
toggleMobile.prop('checked', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (type === "active") {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا میخواهید فعال نمائید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
toggleCameraAccountStatusAjax(id, type);
|
||||
} else {
|
||||
toggleDesktop.prop('checked', false);
|
||||
toggleMobile.prop('checked', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toggleCameraAccountStatusAjax(id, type) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
url: changeCameraAccountStatusAjax,
|
||||
type: 'POST',
|
||||
data: { id: id, type: type },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
1749
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CaseHistory.js
Normal file
1749
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CaseHistory.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
$(document).ready(function () {
|
||||
$(".closeConfirmModal").on("click", function () {
|
||||
$('#ConfirmEmployeeModal').hide();
|
||||
});
|
||||
|
||||
loadEmployeeIsChangeAjax();
|
||||
});
|
||||
|
||||
function loadEmployeeIsChangeAjax() {
|
||||
var GID = $('#CommandID').val();
|
||||
|
||||
var htmlEmployeeItem = '';
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadEmployeesGroupAjax,
|
||||
data: { 'groupId': Number(GID) },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
var responseDataEmployee = response.data;
|
||||
|
||||
if (response.success) {
|
||||
if (responseDataEmployee.length > 0) {
|
||||
responseDataEmployee.forEach(function (itemEmployee) {
|
||||
if (itemEmployee.isShiftChanged) {
|
||||
isShiftChanged = true;
|
||||
htmlEmployeeItem += `<li>${itemEmployee.name}</li>`;
|
||||
htmlEmployeeItem += `<input type="hidden" name="SelectedEmployeeIds[]" value="${itemEmployee.employeeId}" />`;
|
||||
}
|
||||
});
|
||||
|
||||
$('#loadEmployeeItem').html(htmlEmployeeItem);
|
||||
|
||||
} else {
|
||||
isShiftChanged = false;
|
||||
var htmlEmpty = `<div class="text-center bg-white card py-5 d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#loadEmployeeItem').html(htmlEmpty);
|
||||
}
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
251
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CurrentDay.js
Normal file
251
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/CurrentDay.js
Normal file
@@ -0,0 +1,251 @@
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
});
|
||||
|
||||
$(document).on('click', ".btnRollCallStatus", function () {
|
||||
var index = $(this).index();
|
||||
$('.btnRollCallStatus').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
loadRollCallStatus('all');
|
||||
loadRollCallCount();
|
||||
|
||||
// --------------------------------------------- search
|
||||
$('#search').on('keyup', function () {
|
||||
let searchValue = $(this).val().toLowerCase();
|
||||
|
||||
$('.employee-row').filter(function () {
|
||||
$(this).toggle($(this).find('.employee-name').text().toLowerCase().includes(searchValue));
|
||||
});
|
||||
|
||||
$('.absenceItem-row').filter(function () {
|
||||
$(this).toggle($(this).find('.employee-name').text().toLowerCase().includes(searchValue));
|
||||
});
|
||||
|
||||
$('.leaveItem-row').filter(function () {
|
||||
$(this).toggle($(this).find('.employee-name').text().toLowerCase().includes(searchValue));
|
||||
});
|
||||
|
||||
updateIndexes();
|
||||
|
||||
if ($(this).val().length > 0) {
|
||||
$('#clear-search').removeClass('d-none').addClass('d-flex');
|
||||
} else {
|
||||
$('#clear-search').removeClass('d-flex').addClass('d-none');
|
||||
}
|
||||
});
|
||||
|
||||
$('#clear-search').on('click', function () {
|
||||
$('#search').val('');
|
||||
|
||||
$('.employee-row, .absenceItem-row, .leaveItem-row').show();
|
||||
|
||||
updateIndexes();
|
||||
|
||||
$(this).removeClass('d-flex').addClass('d-none');
|
||||
});
|
||||
|
||||
function updateIndexes() {
|
||||
let index = 1;
|
||||
|
||||
$('.employee-row:visible .table-number').each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
|
||||
$('.absenceItem-row:visible .table-number').each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
|
||||
$('.leaveItem-row:visible .table-number').each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function loadRollCallCount() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
data: { workshopId: wpId },
|
||||
url: `${loadRollCallAbsentLeaveCountAjax}`,
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
$('#leaveCount').text(response.leaveEmployeesCount);
|
||||
$('#absentCount').text(response.absentEmployeesCount);
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadRollCallStatus(type) {
|
||||
var index = 1;
|
||||
var html = '';
|
||||
let colorDivStyle = '';
|
||||
|
||||
switch (type) {
|
||||
case "leave":
|
||||
colorDivStyle = "leaveItem";
|
||||
break;
|
||||
case "absent":
|
||||
colorDivStyle = "absenceItem";
|
||||
break;
|
||||
default:
|
||||
colorDivStyle = "";
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: `${loadRollCallMoreAjax}`,
|
||||
data: {
|
||||
type: type,
|
||||
workshopId: wpId
|
||||
},
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
var responseData = response.data;
|
||||
|
||||
|
||||
|
||||
if (responseData.length > 0) {
|
||||
responseData.forEach(function (item) {
|
||||
|
||||
// html += `<div class="Rtable-row Rtable-row--head align-items-center">
|
||||
// <div class="Rtable-cell column-heading d-block width1">ردیف</div>
|
||||
// <div class="Rtable-cell column-heading d-block width6">تاریخ ایجاد</div>
|
||||
// <div class="Rtable-cell column-heading d-block width3">تاریخ سررسید</div>
|
||||
// <div class="Rtable-cell column-heading d-block width4">طرف حساب</div>
|
||||
// <div class="Rtable-cell column-heading d-block width5">عنوان وظیفه</div>
|
||||
// <div class="Rtable-cell column-heading d-block width7 text-end">عملیات</div>
|
||||
//</div>`;
|
||||
|
||||
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative openAction ${colorDivStyle}">
|
||||
<div class="Rtable-cell width1" style="width:5%">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="d-flex justify-content-center align-items-center table-number">
|
||||
${index++}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2" style="width:30%">
|
||||
<div class="Rtable-cell--content text-start" style="overflow:hidden; display: inline; text-overflow: ellipsis; white-space: nowrap; line-height: 30px;">
|
||||
${item.employeeFullName}
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
if (type !== "all") {
|
||||
html += `<div class="Rtable-cell width2" style="width:5%">
|
||||
<div class="Rtable-cell--content text-start" style="overflow:hidden; display: inline; text-overflow: ellipsis; white-space: nowrap; line-height: 30px;">
|
||||
<div class="">شماره پرسنلی: ${item.personnelCode}</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
if (type === "all") {
|
||||
html += `<div class="width3" style="width:1%;border-right: 1px dashed #CACACA;padding: 7px;">-</div>`;
|
||||
html += `<div class="width3" style="width:18%">`;
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div style="direction: ltr;" class="Rtable-cell--content d-block text-center">
|
||||
<div>${itemTime.startDate}</div>
|
||||
</div>`;
|
||||
});
|
||||
html += `</div>`;
|
||||
html += `<div class="width4" style="width:18%">`;
|
||||
item.rollCallTimesList.forEach(function (itemTime) {
|
||||
html += `<div style="direction: ltr;" class="Rtable-cell--content d-block text-center">
|
||||
<div>${itemTime.endDate == null ? "-" : itemTime.endDate}</div>
|
||||
</div>`;
|
||||
});
|
||||
html += `</div>`;
|
||||
html += `<div class="width3" style="width:1%;border-left: 1px dashed #CACACA;padding: 7px;">-</div>`;
|
||||
|
||||
html += `<div class="Rtable-cell d-md-none d-block width6 text-end" style="width:10%">
|
||||
<button class="btn-rollcall-more position-relative">
|
||||
<span class="align-items-center d-flex justify-content-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
if (type === "all") {
|
||||
const hasLastEndDate = item.rollCallTimesList.map(itemTime => itemTime.endDate).filter(endDate => endDate === null).pop() !== undefined;
|
||||
|
||||
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">
|
||||
<div class="d-md-none d-flex align-items-center position-relative">
|
||||
<div class="Rtable-cell--content">
|
||||
شماره پرسنل: ${item.personnelCode}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="d-md-none d-flex align-items-center position-relative">
|
||||
<div class="Rtable-cell--content">
|
||||
مجموع ساعات کارکرد: ${hasLastEndDate
|
||||
? `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE"/>
|
||||
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE"/>
|
||||
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`
|
||||
: `${item.totalWorkingHours}`
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<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>`;
|
||||
}
|
||||
|
||||
$('#loadRollCallTypeAjax').html(html);
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
var isTabPressed = false;
|
||||
$(document).ready(function () {
|
||||
updateRemoveButtons();
|
||||
|
||||
$('.loading').hide();
|
||||
|
||||
$(".dateTime").on("blur", function () {
|
||||
var valueCheck = $(this).val().trim();
|
||||
if (valueCheck === "" || !timeValidCheck(valueCheck)) {
|
||||
$(this).addClass("errored");
|
||||
}
|
||||
});
|
||||
|
||||
//$(".dateTime").on("keydown", function (e) {
|
||||
// if (e.key === "Tab" && !e.shiftKey) {
|
||||
// e.preventDefault();
|
||||
// isTabPressed = true;
|
||||
|
||||
// if (e.shiftKey) {
|
||||
// focusPreviousTimeInput(this);
|
||||
// } else {
|
||||
// focusNextTimeInput(this);
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
if (IsRegularWorkshop) {
|
||||
|
||||
$("#organized").prop('checked', true);
|
||||
$("#disorganized").prop('checked', false);
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
// این مرحله هنگام چک کردن تعداد نوبت هستش
|
||||
var currentCount = $('.groupBox').length;
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
$("#organized").prop('checked', false);
|
||||
$("#disorganized").prop('checked', true);
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
}
|
||||
|
||||
$("#organized").on("click", function () {
|
||||
$('#step_workTimeOption').show();
|
||||
|
||||
if ($('#step_workTimeOption').is(':visible')) {
|
||||
$('.dateTime').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
var currentCount = $('.groupBox').length;
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#disorganized").on("click", function () {
|
||||
$('#step_workTimeOption').hide();
|
||||
$('.btn-register').removeClass('disable');
|
||||
});
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
//validateAllTimes();
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (currentCount < 3) {
|
||||
var namePlacement = "";
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacement = "Second";
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacement = "Third";
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<input type="hidden" name="shiftViewModels[${currentCount}].Placement" value="${namePlacement}" />
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="shiftViewModels[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="shiftViewModels[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="shiftViewModels[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 3) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 3) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
});
|
||||
});
|
||||
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
//updateAddButtonText(1);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
$('.btnAddTimeWork').css('visibility', 'visible');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
$('.btnAddTimeWork').css('visibility', 'visible');
|
||||
} else {
|
||||
$('.btnAddTimeWork').css('visibility', 'hidden');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (isTabPressed) {
|
||||
isTabPressed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
//validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
// focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
//function focusNextTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
|
||||
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
// $(inputs[currentIndex + 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
//function focusPreviousTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
|
||||
// if (currentIndex > 0) {
|
||||
// $(inputs[currentIndex - 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
//function validateAllTimes() {
|
||||
// let timeRanges = [];
|
||||
|
||||
// $(".groupBox").each(function () {
|
||||
// let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
// let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
// if (startTime.length === 5 && endTime.length === 5) {
|
||||
// let startParts = startTime.split(':');
|
||||
// let endParts = endTime.split(':');
|
||||
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Check for conflicts and order
|
||||
// //for (let i = 0; i < timeRanges.length; i++) {
|
||||
// // for (let j = 0; j < i; j++) {
|
||||
// // if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
// // showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// // return;
|
||||
// // }
|
||||
|
||||
// // // Check for overlap with previous entries
|
||||
// // if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
// // showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// // return;
|
||||
// // }
|
||||
// // // Check if the current start time is before the previous start time
|
||||
// // if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
// // showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// // return;
|
||||
// // }
|
||||
// // }
|
||||
// //}
|
||||
//}
|
||||
|
||||
function actionForShowModalReplaceChange() {
|
||||
var htmlEmployeeItem = '';
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: getGroupListAndEmployeeListAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { 'customizeWorkshopSettingsId': $('#customizeWorkshopSettingsId').val() },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
if (response.success) {
|
||||
$('#ConfirmEmployeeModal').show();
|
||||
|
||||
response.data.forEach(function (itemEmployee) {
|
||||
htmlEmployeeItem += `<li>${itemEmployee.groupName}</li>`;
|
||||
if (itemEmployee.employeeName.length > 0) {
|
||||
htmlEmployeeItem += `<ul>`;
|
||||
itemEmployee.employeeName.forEach(function (itemEmployeeName) {
|
||||
htmlEmployeeItem += `<li>${itemEmployeeName}</li>`;
|
||||
});
|
||||
htmlEmployeeItem += `</ul>`;
|
||||
}
|
||||
});
|
||||
|
||||
$('#loadEmployeeItem').html(htmlEmployeeItem);
|
||||
} else {
|
||||
saveEditSettingWorkTime();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function saveEditSettingWorkTime() {
|
||||
var data = $('#create-form').serializeArray();
|
||||
data.push({ name: 'workshopId', value: wpId });
|
||||
|
||||
var requestData = $.param(data);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveEditSettingWorkTimeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: requestData,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
$('#MainModal').modal('hide');
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,420 @@
|
||||
var pageIndexMain = 0;
|
||||
var searchName = '';
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
|
||||
|
||||
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);
|
||||
//});
|
||||
|
||||
$(document).on('change', '.toggle-switch-desktop, .toggle-switch-mobile', function () {
|
||||
var id = $(this).attr('id').split('_')[1]; // Extract ID from toggle switch ID
|
||||
var isActive = $(this).is(':checked') ? 'active' : 'deactive'; // Check if the switch is active (checked)
|
||||
togglePersonnelStatus(id, isActive);
|
||||
});
|
||||
|
||||
$('.btn-search-click').on('click', function () {
|
||||
|
||||
|
||||
var isValidSearch = $('#personnelSearch').val().trim();
|
||||
if (isValidSearch == '') {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('نام پرسنل را وارد نمائید');
|
||||
$('#personnelSearch').addClass('errored');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$('#personnelSearch').removeClass('errored');
|
||||
}, 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pageIndexMain = 0;
|
||||
searchName = $('#personnelSearch').val();
|
||||
$('#filterRemove').removeClass('disable');
|
||||
$('#ajaxDataLoad').html('');
|
||||
$('#loadingSkeleton').css('display', 'contents');
|
||||
loadDataAjax();
|
||||
});
|
||||
|
||||
$('.btn-clear-filter').on('click', function () {
|
||||
pageIndexMain = 0;
|
||||
searchName = '';
|
||||
$('#personnelSearch').val('');
|
||||
$('#ajaxDataLoad').html('');
|
||||
$('#loadingSkeleton').css('display', 'contents');
|
||||
$('#filterRemove').addClass('disable');
|
||||
loadDataAjax();
|
||||
});
|
||||
|
||||
function loadDataAjax() {
|
||||
var b = pageIndexMain % 30;
|
||||
var html = '';
|
||||
|
||||
if (b === 0) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadEmployeeUploadDataAjax,
|
||||
data: {
|
||||
pageIndex: pageIndexMain,
|
||||
searchName: searchName,
|
||||
workshopId: wpId
|
||||
},
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.pageIndex > 0) {
|
||||
var n = pageIndexMain + 1;
|
||||
var dataLoad = response.data.personnelInfoViewModels;
|
||||
|
||||
dataLoad.forEach(function (item) {
|
||||
html += `
|
||||
<div></div>
|
||||
|
||||
<div id="Section_${item.employeeId}" class="Rtable-row align-items-center position-relative ${(item.isActiveString === "false" && item.hasUploadedImage === "false") ? `deactive` : ``} ${item.Black ? `disable` : ``}">
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width1">
|
||||
<div class="Rtable-cell--heading">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center">
|
||||
${n}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width2">
|
||||
<div class="Rtable-cell--heading">نام و نام خانوادگی</div>
|
||||
<div class="Rtable-cell--content d-flex align-items-center">`;
|
||||
|
||||
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="">`;
|
||||
}
|
||||
html += `<div id="EmployeeFullName_${item.employeeId}">${item.employeeFullName}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
<div class="Rtable-cell--heading">کد ملی</div>
|
||||
<div class="Rtable-cell--content">${item.nationalCode}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width4">
|
||||
<div class="Rtable-cell--heading">وضعیت عکس</div>
|
||||
<div class="Rtable-cell--content">`;
|
||||
if (item.hasUploadedImage === "true") {
|
||||
html += `<p id="TextUpload_${item.employeeId}" class="m-0">عکس پرسنل آپلود شده است</p>`;
|
||||
}
|
||||
else {
|
||||
html += `<p id="TextUpload_${item.employeeId}" class="m-0 text-danger">عکس پرسنل آپلود نشده است</p>`;
|
||||
}
|
||||
|
||||
var isActive = item.isActiveString === "true" ? "deactive" : "active";
|
||||
|
||||
html += `</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-flex d-none justify-content-end width5">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex text-end me-3">
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<span class="mx-1 df">فعال</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox"
|
||||
id="togglePersonnelStatus_${item.id}_desktop"
|
||||
class="toggle-switch-desktop btnAvticeAction_${item.employeeId} ${item.isActiveString === "true" ? `btn-deactive` : item.hasUploadedImage === "false" ? `disable` : `btn-active`}"
|
||||
${item.isActiveString === "true" ? `checked` : ``}
|
||||
${item.hasUploadedImage === "false" ? `disabled` : ``}>
|
||||
<span class="sliderEUP"></span>
|
||||
</label>
|
||||
<span class="mx-1 df">غیر فعال</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end me-1 ${item.isActiveString === "true" ? `` : item.hasUploadedImage === "false" ? `disable` : ``}">
|
||||
<button class="btn-upload" type="button" onclick='ModalChaneName(${item.employeeId})' style="width: 95px;">
|
||||
ویرایش نام
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
<button class="btn-upload" type="button" onclick='ModalUploadPics(${item.employeeId})' id="uploadMobileBTN_${item.employeeId}" style="width: 95px;">
|
||||
${item.hasUploadedImage === "true" ? `ویرایش عکس` : `بارگذاری عکس`}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-rollcall-mobile w-100 d-flex d-md-none align-items-center justify-content-between">
|
||||
<div class="d-flex justify-content-center align-items-center justify-content-between">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center" style="width: 30px;height: 30px;">
|
||||
${n}
|
||||
</span>
|
||||
</div>
|
||||
<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="">`;
|
||||
}
|
||||
html += `</span>
|
||||
</div>
|
||||
<div class="Rtable-cell--content my-auto">
|
||||
<div class="title-mobile" style="width: 132px;" id="EmployeeFullNameMobile_${item.employeeId}">${item.employeeFullName}</div>
|
||||
<div class="content-mobile">`;
|
||||
if (item.hasUploadedImage === "true") {
|
||||
html += `<p id="TextUploadMobile_${item.employeeId}" class="m-0">عکس پرسنل آپلود شده است</p>`;
|
||||
}
|
||||
else {
|
||||
html += `<p id="TextUploadMobile_${item.employeeId}" class="m-0 text-danger">عکس پرسنل آپلود نشده است</p>`;
|
||||
}
|
||||
html += `</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell--content d-flex justify-content-end align-items-center">
|
||||
<div class="Rtable-cell--heading d-block text-center" style="width: 120px;">
|
||||
<div class="Rtable-cell--content align-items-center d-block text-end">
|
||||
<div class="d-flex align-items-center justify-content-evenly gap-2 px-2">
|
||||
<button class="btn-upload ${item.isActiveString === "true" ? `` : item.hasUploadedImage === "false" ? `disable` : ``}"" type="button" onclick='ModalChaneName(${item.employeeId})' style="width: 50%; height: 30px;">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn-upload-mobile text-nowrap" type="button" id="uploadMobileBTNMobile_${item.employeeId}" onclick='ModalUploadPics(${item.employeeId})' style="width: 50%; height: 30px; padding: 0;">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center mt-1">
|
||||
<div class="mx-1 df" style="font-size: 10px;">فعال</div>
|
||||
<label class="switch">
|
||||
<input type="checkbox"
|
||||
id="togglePersonnelStatus_${item.id}_mobile"
|
||||
class="toggle-switch-mobile btnAvticeAction_${item.employeeId} ${item.isActiveString === "true" ? `btn-deactive` : item.hasUploadedImage === "false" ? `disable` : `btn-active`}"
|
||||
${item.isActiveString === "true" ? `checked` : ``}
|
||||
${item.hasUploadedImage === "false" ? `disabled` : ``}>
|
||||
<div class="sliderEUP"></div>div
|
||||
</label>
|
||||
<div class="mx-1 df" style="font-size: 10px;">غیر فعال</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
n += 1;
|
||||
});
|
||||
|
||||
$('#ajaxDataLoad').append(html);
|
||||
$('#loadingSkeleton').hide();
|
||||
var newPageIndex = pageIndexMain + response.pageIndex;
|
||||
pageIndexMain = newPageIndex;
|
||||
} else {
|
||||
html += `<div></div>
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#ajaxDataLoad').append(html);
|
||||
$('#loadingSkeleton').hide();
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('.goToTop').on('click', function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
loadDataAjax();
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
function loadInfoCount() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
url: loadInfoCountAjax,
|
||||
type: 'GET',
|
||||
data: { workshopId: wpId },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$('#maxPersonValid').text(response.maxPersonValid);
|
||||
$('#isTrueActiveCount').text(response.isTrueActiveCount);
|
||||
$('#isFalseActiveCount').text(response.isFalseActiveCount);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ModalUploadPics(employeeID)
|
||||
{
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
url: checkModalTakeImageAjax,
|
||||
type: 'GET',
|
||||
data: { workshopId: wpId },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/EmployeeUploadPicture?employeeId=${employeeID}&handler=ModalTakeImages`;
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function togglePersonnelStatus(id, type) {
|
||||
var urlType = "";
|
||||
switch (type) {
|
||||
case 'deactive':
|
||||
urlType = deActivePersonnelAjax;
|
||||
break;
|
||||
case 'active':
|
||||
urlType = activePersonnelAjax;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
const toggleDesktop = $(`#togglePersonnelStatus_${id}_desktop`);
|
||||
const toggleMobile = $(`#togglePersonnelStatus_${id}_mobile`);
|
||||
|
||||
if (type === "deactive") {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "در صورت غیر فعال کردن این پرسنل، حقوق این ماه ایشان محاسبه نخواهد شد. آیا مطمئن هستید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
actionPersonnelStatus(urlType, id, type, toggleDesktop, toggleMobile);
|
||||
} else {
|
||||
toggleDesktop.prop('checked', true);
|
||||
toggleMobile.prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
actionPersonnelStatus(urlType, id, type, toggleDesktop, toggleMobile);
|
||||
}
|
||||
}
|
||||
|
||||
function actionPersonnelStatus(url, id, type, buttonDesktop, buttonMobile) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: url,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { id: id },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2000);
|
||||
|
||||
loadInfoCount();
|
||||
|
||||
// Toggle both desktop and mobile buttons
|
||||
if (type === "deactive") {
|
||||
//$(`#IsActiveString_${id}_desktop`).text('فعال کردن');
|
||||
//$(`#IsActiveString_${id}_mobile`).text('فعال کردن');
|
||||
buttonDesktop.removeClass('btn-deactive').addClass('btn-active');
|
||||
buttonMobile.removeClass('btn-deactive').addClass('btn-active');
|
||||
} else {
|
||||
//$(`#IsActiveString_${id}_desktop`).text('غیر فعال کردن');
|
||||
//$(`#IsActiveString_${id}_mobile`).text('غیر فعال کردن');
|
||||
buttonDesktop.removeClass('btn-active').addClass('btn-deactive');
|
||||
buttonMobile.removeClass('btn-active').addClass('btn-deactive');
|
||||
}
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
buttonDesktop.prop('checked', false);
|
||||
buttonMobile.prop('checked', false);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ModalChaneName(employeeID) {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/EmployeeUploadPicture?employeeId=${employeeID}&workshopId=${wpId}&handler=ModalChangeName`;
|
||||
}
|
||||
398
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Grouping.js
Normal file
398
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Grouping.js
Normal file
@@ -0,0 +1,398 @@
|
||||
$(document).ready(function () {
|
||||
$("#newCreateGroup").click(function () {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/Grouping?workshopSettingId=${workshopSettingId}&handler=CreateGroup`;
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
var id = $(this).data('index');
|
||||
|
||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
|
||||
loadEmployeeAjax(id);
|
||||
$(`.openAction`).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
loadDataAjax();
|
||||
});
|
||||
|
||||
function loadDataAjax() {
|
||||
var html = "";
|
||||
var htmlEmployee = "";
|
||||
var index = 0;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkshopSettingsDataAjax,
|
||||
data: { 'workshopId': wpId },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
var responseData = response.data;
|
||||
|
||||
if (responseData.groupSettings.length > 0) {
|
||||
responseData.groupSettings.forEach(function(item, indexItem) {
|
||||
index = index + 1;
|
||||
|
||||
html += `
|
||||
<div class="p-2 rounded-3 d-flex align-items-center justify-content-between w-100 btnPosition openAction ${
|
||||
indexItem === 0 ? 'active' : ''}" data-index="${item.id}">
|
||||
|
||||
<div class="width1">
|
||||
<span class="d-none" id="groupSettingsId">${item.id}</span>
|
||||
<span class="row-index1">${index}</span>
|
||||
</div>
|
||||
|
||||
<div class="title-group1 width2">
|
||||
<p class="m-0 d-block d-md-none">نام گروه:</p>
|
||||
<p class="m-0">${item.groupName}</p>
|
||||
</div>
|
||||
<div class="title-group1 text-center d-none d-md-block width3">`;
|
||||
|
||||
|
||||
if (item.workshopShiftStatus === 0) {
|
||||
item.rollCallWorkshopShifts.forEach(function (itemShifts) {
|
||||
html += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.endTime}</span>
|
||||
</p>
|
||||
`;
|
||||
});
|
||||
} else {
|
||||
html += `<p class="m-0 time-set-title">`;
|
||||
if (item.irregularShift.workshopIrregularShifts === 1) {
|
||||
html += `<span>12-24</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 2) {
|
||||
html += `<span>24-24</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 3) {
|
||||
html += `<span>12-36</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 4) {
|
||||
html += `<span>24-48</span>`;
|
||||
}
|
||||
|
||||
html += `</p>`;
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
<div class="text-end d-block width5">
|
||||
<button type="button" class="btn-add btn-group-operations" onclick="AddToGroupModal(${responseData.id}, ${item.id})" style="padding: 0 6px;font-weight: 600;color: #65a30d;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="9" cy="9" r="4" fill="#65a30d"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.864 18.8128C14.8851 18.9183 14.9742 19 15.0819 19H16.8672C17.4687 19 17.9213 18.471 17.7202 17.9042C17.3002 16.7199 16.2951 15 14 15C13.8744 15 13.7527 15.0052 13.6347 15.0151C13.2591 15.0467 13.1629 15.5087 13.415 15.7889C14.3198 16.7941 14.6998 17.9918 14.864 18.8128ZM13.5276 17.8332C13.7713 18.4159 13.2918 19 12.6602 19H11.1328C10.5313 19 10.0787 18.4711 10.2798 17.9042C10.4699 17.3683 10.7798 16.7226 11.2749 16.1763C11.5534 15.869 12.022 15.8468 12.3326 16.1214C12.9049 16.6274 13.2808 17.2429 13.5276 17.8332Z" fill="#65a30d"/>
|
||||
<path d="M9 15C12.5715 15 13.5919 17.5512 13.8834 19.0089C13.9917 19.5504 13.5523 20 13 20H5C4.44772 20 4.00829 19.5504 4.11659 19.0089C4.4081 17.5512 5.42846 15 9 15Z" fill="#65a30d"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4821 12.5882C13.4183 11.6795 14 10.4077 14 9C14 8.29933 13.8559 7.63233 13.5957 7.02702C13.7279 7.0092 13.8629 7 14 7C15.6569 7 17 8.34315 17 10C17 11.6569 15.6569 13 14 13C13.4462 13 12.9274 12.8499 12.4821 12.5882ZM11.7119 11.9404C12.5039 11.2095 13 10.1627 13 9C13 8.40307 12.8692 7.83668 12.6348 7.32791C11.6643 7.82475 11 8.8348 11 10C11 10.7399 11.2679 11.4173 11.7119 11.9404Z" fill="#65a30d"/>
|
||||
<path d="M19 3V7" stroke="#65a30d" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M21 5L17 5" stroke="#65a30d" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
افزودن پرسنل
|
||||
</button>
|
||||
<button onclick="editGroup(${item.id})" class="btn-edit position-relative btn-group-operations" style="margin: 2px 0;padding: 0;font-weight: 600;font-size: 12px;">
|
||||
<svg width="24" height="24" 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>
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1"></path>
|
||||
</svg>
|
||||
ویرایش
|
||||
</button>
|
||||
<button type="button" class="btn-delete2 btn-group-operations" onclick="removeGroupConfirm(${item.id})" style="padding: 0;font-weight: 600;font-size: 12px;">
|
||||
<svg width="24" height="24" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.26733 12.4805L8.26733 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M12.2865 12.4805L12.2865 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M3.04224 5.96094H17.5115V5.96094C16.7544 5.96094 16.3758 5.96094 16.0699 6.06212C15.4692 6.26083 14.9979 6.73211 14.7992 7.33286C14.698 7.63875 14.698 8.0173 14.698 8.7744V12.5535C14.698 14.4391 14.698 15.382 14.1122 15.9677C13.5264 16.5535 12.5836 16.5535 10.698 16.5535H9.8557C7.97008 16.5535 7.02727 16.5535 6.44148 15.9677C5.8557 15.382 5.8557 14.4391 5.8557 12.5535V8.7744C5.8557 8.0173 5.8557 7.63875 5.75452 7.33286C5.55581 6.73211 5.08453 6.26083 4.48378 6.06212C4.17789 5.96094 3.79934 5.96094 3.04224 5.96094V5.96094Z" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M8.26727 3.51423C8.26727 3.51423 8.66919 2.69922 10.2769 2.69922C11.8846 2.69922 12.2865 3.51403 12.2865 3.51403" stroke="#F63D3D" stroke-linecap="round" />
|
||||
</svg>
|
||||
حذف
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operation-div w-100 d-block d-md-none" style="margin: -5px 0 0 0;">
|
||||
<div class="operations-btns px-2" id="loadEmployeeItemsMobile_${item.id}">
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
if (indexItem === 0) {
|
||||
loadEmployeeAjax(item.id);
|
||||
}
|
||||
});
|
||||
|
||||
$('#ajaxDataMain').html(html);
|
||||
} else {
|
||||
var htmlEmpty = `<div class="text-center bg-white card py-5 d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#ajaxDataMain').html(htmlEmpty);
|
||||
$('#loadAccountItems').html(htmlEmpty);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadEmployeeAjax(groupSettingId) {
|
||||
isShiftChangedGlobal = false;
|
||||
var htmlEmployee = "";
|
||||
$(`#loadEmployeeItemsMobile_${groupSettingId}`).html('');
|
||||
|
||||
var indexEmployee = 1;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadEmployeesGroupAjax,
|
||||
data: { 'groupId': groupSettingId },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
var responseDataEmployee = response.data;
|
||||
|
||||
if (response.success) {
|
||||
if (responseDataEmployee.length > 0) {
|
||||
|
||||
htmlEmployee += `
|
||||
<div>
|
||||
<div class="col-12 col-md-6 col-lg-3 mt-2 mb-2">
|
||||
<input type="text" class="form-control" id="searchEmployee" placeholder="جستجو ..." />
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
responseDataEmployee.forEach(function (itemEmployee) {
|
||||
if (itemEmployee.isShiftChanged === true) {
|
||||
isShiftChangedGlobal = true;
|
||||
}
|
||||
|
||||
htmlEmployee += `<div></div>
|
||||
<div class="my-1 Rtable-row align-items-center position-relative itemResultEmployee">
|
||||
<div class="Rtable-cell width1 widthMobile1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center row-index2">
|
||||
${indexEmployee++}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width2 widthMobile2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل:</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="d-flex d-md-none">نام پرسنل:</div>
|
||||
<div class="itemEmployeeName">${itemEmployee.name} </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3 widthMobile2 text-center d-none d-md-block">
|
||||
<div class="Rtable-cell--heading d-none">ساعت کاری:</div>
|
||||
<div class="Rtable-cell--content d-flex text-center">
|
||||
<div class="d-flex d-md-none mx-1">ساعت کاری: </div>
|
||||
<div class="w-100">`;
|
||||
|
||||
if (itemEmployee.workshopShiftStatus === 0) {
|
||||
itemEmployee.rollCallWorkshopShifts.forEach(function (itemEmployeeShifts) {
|
||||
htmlEmployee += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.endTime}</span>
|
||||
</p>`;
|
||||
});
|
||||
} else {
|
||||
htmlEmployee += `<p class="m-0 time-set-title">`;
|
||||
if (itemEmployee.irregularShift.workshopIrregularShifts === 1) {
|
||||
htmlEmployee += `<span>12-24</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 2) {
|
||||
htmlEmployee += `<span>24-24</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 3) {
|
||||
htmlEmployee += `<span>12-36</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 4) {
|
||||
htmlEmployee += `<span>24-48</span>`;
|
||||
}
|
||||
|
||||
htmlEmployee += `</p>`;
|
||||
}
|
||||
|
||||
htmlEmployee += `</div></div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 width5 widthMobile3">
|
||||
<button onclick="editEmployee(${itemEmployee.employeeId}, ${groupSettingId})" class="btn-edit position-relative">
|
||||
<svg width="24" height="24" 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>
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<button href="" class="btn-delete2" onclick="removeEmployeeFromGroup(${itemEmployee.employeeId}, ${groupSettingId})">
|
||||
<svg width="24" height="24" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.26733 12.4805L8.26733 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M12.2865 12.4805L12.2865 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M3.04224 5.96094H17.5115V5.96094C16.7544 5.96094 16.3758 5.96094 16.0699 6.06212C15.4692 6.26083 14.9979 6.73211 14.7992 7.33286C14.698 7.63875 14.698 8.0173 14.698 8.7744V12.5535C14.698 14.4391 14.698 15.382 14.1122 15.9677C13.5264 16.5535 12.5836 16.5535 10.698 16.5535H9.8557C7.97008 16.5535 7.02727 16.5535 6.44148 15.9677C5.8557 15.382 5.8557 14.4391 5.8557 12.5535V8.7744C5.8557 8.0173 5.8557 7.63875 5.75452 7.33286C5.55581 6.73211 5.08453 6.26083 4.48378 6.06212C4.17789 5.96094 3.79934 5.96094 3.04224 5.96094V5.96094Z" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M8.26727 3.51423C8.26727 3.51423 8.66919 2.69922 10.2769 2.69922C11.8846 2.69922 12.2865 3.51403 12.2865 3.51403" stroke="#F63D3D" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
$('#loadAccountItems').html(htmlEmployee);
|
||||
$(`#loadEmployeeItemsMobile_${groupSettingId}`).append(htmlEmployee);
|
||||
|
||||
} else {
|
||||
isShiftChangedGlobal = false;
|
||||
var htmlEmpty = `<div class="text-center bg-white card py-5 d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#loadAccountItems').html(htmlEmpty);
|
||||
$(`#loadEmployeeItemsMobile_${groupSettingId}`).html(htmlEmpty);
|
||||
}
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('keyup', '#searchEmployee', function () {
|
||||
var value = $(this).val().toLowerCase();
|
||||
var indexEmployee = 1;
|
||||
$('.itemResultEmployee').filter(function () {
|
||||
var employeeFName = $(this).find('.itemEmployeeName').text().toLowerCase();
|
||||
|
||||
if (employeeFName.includes(value)) {
|
||||
$(this).show();
|
||||
$(this).find('.row-index2').text(indexEmployee++);
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function removeGroupConfirm(group_id) {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا برای حذف این گروه مطمئن هستید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: 'POST',
|
||||
url: removeGroupAjax,
|
||||
data: { 'groupId': Number(group_id) },
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2000);
|
||||
loadDataAjax();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3000);
|
||||
$('.btn-register').removeClass('disable');
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function AddToGroupModal(id, groupId) {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/Grouping?workshopSettingId=${id}&groupId=${groupId}&workshopId=${wpId}&handler=CreateEmployee`;
|
||||
}
|
||||
|
||||
//function showEmployee(id, element) {
|
||||
// loadEmployeeAjax(id);
|
||||
// $(`.openAction`).removeClass('active');
|
||||
// $(element).addClass('active');
|
||||
//}
|
||||
|
||||
function removeEmployeeFromGroup(employeeId, groupSettingId) {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا برای حذف این پرسنل مطمئن هستید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: 'POST',
|
||||
url: removeEmployeeFromGroupAjax,
|
||||
data: {
|
||||
'employeeId': employeeId,
|
||||
'groupId': groupSettingId,
|
||||
'workshopId': wpId
|
||||
},
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2000);
|
||||
loadDataAjax();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3000);
|
||||
$('.btn-register').removeClass('disable');
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editGroup(groupId) {
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/Grouping?groupId=${groupId}&handler=EditGroup`;
|
||||
}
|
||||
|
||||
function editEmployee(employee_id, groupId) {
|
||||
var array_employees = [employee_id];
|
||||
window.location.href = `#showmodal=/AdminNew/Company/RollCall/Grouping?groupId=${groupId}&employeeId=${array_employees}&workshopId=${wpId}&handler=EditEmployee`;
|
||||
}
|
||||
38
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Index.js
Normal file
38
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(".openAction").click(function () {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$(this).find(".operations-btns").first().slideToggle(500);
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
if (hasRollCallService) {
|
||||
if (!hasCameraAccount || !hasRollCallWorkshopSetting) {
|
||||
window.location.href = saveCameraAccountUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
|
||||
// function AjaxPlans(id) {
|
||||
// $.ajax({
|
||||
// url: '@Url.Page("./Plans")',
|
||||
// type: 'GET',
|
||||
// headers: {
|
||||
// 'workshopId': id
|
||||
// },
|
||||
// success: function (response) {
|
||||
// window.location.href = '@Url.Page("./Plans")'
|
||||
// },
|
||||
// error: function (e) {
|
||||
// console.log('error: ' + e)
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
@@ -0,0 +1,230 @@
|
||||
$(document).ready(function () {
|
||||
//******************** انتخاب چک باکس ********************
|
||||
$('.items').click(function (e) {
|
||||
if ($(e.target).is('input[type="checkbox"]')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var checkbox = $(this).find('input[type="checkbox"]');
|
||||
var isChecked = checkbox.is(":checked");
|
||||
|
||||
checkbox.prop('checked', !isChecked);
|
||||
$(this).toggleClass('checked-item', !isChecked);
|
||||
});
|
||||
|
||||
$('.items input[type="checkbox"]').click(function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var isChecked = $(this).is(":checked");
|
||||
$(this).closest('.items').toggleClass('checked-item', isChecked);
|
||||
});
|
||||
|
||||
$('.items label').click(function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var isChecked = $(this).is(":checked");
|
||||
$(this).closest('.items').toggleClass('checked-item', isChecked);
|
||||
});
|
||||
|
||||
//******************** انتخاب چک باکس ********************
|
||||
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
$(".selectAll").change(function () {
|
||||
$('input:checkbox').not(this).prop('checked', this.checked);
|
||||
if ($(this).is(":checked")) {
|
||||
$('.items').addClass('checked-item');
|
||||
} else {
|
||||
$('.items').removeClass('checked-item');
|
||||
}
|
||||
});
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
|
||||
|
||||
|
||||
$('.select2Position').select2({
|
||||
placeholder: {
|
||||
text: "انتخاب اعضاء ..."
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#btn-add').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var idlist = "";
|
||||
|
||||
|
||||
// if ($('.select2Position').select2('data').length > 0) {
|
||||
if (($('input:checkbox').is(":checked"))) {
|
||||
|
||||
|
||||
$('.foo').each(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
var a = $(this).val();
|
||||
var b = a + "+";
|
||||
idlist += b;
|
||||
}
|
||||
});
|
||||
|
||||
$('#Accounts').val(idlist);
|
||||
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Group", "AddAccountToPosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$("#groupName").val('');
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
window.location.replace('/AdminNew/Company/Task/Group');
|
||||
}, 1500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا شخصی برای ذخیره انتخاب کنید.');
|
||||
$("#groupName").addClass('errored');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$("#groupName").removeClass('errored');
|
||||
}, 3500);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function searchMember() {
|
||||
var input, filter, tbody, tr, a, i;
|
||||
input = document.getElementById("search");
|
||||
|
||||
filter = input.value.toUpperCase();
|
||||
tbody = document.getElementById("PersonnelList");
|
||||
tr = tbody.getElementsByClassName("items");
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByClassName("searchItem")[0];
|
||||
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = "";
|
||||
} else {
|
||||
tr[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LoadEmployeeAjax();
|
||||
function LoadEmployeeAjax(parameters) {
|
||||
var html = "";
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadEmployeeGroupAjax,
|
||||
data: {
|
||||
'rollCallWorkshopSettingId': workshopSettingId
|
||||
},
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
|
||||
if (response.success) {
|
||||
if (response.data.length > 0) {
|
||||
response.data.forEach(function (item) {
|
||||
html += `<div class="items">
|
||||
<div class="from-group">
|
||||
<input class="form-check-input foo" type="checkbox" name="employeeIds[]" id="select-${item.id}" value="${item.id}">
|
||||
<label class="form-check-label searchItem" for="select-${item.id}">
|
||||
${item.employeeFullName}
|
||||
</label>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
$('#PersonnelList').append(html);
|
||||
$('#loadingSkeleton').hide();
|
||||
}
|
||||
else {
|
||||
html += `<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#PersonnelList').append(html);
|
||||
$('#loadingSkeleton').hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function saveEmployeeData() {
|
||||
$('.btn-register').addClass('disable');
|
||||
|
||||
const employeeIds = [];
|
||||
$('input[name="employeeIds[]"]:checked').each(function () {
|
||||
employeeIds.push($(this).val());
|
||||
});
|
||||
|
||||
const data = {
|
||||
'command.EmployeeIds': employeeIds,
|
||||
'command.GroupId': groupId,
|
||||
'command.WorkshopSettingId': workshopSettingId
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
//contentType: 'charset=utf-8',
|
||||
//dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveEmployeeToGroupAjax,
|
||||
data: data,
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
|
||||
$('#MainModal').modal('toggle');
|
||||
loadDataAjax();
|
||||
}, 2000);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3000);
|
||||
$('.btn-register').removeClass('disable');
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,551 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#modalWorkshopFullname").text($('#caseHistoryWorkshopFullname').text());
|
||||
$('.btn-register').addClass('disable');
|
||||
|
||||
$(".select2OptionAddModal").select2({
|
||||
language: "fa",
|
||||
dir: "rtl",
|
||||
dropdownParent: $('#MainModal')
|
||||
});
|
||||
|
||||
// فعال و غیر فعال شدن برای تنظیمات ساعت کاری براساس ورودی هایی که اعمال میشود
|
||||
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date').val() !== '') {
|
||||
$('.heightControll').removeClass('disable');
|
||||
} else {
|
||||
$('.heightControll').addClass('disable');
|
||||
}
|
||||
|
||||
$(".form-control-date").each(function () {
|
||||
new Cleave(this, {
|
||||
date: true,
|
||||
delimiter: '/',
|
||||
datePattern: ['Y', 'm', 'd']
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
// updateDateInput(0);
|
||||
|
||||
ajaxPersonals();
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentCount < 5) {
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
case 4:
|
||||
namePlacementPersian = "چهارم";
|
||||
break;
|
||||
case 5:
|
||||
namePlacementPersian = "پنجم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 5) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 5) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
});
|
||||
});
|
||||
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
//function updateDateInput(daysToAdd) {
|
||||
// var today = new Date();
|
||||
// today.setDate(today.getDate() + daysToAdd);
|
||||
// var jalaaliDate = jalaali.toJalaali(today);
|
||||
// var formattedDate = jalaaliDate.jy + '/' + (jalaaliDate.jm < 10 ? '0' + jalaaliDate.jm : jalaaliDate.jm) + '/' + (jalaaliDate.jd < 10 ? '0' + jalaaliDate.jd : jalaaliDate.jd);
|
||||
// $('.form-control-date').val(formattedDate);
|
||||
//}
|
||||
|
||||
//updateAddButtonText(1);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
} else if (currentCount === 3) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت چهارم');
|
||||
} else if (currentCount === 4) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت پنجم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
function ajaxPersonals() {
|
||||
$.ajax({
|
||||
url: employeeListAjax,
|
||||
type: 'GET',
|
||||
data: { workshopId: wpId },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
var employees = response.data;
|
||||
var employeeOptionsHtml = '<option value="0" selected>انتخاب پرسنل ...</option>';
|
||||
employees.forEach(function (employee) {
|
||||
employeeOptionsHtml += `<option value="${employee.employeeId}">${employee.employeeFullName}</option>`;
|
||||
});
|
||||
$('#employeeSelectAddModal').html(employeeOptionsHtml);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
// validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
// focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
//function focusNextTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
|
||||
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
// $(inputs[currentIndex + 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
function validateAllTimes() {
|
||||
let timeRanges = [];
|
||||
|
||||
$(".groupBox").each(function () {
|
||||
let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
if (startTime.length === 5 && endTime.length === 5) {
|
||||
let startParts = startTime.split(':');
|
||||
let endParts = endTime.split(':');
|
||||
let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
}
|
||||
});
|
||||
|
||||
// Check for conflicts and order
|
||||
for (let i = 0; i < timeRanges.length; i++) {
|
||||
for (let j = 0; j < i; j++) {
|
||||
if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for overlap with previous entries
|
||||
if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
// Check if the current start time is before the previous start time
|
||||
if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('.btn-register').click(function() {
|
||||
var loading = $('.btn-register .spinner-loading');
|
||||
|
||||
var data = $('#create-form').serializeArray();
|
||||
data.push({ name: 'workshopId', value: wpId });
|
||||
var requestData = $.param(data);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveRollCallWorkTimeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: requestData,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
loading.show();
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
loading.hide();
|
||||
$('#MainModal').modal('hide');
|
||||
//window.location.reload();
|
||||
}, 2000);
|
||||
|
||||
setTimeout(function () {
|
||||
hasData = true;
|
||||
dateIndex = 0;
|
||||
dateEmployeeIndex = null;
|
||||
$('#caseHistoryLoadData').html('');
|
||||
caseHistoryLoadAjax();
|
||||
loadUntilHeightExceeds();
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
loading.hide();
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#employeeSelectAddModal', function () {
|
||||
const employeeId = $('#employeeSelectAddModal').val();
|
||||
const dateFa = $('.form-control-date').val();
|
||||
|
||||
// Toggle .heightControll based on conditions
|
||||
toggleHeightControl();
|
||||
|
||||
// Fetch and display roll call data if conditions are met
|
||||
if (employeeId !== '0' && dateFa !== '') {
|
||||
fetchAndDisplayRollCallData(employeeId, dateFa);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('keyup', '.form-control-date', function () {
|
||||
// Toggle .heightControll based on conditions
|
||||
toggleHeightControl();
|
||||
|
||||
// Trigger fetching of roll call data if input length is valid
|
||||
const employeeId = $('#employeeSelectAddModal').val();
|
||||
const dateFa = $('.form-control-date').val();
|
||||
|
||||
if (dateFa.length >= 10 && employeeId !== '0') {
|
||||
fetchAndDisplayRollCallData(employeeId, dateFa);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function toggleHeightControl() {
|
||||
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date').val().length >= 10) {
|
||||
$('.heightControll').removeClass('disable');
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.heightControll').addClass('disable');
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
// Function to handle the AJAX request and generate HTML for roll call data
|
||||
function fetchAndDisplayRollCallData(employeeId, dateFa) {
|
||||
let htmlElement = '';
|
||||
$('#appendChildTimeWorkHtml').html('');
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: checkEmployeeData,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { 'employeeId': employeeId, 'date': dateFa, 'workshopId': wpId },
|
||||
success: function (response) {
|
||||
const rollCallData = response.data;
|
||||
|
||||
console.log(response);
|
||||
|
||||
if (response.hasLeave) {
|
||||
htmlElement = `
|
||||
<div class="text-center">این پرسنل مرخصی ثبت شده است.</div>
|
||||
`;
|
||||
$('#appendChildTimeWorkHtml').html(htmlElement);
|
||||
$('.btn-register').addClass('disable');
|
||||
$('.btnAddTimeWork').hide();
|
||||
} else if (response.hasNullEndDate) {
|
||||
htmlElement = `
|
||||
<div class="text-center">بدلیل عدم ثبت خروج پرسنل در این تاریخ شما قادر به افزودن نمی باشید.</div>
|
||||
`;
|
||||
$('#appendChildTimeWorkHtml').html(htmlElement);
|
||||
$('.btn-register').addClass('disable');
|
||||
$('.btnAddTimeWork').hide();
|
||||
} else {
|
||||
|
||||
$('.btnAddTimeWork').show();
|
||||
|
||||
if (rollCallData.length > 0) {
|
||||
|
||||
rollCallData.forEach(function (employee, indexRollCallTime) {
|
||||
//const currentCount = indexRollCallTime + 1;
|
||||
let namePlacementPersian = '';
|
||||
|
||||
switch (indexRollCallTime) {
|
||||
case 0:
|
||||
namePlacementPersian = "اول";
|
||||
break;
|
||||
case 1:
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 2:
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacementPersian = "چهارم";
|
||||
break;
|
||||
case 4:
|
||||
namePlacementPersian = "پنجم";
|
||||
break;
|
||||
default:
|
||||
namePlacementPersian = "";
|
||||
}
|
||||
|
||||
htmlElement += `<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${indexRollCallTime}].StartTime" value="${employee.startTimeString}" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${indexRollCallTime}].EndTime" value="${employee.endTimeString}" placeholder="00:00" style="direction: ltr;">
|
||||
</div>`;
|
||||
|
||||
if (indexRollCallTime === 0) {
|
||||
htmlElement += `<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>`;
|
||||
} else {
|
||||
htmlElement += `<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
||||
htmlElement += `</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').html(htmlElement);
|
||||
|
||||
// Apply time formatting with Cleave.js
|
||||
new Cleave(`input[name="Command.RollCallRecords[${indexRollCallTime}].StartTime"]`,
|
||||
{
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[${indexRollCallTime}].EndTime"]`,
|
||||
{
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
// Update add button text
|
||||
updateAddButtonText(indexRollCallTime + 1);
|
||||
|
||||
// Hide the add button if 5 records are added
|
||||
if (indexRollCallTime === 4) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
var namePlacementPersian = "اول";
|
||||
var nameBtnPersian = "دوم";
|
||||
|
||||
htmlElement += `<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
// Update add button text
|
||||
updateAddButtonText(1);
|
||||
|
||||
$('#appendChildTimeWorkHtml').html(htmlElement);
|
||||
|
||||
// Apply time formatting with Cleave.js
|
||||
new Cleave(`input[name="Command.RollCallRecords[0].StartTime"]`,
|
||||
{
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[0].EndTime"]`,
|
||||
{
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log('Error fetching roll call data:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,499 @@
|
||||
$(document).ready(function () {
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
if (hasCamera && hasGroupWorkshop) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
|
||||
if (!hasCamera) {
|
||||
if ($('#username').val() === '' && $('#signupInputPassword').val() === '' && $('#repeat_password').val() === '') {
|
||||
$('#next-step').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
if (hasCamera && !hasGroupWorkshop) {
|
||||
$('#step-form1 .row .ShowMessage').removeClass('d-none');
|
||||
$('#ShowAccountMessage').text('شما از قبل اکانت ساخته اید.');
|
||||
$('#step-form1').addClass('disable');
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
$('#next-step').text('ثبت');
|
||||
$('#next-step').attr('onclick', 'registerAccount()');
|
||||
$('#step-2').removeClass('not-step');
|
||||
|
||||
// برای نمایش وضعیت ساخت ساعت
|
||||
$('#step_workTimeOption').hide();
|
||||
}
|
||||
|
||||
if (!hasCamera && hasGroupWorkshop) {
|
||||
$('#step-form2 .row .ShowMessage').removeClass('d-none');
|
||||
$('#ShowSettingMessage').text('شما از قبل ساعات کاری را تنظیم کرده اید.');
|
||||
$('#step-form2').addClass('disable');
|
||||
}
|
||||
|
||||
$("#next-step").on("click", function () {
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
|
||||
if ($('#step-form2').is(':visible')) {
|
||||
$('#step_workTimeOption').hide();
|
||||
$('.dateTime').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
$('#next-step').addClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#next-step').text('ثبت');
|
||||
$('#next-step').attr('onclick', 'registerAccount()');
|
||||
$('#step-2').removeClass('not-step');
|
||||
});
|
||||
|
||||
$("#prev-step").on("click", function () {
|
||||
$('#step-form1').show();
|
||||
if ($('#step-form2').is(":hidden")) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
$("#next-step").removeAttr("onclick");
|
||||
$('#next-step').removeClass('disable');
|
||||
$('#step-form2').hide();
|
||||
$('#prev-step').text('انصراف');
|
||||
$('#next-step').text('مرحله بعد');
|
||||
$('#step-2').addClass('not-step');
|
||||
});
|
||||
|
||||
$("#organized").on("click", function () {
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
if ($('#step-form2').is(':visible')) {
|
||||
$('.dateTime').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
$('#next-step').addClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#disorganized").on("click", function () {
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
$('#next-step').removeClass('disable');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
//validateAllTimes();
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentCount < 3) {
|
||||
var namePlacement = "";
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacement = "Second";
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacement = "Third";
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="CreateWorkshopSettings.ShiftsList[${currentCount}].Placement" value="${namePlacement}" />
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="CreateWorkshopSettings.ShiftsList[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="CreateWorkshopSettings.ShiftsList[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="CreateWorkshopSettings.ShiftsList[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 3) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 3) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
updateAddButtonText(1);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
//$(document).on('input', ".dateTime", function () {
|
||||
// var value = $(this).val();
|
||||
// $(this).val(convertPersianNumbersToEnglish(value)).mask("00:00");
|
||||
//});
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
//validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
//function validateAllTimes() {
|
||||
// let timeRanges = [];
|
||||
|
||||
// $(".groupBox").each(function () {
|
||||
// let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
// let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
// if (startTime.length === 5 && endTime.length === 5) {
|
||||
// let startParts = startTime.split(':');
|
||||
// let endParts = endTime.split(':');
|
||||
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Check for conflicts and order
|
||||
// for (let i = 0; i < timeRanges.length; i++) {
|
||||
// for (let j = 0; j < i; j++) {
|
||||
// if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Check for overlap with previous entries
|
||||
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
// showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// // Check if the current start time is before the previous start time
|
||||
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
// showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
var eyeShow = $('.eyeShow');
|
||||
var eyeClose = $('.eyeClose');
|
||||
var reEyeShow = $('.reEyeShow');
|
||||
var reEyeClose = $('.reEyeClose');
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
|
||||
$("#username").on("input", function () {
|
||||
var currentValue = $(this).val();
|
||||
$(this).val(currentValue.replace(/[^a-zA-Z0-9_\-\$\#\@\!\^\&\%\*]/g, ''));
|
||||
});
|
||||
|
||||
$('#username, #signupInputPassword, #repeat_password').on('keyup', function () {
|
||||
if ($('#username').val() && $('#signupInputPassword').val() && $('#repeat_password').val() && $('#signupInputPassword').val() === $('#repeat_password').val()) {
|
||||
$('#next-step').removeClass('disable');
|
||||
} else {
|
||||
$('#next-step').addClass('disable');
|
||||
}
|
||||
});
|
||||
|
||||
$('#repeat_password').on('keyup', function () {
|
||||
if ($('#signupInputPassword').val() !== $('#repeat_password').val()) {
|
||||
$('#passwordErrorMessage').text('گذرواژه یکسان نیست');
|
||||
} else {
|
||||
$('#passwordErrorMessage').text('');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#accountModalModal button', function () {
|
||||
|
||||
// alert($(this));
|
||||
// $(this).find('input').type ? 'text' : 'password';
|
||||
// document.getElementById('hybrid').type = 'password';
|
||||
$("#accountModalModal button").find('input').attr("type", "text");
|
||||
|
||||
|
||||
// var input=document.getElementById(some-id);
|
||||
// var input2= input.cloneNode(false);
|
||||
// input2.type='password';
|
||||
// input.parentNode.replaceChild(input2,input);
|
||||
});
|
||||
|
||||
function passFunction() {
|
||||
var x = document.getElementById("signupInputPassword");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
eyeShow.hide();
|
||||
eyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function rePassFunction() {
|
||||
var x = document.getElementById("repeat_password");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
reEyeShow.hide();
|
||||
reEyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function passwordCheck(password) {
|
||||
if (password.length >= 8)
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[0-9])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[A-Z])/))
|
||||
strength += 1;
|
||||
|
||||
displayBar(strength);
|
||||
}
|
||||
|
||||
function displayBar(strength) {
|
||||
$(".password-strength-group").attr('data-strength', strength);
|
||||
}
|
||||
|
||||
$("#signupInputPassword").keyup(function () {
|
||||
strength = 0;
|
||||
var password = $(this).val();
|
||||
passwordCheck(password);
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var typingTimer;
|
||||
var typingInterval = 1500;
|
||||
|
||||
$("#username").on('keyup', function () {
|
||||
clearTimeout(typingTimer);
|
||||
var username = $('#username').val();
|
||||
|
||||
if (username.length >= 6) {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').addClass("d-none");
|
||||
$('#loadingSpinner').removeClass("d-none");
|
||||
|
||||
typingTimer = setTimeout(function () {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: checkAccountAjax,
|
||||
data: { username: username },
|
||||
success: function (response) {
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
|
||||
if (response.success) {
|
||||
$('#errorSvg').addClass("d-none");
|
||||
$('#successSvg').removeClass("d-none");
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2000);
|
||||
} else {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}, typingInterval);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("نام کاربری حداقل باید 6 حرف باشد");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function registerAccount() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveCameraAccountAndWorkshopSettingAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
window.location.reload();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
// ------------------------------------------------------- Start Code SMS
|
||||
$(document).ready(function () {
|
||||
$('#btnSmsReceiver').on("click", handleSmsReceiverClick);
|
||||
});
|
||||
|
||||
$('.codeInput').keyup(function (e) {
|
||||
if (this.value.length === this.maxLength) {
|
||||
let next = $(this).data('next');
|
||||
$('#n' + next).focus();
|
||||
$('#n' + next).select();
|
||||
}
|
||||
|
||||
//وقتی کد ورودی وارد شد، اتوماتیک ورود میشود
|
||||
if ($('#n0').val() && $('#n1').val() && $('#n2').val() && $('#n3').val() && $('#n4').val() && $('#n5').val()) {
|
||||
$('#submit').removeClass('disable');
|
||||
confirmCode();
|
||||
}
|
||||
});
|
||||
|
||||
$('#codeInput').on('keyup', function () {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
});
|
||||
|
||||
$(".codeInput").click(function () {
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
function handleSmsReceiverClick() {
|
||||
let password = $('#signupInputPassword');
|
||||
let repeatPassword = $('#repeat_password');
|
||||
|
||||
checkValidationPassword(password.val(), repeatPassword.val());
|
||||
|
||||
if (valid) {
|
||||
if (password.val() === '' || repeatPassword.val() === '') {
|
||||
displayAlert('لطفاً هر دو فیلد رمز عبور را پر کنید');
|
||||
password.addClass('errored');
|
||||
repeatPassword.addClass('errored');
|
||||
setTimeout(function () {
|
||||
password.removeClass('errored');
|
||||
repeatPassword.removeClass('errored');
|
||||
}, 3500);
|
||||
} else if (password.val() !== repeatPassword.val()) {
|
||||
repeatPassword.addClass('errored');
|
||||
setTimeout(function () {
|
||||
repeatPassword.removeClass('errored');
|
||||
}, 3500);
|
||||
displayAlert('رمز عبور و تکرار آن باید یکسان باشند');
|
||||
} else {
|
||||
toggleLoading(true);
|
||||
$('#btnSmsReceiver').hide();
|
||||
$('#sentCode').hide();
|
||||
$('#form').hide();
|
||||
sendVerifyCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function sendVerifyCode() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: sendSmsAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
startCodeTimer();
|
||||
} else {
|
||||
toggleLoading(false);
|
||||
$('#btnSmsReceiver').show();
|
||||
$('#form').show();
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
console.error('Error:', response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var timerInterval;
|
||||
|
||||
function startCodeTimer() {
|
||||
resetOtpInput();
|
||||
$('#codeDiv, #submit, #timerCount, .otp').show();
|
||||
toggleLoading(false);
|
||||
$('#msg').hide();
|
||||
$('#n0').focus();
|
||||
|
||||
var timer = "2:00";
|
||||
|
||||
if (timerInterval) {
|
||||
clearInterval(timerInterval);
|
||||
}
|
||||
|
||||
timerInterval = setInterval(function () {
|
||||
const [minutes, seconds] = timer.split(':').map(Number);
|
||||
const updatedSeconds = seconds - 1;
|
||||
const updatedMinutes = updatedSeconds < 0 ? minutes - 1 : minutes;
|
||||
const displaySeconds = (updatedSeconds < 0 ? 59 : updatedSeconds).toString().padStart(2, '0');
|
||||
|
||||
if (updatedMinutes < 0) {
|
||||
clearInterval(timerInterval);
|
||||
timerInterval = null;
|
||||
} else {
|
||||
timer = `${updatedMinutes}:${displaySeconds}`;
|
||||
$('.countdown').text(timer);
|
||||
}
|
||||
|
||||
if (timer === "0:00" && !$('#form').hasClass("showPassDiv")) {
|
||||
resetCodeEntry();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function resetCodeEntry() {
|
||||
$('#submit').addClass('disable');
|
||||
$('#submit').hide();
|
||||
resetOtpInput();
|
||||
$('#btnSmsReceiver').show();
|
||||
$('#sentCode').show();
|
||||
toggleLoading(false);
|
||||
$('#timerCount, .otp').hide();
|
||||
$('#msg').show();
|
||||
}
|
||||
|
||||
function confirmCode() {
|
||||
const code = Array.from({ length: 6 }, (_, i) => $(`#n${i}`).val()).join('');
|
||||
|
||||
if (code.length === 6) {
|
||||
toggleLoading(true);
|
||||
setTimeout(() => {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: checkCodeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { code },
|
||||
success: handleCodeVerificationResponse,
|
||||
error: function (response) {
|
||||
console.error('Error:', response);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
displayAlert('کد وارد شده کمتر از 6 رقم است');
|
||||
}
|
||||
}
|
||||
|
||||
function handleCodeVerificationResponse(response) {
|
||||
toggleLoading(false);
|
||||
|
||||
if (response.exist) {
|
||||
//$('#form').show().addClass("showPassDiv");
|
||||
//$('#timerCount, .otp, #btn-login-code').hide();
|
||||
$('#timerCount, .otp').hide();
|
||||
$('#submit').show();
|
||||
$('#msg').hide();
|
||||
changePasswordCameraAccount();
|
||||
} else {
|
||||
displayAlert('کد وارد شده صحیح نیست');
|
||||
}
|
||||
}
|
||||
|
||||
function resetOtpInput() {
|
||||
$('.codeInput').val('');
|
||||
}
|
||||
|
||||
function toggleLoading(isLoading) {
|
||||
$('.loading').toggle(isLoading);
|
||||
}
|
||||
|
||||
function displayAlert(message) {
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
// ------------------------------------------------------- Stop Code SMS
|
||||
|
||||
var eyeShow = $('.eyeShow');
|
||||
var eyeClose = $('.eyeClose');
|
||||
var reEyeShow = $('.reEyeShow');
|
||||
var reEyeClose = $('.reEyeClose');
|
||||
|
||||
$(document).ready(function () {
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
});
|
||||
|
||||
$('#username, #signupInputPassword, #repeat_password').on('keyup', function () {
|
||||
if ($('#signupInputPassword').val() && $('#repeat_password').val() && $('#signupInputPassword').val() === $('#repeat_password').val()) {
|
||||
$('#next-step').removeClass('disable');
|
||||
} else {
|
||||
$('#next-step').addClass('disable');
|
||||
}
|
||||
});
|
||||
|
||||
$('#repeat_password').on('keyup', function () {
|
||||
if ($('#signupInputPassword').val() !== $('#repeat_password').val()) {
|
||||
$('#passwordErrorMessage').text('گذرواژه یکسان نیست');
|
||||
} else {
|
||||
$('#passwordErrorMessage').text('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function passFunction() {
|
||||
var x = document.getElementById("signupInputPassword");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
eyeShow.hide();
|
||||
eyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function rePassFunction() {
|
||||
var x = document.getElementById("repeat_password");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
reEyeShow.hide();
|
||||
reEyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function passwordCheck(password) {
|
||||
if (password.length >= 8)
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[0-9])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[A-Z])/))
|
||||
strength += 1;
|
||||
|
||||
displayBar(strength);
|
||||
}
|
||||
|
||||
function displayBar(strength) {
|
||||
$(".password-strength-group").attr('data-strength', strength);
|
||||
}
|
||||
|
||||
$("#signupInputPassword").keyup(function () {
|
||||
strength = 0;
|
||||
var password = $(this).val();
|
||||
passwordCheck(password);
|
||||
});
|
||||
|
||||
|
||||
function changePasswordCameraAccount() {
|
||||
var data = $('#create-form2').serialize();
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveCameraAccountPasswordChangeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: data,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
|
||||
clearInterval(timerInterval);
|
||||
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
|
||||
$('#MainModal').modal('hide');
|
||||
//window.location.reload();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var valid = true;
|
||||
function checkValidationPassword(password, rePassword) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: ajaxCameraValidation,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { 'password': password, 'rePassword': rePassword },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
valid = true;
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
valid = false;
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
valid = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
|
||||
$('#createData').click(function() {
|
||||
|
||||
if ($('#EmployeeFName').val() === "") {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("نام پرسنل را وارد کنید.");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
return false;
|
||||
}
|
||||
if ($('#EmployeeLName').val() === "") {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("نام خانوادگی پرسنل را وارد کنید.");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
return false;
|
||||
}
|
||||
|
||||
var loading = $('.btnCreateNew .spinner-loading');
|
||||
|
||||
var data = $('#create-form').serialize();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveChangeNameAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: data,
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
loading.show();
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
loading.hide();
|
||||
$('#MainModal').modal('hide');
|
||||
}, 2000);
|
||||
|
||||
|
||||
$(`#EmployeeFullName_${employeeId}`).html($('#EmployeeFName').val() + ' ' + $('#EmployeeLName').val());
|
||||
$(`#EmployeeFullNameMobile_${employeeId}`).html($('#EmployeeFName').val() + ' ' + $('#EmployeeLName').val());
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
loading.hide();
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,548 @@
|
||||
$(document).ready(function () {
|
||||
$(document).on("click", ".btn-cancel2", function () {
|
||||
$('#MainModal').modal('toggle');
|
||||
});
|
||||
|
||||
$(".money").each(function () {
|
||||
new Cleave('.money', {
|
||||
numeral: true,
|
||||
numeralThousandsGroupStyle: 'thousand'
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTimeIrregular").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
$("#organized").on("click", function () {
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
if ($('#step_workTimeOption').is(':visible')) {
|
||||
$('.dateTime').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
var currentCount = $('.groupBox').length;
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('input[name="Command.IrregularShift.WorkshopIrregularShifts"]').prop('checked', false);
|
||||
$('#irregularShiftsDateTime').addClass('disable');
|
||||
$('.dateTimeIrregular').val('');
|
||||
});
|
||||
|
||||
$("#disorganized").on("click", function () {
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
});
|
||||
|
||||
if (IsRegularWorkshop) {
|
||||
$("#organized").prop('checked', true);
|
||||
$("#disorganized").prop('checked', false);
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
// این مرحله هنگام چک کردن تعداد نوبت هستش
|
||||
updateAddButtonText(indexShiftViewModel);
|
||||
} else {
|
||||
$("#organized").prop('checked', false);
|
||||
$("#disorganized").prop('checked', true);
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
if ($("#hour").val() === "0" && $("#min").val() === "00") {
|
||||
$('#computeTimeText').text('');
|
||||
} else {
|
||||
$('#computeTimeText').text($("#hour").val() + ' ساعت ' + $("#min").val() + ' دقیقه ');
|
||||
}
|
||||
|
||||
updateIrregularButton();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('input[name="Command.IrregularShift.WorkshopIrregularShifts"]').on('change', function () {
|
||||
if ($('input[name="Command.IrregularShift.WorkshopIrregularShifts"]:checked').length > 0) {
|
||||
$('#irregularShiftsDateTime').removeClass('disable');
|
||||
$('#irregularShiftsStartDateTime').focus();
|
||||
} else {
|
||||
$('#irregularShiftsDateTime').addClass('disable');
|
||||
}
|
||||
|
||||
$('.dateTimeIrregular').val('');
|
||||
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$('#BreakTime, #BreakTimeFirst').on('change', function () {
|
||||
|
||||
$('#BreakTime, #BreakTimeFirst').not(this).prop('checked', false);
|
||||
|
||||
var currentCount = $('.groupBox').length;
|
||||
if (currentCount >= 2) {
|
||||
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $(this));
|
||||
$(this).prop('checked', false);
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').addClass('disable');
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($('#BreakTime').is(':Checked')) {
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').removeClass('disable');
|
||||
$("#TimeOnly").val('');
|
||||
} else {
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').addClass('disable');
|
||||
$("#TimeOnly").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name="selectCheckBreakTime"]').on('change', function () {
|
||||
if (parseInt($("#hour").val(), 10) === 3) {
|
||||
$("#min").val("00");
|
||||
}
|
||||
$('#computeTimeText').text($("#hour").val() + ' ساعت ' + $("#min").val() + ' دقیقه ');
|
||||
|
||||
$("#TimeOnly").val($("#hour").val() + ':' + $("#min").val());
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
if ($("#BreakTime").is(':Checked') && parseInt($("#hour").val(), 10) === 3) {
|
||||
showAlert('به دلیل داشتن 3 ساعت استراحت، بیشتر از نوبت اول نمیتوانید ایجاد نمائید.', $(this));
|
||||
return false;
|
||||
}
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentCount >= 1) {
|
||||
$('#BreakTime').prop('checked', false);
|
||||
$('#BreakTimeFirst').prop('checked', false);
|
||||
$('#computeTimeText').text('');
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTime').addClass('disable');
|
||||
} else {
|
||||
$('#computeTime').removeClass('disable');
|
||||
}
|
||||
|
||||
|
||||
if (currentCount < 3) {
|
||||
var namePlacement = "";
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacement = "Second";
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacement = "Third";
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="Command.ShiftViewModel[${currentCount}].Placement" value="${namePlacement}" />
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;" />
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftViewModel[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;" />
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="Command.ShiftViewModel[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.ShiftViewModel[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 3) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 3) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
|
||||
updateAddButtonText(indexShiftViewModel);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
function updateIrregularButton() {
|
||||
let allFilled = true;
|
||||
$('.dateTimeIrregular').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
//$(document).on('input', ".dateTime", function () {
|
||||
// var value = $(this).val();
|
||||
// $(this).val(convertPersianNumbersToEnglish(value)).mask("00:00");
|
||||
//});
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
// validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
//focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("keyup", ".dateTimeIrregular", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
}
|
||||
}
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$(document).on("keyup", "#irregularShiftsStartDateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
|
||||
let timeRegex = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
if (!timeRegex.test(value)) {
|
||||
$("#irregularShiftsEndDateTime").val("");
|
||||
return;
|
||||
}
|
||||
|
||||
let [hours, minutes] = value.split(":").map(Number);
|
||||
|
||||
let hoursToAdd = 0;
|
||||
if ($("#TwelveTwentyFour").is(":checked")) {
|
||||
hoursToAdd = 12;
|
||||
} else if ($("#TwentyFourTwentyFour").is(":checked")) {
|
||||
hoursToAdd = 24;
|
||||
} else if ($("#TwelveThirtySix").is(":checked")) {
|
||||
hoursToAdd = 12;
|
||||
} else if ($("#TwentyFourFortyEight").is(":checked")) {
|
||||
hoursToAdd = 24;
|
||||
}
|
||||
|
||||
let endHours = (hours + hoursToAdd) % 24;
|
||||
let endTime = `${endHours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
||||
|
||||
let maxHours = hours + 12;
|
||||
if (endHours > maxHours) {
|
||||
$("#irregularShiftsEndDateTime").val("");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#irregularShiftsEndDateTime").val(endTime);
|
||||
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$(document).on("keyup", "#irregularShiftsEndDateTime", function () {
|
||||
if ($("#TwelveTwentyFour").is(":checked") || $("#TwelveThirtySix").is(":checked")) {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
|
||||
let timeRegex = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
if (!timeRegex.test(value)) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
let [endHours, endMinutes] = value.split(":").map(Number);
|
||||
|
||||
let startValue = $("#irregularShiftsStartDateTime").val();
|
||||
if (!timeRegex.test(startValue)) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
let [startHours, startMinutes] = startValue.split(":").map(Number);
|
||||
let startTotalMinutes = startHours * 60 + startMinutes;
|
||||
let endTotalMinutes = endHours * 60 + endMinutes;
|
||||
|
||||
let maxRangeInMinutes = 0;
|
||||
if ($("#TwelveTwentyFour").is(":checked") || $("#TwelveThirtySix").is(":checked")) {
|
||||
maxRangeInMinutes = 12 * 60;
|
||||
}
|
||||
//else if ($("#TwentyFourTwentyFour").is(":checked") || $("#TwentyFourFortyEight").is(":checked")) {
|
||||
// maxRangeInMinutes = 24 * 60;
|
||||
//}
|
||||
|
||||
let maxEndTotalMinutes = (startTotalMinutes + maxRangeInMinutes) % (24 * 60); // Wrap around 24 hours
|
||||
|
||||
let isValid = false;
|
||||
if (startTotalMinutes <= maxEndTotalMinutes) {
|
||||
isValid = endTotalMinutes >= startTotalMinutes && endTotalMinutes <= maxEndTotalMinutes;
|
||||
} else {
|
||||
isValid = endTotalMinutes >= startTotalMinutes || endTotalMinutes <= maxEndTotalMinutes;
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
$('.btn-register').removeClass('disable');
|
||||
updateIrregularButton();
|
||||
}
|
||||
});
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/; // Validates HH:mm format
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
//function validateAllTimes() {
|
||||
// let timeRanges = [];
|
||||
|
||||
// $(".groupBox").each(function () {
|
||||
// let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
// let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
// if (startTime.length === 5 && endTime.length === 5) {
|
||||
// let startParts = startTime.split(':');
|
||||
// let endParts = endTime.split(':');
|
||||
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Check for conflicts and order
|
||||
// for (let i = 0; i < timeRanges.length; i++) {
|
||||
// for (let j = 0; j < i; j++) {
|
||||
// if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Check for overlap with previous entries
|
||||
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
// showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// // Check if the current start time is before the previous start time
|
||||
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
// showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//function focusNextTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
|
||||
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
// $(inputs[currentIndex + 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
function ajaxEditEmployeeSaveData() {
|
||||
if ($('#BreakTime').prop('checked')) {
|
||||
if ($('#hour').val() === "0" && $('#min').val() === "00") {
|
||||
showAlert('لطفا ساعت یا دقیقه استراحت را مشخص نمایید', $('#hour, #min'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var data = $('#edit-employee-form').serializeArray();
|
||||
var hasBreakTime = "false";
|
||||
if ($('#BreakTime').prop('checked')) {
|
||||
hasBreakTime = $("#BreakTime").prop("checked") ? "true" : "false";
|
||||
} else if ($('#BreakTimeFirst').prop('checked')) {
|
||||
hasBreakTime = $("#BreakTimeFirst").prop("checked") ? "true" : "false";
|
||||
}
|
||||
//var hasBreakTime = $("#BreakTime").prop("checked") ? "true" : "false";
|
||||
var breakTimeValue = $("#TimeOnly").val();
|
||||
|
||||
data.push({ name: 'Command.BreakTime.HasBreakTimeValue', value: hasBreakTime });
|
||||
data.push({ name: 'Command.BreakTime.BreakTimeValue', value: breakTimeValue });
|
||||
|
||||
var requestData = $.param(data);
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: ajaxPostChangeEditEmployee,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: requestData,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
isShiftChangedGlobal = true;
|
||||
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
$('#btn-register').addClass('disable');
|
||||
$('#MainModal').modal('hide');
|
||||
loadDataAjax();
|
||||
}, 2000);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
574
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/ModalEditGroup.js
Normal file
574
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/ModalEditGroup.js
Normal file
@@ -0,0 +1,574 @@
|
||||
$(document).ready(function () {
|
||||
$(document).on("click", ".btn-cancel2", function () {
|
||||
$('#MainModal').modal('toggle');
|
||||
});
|
||||
|
||||
$(".money").each(function () {
|
||||
new Cleave('.money', {
|
||||
numeral: true,
|
||||
numeralThousandsGroupStyle: 'thousand'
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTimeIrregular").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
$("#closeEmployeeIsChange").on("click", function () {
|
||||
$('.overlay-black-modal').hide();
|
||||
$('#submitIsChangeForEmployee').hide();
|
||||
});
|
||||
|
||||
$("#organized").on("click", function () {
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
if ($('#step_workTimeOption').is(':visible')) {
|
||||
$('.dateTime').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
var currentCount = $('.groupBox').length;
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('input[name="IrregularShift.WorkshopIrregularShifts"]').prop('checked', false);
|
||||
$('#irregularShiftsDateTime').addClass('disable');
|
||||
$('.dateTimeIrregular').val('');
|
||||
});
|
||||
|
||||
$("#disorganized").on("click", function () {
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
});
|
||||
|
||||
|
||||
if (IsRegularWorkshop) {
|
||||
$("#organized").prop('checked', true);
|
||||
$("#disorganized").prop('checked', false);
|
||||
$('#step_workTimeOption').show();
|
||||
$('#step_workTimeOptionIrregular').hide();
|
||||
|
||||
// این مرحله هنگام چک کردن تعداد نوبت هستش
|
||||
updateAddButtonText(indexShiftViewModel);
|
||||
} else {
|
||||
$("#organized").prop('checked', false);
|
||||
$("#disorganized").prop('checked', true);
|
||||
$('#step_workTimeOption').hide();
|
||||
$('#step_workTimeOptionIrregular').show();
|
||||
if ($("#hour").val() === "0" && $("#min").val() === "00") {
|
||||
$('#computeTimeText').text('');
|
||||
} else {
|
||||
$('#computeTimeText').text($("#hour").val() + ' ساعت ' + $("#min").val() + ' دقیقه ');
|
||||
}
|
||||
|
||||
updateIrregularButton();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('input[name="IrregularShift.WorkshopIrregularShifts"]').on('change', function () {
|
||||
if ($('input[name="IrregularShift.WorkshopIrregularShifts"]:checked').length > 0) {
|
||||
$('#irregularShiftsDateTime').removeClass('disable');
|
||||
$('#irregularShiftsStartDateTime').focus();
|
||||
} else {
|
||||
$('#irregularShiftsDateTime').addClass('disable');
|
||||
}
|
||||
|
||||
$('.dateTimeIrregular').val('');
|
||||
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$('#BreakTime, #BreakTimeFirst').on('change', function () {
|
||||
|
||||
$('#BreakTime, #BreakTimeFirst').not(this).prop('checked', false);
|
||||
|
||||
var currentCount = $('.groupBox').length;
|
||||
if (currentCount >= 2) {
|
||||
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $(this));
|
||||
$(this).prop('checked', false);
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').addClass('disable');
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($('#BreakTime').is(':Checked')) {
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').removeClass('disable');
|
||||
$("#TimeOnly").val('');
|
||||
} else {
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTimeText').text('');
|
||||
$('#computeTime').addClass('disable');
|
||||
$("#TimeOnly").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name="selectCheckBreakTime"]').on('change', function () {
|
||||
if (parseInt($("#hour").val(), 10) === 3) {
|
||||
$("#min").val("00");
|
||||
}
|
||||
$('#computeTimeText').text($("#hour").val() + ' ساعت ' + $("#min").val() + ' دقیقه ');
|
||||
|
||||
$("#TimeOnly").val($("#hour").val() + ':' + $("#min").val());
|
||||
});
|
||||
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
|
||||
if ($("#BreakTime").is(':Checked') && parseInt($("#hour").val(), 10) === 3) {
|
||||
showAlert('به دلیل داشتن 3 ساعت استراحت، بیشتر از نوبت اول نمیتوانید ایجاد نمائید.', $(this));
|
||||
return false;
|
||||
}
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (currentCount >= 1) {
|
||||
$('#BreakTime').prop('checked', false);
|
||||
$('#BreakTimeFirst').prop('checked', false);
|
||||
$('#computeTimeText').text('');
|
||||
$("#hour").val("0");
|
||||
$("#min").val("00");
|
||||
$('#computeTime').addClass('disable');
|
||||
$("#TimeOnly").val('');
|
||||
} else {
|
||||
$('#computeTime').removeClass('disable');
|
||||
}
|
||||
|
||||
|
||||
if (currentCount < 3) {
|
||||
var namePlacement = "";
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacement = "Second";
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacement = "Third";
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-3 d-flex align-items-center">
|
||||
<input type="hidden" name="ShiftViewModel[${currentCount}].Placement" value="${namePlacement}" />
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;" />
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="ShiftViewModel[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;" />
|
||||
</div>
|
||||
<div class="col-1 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="ShiftViewModel[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="ShiftViewModel[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 3) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 3) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
});
|
||||
});
|
||||
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
function updateIrregularButton() {
|
||||
let allFilled = true;
|
||||
$('.dateTimeIrregular').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
//$(document).on('input', ".dateTime", function () {
|
||||
// var value = $(this).val();
|
||||
// $(this).val(convertPersianNumbersToEnglish(value)).mask("00:00");
|
||||
//});
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
// validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
//focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("keyup", ".dateTimeIrregular", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
}
|
||||
}
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$(document).on("keyup", "#irregularShiftsStartDateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
|
||||
let timeRegex = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
if (!timeRegex.test(value)) {
|
||||
$("#irregularShiftsEndDateTime").val("");
|
||||
return;
|
||||
}
|
||||
|
||||
let [hours, minutes] = value.split(":").map(Number);
|
||||
|
||||
let hoursToAdd = 0;
|
||||
if ($("#TwelveTwentyFour").is(":checked")) {
|
||||
hoursToAdd = 12;
|
||||
} else if ($("#TwentyFourTwentyFour").is(":checked")) {
|
||||
hoursToAdd = 24;
|
||||
} else if ($("#TwelveThirtySix").is(":checked")) {
|
||||
hoursToAdd = 12;
|
||||
} else if ($("#TwentyFourFortyEight").is(":checked")) {
|
||||
hoursToAdd = 24;
|
||||
}
|
||||
|
||||
let endHours = (hours + hoursToAdd) % 24;
|
||||
let endTime = `${endHours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
||||
|
||||
let maxHours = hours + 12;
|
||||
if (endHours > maxHours) {
|
||||
$("#irregularShiftsEndDateTime").val("");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#irregularShiftsEndDateTime").val(endTime);
|
||||
|
||||
updateIrregularButton();
|
||||
});
|
||||
|
||||
$(document).on("keyup", "#irregularShiftsEndDateTime", function () {
|
||||
if ($("#TwelveTwentyFour").is(":checked") || $("#TwelveThirtySix").is(":checked")) {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
|
||||
let timeRegex = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
if (!timeRegex.test(value)) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
let [endHours, endMinutes] = value.split(":").map(Number);
|
||||
|
||||
let startValue = $("#irregularShiftsStartDateTime").val();
|
||||
if (!timeRegex.test(startValue)) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
let [startHours, startMinutes] = startValue.split(":").map(Number);
|
||||
let startTotalMinutes = startHours * 60 + startMinutes;
|
||||
let endTotalMinutes = endHours * 60 + endMinutes;
|
||||
|
||||
let maxRangeInMinutes = 0;
|
||||
if ($("#TwelveTwentyFour").is(":checked") || $("#TwelveThirtySix").is(":checked")) {
|
||||
maxRangeInMinutes = 12 * 60;
|
||||
}
|
||||
//else if ($("#TwentyFourTwentyFour").is(":checked") || $("#TwentyFourFortyEight").is(":checked")) {
|
||||
// maxRangeInMinutes = 24 * 60;
|
||||
//}
|
||||
|
||||
let maxEndTotalMinutes = (startTotalMinutes + maxRangeInMinutes) % (24 * 60); // Wrap around 24 hours
|
||||
|
||||
let isValid = false;
|
||||
if (startTotalMinutes <= maxEndTotalMinutes) {
|
||||
isValid = endTotalMinutes >= startTotalMinutes && endTotalMinutes <= maxEndTotalMinutes;
|
||||
} else {
|
||||
isValid = endTotalMinutes >= startTotalMinutes || endTotalMinutes <= maxEndTotalMinutes;
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('بیشتر از 12 ساعت را نمی توانید وارد نمائید', $input);
|
||||
return;
|
||||
}
|
||||
|
||||
$('.btn-register').removeClass('disable');
|
||||
updateIrregularButton();
|
||||
}
|
||||
});
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/; // Validates HH:mm format
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
//function validateAllTimes() {
|
||||
// let timeRanges = [];
|
||||
|
||||
// $(".groupBox").each(function () {
|
||||
// let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
// let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
// if (startTime.length === 5 && endTime.length === 5) {
|
||||
// let startParts = startTime.split(':');
|
||||
// let endParts = endTime.split(':');
|
||||
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Check for conflicts and order
|
||||
// for (let i = 0; i < timeRanges.length; i++) {
|
||||
// for (let j = 0; j < i; j++) {
|
||||
// if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Check for overlap with previous entries
|
||||
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
// showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// // Check if the current start time is before the previous start time
|
||||
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
// showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//function focusNextTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
//
|
||||
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
// $(inputs[currentIndex + 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
|
||||
function ajaxEditGroupingSaveData() {
|
||||
if (isShiftChangedGlobal) {
|
||||
$('#ConfirmEmployeeModal').show();
|
||||
} else {
|
||||
ajaxSaveSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
$('#YesConfirm, #NotConfirm').on('change', function () {
|
||||
$('#finalSaveRollCallSetting').removeClass('disable');
|
||||
});
|
||||
|
||||
function ajaxSaveSubmit() {
|
||||
if ($('#BreakTime').prop('checked')) {
|
||||
if ($('#hour').val() === "0" && $('#min').val() === "00") {
|
||||
showAlert('لطفا ساعت یا دقیقه استراحت را مشخص نمایید', $('#hour, #min'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnSave').addClass('disable');
|
||||
|
||||
var data = $('#edit-form').serializeArray();
|
||||
|
||||
var hasBreakTime = "false";
|
||||
if ($('#BreakTime').prop('checked')) {
|
||||
hasBreakTime = $("#BreakTime").prop("checked") ? "true" : "false";
|
||||
} else if ($('#BreakTimeFirst').prop('checked')) {
|
||||
hasBreakTime = $("#BreakTimeFirst").prop("checked") ? "true" : "false";
|
||||
}
|
||||
//var hasBreakTime = $("#BreakTime").prop("checked") ? "true" : "false";
|
||||
var breakTimeValue = $("#TimeOnly").val();
|
||||
var isShiftChanged = $('#YesConfirm').prop("checked") ? "true" : "false";
|
||||
|
||||
//console.log(breakTimeValue);
|
||||
//return;
|
||||
|
||||
data.push({ name: 'BreakTime.HasBreakTimeValue', value: hasBreakTime });
|
||||
data.push({ name: 'BreakTime.BreakTimeValue', value: breakTimeValue });
|
||||
data.push({ name: 'IsShiftChanged', value: isShiftChanged });
|
||||
|
||||
var requestData = $.param(data);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: ajaxEditGroupSave,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: requestData,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
$('#btn-register').addClass('disable');
|
||||
$('#MainModal').modal('hide');
|
||||
loadDataAjax();
|
||||
$('#btnSave').removeClass('disable');
|
||||
}, 2000);
|
||||
} else {
|
||||
$('#btnSave').removeClass('disable');
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
$('#btnSave').removeClass('disable');
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#modalWorkshopFullname").text($('#caseHistoryWorkshopFullname').text());
|
||||
$('.btn-register').addClass('disable');
|
||||
|
||||
$(".form-control-date").each(function () {
|
||||
new Cleave(this, {
|
||||
date: true,
|
||||
delimiter: '/',
|
||||
datePattern: ['Y', 'm', 'd']
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
// updateDateInput(0);
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
var $inputs = $('.dateTime');
|
||||
var allFilled = true;
|
||||
|
||||
$inputs.each(function () {
|
||||
if ($(this).val() === '') {
|
||||
allFilled = false;
|
||||
$('.btn-register').addClass('disable');
|
||||
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
|
||||
}
|
||||
});
|
||||
|
||||
if (!allFilled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (currentCount < 5) {
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
case 4:
|
||||
namePlacementPersian = "چهارم";
|
||||
break;
|
||||
case 5:
|
||||
namePlacementPersian = "پنجم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 5) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
}
|
||||
});
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 5) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
|
||||
// Update Remove button enable/disable state
|
||||
updateRemoveButtons();
|
||||
});
|
||||
});
|
||||
function updateRemoveButtons() {
|
||||
$(".btnRemoveTimeWork").addClass("disable");
|
||||
$(".btnRemoveTimeWork").last().removeClass("disable");
|
||||
}
|
||||
|
||||
//function updateDateInput(daysToAdd) {
|
||||
// var today = new Date();
|
||||
// today.setDate(today.getDate() + daysToAdd);
|
||||
// var jalaaliDate = jalaali.toJalaali(today);
|
||||
// var formattedDate = jalaaliDate.jy + '/' + (jalaaliDate.jm < 10 ? '0' + jalaaliDate.jm : jalaaliDate.jm) + '/' + (jalaaliDate.jd < 10 ? '0' + jalaaliDate.jd : jalaaliDate.jd);
|
||||
// $('.form-control-date').val(formattedDate);
|
||||
//}
|
||||
|
||||
//updateAddButtonText(1);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
} else if (currentCount === 3) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت چهارم');
|
||||
} else if (currentCount === 4) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت پنجم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
// validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
// focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
//function focusNextTimeInput(currentInput) {
|
||||
// var inputs = $(".dateTime");
|
||||
// var currentIndex = inputs.index(currentInput);
|
||||
|
||||
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
// $(inputs[currentIndex + 1]).focus();
|
||||
// }
|
||||
//}
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
function validateAllTimes() {
|
||||
let timeRanges = [];
|
||||
|
||||
$(".groupBox").each(function () {
|
||||
let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
if (startTime.length === 5 && endTime.length === 5) {
|
||||
let startParts = startTime.split(':');
|
||||
let endParts = endTime.split(':');
|
||||
let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
}
|
||||
});
|
||||
|
||||
// Check for conflicts and order
|
||||
for (let i = 0; i < timeRanges.length; i++) {
|
||||
for (let j = 0; j < i; j++) {
|
||||
if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for overlap with previous entries
|
||||
if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
// Check if the current start time is before the previous start time
|
||||
if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('.btn-register').click(function () {
|
||||
var loading = $('.btn-register .spinner-loading');
|
||||
|
||||
var data = $('#edit-form').serializeArray();
|
||||
data.push({ name: 'workshopId', value: wpId });
|
||||
var requestData = $.param(data);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveRollCallWorkTimeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: requestData,
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
loading.show();
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
loading.hide();
|
||||
//$('#MainModal').modal('hide');
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
|
||||
setTimeout(function () {
|
||||
window.location.reload();
|
||||
//hasData = true;
|
||||
//dateIndex = 0;
|
||||
//dateEmployeeIndex = null;
|
||||
//$('#caseHistoryLoadData').html('');
|
||||
//caseHistoryLoadAjax();
|
||||
//loadUntilHeightExceeds();
|
||||
}, 1000);
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
loading.hide();
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function toggleHeightControl() {
|
||||
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date').val().length >= 10) {
|
||||
$('.heightControll').removeClass('disable');
|
||||
} else {
|
||||
$('.heightControll').addClass('disable');
|
||||
}
|
||||
}
|
||||
253
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/ModalOTPAction.js
Normal file
253
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/ModalOTPAction.js
Normal file
@@ -0,0 +1,253 @@
|
||||
|
||||
var dateTimeNow = '';
|
||||
$(document).ready(function () {
|
||||
$('#rule').click(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#btnSmsReciver').prop("disabled", false);
|
||||
$('#btnSmsReciver').removeClass("disable");
|
||||
$(this).prop("disabled", true);
|
||||
} else {
|
||||
$('#btnSmsReciver').prop("disabled", true);
|
||||
$('#btnSmsReciver').addClass("disable");
|
||||
}
|
||||
});
|
||||
|
||||
$("#next-step").on("click", function () {
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
$('#next-step').text('ثبت');
|
||||
// $('#next-step').addClass('disable')
|
||||
$('#step-2').removeClass('not-step');
|
||||
});
|
||||
|
||||
$("#prev-step").on("click", function () {
|
||||
$('#step-form1').show();
|
||||
|
||||
if ($('#step-form2').is(":hidden")) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
|
||||
$('#step-form2').hide();
|
||||
$('#prev-step').text('انصراف');
|
||||
$('#next-step').text('مرحله بعد');
|
||||
$('#step-2').addClass('not-step');
|
||||
});
|
||||
|
||||
$("#time-code").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("000000");
|
||||
|
||||
$('#changeDuration').on('change', function () {
|
||||
|
||||
if (this.value == "1Mount") {
|
||||
$('#Duration').val('یک ماهه');
|
||||
} else if (this.value == "3Mount") {
|
||||
$('#Duration').val('سه ماهه');
|
||||
} else if (this.value == "6Mount") {
|
||||
$('#Duration').val('شش ماهه');
|
||||
} else if (this.value == "12Mount") {
|
||||
$('#Duration').val('یک ساله');
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
url: computeMoneyByMountAjax,
|
||||
type: 'GET',
|
||||
data: {"mount": this.value, "money": $('#AmountFaReal').val() },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$('#AmountFaWithout').text(response.cumputeWithout);
|
||||
//$('#AmountFaDiscount').text(response.cumputeDiscount);
|
||||
$('#AmountFaWith').text(response.cumputeWithout);
|
||||
$('#AmountFaTotal').text(response.cumputeWithout);
|
||||
$('#AmountFa').text(response.cumputeWithout);
|
||||
// برای تخفیف محاسبه میشد
|
||||
//$('#AmountFaWith').text(response.cumpute);
|
||||
//$('#AmountFaTotal').text(response.cumpute);
|
||||
//$('#AmountFa').text(response.cumpute);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btnSmsReciver').on("click", function () {
|
||||
$('#btnSmsReciver').prop("disabled", true);
|
||||
$('#btnSmsReciver').addClass("disable");
|
||||
sendVerifyCode();
|
||||
});
|
||||
|
||||
function sendVerifyCode() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: sendSmsAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#CodeDiv').removeClass("disable");
|
||||
$('#next-step').removeClass('disable');
|
||||
$('#next-step').attr('onclick', 'confirmCodeToLogin()');
|
||||
// codeTimer();
|
||||
dateTimeNow = new Date().toJSON();
|
||||
startTimer(2);
|
||||
} else {
|
||||
$('.loading').hide();
|
||||
$('#btnSmsReciver').show();
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function startTimer(minutes) {
|
||||
var timer = minutes * 60, display = $('#timer');
|
||||
var interval = setInterval(function () {
|
||||
var minutes = parseInt(timer / 60, 10);
|
||||
var seconds = parseInt(timer % 60, 10);
|
||||
|
||||
minutes = minutes < 10 ? "0" + minutes : minutes;
|
||||
seconds = seconds < 10 ? "0" + seconds : seconds;
|
||||
|
||||
display.text(minutes + ":" + seconds);
|
||||
|
||||
if (--timer < 0) {
|
||||
clearInterval(interval);
|
||||
$('#btnSmsReciver').prop("disabled", false);
|
||||
$('#btnSmsReciver').removeClass("disable");
|
||||
$('#btnSmsReciver').text('ارسال دوباره');
|
||||
$('#CodeDiv').addClass("disable");
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function codeTimer() {
|
||||
$('#timer').text('');
|
||||
var timer2 = "2:00";
|
||||
var interval = setInterval(function () {
|
||||
var timer = timer2.split(':');
|
||||
//by parsing integer, I avoid all extra string processing
|
||||
var minutes = parseInt(timer[0], 10);
|
||||
var seconds = parseInt(timer[1], 10);
|
||||
--seconds;
|
||||
minutes = (seconds < 0) ? --minutes : minutes;
|
||||
if (minutes < 0) clearInterval(interval);
|
||||
seconds = (seconds < 0) ? 59 : seconds;
|
||||
seconds = (seconds < 10) ? '0' + seconds : seconds;
|
||||
//minutes = (minutes < 10) ? minutes : minutes;
|
||||
$('.countdown').html(minutes + ':' + seconds);
|
||||
timer2 = minutes + ':' + seconds;
|
||||
|
||||
if (timer2 === "0:00" && !$('#passDiv').hasClass("showPassDiv")) {
|
||||
|
||||
$('#next-step').attr('onclick', '');
|
||||
$('#next-step').addClass('disable');
|
||||
$('#CodeDiv').addClass("disable");
|
||||
|
||||
|
||||
//اینپوت برای وارد کردن کدها خالی میشود
|
||||
$('.time-code').val('');
|
||||
$('#timer').text('00:00');
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// var form = $("#steps");
|
||||
// form.steps({
|
||||
// headerTag: "h6",
|
||||
// bodyTag: "section",
|
||||
// transitionEffect: "fade",
|
||||
// titleTemplate: '<div class="step-progress"><h5 class="d-flex justify-content-center align-items-center not-step"> #index# </h5><p>#title#</p></div>'
|
||||
// });
|
||||
});
|
||||
|
||||
function confirmCodeToLogin() {
|
||||
var code = $('#time-code').val();
|
||||
|
||||
if (code.length === 6) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: checkCodeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: {
|
||||
'code': code,
|
||||
'codeSendTimeStr': dateTimeNow
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.exist === true) {
|
||||
SaveServiceData();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('کد وارد شده کمتر از 6 رقم است.');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
function SaveServiceData()
|
||||
{
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveServiceAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded === true) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function OpenAccount() {
|
||||
window.location.href = saveCameraAccountUrl;
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
$(document).ready(function () {
|
||||
$('#rule').click(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#btnSmsReciver').prop("disabled", false);
|
||||
$('#btnSmsReciver').removeClass("disable");
|
||||
} else {
|
||||
$('#btnSmsReciver').prop("disabled", true);
|
||||
$('#btnSmsReciver').addClass("disable");
|
||||
}
|
||||
});
|
||||
|
||||
$("#next-step").on("click", function () {
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
$('#next-step').text('ثبت');
|
||||
// $('#next-step').addClass('disable')
|
||||
$('#step-2').removeClass('not-step');
|
||||
});
|
||||
|
||||
$("#prev-step").on("click", function () {
|
||||
$('#step-form1').show();
|
||||
|
||||
if ($('#step-form2').is(":hidden")) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
|
||||
$('#step-form2').hide();
|
||||
$('#prev-step').text('انصراف');
|
||||
$('#next-step').text('مرحله بعد');
|
||||
$('#step-2').addClass('not-step');
|
||||
});
|
||||
|
||||
$('#btnSmsReciver').on("click", function () {
|
||||
$('#btnSmsReciver').prop("disabled", true);
|
||||
$('#btnSmsReciver').addClass("disable");
|
||||
sendVerifyCode();
|
||||
});
|
||||
|
||||
function sendVerifyCode() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: sendSmsAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#CodeDiv').removeClass("disable");
|
||||
$('#next-step').removeClass('disable');
|
||||
$('#next-step').attr('onclick', 'confirmCodeToLogin()');
|
||||
codeTimer();
|
||||
} else {
|
||||
$('.loading').hide();
|
||||
$('#btnSmsReciver').show();
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function codeTimer() {
|
||||
$('#timer').text('');
|
||||
var timer2 = "2:00";
|
||||
var interval = setInterval(function () {
|
||||
var timer = timer2.split(':');
|
||||
//by parsing integer, I avoid all extra string processing
|
||||
var minutes = parseInt(timer[0], 10);
|
||||
var seconds = parseInt(timer[1], 10);
|
||||
--seconds;
|
||||
minutes = (seconds < 0) ? --minutes : minutes;
|
||||
if (minutes < 0) clearInterval(interval);
|
||||
seconds = (seconds < 0) ? 59 : seconds;
|
||||
seconds = (seconds < 10) ? '0' + seconds : seconds;
|
||||
//minutes = (minutes < 10) ? minutes : minutes;
|
||||
$('.countdown').html(minutes + ':' + seconds);
|
||||
timer2 = minutes + ':' + seconds;
|
||||
|
||||
if (timer2 === "0:00" && !$('#passDiv').hasClass("showPassDiv")) {
|
||||
|
||||
$('#next-step').attr('onclick', '');
|
||||
$('#next-step').addClass('disable');
|
||||
$('#CodeDiv').addClass("disable");
|
||||
|
||||
|
||||
//اینپوت برای وارد کردن کدها خالی میشود
|
||||
$('.time-code').val('');
|
||||
$('#timer').text('00:00');
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
function confirmCodeToLogin() {
|
||||
var code = $('#time-code').val();
|
||||
if (code.length == 6) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: checkCodeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: {
|
||||
'code': code
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.exist === true) {
|
||||
SaveServiceData();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('کد وارد شده صحیح نیست.');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('کد وارد شده کمتر از 6 رقم است.');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
function SaveServiceData()
|
||||
{
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveServiceFreeAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded === true) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,539 @@
|
||||
$(document).ready(function () {
|
||||
$('.form-control-percent').on('keydown', function (e) {
|
||||
const allowedKeys = [
|
||||
'Backspace', 'Tab', 'Escape', 'Enter', 'ArrowLeft', 'ArrowRight',
|
||||
'ArrowUp', 'ArrowDown', 'Delete', 'Home', 'End'
|
||||
];
|
||||
|
||||
if (allowedKeys.includes(e.key) || (e.key === 'a' && (e.ctrlKey || e.metaKey))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!/^\d$/.test(e.key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$(".form-control-currency").each(function () {
|
||||
new Cleave(this, {
|
||||
numeral: true,
|
||||
numeralThousandsGroupStyle: 'thousand'
|
||||
});
|
||||
});
|
||||
|
||||
$(".dateTime").each(function () {
|
||||
new Cleave(this, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
});
|
||||
|
||||
//----------------------- Radio Group -----------------------
|
||||
//$('.Sub-Radio, .sub-input').prop('disabled', true);
|
||||
|
||||
$('.Main-Radio').on('change', function () {
|
||||
var $currentGroupContainer = $(this).closest('.group-container');
|
||||
var $currentGroupInput = $(this).closest('.group');
|
||||
|
||||
// Clear previous selections
|
||||
$currentGroupContainer.find('.Sub-Radio').prop('checked', false).prop('disabled', true);
|
||||
$currentGroupContainer.find('.sub-input').val('').prop('disabled', true);
|
||||
$currentGroupInput.find('.sub-input').first().prop('disabled', false).focus();
|
||||
|
||||
// Disable all main checkboxes except the current one
|
||||
$currentGroupContainer.find('.main-checkbox').prop('checked', false);
|
||||
|
||||
var $currentGroup = $(this).closest('.group');
|
||||
|
||||
|
||||
if (!$(this).hasClass('main-checkbox')) {
|
||||
$currentGroupContainer.find('.main-checkbox').prop('checked', false);
|
||||
} else {
|
||||
$currentGroupContainer.find('.main-checkbox').prop('checked', true);
|
||||
$currentGroupContainer.find('.main-checkbox').not(this).prop('checked', false);
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
$currentGroup.find('.Sub-Radio').prop('disabled', false);
|
||||
|
||||
var $firstSubRadio = $currentGroup.find('.Sub-Radio').first();
|
||||
$firstSubRadio.prop('checked', true);
|
||||
$firstSubRadio.closest('div').find('.sub-input').prop('disabled', false).focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.Sub-Radio').on('change', function () {
|
||||
var $currentSubGroup = $(this).closest('.sub-group');
|
||||
|
||||
$currentSubGroup.find('.sub-input').val('').prop('disabled', true);
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
// $(this).next('.sub-input').prop('disabled', false);
|
||||
$(this).closest('div').find('.sub-input').prop('disabled', false).focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
//******************** انتخاب چک باکس ********************
|
||||
$('#AbsentPenaltyAll').on('change', function () {
|
||||
var isChecked = $(this).is(':checked');
|
||||
$('input[name="AbsentPenaltyDays"]').not('#AbsentPenaltyAll').prop('checked', isChecked);
|
||||
});
|
||||
|
||||
$('input[name="AbsentPenaltyDays"]').not('#AbsentPenaltyAll').on('change', function () {
|
||||
var allChecked = $('input[name="AbsentPenaltyDays"]').not('#AbsentPenaltyAll').length ===
|
||||
$('input[name="AbsentPenaltyDays"]:checked').not('#AbsentPenaltyAll').length;
|
||||
$('#AbsentPenaltyAll').prop('checked', allChecked);
|
||||
});
|
||||
//******************** انتخاب چک باکس ********************
|
||||
|
||||
$('.spinner-loading').hide();
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.current').each(function () {
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
$('.sidebarRollCallMenu ul li').click(function () {
|
||||
$('.form-section').hide();
|
||||
|
||||
$('.sidebarRollCallMenu ul li').removeClass('current');
|
||||
|
||||
$(this).addClass('current');
|
||||
$('#rollCallSettingModalHead').text($(this).find('span').text());
|
||||
|
||||
var targetForm = $(this).data('target');
|
||||
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
$(".btnAddTimeWork").on("click", function () {
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
if (currentCount < 3) {
|
||||
var namePlacement = "";
|
||||
var namePlacementPersian = "";
|
||||
|
||||
switch (currentCount + 1) {
|
||||
case 2:
|
||||
namePlacement = "Second";
|
||||
namePlacementPersian = "دوم";
|
||||
break;
|
||||
case 3:
|
||||
namePlacement = "Third";
|
||||
namePlacementPersian = "سوم";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
var timeWorkHtml = `
|
||||
<div class="groupBox timeWork">
|
||||
<div class="row align-items-center justify-content-between">
|
||||
<div class="col-2 d-flex align-items-center">
|
||||
<input type="hidden" name="Command.ShiftsList[${currentCount}].Placement" value="${namePlacement}" />
|
||||
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">از</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftsList[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
<div class="col-4 d-flex align-items-center">
|
||||
<div class="timeWorkTitle">الی</div>
|
||||
<input type="text" class="form-control text-center dateTime" name="Command.ShiftsList[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;"/>
|
||||
</div>
|
||||
<div class="col-2 d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemoveTimeWork">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
|
||||
|
||||
new Cleave(`input[name="Command.ShiftsList[${currentCount}].StartTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
new Cleave(`input[name="Command.ShiftsList[${currentCount}].EndTime"]`, {
|
||||
time: true,
|
||||
timePattern: ['h', 'm']
|
||||
});
|
||||
|
||||
updateAddButtonText(currentCount + 1);
|
||||
|
||||
if (currentCount + 1 === 3) {
|
||||
$(".btnAddTimeWork").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).on("click", ".btnRemoveTimeWork", function () {
|
||||
$(this).closest(".groupBox").remove();
|
||||
var currentCount = $('.groupBox').length;
|
||||
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
if (currentCount < 3) {
|
||||
$(".btnAddTimeWork").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
//updateAddButtonText(1);
|
||||
function updateAddButtonText(currentCount) {
|
||||
if (currentCount === 1) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت دوم');
|
||||
} else if (currentCount === 2) {
|
||||
$('.btnAppendChildTimeWork').text('افزودن نوبت سوم');
|
||||
}
|
||||
|
||||
let allFilled = true;
|
||||
$('.dateTime').each(function () {
|
||||
const value = $(this).val().trim();
|
||||
if (value === "" || !timeValidCheck(value)) {
|
||||
allFilled = false;
|
||||
return false; // Break the loop
|
||||
}
|
||||
});
|
||||
|
||||
if (allFilled) {
|
||||
$('.btn-register').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-register').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
//$(document).on('input', ".dateTime", function () {
|
||||
// var value = $(this).val();
|
||||
// $(this).val(convertPersianNumbersToEnglish(value)).mask("00:00");
|
||||
//});
|
||||
|
||||
$(document).on('keyup', ".dateTime", function () {
|
||||
let $input = $(this);
|
||||
let value = $input.val();
|
||||
let lengthValue = value.length;
|
||||
let currentCount = $('.groupBox').length;
|
||||
|
||||
if (lengthValue >= 5) {
|
||||
if (!timeValidCheck(value)) {
|
||||
showAlert('ساعت را به درستی وارد نمائید', $input);
|
||||
updateAddButtonText(currentCount);
|
||||
} else {
|
||||
clearAlert($input);
|
||||
validateAllTimes();
|
||||
updateAddButtonText(currentCount);
|
||||
|
||||
focusNextTimeInput($input);
|
||||
}
|
||||
} else {
|
||||
updateAddButtonText(currentCount);
|
||||
}
|
||||
});
|
||||
|
||||
function showAlert(message, inputElement) {
|
||||
inputElement.addClass("errored");
|
||||
$('.alert-msg').show().find('p').text(message);
|
||||
setTimeout(function () {
|
||||
clearAlert(inputElement);
|
||||
}, 3500);
|
||||
}
|
||||
|
||||
function clearAlert(inputElement) {
|
||||
inputElement.removeClass("errored");
|
||||
$('.alert-msg').hide().find('p').text('');
|
||||
}
|
||||
|
||||
function timeValidCheck(value) {
|
||||
const timePattern = /^([01]\d|2[0-3]):([0-5]\d)$/; // Validates HH:mm format
|
||||
return timePattern.test(value);
|
||||
}
|
||||
|
||||
function validateAllTimes() {
|
||||
let timeRanges = [];
|
||||
|
||||
$(".groupBox").each(function () {
|
||||
let startTime = $(this).find('input[name*="StartTime"]').val();
|
||||
let endTime = $(this).find('input[name*="EndTime"]').val();
|
||||
|
||||
if (startTime.length === 5 && endTime.length === 5) {
|
||||
let startParts = startTime.split(':');
|
||||
let endParts = endTime.split(':');
|
||||
let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
|
||||
let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
|
||||
timeRanges.push({ start: startInMinutes, end: endInMinutes });
|
||||
}
|
||||
});
|
||||
|
||||
// Check for conflicts and order
|
||||
for (let i = 0; i < timeRanges.length; i++) {
|
||||
for (let j = 0; j < i; j++) {
|
||||
if (timeRanges[i].start >= timeRanges[i].end) {
|
||||
showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for overlap with previous entries
|
||||
if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
|
||||
showAlert('زمانها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
// Check if the current start time is before the previous start time
|
||||
if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
|
||||
showAlert('ساعت جدید نباید کوچکتر از ساعتهای قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function focusNextTimeInput(currentInput) {
|
||||
var inputs = $(".dateTime");
|
||||
var currentIndex = inputs.index(currentInput);
|
||||
|
||||
if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
|
||||
$(inputs[currentIndex + 1]).focus();
|
||||
}
|
||||
}
|
||||
//******************** برای نوشتن تاریخ ********************
|
||||
|
||||
var eyeShow = $('.eyeShow');
|
||||
var eyeClose = $('.eyeClose');
|
||||
var reEyeShow = $('.reEyeShow');
|
||||
var reEyeClose = $('.reEyeClose');
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
|
||||
$(document).on('click', '#accountModalModal button', function () {
|
||||
|
||||
// alert($(this));
|
||||
// $(this).find('input').type ? 'text' : 'password';
|
||||
// document.getElementById('hybrid').type = 'password';
|
||||
$("#accountModalModal button").find('input').attr("type", "text");
|
||||
|
||||
|
||||
// var input=document.getElementById(some-id);
|
||||
// var input2= input.cloneNode(false);
|
||||
// input2.type='password';
|
||||
// input.parentNode.replaceChild(input2,input);
|
||||
});
|
||||
|
||||
function passFunction() {
|
||||
var x = document.getElementById("signupInputPassword");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
eyeShow.hide();
|
||||
eyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
eyeShow.show();
|
||||
eyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function rePassFunction() {
|
||||
var x = document.getElementById("repeat_password");
|
||||
|
||||
if (x.type === "password") {
|
||||
x.type = "text";
|
||||
reEyeShow.hide();
|
||||
reEyeClose.show();
|
||||
} else {
|
||||
x.type = "password";
|
||||
reEyeShow.show();
|
||||
reEyeClose.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function passwordCheck(password) {
|
||||
if (password.length >= 8)
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[0-9])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[!,%,&,@,#,$,^,*,?,_,~,<,>,])/))
|
||||
strength += 1;
|
||||
if (password.match(/(?=.*[A-Z])/))
|
||||
strength += 1;
|
||||
|
||||
displayBar(strength);
|
||||
}
|
||||
|
||||
function displayBar(strength) {
|
||||
$(".password-strength-group").attr('data-strength', strength);
|
||||
}
|
||||
|
||||
$("#signupInputPassword").keyup(function () {
|
||||
strength = 0;
|
||||
var password = $(this).val();
|
||||
passwordCheck(password);
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var typingTimer;
|
||||
var typingInterval = 1500;
|
||||
|
||||
$("#username").on('keyup', function () {
|
||||
clearTimeout(typingTimer);
|
||||
var username = $('#username').val();
|
||||
|
||||
if (username.length >= 6) {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').addClass("d-none");
|
||||
$('#loadingSpinner').removeClass("d-none");
|
||||
|
||||
typingTimer = setTimeout(function () {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: checkAccountAjax,
|
||||
data: { username: username },
|
||||
success: function (response) {
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
|
||||
if (response.success) {
|
||||
$('#errorSvg').addClass("d-none");
|
||||
$('#successSvg').removeClass("d-none");
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 2000);
|
||||
} else {
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}, typingInterval);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("نام کاربری حداقل باید 6 حرف باشد");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
$('#loadingSpinner').addClass("d-none");
|
||||
$('#successSvg').addClass("d-none");
|
||||
$('#errorSvg').removeClass("d-none");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function registerAccount() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveCameraAccountAndWorkshopSettingAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
}, 3500);
|
||||
window.location.reload();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#saveRollCallButton').on('click', saveRollCallSettingAjax);
|
||||
function saveRollCallSettingAjax() {
|
||||
var isValid = true;
|
||||
var loading = $('#saveRollCallButton').next('.spinner-loading');
|
||||
|
||||
$('#create-form').find('.sub-input, select').each(function () {
|
||||
if (!$(this).prop('disabled') && !$(this).val()) {
|
||||
isValid = false;
|
||||
$(this).addClass('errored');
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا جای خالی تنظیمات را پر نمائید');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
return false;
|
||||
} else {
|
||||
$(this).removeClass('error');
|
||||
}
|
||||
});
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = $('#create-form').serialize();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveWorkshopSetting,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: data ,
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
loading.show();
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
loading.hide();
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
$('#saveButton').on('click', saveWorkTimeSettingAjax);
|
||||
function saveWorkTimeSettingAjax() {
|
||||
var isValid = true;
|
||||
var loading = $('#saveButton').next('.spinner-loading');
|
||||
|
||||
$('#create-form').find('.sub-input, select').each(function () {
|
||||
if (!$(this).prop('disabled') && !$(this).val()) {
|
||||
isValid = false;
|
||||
$(this).addClass('errored');
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا جای خالی ساعت را پر نمائید');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
return false;
|
||||
} else {
|
||||
$(this).removeClass('error');
|
||||
}
|
||||
});
|
||||
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = $('#create-form').serialize();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: saveWorkTimeSetting,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: data,
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
loading.show();
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
loading.hide();
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
loading.hide();
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,434 @@
|
||||
var loadModels = async () => {
|
||||
await Promise.all([
|
||||
faceapi.nets.ssdMobilenetv1.loadFromUri("\\weights\\"),
|
||||
faceapi.nets.faceRecognitionNet.loadFromUri("\\weights\\"),
|
||||
faceapi.nets.faceLandmark68Net.loadFromUri("\\weights\\")
|
||||
]);
|
||||
};
|
||||
loadModels();
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
if ($(window).width() > 992) {
|
||||
$('#desktopDisplay').show();
|
||||
$('#mobileDisplay').hide();
|
||||
$('#mobileDisplay').html('');
|
||||
}
|
||||
|
||||
if ($(window).width() <= 992) {
|
||||
$('#desktopDisplay').html('');
|
||||
$('#desktopDisplay').hide();
|
||||
$('#mobileDisplay').show();
|
||||
}
|
||||
|
||||
$(document).on('click', '.upload-image1', function () {
|
||||
$('.md-modal').addClass('md-show');
|
||||
$('.take_snapshot1').show();
|
||||
$('.take_snapshot2').hide();
|
||||
startCamera();
|
||||
});
|
||||
|
||||
$(document).on('click', '.upload-image2', function () {
|
||||
$('.md-modal').addClass('md-show');
|
||||
$('.take_snapshot1').hide();
|
||||
$('.take_snapshot2').show();
|
||||
startCamera();
|
||||
});
|
||||
|
||||
$(document).on('click', '.camera_close', function () {
|
||||
$('.md-modal').removeClass('md-show');
|
||||
stopCamera();
|
||||
});
|
||||
|
||||
updateSaveButton();
|
||||
});
|
||||
|
||||
//window.onload = async () => {
|
||||
// await loadModels();
|
||||
// modelsLoaded = true;
|
||||
//};
|
||||
|
||||
|
||||
var modelsLoaded = false;
|
||||
|
||||
//var ensureModelsLoaded = async () => {
|
||||
// if (!modelsLoaded) {
|
||||
// await loadModels();
|
||||
// modelsLoaded = true;
|
||||
// }
|
||||
//};
|
||||
|
||||
var updateSaveButton = () => {
|
||||
if (!hasErrorPic1 && checkFace1 && !hasErrorPic2 && checkFace2) {
|
||||
$('#SaveImageEmployee').removeClass('disable');
|
||||
} else {
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
}
|
||||
};
|
||||
|
||||
var runCheckFace1 = async () => {
|
||||
|
||||
const img1 = document.getElementById('pic1');
|
||||
|
||||
const detectionPromise1 = await faceapi.detectAllFaces(img1).withFaceLandmarks().withFaceDescriptors();
|
||||
|
||||
if (detectionPromise1.length === 1) {
|
||||
console.log('یک چهره در تصویر اول شناسایی شد');
|
||||
|
||||
checkFace1 = true;
|
||||
hasErrorPic1 = false;
|
||||
$('#demoResult1').css('border', '2px dashed #148b8b');
|
||||
} else if (detectionPromise1.length > 1) {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('بیش از یک چهره در تصویر اول شناسایی شد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
|
||||
hasErrorPic1 = true;
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
$('.upload-image1').css('background', '#ff090940');
|
||||
$('#demoResult1').css('border', '2px dashed #ff5c5c');
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('چهرهای در تصویر اول شناسایی نشد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
|
||||
hasErrorPic1 = true;
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
$('.upload-image1').css('background', '#ff090940');
|
||||
$('#demoResult1').css('border', '2px dashed #ff5c5c');
|
||||
}
|
||||
updateSaveButton();
|
||||
$('#loadingImage1').hide();
|
||||
};
|
||||
|
||||
var runCheckFace2 = async () => {
|
||||
|
||||
const img2 = document.getElementById('pic2');
|
||||
|
||||
const detectionPromise2 = await faceapi.detectAllFaces(img2).withFaceLandmarks().withFaceDescriptors();
|
||||
|
||||
if (detectionPromise2.length === 1) {
|
||||
console.log('یک چهره در تصویر دوم شناسایی شد');
|
||||
checkFace2 = true;
|
||||
hasErrorPic2 = false;
|
||||
|
||||
$('#demoResult2').css('border', '2px dashed #148b8b');
|
||||
} else if (detectionPromise2.length > 1) {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('بیش از یک چهره در تصویر دوم شناسایی شد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
|
||||
hasErrorPic2 = true;
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
$('.upload-image2').css('background', '#ff090940');
|
||||
$('#demoResult2').css('border', '2px dashed #ff5c5c');
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('چهرهای در تصویر دوم شناسایی نشد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
|
||||
hasErrorPic2 = true;
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
$('.upload-image2').css('background', '#ff090940');
|
||||
$('#demoResult2').css('border', '2px dashed #ff5c5c');
|
||||
}
|
||||
updateSaveButton();
|
||||
$('#loadingImage2').hide();
|
||||
};
|
||||
|
||||
|
||||
var FACING_MODES = JslibHtml5CameraPhoto.FACING_MODES;
|
||||
var IMAGE_TYPES = JslibHtml5CameraPhoto.IMAGE_TYPES;
|
||||
|
||||
// Check if videoElement is already declared to avoid redeclaration
|
||||
// if (typeof videoElement === 'undefined') {
|
||||
var videoElement = document.getElementById('videoElement');
|
||||
var cameraPhoto = new JslibHtml5CameraPhoto.default(videoElement);
|
||||
// }
|
||||
|
||||
function startCamera() {
|
||||
// startCameraMaxResolution
|
||||
cameraPhoto.startCamera(FACING_MODES.USER).then(() => {
|
||||
console.log('Camera started!');
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
console.error('Camera not started!', error);
|
||||
});
|
||||
}
|
||||
|
||||
function stopCamera() {
|
||||
cameraPhoto.stopCamera().then(() => {
|
||||
console.log('Camera stopped!');
|
||||
}).catch((error) => {
|
||||
console.log('No camera to stop!:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function cropAndResizeImage(base64Str, newWidth, newHeight) {
|
||||
return new Promise((resolve) => {
|
||||
let img = new Image();
|
||||
img.src = base64Str;
|
||||
img.onload = () => {
|
||||
let canvas = document.createElement('canvas');
|
||||
let ctx = canvas.getContext('2d');
|
||||
|
||||
let sideLength = Math.min(img.width, img.height);
|
||||
let startX = (img.width - sideLength) / 2;
|
||||
let startY = (img.height - sideLength) / 2;
|
||||
|
||||
canvas.width = newWidth;
|
||||
canvas.height = newHeight;
|
||||
|
||||
ctx.drawImage(img, startX, startY, sideLength, sideLength, 0, 0, newWidth, newHeight);
|
||||
resolve(canvas.toDataURL('image/jpeg'));
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function take_snapshot1() {
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
var sizeFactor = 1;
|
||||
var imageType = IMAGE_TYPES.JPG;
|
||||
var imageCompression = 1;
|
||||
|
||||
var config = {
|
||||
sizeFactor,
|
||||
imageType,
|
||||
imageCompression
|
||||
};
|
||||
|
||||
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 =
|
||||
'<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) => {
|
||||
console.error('Error cropping and resizing photo:', error);
|
||||
});
|
||||
|
||||
$('.md-modal').removeClass('md-show');
|
||||
|
||||
stopCamera();
|
||||
}
|
||||
|
||||
function take_snapshot2() {
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
var sizeFactor = 1;
|
||||
var imageType = IMAGE_TYPES.JPG;
|
||||
var imageCompression = 1;
|
||||
|
||||
var config = {
|
||||
sizeFactor,
|
||||
imageType,
|
||||
imageCompression
|
||||
};
|
||||
|
||||
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 =
|
||||
'<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) => {
|
||||
console.error('Error cropping and resizing photo:', error);
|
||||
});
|
||||
|
||||
$('.md-modal').removeClass('md-show');
|
||||
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');
|
||||
let pic2 = $("#pic2").attr('src');
|
||||
const img1 = document.getElementById('pic1');
|
||||
const img2 = document.getElementById('pic2');
|
||||
|
||||
let workshopId = Number($('#workshopId').val());
|
||||
let employeeId = Number($('#employeeId').val());
|
||||
|
||||
if (!hasErrorPic1 && checkFace1 && !hasErrorPic2 && checkFace2) {
|
||||
const detection1 = await faceapi.detectSingleFace(img1).withFaceLandmarks().withFaceDescriptor();
|
||||
const detection2 = await faceapi.detectSingleFace(img2).withFaceLandmarks().withFaceDescriptor();
|
||||
|
||||
console.log(detection1);
|
||||
const distance = faceapi.euclideanDistance(detection1.descriptor, detection2.descriptor);
|
||||
if (distance > 0.45) {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('چهره اول با چهره دوم مطابقت ندارد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 4000);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (pic1 != null && pic2 != null) {
|
||||
const loading = $('.spinner-loading-progress').show();
|
||||
const loadingBtn = $('.spinner-loading').show();
|
||||
let startTime = Date.now();
|
||||
|
||||
$('#SaveImageEmployee').addClass('disable');
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: takePictureAjax,
|
||||
data: {
|
||||
"base64pic1": pic1,
|
||||
"base64pic2": pic2,
|
||||
"workshopId": workshopId,
|
||||
"employeeId": employeeId
|
||||
},
|
||||
headers: {
|
||||
"RequestVerificationToken": antiForgeryToken
|
||||
},
|
||||
xhr: function () {
|
||||
let xhr = new XMLHttpRequest();
|
||||
// Track the progress of the upload
|
||||
xhr.upload.onprogress = function (e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total) * 100;
|
||||
$('#progressBar').text(Math.round(percentComplete) + '%');
|
||||
$('.spinner-loading-progress').css('width', `${Math.round(percentComplete)}%`);
|
||||
}
|
||||
};
|
||||
return xhr;
|
||||
},
|
||||
success: function (response) {
|
||||
let elapsedTime = Date.now() - startTime;
|
||||
let delay = Math.max(1000 - elapsedTime, 0);
|
||||
|
||||
setTimeout(function () {
|
||||
if (response.isSuccedded) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
|
||||
$(`#ImageEmployee_${employeeId}`).attr("src", `data:image/jpeg;base64,${response.src}`);
|
||||
$(`#ImageEmployeeMobile_${employeeId}`).attr("src", `data:image/jpeg;base64,${response.src}`);
|
||||
$(`#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("ویرایش عکس");
|
||||
|
||||
$(`#Section_${employeeId}`).removeClass("deactive");
|
||||
$('#SaveImageEmployee').removeClass('disable');
|
||||
$('#MainModal').modal('hide');
|
||||
}, 1000);
|
||||
} else {
|
||||
$('#SaveImageEmployee').removeClass('disable');
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}, delay); // Delay the hiding of the spinner
|
||||
},
|
||||
error: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('گرفتن دو عکس الزامیست');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('گرفتن دو عکس الزامیست');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
73
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Plans.js
Normal file
73
ServiceHost/wwwroot/AssetsAdminNew/RollCall/js/Plans.js
Normal file
@@ -0,0 +1,73 @@
|
||||
function choosePlane(maxPersonnelId) {
|
||||
var maxPersonnelVal = Number(maxPersonnelId);
|
||||
var parameter = '&maxId=' + maxPersonnelVal;
|
||||
var url = OTPActionUrl;
|
||||
window.location.href = url + parameter;
|
||||
}
|
||||
|
||||
function choosePlaneFree() {
|
||||
if (employeeCount > 0) {
|
||||
window.location.href = OTPActionFreeUrl;
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('هیچ پرسنلی در کارگاه وجود ندارد');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '.gwb-card', function () {
|
||||
var index = $(this).index();
|
||||
var $clickedCard = $(this).find('.click');
|
||||
|
||||
$('.click').removeClass('active');
|
||||
$clickedCard.addClass('active');
|
||||
|
||||
var isPaymentBoxVisible = $('#paymentIncDecBox').is(':visible');
|
||||
var isPackageVisible = $('.card-grid-package').is(':visible');
|
||||
|
||||
$('.card-grid-package').slideUp("slow");
|
||||
$('#paymentIncDecBox').slideUp("slow");
|
||||
|
||||
if (index === 2) {
|
||||
if (!isPaymentBoxVisible) {
|
||||
$('#paymentIncDecBox').slideDown("slow");
|
||||
}
|
||||
} else {
|
||||
if (!isPackageVisible) {
|
||||
$('.card-grid-package').slideDown("slow");
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '.increment', function () {
|
||||
var $input = $(this).siblings('.increDecreInput');
|
||||
var currentValue = parseInt($input.val());
|
||||
|
||||
$input.val(currentValue + 1);
|
||||
updateTotalAmount(currentValue + 1);
|
||||
$('#addMaxPerson').text(Number($('#addMaxPerson').text()) + 1);
|
||||
});
|
||||
|
||||
$(document).on('click', '.decrement', function () {
|
||||
var $input = $(this).siblings('.increDecreInput');
|
||||
var currentValue = parseInt($input.val());
|
||||
|
||||
if (currentValue > 0) {
|
||||
$input.val(currentValue - 1);
|
||||
updateTotalAmount(currentValue - 1);
|
||||
$('#addMaxPerson').text(Number($('#addMaxPerson').text()) - 1);
|
||||
}
|
||||
});
|
||||
|
||||
function updateTotalAmount(quantity) {
|
||||
var pricePerPerson = 350000;
|
||||
var totalAmount = quantity * pricePerPerson;
|
||||
|
||||
$('.increDecreTxt3').text(totalAmount.toLocaleString() + ' تومان');
|
||||
}
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user