change of task
This commit is contained in:
@@ -10,8 +10,8 @@ public static class Version
|
||||
{
|
||||
static Version()
|
||||
{
|
||||
StyleVersion = "2.11.28";
|
||||
AdminVersion = "2.5.13";
|
||||
StyleVersion = "2.11.31";
|
||||
AdminVersion = "2.5.16";
|
||||
CameraVersion = "1.0.3";
|
||||
}
|
||||
|
||||
|
||||
@@ -12,15 +12,9 @@ public class CreateTask
|
||||
public string EndTaskTime { get; set; }
|
||||
public string ContractingPartyName { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public IFormFile Document1 { get; set; }
|
||||
public IFormFile Document2 { get; set; }
|
||||
public IFormFile Document3 { get; set; }
|
||||
public IFormFile Document4 { get; set; }
|
||||
public IFormFile Document5 { get; set; }
|
||||
public IFormFile Document6 { get; set; }
|
||||
public List<long> PositionId { get; set; }
|
||||
|
||||
public IFormFile Voice{ get; set; }
|
||||
public List<long> UploadedMedia { get; set; }
|
||||
public long UploadedVoiceMedia { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Assign;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Task;
|
||||
|
||||
@@ -40,10 +41,14 @@ public interface ITaskApplication
|
||||
OperationResult RejectCompleteRequest(long taskId);
|
||||
|
||||
OperationResult CreateTaskByPosition(CreateTask command, List<long> positionIds);
|
||||
List<TaskViewModel> GetAllRequestedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetRequestedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> AllRequestedTasks(TaskSearchModel searchModel);
|
||||
int GetRequestedTasksCount();
|
||||
|
||||
|
||||
OperationResult ChangeRequestTimeAndAccept(string time,long taskId);
|
||||
TaskViewModel GetRequestDetails(long id);
|
||||
OperationResult UploadMedia(IFormFile mediaFile,long senderId);
|
||||
OperationResult RemoveMedia(long mediaId);
|
||||
void RemoveTempUploadedFiles(long userId);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class TaskSearchModel
|
||||
public string IsCancelRequest { get; set; }
|
||||
public string IsTimeRequest { get; set; }
|
||||
public string TimeRequestAccepted { get; set; }
|
||||
public string TypeOfTicket { get; set; }
|
||||
public string TypeOfTask { get; set; }
|
||||
public string GeneralSearch { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -10,11 +10,7 @@ public class CreateTicket
|
||||
public long SenderId { get; set; }
|
||||
public string ContractingPartyName { get; set; }
|
||||
public string TicketType { get; set; }
|
||||
public IFormFile Document1 { get; set; }
|
||||
public IFormFile Document2 { get; set; }
|
||||
public IFormFile Document3 { get; set; }
|
||||
public IFormFile Document4 { get; set; }
|
||||
public IFormFile Document5 { get; set; }
|
||||
public IFormFile ScreenShot { get; set; }
|
||||
public IFormFile Voice { get; set; }
|
||||
public List<long> UploadedMediaIds { get; set; }
|
||||
public long ScreenShotId { get; set; }
|
||||
public long VoiceId { get; set; }
|
||||
}
|
||||
@@ -7,4 +7,6 @@ public class EditTicket:CreateTicket
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public List<MediaViewModel> MediaViewModels { get; set; }
|
||||
public List<AdminResponseViewModel> AdminResponseViewModels{ get; set; }
|
||||
public List<ClientResponseViewModel> ClientResponseViewModels { get; set; }
|
||||
}
|
||||
16
AccountManagement.Application.Contracts/Ticket/Response.cs
Normal file
16
AccountManagement.Application.Contracts/Ticket/Response.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using AccountManagement.Application.Contracts.Media;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Ticket;
|
||||
public class Response
|
||||
{
|
||||
public long TicketId { get; set; }
|
||||
public string ResponseMessage { get; set; }
|
||||
public bool IsAdmin { get; set; }
|
||||
public bool IsClient { get; set; }
|
||||
public List<MediaViewModel> MediaViewModels { get; set; }
|
||||
}
|
||||
@@ -6,11 +6,6 @@ public class ResponseTicket
|
||||
{
|
||||
public long TicketId { get; set; }
|
||||
public string Response { get; set; }
|
||||
public IFormFile Document1 { get; set; }
|
||||
public IFormFile Document2 { get; set; }
|
||||
public IFormFile Document3 { get; set; }
|
||||
public IFormFile Document4 { get; set; }
|
||||
public IFormFile Document5 { get; set; }
|
||||
public IFormFile Document6 { get; set; }
|
||||
public IFormFile Voice { get; set; }
|
||||
public List<long> UploadedFileIds { get; set; }
|
||||
public long VoiceId { get; set; }
|
||||
}
|
||||
@@ -7,8 +7,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AccountManagement.Application.Contracts\AccountManagement.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\AccountManagement.Domain\AccountManagement.Domain.csproj" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ using AccountManagement.Domain.ClientResponseAgg;
|
||||
using AccountManagement.Domain.MediaAgg;
|
||||
using AccountManagement.Domain.TaskAgg;
|
||||
using AccountManagement.Domain.TicketAgg;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace AccountManagement.Application;
|
||||
|
||||
@@ -59,117 +60,41 @@ public class TicketApplication : ITicketApplication
|
||||
_ticketRepository.SaveChanges();
|
||||
#region SaveDocuments
|
||||
|
||||
if ((command.Document1?.Length > 5000000) || (command.Document2?.Length > 5000000) || (command.Document3?.Length > 5000000) || (command.Document4?.Length > 5000000)
|
||||
|| (command.Document5?.Length > 5000000))
|
||||
return operation.Failed("حجم فایل نمیتواند از 5 مگابایت بیشتر باشد");
|
||||
|
||||
|
||||
if (command.Document1?.Length > 0)
|
||||
if (command.UploadedMediaIds?.Count>0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document1.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
foreach (var mediaId in command.UploadedMediaIds)
|
||||
{
|
||||
command.Document1.CopyTo(stream);
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
if (command.Document2?.Length > 0)
|
||||
if (command.ScreenShotId > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
var media = _mediaRepository.Get(command.ScreenShotId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document2.FileName);
|
||||
string filepath = Path.Combine(path, Path.GetFileName(path));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document2.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
if (command.Document3?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document3.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document3.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
if (command.Document4?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document4.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document4.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
if (command.Document5?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document5.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document5.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
if (command.ScreenShot?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.ScreenShot.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.ScreenShot.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
}
|
||||
@@ -178,22 +103,19 @@ public class TicketApplication : ITicketApplication
|
||||
|
||||
#endregion
|
||||
#region SaveVoice
|
||||
if (command.Voice?.Length > 0)
|
||||
if (command.VoiceId > 0)
|
||||
{
|
||||
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
var media = _mediaRepository.Get(command.ScreenShotId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Ticket", $"{ticket.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Voice.FileName);
|
||||
string filepath = Path.Combine(path, Path.GetFileName(path));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, "صوت");
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Voice.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateTicketMedia(ticket.id, media.id);
|
||||
|
||||
@@ -279,160 +201,52 @@ public class TicketApplication : ITicketApplication
|
||||
|
||||
#region SaveDocuments
|
||||
|
||||
if ((command.Document1?.Length > 5000000) || (command.Document2?.Length > 5000000) || (command.Document3?.Length > 5000000) || (command.Document4?.Length > 5000000)
|
||||
|| (command.Document5?.Length > 5000000) || (command.Document6?.Length > 5000000))
|
||||
return operation.Failed("حجم فایل نمیتواند از 5 مگابایت بیشتر باشد");
|
||||
|
||||
|
||||
if (command.Document1?.Length > 0)
|
||||
if (command.UploadedMedia?.Count>0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document1.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
foreach (var mediaId in command.UploadedMedia)
|
||||
{
|
||||
command.Document1.CopyTo(stream);
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
|
||||
}
|
||||
if (command.Document2?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document2.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document2.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
if (command.Document3?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document3.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document3.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
if (command.Document4?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document4.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document4.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
if (command.Document5?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document5.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document5.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
if (command.Document6?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document6.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document6.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
#region SaveVoice
|
||||
if (command.Voice?.Length > 0)
|
||||
|
||||
if (command.UploadedVoiceMedia > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
var media = _mediaRepository.Get(command.UploadedVoiceMedia);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"Task", $"{task.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Voice.FileName);
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Voice.CopyTo(stream);
|
||||
}
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "صوت");
|
||||
_mediaRepository.Create(media);
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, "صوت");
|
||||
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateMediaWithTaskMedia(task.id, media.id);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
_taskRepository.SaveChanges();
|
||||
|
||||
return operation.Succcedded(task.id);
|
||||
@@ -465,138 +279,30 @@ public class TicketApplication : ITicketApplication
|
||||
|
||||
#region SaveDocuments
|
||||
|
||||
if ((command.Document1?.Length > 5000000) || (command.Document2?.Length > 5000000) || (command.Document3?.Length > 5000000) || (command.Document4?.Length > 5000000)
|
||||
|| (command.Document5?.Length > 5000000) || (command.Document6?.Length > 5000000))
|
||||
return operation.Failed("حجم فایل نمیتواند از 5 مگابایت بیشتر باشد");
|
||||
|
||||
|
||||
if (command.Document1?.Length > 0)
|
||||
if (command.UploadedFileIds?.Count>0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document1.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
foreach (var mediaId in command.UploadedFileIds)
|
||||
{
|
||||
command.Document1.CopyTo(stream);
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
if (command.Document2?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document2.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document2.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
if (command.Document3?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document3.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document3.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
if (command.Document4?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document4.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document4.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
if (command.Document5?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document5.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document5.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
}
|
||||
|
||||
if (command.Document6?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost",
|
||||
"Storage",
|
||||
"TicketAdminResponse", $"{adminRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document6.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document6.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateAdminResponseMedia(adminRes.id, media.id);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.SaveChanges();
|
||||
|
||||
|
||||
return operation.Succcedded(adminRes.id);
|
||||
@@ -615,135 +321,26 @@ public class TicketApplication : ITicketApplication
|
||||
_ticketRepository.SaveChanges();
|
||||
#region SaveDocuments
|
||||
|
||||
if ((command.Document1?.Length > 5000000) || (command.Document2?.Length > 5000000) || (command.Document3?.Length > 5000000) || (command.Document4?.Length > 5000000)
|
||||
|| (command.Document5?.Length > 5000000) || (command.Document6?.Length > 5000000))
|
||||
return operation.Failed("حجم فایل نمیتواند از 5 مگابایت بیشتر باشد");
|
||||
|
||||
|
||||
if (command.Document1?.Length > 0)
|
||||
if (command.UploadedFileIds?.Count>0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document1.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
foreach (var mediaId in command.UploadedFileIds)
|
||||
{
|
||||
command.Document1.CopyTo(stream);
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine($"{_taskRepository.GetWebEnvironmentPath()}", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
File.Move(oldPath, filepath);
|
||||
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
|
||||
}
|
||||
if (command.Document2?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document2.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document2.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
}
|
||||
if (command.Document3?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document3.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document3.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
}
|
||||
if (command.Document4?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document4.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document4.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
}
|
||||
if (command.Document5?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost", "Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document5.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document5.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
}
|
||||
|
||||
if (command.Document6?.Length > 0)
|
||||
{
|
||||
var path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).FullName, "ServiceHost",
|
||||
"Storage",
|
||||
"TicketClientResponse", $"{clientRes.id}");
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, command.Document6.FileName);
|
||||
|
||||
using (var stream = new FileStream(filepath, FileMode.Create))
|
||||
{
|
||||
command.Document6.CopyTo(stream);
|
||||
|
||||
}
|
||||
|
||||
var type = Path.GetExtension(filepath);
|
||||
var media = new Media(filepath, type, "فایل");
|
||||
_mediaRepository.Create(media);
|
||||
_mediaRepository.SaveChanges();
|
||||
_mediaRepository.CreateClientResponseMedia(clientRes.id, media.id);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -7,27 +7,35 @@ using AccountManagement.Domain.TicketMediasAgg;
|
||||
|
||||
namespace AccountManagement.Domain.MediaAgg;
|
||||
|
||||
public class Media:EntityBase
|
||||
public class Media : EntityBase
|
||||
{
|
||||
public Media( string path, string type, string category)
|
||||
public Media(string path, string type, string category)
|
||||
{
|
||||
|
||||
|
||||
Path = path;
|
||||
Type = type;
|
||||
Category = category;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//مسیر ذخیره فایل
|
||||
public string Path { get; private set; }
|
||||
|
||||
|
||||
//نوع ذخیره فایل
|
||||
public string Type { get; private set; }
|
||||
|
||||
//دسته بندی ذخیره فایل
|
||||
public string Category { get; set; }
|
||||
public string Category { get; private set; }
|
||||
public List<TaskMedia> TaskMedias { get; set; }
|
||||
public List<AdminResponseMedia> AdminResponseMedias { get; set; }
|
||||
public List<ClientResponseMedia> ClientResponseMedias { get; set; }
|
||||
public List<TicketMedia> TicketMedias { get; set; }
|
||||
|
||||
public void Edit(string path, string type, string category)
|
||||
{
|
||||
Path = path;
|
||||
Type = type;
|
||||
Category = category;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,17 +11,15 @@ public interface ITaskRepository:IRepository<long,Tasks>
|
||||
void Remove(long id);
|
||||
//گرفتن تمامی وظایف
|
||||
List<TaskViewModel> GetTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetAllRequestedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetRequestedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetSelfTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetAllNotSelfIncludedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetReceivedTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> GetSentTasks(TaskSearchModel searchModel);
|
||||
List<TaskViewModel> AllRequestedTasks(TaskSearchModel searchModel);
|
||||
string SetTasksColors(DateTime time,bool isCancel);
|
||||
int GetRequestedTasksCount();
|
||||
TaskViewModel GetRequestDetails(long id);
|
||||
|
||||
|
||||
|
||||
|
||||
string GetWebEnvironmentPath();
|
||||
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public class AccountRepository : RepositoryBase<long, Account>, IAccountReposito
|
||||
|
||||
var account = GetIncludePositions(int.Parse(_contextAccessor.HttpContext.User.FindFirst("AccountId").Value));
|
||||
return _context.Accounts.Include(x => x.Position)
|
||||
.Where(x => x.Position.PositionValue > account.Position.PositionValue && x.IsActiveString == "true").Select(x => new AccountViewModel()
|
||||
.Where(x => x.Position.PositionValue >= account.Position.PositionValue && x.IsActiveString == "true").Select(x => new AccountViewModel()
|
||||
{
|
||||
PositionValue = x.Position.PositionValue,
|
||||
Id = x.id,
|
||||
|
||||
@@ -42,15 +42,11 @@ public class PositionRepository : RepositoryBase<long, Position>, IPositionRepos
|
||||
public List<PositionViewModel> GetLowerPosition()
|
||||
{
|
||||
var posValue = int.Parse(_contextAccessor.HttpContext.User.FindFirst("PositionValue").Value);
|
||||
return _accountContext.Positions.Where(x => x.PositionValue > posValue).Select(x => new PositionViewModel()
|
||||
return _accountContext.Positions.Where(x => x.PositionValue >= posValue).Select(x => new PositionViewModel()
|
||||
{
|
||||
Value = x.PositionValue,
|
||||
Id = x.id,
|
||||
Name = x.PositionName
|
||||
|
||||
|
||||
|
||||
|
||||
}).OrderBy(x => x.Value).ToList();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ using AccountManagement.Application.Contracts.Media;
|
||||
using AccountManagement.Application.Contracts.Ticket;
|
||||
using AccountManagement.Domain.AdminResponseAgg;
|
||||
using AccountManagement.Domain.ClientResponseAgg;
|
||||
using AccountManagement.Domain.ClientResponseMediaAgg;
|
||||
using AccountManagement.Domain.TicketAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -148,6 +149,33 @@ public class TicketRepository : RepositoryBase<long, Ticket>, ITicketRepository
|
||||
Path = m.Media.Path,
|
||||
Type = m.Media.Type,
|
||||
}).ToList(),
|
||||
|
||||
ClientResponseViewModels = _accountContext.ClientResponses.Where(c => c.TicketId == x.id)
|
||||
.Select(m => new ClientResponseViewModel()
|
||||
{
|
||||
Response = m.Response,
|
||||
TicketId = m.TicketId,
|
||||
MediaViewModels = _accountContext.ClientResponseMedias.Include(a => a.Media).Where(a => a.ClientResponseId == m.id).Select(cm => new MediaViewModel()
|
||||
{
|
||||
Category = cm.Media.Category,
|
||||
Path = cm.Media.Path,
|
||||
Id = cm.Media.id,
|
||||
Type = cm.Media.Type,
|
||||
}).ToList(),
|
||||
}).ToList(),
|
||||
AdminResponseViewModels = _accountContext.AdminResponses.Where(c => c.TicketId == x.id)
|
||||
.Select(m => new AdminResponseViewModel()
|
||||
{
|
||||
Response = m.Response,
|
||||
TicketId = m.TicketId,
|
||||
MediaViewModels = _accountContext.AdminResponseMedias.Include(a => a.Media).Where(a => a.AdminResponseId == m.id).Select(cm => new MediaViewModel()
|
||||
{
|
||||
Category = cm.Media.Category,
|
||||
Path = cm.Media.Path,
|
||||
Id = cm.Media.id,
|
||||
Type = cm.Media.Type,
|
||||
}).ToList(),
|
||||
}).ToList(),
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,12 @@ public interface IEmployerRepository : IRepository<long, Employer>
|
||||
bool ExistsEmployerAccountRegisterId(string commandRegisterId);
|
||||
bool ExistsEmployerAccountLName(string commandLName);
|
||||
|
||||
#region Mahan
|
||||
|
||||
List<EmployerViewModel> GetEmployersHasWorkshop();
|
||||
|
||||
#endregion
|
||||
|
||||
#region NewByHeydari
|
||||
OperationResult DeleteEmployer(long id);
|
||||
List<EmployerViewModel> GetEmployerWithFNameOrLName(string searchText);
|
||||
|
||||
@@ -32,7 +32,10 @@ public interface IEmployerApplication
|
||||
|
||||
OperationResult EditForClient(EditEmployer command);
|
||||
OperationResult EditLegalForClient(EditEmployer command);
|
||||
#region Mahan
|
||||
|
||||
List<EmployerViewModel> GetEmployersHasWorkshop();
|
||||
#endregion
|
||||
#region NewByHeydari
|
||||
OperationResult DeleteEmployer(long id);
|
||||
List<EmployerViewModel> GetEmployerWithFNameOrLName(string searchText);
|
||||
|
||||
@@ -886,6 +886,14 @@ public class EmployerApplication : IEmployerApplication
|
||||
return opration.Succcedded();
|
||||
|
||||
}
|
||||
|
||||
#region Mahan
|
||||
public List<EmployerViewModel> GetEmployersHasWorkshop()
|
||||
{
|
||||
return _EmployerRepository.GetEmployersHasWorkshop();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region NewByHeydari
|
||||
|
||||
|
||||
|
||||
@@ -17,17 +17,17 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
public DateTime initial = new DateTime(1922, 01, 01, 00, 00, 00, 0000000);
|
||||
|
||||
|
||||
public EmployerRepository(CompanyContext context, IAuthHelper authHelper) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
_authHelper = authHelper;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public List<EmployerViewModel> GetEmployers()
|
||||
{
|
||||
return _context.Employers.Where(x=>x.IsActive==true).Select(x => new EmployerViewModel
|
||||
return _context.Employers.Where(x => x.IsActive == true).Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
|
||||
@@ -63,8 +63,8 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
Phone = x.Phone,
|
||||
AgentPhone = x.AgentPhone,
|
||||
Address = x.Address
|
||||
}).Where(x=> id.Contains(x.Id))
|
||||
.Where(x=>x.IsActive).ToList();
|
||||
}).Where(x => id.Contains(x.Id))
|
||||
.Where(x => x.IsActive).ToList();
|
||||
//var empList = new List<EmployerViewModel>();
|
||||
//foreach (var item in id)
|
||||
//{
|
||||
@@ -96,47 +96,47 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
public EditEmployer GetDetails(long id)
|
||||
{
|
||||
return _context.Employers.Select(x => new EditEmployer
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
ContractingPartyId = x.ContractingPartyId,
|
||||
Gender = x.Gender,
|
||||
Nationalcode = x.Nationalcode,
|
||||
IdNumber = x.IdNumber,
|
||||
Nationality = x.Nationality,
|
||||
FatherName = x.FatherName,
|
||||
DateOfBirth = x.DateOfBirth == initial ? "" : x.DateOfBirth.ToFarsi(),
|
||||
DateOfIssue = x.DateOfIssue == initial ? "" : x.DateOfIssue.ToFarsi(),
|
||||
PlaceOfIssue = x.PlaceOfIssue,
|
||||
RegisterId = x.RegisterId,
|
||||
NationalId = x.NationalId,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
Phone = x.Phone,
|
||||
AgentPhone = x.AgentPhone,
|
||||
Address = x.Address,
|
||||
MclsUserName = x.MclsUserName,
|
||||
MclsPassword = x.MclsPassword,
|
||||
EserviceUserName = x.EserviceUserName,
|
||||
EservicePassword = x.EservicePassword,
|
||||
TaxOfficeUserName = x.EservicePassword,
|
||||
SanaUserName = x.SanaUserName,
|
||||
SanaPassword = x.SanaPassword,
|
||||
EmployerNo = x.EmployerNo,
|
||||
FullName = x.FullName
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
ContractingPartyId = x.ContractingPartyId,
|
||||
Gender = x.Gender,
|
||||
Nationalcode = x.Nationalcode,
|
||||
IdNumber = x.IdNumber,
|
||||
Nationality = x.Nationality,
|
||||
FatherName = x.FatherName,
|
||||
DateOfBirth = x.DateOfBirth == initial ? "" : x.DateOfBirth.ToFarsi(),
|
||||
DateOfIssue = x.DateOfIssue == initial ? "" : x.DateOfIssue.ToFarsi(),
|
||||
PlaceOfIssue = x.PlaceOfIssue,
|
||||
RegisterId = x.RegisterId,
|
||||
NationalId = x.NationalId,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
Phone = x.Phone,
|
||||
AgentPhone = x.AgentPhone,
|
||||
Address = x.Address,
|
||||
MclsUserName = x.MclsUserName,
|
||||
MclsPassword = x.MclsPassword,
|
||||
EserviceUserName = x.EserviceUserName,
|
||||
EservicePassword = x.EservicePassword,
|
||||
TaxOfficeUserName = x.EservicePassword,
|
||||
SanaUserName = x.SanaUserName,
|
||||
SanaPassword = x.SanaPassword,
|
||||
EmployerNo = x.EmployerNo,
|
||||
FullName = x.FullName
|
||||
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
.FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
public List<EmprViewModel> GetEmployerByWorkshopId(long workshopId)
|
||||
{
|
||||
|
||||
|
||||
var emps = _context.WorkshopEmployers.Where(x=>x.WorkshopId == workshopId)
|
||||
|
||||
var emps = _context.WorkshopEmployers.Where(x => x.WorkshopId == workshopId)
|
||||
.Select(x => x.EmployerId).ToList();
|
||||
var employerlist = _context.Employers.Where(x => emps.Contains(x.id)).ToList();
|
||||
var employers = new List<EmprViewModel>();
|
||||
@@ -152,11 +152,11 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
IsLegal = element.IsLegal,
|
||||
LName = element.LName,
|
||||
IsBlockContractingParty = _context.PersonalContractingParties.FirstOrDefault(x => x.id == element.ContractingPartyId)?.IsBlock,
|
||||
};
|
||||
};
|
||||
employers.Add(employer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return employers;
|
||||
}
|
||||
@@ -164,26 +164,26 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
public List<EmployerViewModel> GetEmployerByContracrtingPartyID(long contractingPartyId)
|
||||
{
|
||||
return _context.Employers.Select(x => new EmployerViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
ContractingPartyID = x.ContractingPartyId,
|
||||
EmployerNo = x.EmployerNo,
|
||||
Nationalcode = x.Nationalcode,
|
||||
IdNumber = x.IdNumber,
|
||||
Nationality = x.Nationality,
|
||||
|
||||
RegisterId = x.RegisterId,
|
||||
NationalId = x.NationalId,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
|
||||
FullName = x.FName + " " +x.LName,
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
ContractingPartyID = x.ContractingPartyId,
|
||||
EmployerNo = x.EmployerNo,
|
||||
Nationalcode = x.Nationalcode,
|
||||
IdNumber = x.IdNumber,
|
||||
Nationality = x.Nationality,
|
||||
|
||||
RegisterId = x.RegisterId,
|
||||
NationalId = x.NationalId,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
|
||||
FullName = x.FName + " " + x.LName,
|
||||
|
||||
|
||||
|
||||
}).Where(x=>x.ContractingPartyID==contractingPartyId)
|
||||
}).Where(x => x.ContractingPartyID == contractingPartyId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -210,18 +210,18 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
Address = x.Address,
|
||||
EmployerNo = x.EmployerNo,
|
||||
HasContractingParty = x.ContractingPartyId == 30428 && workshopEmp.Any(n => n == x.id),
|
||||
HasBlockContractingParty = x.ContractingParty.IsBlock=="true",
|
||||
HasBlockContractingParty = x.ContractingParty.IsBlock == "true",
|
||||
});
|
||||
|
||||
if (searchModel.Id > 0)
|
||||
query = query.Where(x => x.Id == searchModel.Id);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.LName))
|
||||
query = query.Where(x => x.LName.Contains(searchModel.FName)|| x.FName.Contains(searchModel.LName));
|
||||
|
||||
query = query.Where(x => x.LName.Contains(searchModel.FName) || x.FName.Contains(searchModel.LName));
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.Nationalcode) && searchModel.Nationalcode != "0")
|
||||
query = query.Where(x => x.Nationalcode.Contains(searchModel.Nationalcode)|| x.NationalId.Contains(searchModel.Nationalcode));
|
||||
query = query.Where(x => x.Nationalcode.Contains(searchModel.Nationalcode) || x.NationalId.Contains(searchModel.Nationalcode));
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.IdNumber) && searchModel.IdNumber != "0")
|
||||
query = query.Where(x => x.IdNumber.Contains(searchModel.IdNumber) || x.RegisterId.Contains(searchModel.IdNumber));
|
||||
@@ -238,7 +238,7 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
|
||||
if (!string.IsNullOrEmpty(searchModel.ContactingPartyName))
|
||||
{
|
||||
var personalContractingPIds = _context.PersonalContractingParties.Where(x => !string.IsNullOrEmpty(x.FName) && (x.FName+" "+x.LName).Contains(searchModel.ContactingPartyName)).Select(x => x.id).ToList();
|
||||
var personalContractingPIds = _context.PersonalContractingParties.Where(x => !string.IsNullOrEmpty(x.FName) && (x.FName + " " + x.LName).Contains(searchModel.ContactingPartyName)).Select(x => x.id).ToList();
|
||||
query = query.Where(x => personalContractingPIds.Contains(x.ContractingPartyID));
|
||||
}
|
||||
|
||||
@@ -269,16 +269,16 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
public List<EmprViewModel> GetEmployerByEmployerIds(List<long> employerIds)
|
||||
{
|
||||
return _context.Employers.Select(x => new EmprViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
{
|
||||
Id = x.id,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
EmployerLName = x.EmployerLName,
|
||||
IsLegal = x.IsLegal,
|
||||
|
||||
//FullName = x.FName + " " + x.LName,
|
||||
//FullName = x.FName + " " + x.LName,
|
||||
|
||||
}).Where(x => employerIds.Contains(x.Id))
|
||||
}).Where(x => employerIds.Contains(x.Id))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -556,6 +556,20 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Mahan
|
||||
|
||||
public List<EmployerViewModel> GetEmployersHasWorkshop()
|
||||
{
|
||||
return _context.WorkshopEmployers.Include(x => x.Employer).Select(x =>
|
||||
new EmployerViewModel()
|
||||
{
|
||||
FullName = x.Employer.FullName,
|
||||
Id = x.Employer.id
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region NewByHeydari
|
||||
public OperationResult DeleteEmployer(long id)
|
||||
{
|
||||
@@ -575,10 +589,10 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
|
||||
public List<EmployerViewModel> GetEmployerWithFNameOrLName(string searchText)
|
||||
{
|
||||
var result = _context.Employers.Where(x => (!string.IsNullOrEmpty(x.FName) && x.FName.StartsWith(searchText))||
|
||||
var result = _context.Employers.Where(x => (!string.IsNullOrEmpty(x.FName) && x.FName.StartsWith(searchText)) ||
|
||||
(!string.IsNullOrEmpty(x.LName) && x.LName.StartsWith(searchText)) ||
|
||||
(x.IsLegal== "حقیقی" && (!string.IsNullOrEmpty(x.FName)&& !string.IsNullOrEmpty(x.LName)) &&
|
||||
(x.FName +" "+ x.LName).Contains(searchText)))
|
||||
(x.IsLegal == "حقیقی" && (!string.IsNullOrEmpty(x.FName) && !string.IsNullOrEmpty(x.LName)) &&
|
||||
(x.FName + " " + x.LName).Contains(searchText)))
|
||||
.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
@@ -606,7 +620,7 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
.Select(x => new EmployerViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
Nationalcode =(x.IsLegal== "حقیقی" ? x.Nationalcode:x.NationalId) ,
|
||||
Nationalcode = (x.IsLegal == "حقیقی" ? x.Nationalcode : x.NationalId),
|
||||
}).Take(100).ToList();
|
||||
|
||||
return result;
|
||||
@@ -619,12 +633,12 @@ public class EmployerRepository : RepositoryBase<long, Employer>, IEmployerRepos
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
|
||||
var employer = _context.Employers.FirstOrDefault(x => x.id == id);
|
||||
employer.DeActive();
|
||||
|
||||
var workshopIds = _context.WorkshopEmployers.Where(x => x.EmployerId==id).Select(x => x.WorkshopId).ToList();
|
||||
var workshopIds = _context.WorkshopEmployers.Where(x => x.EmployerId == id).Select(x => x.WorkshopId).ToList();
|
||||
var workshops = _context.Workshops.Where(x => workshopIds.Contains(x.id)).ToList();
|
||||
workshops.ForEach(x => x.DeActive(x.ArchiveCode));
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class WorkshopRepository : RepositoryBase<long, Company.Domain.WorkshopAg
|
||||
var AcountID = _authHelper.CurrentAccountId();
|
||||
//var workshopAcounts = _context.WorkshopAccounts.Where(x => x.AccountId == AcountID)
|
||||
// .Select(x => x.WorkshopId).ToList();
|
||||
var workshopAcountsList = _context.WorkshopAccounts.FromSqlInterpolated($"SelectQuery_WorkshopIdGetAccId {AcountID}").AsNoTracking().ToList();
|
||||
var workshopAcountsList = _context.WorkshopAccounts.Where(x => x.AccountId == AcountID);
|
||||
//var res = (e => contractData.Contains(e.Id))
|
||||
var workshopAcounts = workshopAcountsList.Select(x => x.WorkshopId).ToList();
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@
|
||||
<a permission="30710" id="btnPopModal" href="#showmodal=@Url.Page("/Company/InstitutionContracts/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> ایجاد قرارداد </a>
|
||||
</p>
|
||||
@*<input type="hidden" id="sercheCheck" value="@Model.WorkshopSearch" />*@
|
||||
|
||||
|
||||
@*href="#showmodal=@Url.Page("./Index", "PrintAll", new {ids = idss})"*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _0_Framework.Application;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
@@ -12,6 +13,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using PersianTools.Core;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
//using iText.Html2pdf;
|
||||
//using iText.IO.Source;
|
||||
//using iText.Kernel.Geom;
|
||||
@@ -72,6 +74,8 @@ public class IndexModel : PageModel
|
||||
public string Message { get; set; }
|
||||
|
||||
|
||||
[SuppressMessage("ReSharper.DPA", "DPA0006: Large number of DB commands", MessageId = "count: 270")]
|
||||
[SuppressMessage("ReSharper.DPA", "DPA0007: Large number of DB records", MessageId = "count: 16092")]
|
||||
public void OnGet(InstitutionContractSearchModel searchModel)
|
||||
{
|
||||
//var test = _institutionContract.NewSearch(searchModel);
|
||||
@@ -96,7 +100,57 @@ public class IndexModel : PageModel
|
||||
SumOfAmounts = totalAmounts.ToMoney();
|
||||
TotalBalance = totalBalance.ToMoney();
|
||||
}
|
||||
// اصلاح شماره تماس ها
|
||||
#region CorrectionContactInfo
|
||||
|
||||
public IActionResult OnGetCorrection()
|
||||
{
|
||||
var getNewContarcts = _institutionContract.NewSearch(new InstitutionContractSearchModel() { });
|
||||
foreach (var newContracts in getNewContarcts)
|
||||
{
|
||||
var deActiveContracts = _institutionContract.NewSearch(new InstitutionContractSearchModel()
|
||||
{ ContractingPartyId = newContracts.ContractingPartyId, IsActiveString = "false" });
|
||||
Thread.Sleep(100);
|
||||
if (deActiveContracts.Count > 0)
|
||||
{
|
||||
var newContactInfo = _contactInfoApplication.GetContactInfolist(newContracts.Id);
|
||||
foreach (var deactive in deActiveContracts)
|
||||
{
|
||||
|
||||
_contactInfoApplication.RemoveContactInfo(deactive.Id);
|
||||
foreach (var phone in newContactInfo)
|
||||
{
|
||||
if (phone.PhoneNumber != null)
|
||||
{
|
||||
var contactinfo = new CreateContactInfo
|
||||
{
|
||||
InstitutionContractId = deactive.Id,
|
||||
PhoneType = phone.PhoneType,
|
||||
Position = phone.Position,
|
||||
PhoneNumber = phone.PhoneNumber,
|
||||
FnameLname = phone.FnameLname,
|
||||
SendSms = phone.SendSms,
|
||||
};
|
||||
_contactInfoApplication.Create(contactinfo);
|
||||
Console.WriteLine(phone.PhoneNumber);
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public IActionResult OnPostContractingParties(long id)
|
||||
{
|
||||
@@ -379,11 +433,39 @@ public class IndexModel : PageModel
|
||||
//if (string.IsNullOrWhiteSpace(command.HasValueAddedTax))
|
||||
// command.HasValueAddedTax = "false";
|
||||
var result = _institutionContract.Edit(command);
|
||||
var contractingPartyId = _institutionContract.GetDetails(result.SendId);
|
||||
var counter = command.ContactInformationList.Count;
|
||||
var getOldContarct = _institutionContract.NewSearch(new InstitutionContractSearchModel()
|
||||
{ ContractingPartyId = contractingPartyId.ContractingPartyId, IsActiveString = "both" }).Where(x=>x.IsActiveString == "false" || x.IsActiveString == "blue").ToList();
|
||||
if (result.IsSuccedded && counter > 0)
|
||||
{
|
||||
_contactInfoApplication.RemoveContactInfo(command.Id);
|
||||
|
||||
if (getOldContarct.Count > 0)
|
||||
{
|
||||
foreach (var item in getOldContarct)
|
||||
{
|
||||
_contactInfoApplication.RemoveContactInfo(item.Id);
|
||||
foreach (var phone in command.ContactInformationList)
|
||||
{
|
||||
if (phone.PhoneNumber != null)
|
||||
{
|
||||
var contactinfo = new CreateContactInfo
|
||||
{
|
||||
InstitutionContractId = item.Id,
|
||||
PhoneType = phone.PhoneType,
|
||||
Position = phone.Position,
|
||||
PhoneNumber = phone.PhoneNumber,
|
||||
FnameLname = phone.FnameLname,
|
||||
SendSms = phone.SendSmsString == "true" ? true : false
|
||||
};
|
||||
_contactInfoApplication.Create(contactinfo);
|
||||
}
|
||||
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
_contactInfoApplication.RemoveContactInfo(command.Id);
|
||||
foreach (var item in command.ContactInformationList)
|
||||
{
|
||||
if (item.PhoneNumber != null)
|
||||
@@ -585,6 +667,7 @@ public class IndexModel : PageModel
|
||||
var result = _institutionContract.Extension(command);
|
||||
|
||||
if (result.IsSuccedded && counter > 0)
|
||||
{
|
||||
for (var i = 0; i <= counter - 1; i++)
|
||||
{
|
||||
if (command.ContactInformationList[i].PhoneNumber != null)
|
||||
@@ -603,13 +686,47 @@ public class IndexModel : PageModel
|
||||
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
_institutionContract.DeActive(command.PrviousContractId);
|
||||
_institutionContract.ReActiveAllAfterCreateNew(command.ContractingPartyId);
|
||||
}
|
||||
var contractingPartyId = _institutionContract.GetDetails(result.SendId);
|
||||
|
||||
var getOldContarct = _institutionContract.NewSearch(new InstitutionContractSearchModel()
|
||||
{ ContractingPartyId = contractingPartyId.ContractingPartyId, IsActiveString = "both" }).Where(x => x.IsActiveString == "false" || x.IsActiveString == "blue").ToList();
|
||||
if (result.IsSuccedded && counter > 0)
|
||||
{
|
||||
|
||||
if (getOldContarct.Count > 0)
|
||||
{
|
||||
foreach (var item in getOldContarct)
|
||||
{
|
||||
_contactInfoApplication.RemoveContactInfo(item.Id);
|
||||
foreach (var phone in command.ContactInformationList)
|
||||
{
|
||||
if (phone.PhoneNumber != null)
|
||||
{
|
||||
var contactinfo = new CreateContactInfo
|
||||
{
|
||||
InstitutionContractId = item.Id,
|
||||
PhoneType = phone.PhoneType,
|
||||
Position = phone.Position,
|
||||
PhoneNumber = phone.PhoneNumber,
|
||||
FnameLname = phone.FnameLname,
|
||||
SendSms = phone.SendSmsString == "true" ? true : false
|
||||
};
|
||||
_contactInfoApplication.Create(contactinfo);
|
||||
}
|
||||
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new JsonResult(result);
|
||||
}
|
||||
|
||||
@@ -1,258 +1,305 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Task.CreateModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model CreateModel
|
||||
|
||||
@{
|
||||
ViewData["title"] = " - وظیفه جدید";
|
||||
}
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
|
||||
@section Styles {
|
||||
<link href="~/assetsclient/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/create.css?ver=@Version.AdminVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<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.png" alt="" class="img-fluid me-2" style="width: 45px;"/>
|
||||
<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.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">کارگاه نورداد مهر گستر کاسپین</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">وظایف جدید</h4>
|
||||
<div class="title d-flex align-items-center">کارگاه نورداد مهر گستر کاسپین</div>
|
||||
<a asp-page="/Company/Task/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/Task/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="row p-0">
|
||||
<div class="card tm-create p-2">
|
||||
<div class="col-12">
|
||||
<!-- List Items -->
|
||||
<div class="row p-0">
|
||||
<div class="card tm-create p-2">
|
||||
<div class="col-12">
|
||||
|
||||
<form role="form" method="post" id="create-form" enctype="multipart/form-data" autocomplete="off">
|
||||
@* <input type="hidden" asp-for="Command.SenderId" value="@Model.SenderId" /> *@
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div permission="90310" class="form-check form-checked selectRadioBox">
|
||||
<input class="form-check-input" type="radio" name="selectMemberOrGroup" id="memberSelect">
|
||||
<label class="form-check-label" for="memberSelect">
|
||||
انتخاب اعضاء
|
||||
</label>
|
||||
</div>
|
||||
<div permission="90311" class="form-check form-checked selectRadioBox">
|
||||
<input class="form-check-input" type="radio" name="selectMemberOrGroup" id="groupSelect">
|
||||
<label class="form-check-label" for="groupSelect">
|
||||
انتخاب گروهی
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="from-group" id="select2MemberList">
|
||||
<select class="form-select select2Member disable" multiple="multiple" asp-for="Command.ReceiverId" disabled="disabled">
|
||||
<option value="@Model.Id">خودم</option>
|
||||
|
||||
@foreach (var item in Model.AccountsList)
|
||||
{
|
||||
<option value="@item.Value">@item.Text</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="from-group" id="select2GroupList" style="display: none">
|
||||
<select class="form-select select2Group disable" multiple="multiple" asp-for="Command.PositionId" disabled="disabled">
|
||||
@foreach (var item in Model.PositionViewModels)
|
||||
{
|
||||
<option value="@item.Id">@item.Name</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" asp-for="Command.ContractingPartyName" id="partyNameSearch" class="form-control" autocomplete="off" placeholder="طرف حساب" onkeyup="searchPartyNameTask()">
|
||||
<div id="partyName" class="selectDiv">
|
||||
<ul class="searchResult" id="searchResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="from-group my-1 position-relative">
|
||||
<input type="text" asp-for="Command.Title" class="form-control m-0 TaskTitleSearch" placeholder="عنوان وظیفه" onkeyup="searchSubjectTask()">
|
||||
<div permission="90313" class="position-absolute" style="top: 3px; left:3px; cursor: pointer;" onclick="taskSubjectModal()">
|
||||
<div class="btn-add2">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L12 18" stroke="#ffffff" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M18 12L6 12" stroke="#ffffff" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div id="TaskTitle" class="selectTitleDiv">
|
||||
<ul id="searchTitleResult" class="searchTitleResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="from-group">
|
||||
@* <input asp-for="Command.EndTaskDate" type="text" id="EndTaskDate" value="@Model.DateFa" class="form-control text-center date" placeholder="تاریخ"> *@
|
||||
<input asp-for="Command.EndTaskDate" type="text" id="EndTaskDate" value="" class="form-control text-center date" placeholder="تاریخ" onkeyup="CheckHoliday()">
|
||||
<div class="w-100 text-center" id="HolidayError" style="display: none; font-size: 11px; color: red; ">اخطار: تاریخ وارد شده تعطیل رسمی است</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-4 pe-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="today" style="margin:0 2px">امروز</label>
|
||||
<form role="form" method="post" id="create-form" enctype="multipart/form-data" autocomplete="off">
|
||||
@* <input type="hidden" asp-for="Command.SenderId" value="@Model.SenderId" /> *@
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div permission="90310" class="form-check form-checked selectRadioBox">
|
||||
<input class="form-check-input" type="radio" name="selectMemberOrGroup" id="memberSelect">
|
||||
<label class="form-check-label" for="memberSelect">
|
||||
انتخاب اعضاء
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-4 p-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="tommorow" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="tommorow" style="margin:0 2px">فردا</label>
|
||||
<div permission="90311" class="form-check form-checked selectRadioBox">
|
||||
<input class="form-check-input" type="radio" name="selectMemberOrGroup" id="groupSelect">
|
||||
<label class="form-check-label" for="groupSelect">
|
||||
انتخاب گروهی
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-4 ps-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="two-day-later" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="two-day-later" style="margin:0 2px">پس فردا</label>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="from-group" id="select2MemberList">
|
||||
<select class="form-select select2Member disable" multiple="multiple" asp-for="Command.ReceiverId" disabled="disabled">
|
||||
<option value="@Model.Id">خودم</option>
|
||||
|
||||
@foreach (var item in Model.AccountsList)
|
||||
{
|
||||
<option value="@item.Value">@item.Text</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="from-group" id="select2GroupList" style="display: none">
|
||||
<select class="form-select select2Group disable" multiple="multiple" asp-for="Command.PositionId" disabled="disabled">
|
||||
@foreach (var item in Model.PositionViewModels)
|
||||
{
|
||||
<option value="@item.Id">@item.Name</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="from-group">
|
||||
<input asp-for="Command.EndTaskTime" id="EndTaskTime" type="text" class="form-control text-center" placeholder="00:00">
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" asp-for="Command.ContractingPartyName" id="partyNameSearch" class="form-control" autocomplete="off" placeholder="طرف حساب" onkeyup="searchPartyNameTask()">
|
||||
<div id="partyName" class="selectDiv">
|
||||
<ul class="searchResult" id="searchResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="from-group my-1 position-relative">
|
||||
<input type="text" asp-for="Command.Title" class="form-control m-0 TaskTitleSearch" placeholder="عنوان وظیفه" onkeyup="searchSubjectTask()">
|
||||
<div permission="90313" class="position-absolute" style="top: 3px; left:3px; cursor: pointer;" onclick="taskSubjectModal()">
|
||||
<div class="btn-add2">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L12 18" stroke="#ffffff" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M18 12L6 12" stroke="#ffffff" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div id="TaskTitle" class="selectTitleDiv">
|
||||
<ul id="searchTitleResult" class="searchTitleResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="from-group">
|
||||
@* <input asp-for="Command.EndTaskDate" type="text" id="EndTaskDate" value="@Model.DateFa" class="form-control text-center date" placeholder="تاریخ"> *@
|
||||
<input asp-for="Command.EndTaskDate" type="text" id="EndTaskDate" value="" class="form-control text-center date" placeholder="تاریخ" onkeyup="CheckHoliday()">
|
||||
<div class="w-100 text-center" id="HolidayError" style="display: none; font-size: 11px; color: red; ">اخطار: تاریخ وارد شده تعطیل رسمی است</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-4 pe-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="today" style="margin:0 2px">امروز</label>
|
||||
</div>
|
||||
<div class="col-4 p-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="tommorow" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="tommorow" style="margin:0 2px">فردا</label>
|
||||
</div>
|
||||
<div class="col-4 ps-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="two-day-later" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="two-day-later" style="margin:0 2px">پس فردا</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="from-group">
|
||||
<input asp-for="Command.EndTaskTime" id="EndTaskTime" type="text" class="form-control text-center" placeholder="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* <div class="col-5 col-md-4">
|
||||
@* <div class="col-5 col-md-4">
|
||||
<span class="sumDays">مهلت زمانی: </span>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="Command.Description" id="Command_Description" class="tm-textarea p-2" rows="5" placeholder="توضیحات ..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file" id="upload-doc" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 5C5 3.89543 5.89543 3 7 3H11.75C11.8881 3 12 3.11193 12 3.25V8C12 9.10457 12.8954 10 14 10H18.75C18.8881 10 19 10.1119 19 10.25V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V5Z" fill="white"/>
|
||||
<path d="M13 8V3.60355C13 3.38083 13.2693 3.26929 13.4268 3.42678L18.5732 8.57322C18.7307 8.73071 18.6192 9 18.3964 9H14C13.4477 9 13 8.55228 13 8Z" fill="#29B4B4"/>
|
||||
<path d="M12 11.5V17.5" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
<path d="M9 14.5H15" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>بارگذاری تصاویر و مدارک</span>
|
||||
</button>
|
||||
|
||||
<input type="file" class="d-none" asp-for="Command.Document1" id="Command_Document1" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" asp-for="Command.Document2" id="Command_Document2" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" asp-for="Command.Document3" id="Command_Document3" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" asp-for="Command.Document4" id="Command_Document4" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" asp-for="Command.Document5" id="Command_Document5" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" asp-for="Command.Document6" id="Command_Document6" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mx-1" id="upload-container-doc">
|
||||
<div class="upload-box empty inBox1"></div>
|
||||
<div class="upload-box empty inBox2"></div>
|
||||
<div class="upload-box empty inBox3"></div>
|
||||
<div class="upload-box empty inBox4"></div>
|
||||
<div class="upload-box empty inBox5"></div>
|
||||
<div class="upload-box empty inBox6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file record_btn" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
<input type="file" class="d-none" asp-for="Command.Voice" id="Command_Voice">
|
||||
<div class="d-flex justify-content-between align-items-center mx-1" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty" id="msg_box"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="Command.Description" id="Command_Description" class="tm-textarea p-2" rows="5" placeholder="توضیحات ..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-center">
|
||||
<a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button">
|
||||
<span>انصراف</span>
|
||||
</a>
|
||||
<button type="button" id="save" class="btn-tm-save m-1 position-relative loadingButton">
|
||||
<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 class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file" id="upload-doc" type="submit">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 5C5 3.89543 5.89543 3 7 3H11.75C11.8881 3 12 3.11193 12 3.25V8C12 9.10457 12.8954 10 14 10H18.75C18.8881 10 19 10.1119 19 10.25V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V5Z" fill="white"/>
|
||||
<path d="M13 8V3.60355C13 3.38083 13.2693 3.26929 13.4268 3.42678L18.5732 8.57322C18.7307 8.73071 18.6192 9 18.3964 9H14C13.4477 9 13 8.55228 13 8Z" fill="#29B4B4"/>
|
||||
<path d="M12 11.5V17.5" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
<path d="M9 14.5H15" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>بارگذاری تصاویر و مدارک</span>
|
||||
</button>
|
||||
|
||||
<input type="file" class="d-none" id="Command_Document1" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" id="Command_Document2" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" id="Command_Document3" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" id="Command_Document4" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" id="Command_Document5" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<input type="file" class="d-none" id="Command_Document6" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mx-1" id="upload-container-doc">
|
||||
<div class="upload-box empty inBox1 loadingButton">
|
||||
|
||||
<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 class="upload-box empty inBox2 loadingButton">
|
||||
|
||||
<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 class="upload-box empty inBox3 loadingButton">
|
||||
|
||||
<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 class="upload-box empty inBox4 loadingButton">
|
||||
|
||||
<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 class="upload-box empty inBox5 loadingButton">
|
||||
|
||||
<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 class="upload-box empty inBox6 loadingButton">
|
||||
|
||||
<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 class="col-12 col-lg-11 col-xl-9">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file record_btn" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
<input type="file" class="d-none" id="Command_Voice">
|
||||
<div class="d-flex justify-content-between align-items-center mx-1" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty loadingButton" id="msg_box">
|
||||
|
||||
<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 id="fileItems" style="display: none"></div>
|
||||
<div id="voiceItem" style="display: none"></div>
|
||||
</div>
|
||||
</button>
|
||||
@* <a href="#" id="save" class="btn-tm-save">ارسال</a> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-center">
|
||||
@* <a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button"> *@
|
||||
<button id="cancel" class="btn-tm-cancel m-1 text-white" type="button">
|
||||
<span>انصراف</span>
|
||||
</button>
|
||||
<button type="button" id="save" class="btn-tm-save m-1 position-relative loadingButton">
|
||||
<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>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End List Items -->
|
||||
|
||||
|
||||
<!-- مودال -->
|
||||
<div class="modal fade assignTo" id="MainModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="assignToLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xl-taskTime modal-dialog-centered">
|
||||
<div class="w-100" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog modal-xl-taskTime modal-dialog-centered">
|
||||
<div class="w-100" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- مودال -->
|
||||
|
||||
@section Script {
|
||||
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var createTaskSaveAjax = '@Url.Page("/Company/Task/Create", "CreateSaveTask")';
|
||||
var searchContractingPartiesAjax = '@Url.Page("./Create", "SearchContractingParties")';
|
||||
var searchTaskSubject = '@Url.Page("./Create", "SearchTaskSubject")';
|
||||
var taskSubject = '@Url.Page("/Company/Task/Create", "TaskSubject")';
|
||||
var checkIsHolidayAjax = '@Url.Page("./Create", "CheckHoliday")';
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var createTaskSaveAjax = '@Url.Page("/Company/Task/Create", "CreateSaveTask")';
|
||||
var searchContractingPartiesAjax = '@Url.Page("./Create", "SearchContractingParties")';
|
||||
var searchTaskSubject = '@Url.Page("./Create", "SearchTaskSubject")';
|
||||
var taskSubject = '@Url.Page("/Company/Task/Create", "TaskSubject")';
|
||||
var checkIsHolidayAjax='@Url.Page("./Create", "CheckHoliday")';
|
||||
var uploadFileAjax = '@Url.Page("/Company/Task/Create", "UploadFile")';
|
||||
var deleteFileAjax = '@Url.Page("./Create", "DeleteFile")';
|
||||
var deleteAllFilesAjax = '@Url.Page("./Create", "RemoveAllTempFiles")';
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/create.js?ver=@Version.StyleVersion"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Globalization;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountManagement.Application.Contracts.Position;
|
||||
using AccountManagement.Application.Contracts.Task;
|
||||
@@ -7,269 +6,341 @@ using AccountManagement.Application.Contracts.TaskSubject;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.HolidayItem;
|
||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Company.Domain.HolidayAgg;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.Task;
|
||||
|
||||
[Authorize]
|
||||
public class CreateModel : PageModel
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
{
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly IHolidayItemApplication _holidayItemApplication;
|
||||
private readonly IPersonalContractingPartyApp _personalContractingPartyApp;
|
||||
private readonly IPositionApplication _positionApplication;
|
||||
private readonly ITaskApplication _taskApplication;
|
||||
private readonly ITaskSubjectApplication _taskSubjectApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
public string DateFa;
|
||||
|
||||
public CreateModel(ITaskApplication taskApplication, IAccountApplication accountApplication,
|
||||
IPersonalContractingPartyApp personalContractingPartyApp, IAuthHelper authHelper,
|
||||
IPersonalContractingPartyApp contractingPartyApp, IPositionApplication positionApplication,
|
||||
ITaskSubjectApplication taskSubjectApplication, IWebHostEnvironment webHostEnvironment,
|
||||
IHolidayApplication holidayApplication, IHolidayItemApplication holidayItemApplication)
|
||||
{
|
||||
_taskApplication = taskApplication;
|
||||
_accountApplication = accountApplication;
|
||||
_personalContractingPartyApp = personalContractingPartyApp;
|
||||
_authHelper = authHelper;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_positionApplication = positionApplication;
|
||||
_taskSubjectApplication = taskSubjectApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_holidayItemApplication = holidayItemApplication;
|
||||
}
|
||||
|
||||
public CreateTask Command { get; set; }
|
||||
public SelectList AccountsList { get; set; }
|
||||
public List<PositionViewModel> PositionViewModels { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
var positionValue = _authHelper.CurrentAccountInfo().PositionValue == null
|
||||
? 0
|
||||
: _authHelper.CurrentAccountInfo().PositionValue;
|
||||
|
||||
if (positionValue > 0)
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x => x == 903))
|
||||
{
|
||||
var accounts = _accountApplication.GetAccountLowerPositionvalue();
|
||||
AccountsList = new SelectList(accounts, "Id", "Fullname");
|
||||
PositionViewModels = _positionApplication.GetLowerPosition();
|
||||
DateFa = DateTime.Now.ToFarsi();
|
||||
Id = _authHelper.CurrentAccountId();
|
||||
return Page();
|
||||
}
|
||||
|
||||
return Forbid();
|
||||
}
|
||||
|
||||
return Forbid();
|
||||
}
|
||||
[Authorize]
|
||||
public class CreateModel : PageModel
|
||||
{
|
||||
private readonly ITaskApplication _taskApplication;
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly IPositionApplication _positionApplication;
|
||||
private readonly ITaskSubjectApplication _taskSubjectApplication;
|
||||
private readonly IHolidayItemApplication _holidayItemApplication;
|
||||
private readonly IEmployerApplication _employerApplication;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
|
||||
|
||||
public IActionResult OnPostCreateSaveTask(CreateTask Command)
|
||||
{
|
||||
Command.SenderId = _authHelper.CurrentAccountId();
|
||||
var result = _taskApplication.CreateTask(Command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public CreateModel(ITaskApplication taskApplication, IAccountApplication accountApplication, IPersonalContractingPartyApp personalContractingPartyApp, IAuthHelper authHelper, IPersonalContractingPartyApp contractingPartyApp, IPositionApplication positionApplication, ITaskSubjectApplication taskSubjectApplication, IWebHostEnvironment webHostEnvironment, IHolidayApplication holidayApplication, IHolidayItemApplication holidayItemApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication)
|
||||
{
|
||||
_taskApplication = taskApplication;
|
||||
_accountApplication = accountApplication;
|
||||
_authHelper = authHelper;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_positionApplication = positionApplication;
|
||||
_taskSubjectApplication = taskSubjectApplication;
|
||||
_holidayItemApplication = holidayItemApplication;
|
||||
_employerApplication = employerApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
}
|
||||
|
||||
public IActionResult OnGetSearchContractingParties(string searchName)
|
||||
{
|
||||
var list = new List<string>();
|
||||
var contractingParties = _contractingPartyApp.SearchByName(searchName);
|
||||
public CreateTask Command { get; set; }
|
||||
public SelectList AccountsList { get; set; }
|
||||
public List<PositionViewModel> PositionViewModels { get; set; }
|
||||
public long Id { get; set; }
|
||||
public string DateFa;
|
||||
|
||||
//var test =list.Join(contractingParties, x=>x , c=>c,(first, second)=> new string(first=second)).ToList();
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
var positionValue = _authHelper.CurrentAccountInfo().PositionValue == null
|
||||
? 0
|
||||
: _authHelper.CurrentAccountInfo().PositionValue;
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true, list
|
||||
});
|
||||
}
|
||||
if (positionValue > 0)
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x => x == 903))
|
||||
{
|
||||
var accounts = _accountApplication.GetAccountLowerPositionvalue();
|
||||
AccountsList = new SelectList(accounts, "Id", "Fullname");
|
||||
PositionViewModels = _positionApplication.GetLowerPosition();
|
||||
DateFa = DateTime.Now.ToFarsi();
|
||||
Id = _authHelper.CurrentAccountId();
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Forbid();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return Forbid();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// برای باز کردن مودال عنوان دلبخواه
|
||||
public IActionResult OnGetTaskSubject()
|
||||
{
|
||||
return Partial("CreateCRUDTaskSubjectModal");
|
||||
}
|
||||
public IActionResult OnPostCreateSaveTask(CreateTask Command)
|
||||
{
|
||||
Command.SenderId = _authHelper.CurrentAccountId();
|
||||
Command.Description = Command.Description?.Replace("\n", "<br>");
|
||||
var result = _taskApplication.CreateTask(Command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
// برای گرفتن عنوان دلبخواه
|
||||
public IActionResult OnGetListTaskSubject()
|
||||
{
|
||||
var result = _taskSubjectApplication.GetAll("").OrderByDescending(x => x.Id);
|
||||
return new JsonResult(new
|
||||
{
|
||||
result
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetSearchContractingParties(string searchName)
|
||||
{
|
||||
var list = new List<string>();
|
||||
var contractingParties = _contractingPartyApp.SearchByName(searchName);
|
||||
var employers = _employerApplication.GetEmployersHasWorkshop().Select(x => x.FullName).ToList();
|
||||
var workshops = _workshopApplication.GetWorkshopAll().Select(x => x.WorkshopFullName).ToList();
|
||||
|
||||
list.Capacity = list.Count + contractingParties.Count + employers.Count + workshops.Count;
|
||||
list.AddRange(contractingParties);
|
||||
list.AddRange(employers);
|
||||
list.AddRange(workshops);
|
||||
|
||||
|
||||
// برای ذخیره عنوان دلبخواه
|
||||
public IActionResult OnPostCreateTaskSubject(string subject)
|
||||
{
|
||||
var result = _taskSubjectApplication.Create(subject);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
// برای ویرایش عنوان دلبخواه
|
||||
public IActionResult OnPostEditTaskSubject(long id, string subject)
|
||||
{
|
||||
var model = new TaskSubjectViewModel
|
||||
{
|
||||
Id = id,
|
||||
Subject = subject
|
||||
};
|
||||
var result = _taskSubjectApplication.Edit(model);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
// برای حذف عنوان دلبخواه
|
||||
public IActionResult OnPostRemoveTaskSubject(long id)
|
||||
{
|
||||
var result = _taskSubjectApplication.Delete(id);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
list = list.GroupBy(x=>x).Select(x=>x.First()),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetSearchTaskSubject(string searchSubject)
|
||||
{
|
||||
var list = _taskSubjectApplication.GetAll(searchSubject);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true, list
|
||||
});
|
||||
}
|
||||
// برای محاسبه تاریخ و ساعت
|
||||
#region ComputeDay
|
||||
//public IActionResult OnGetComputeDay(string date, string time)
|
||||
//{
|
||||
|
||||
public IActionResult OnGetCheckHoliday(string time)
|
||||
{
|
||||
var dateTime = time.ToGeorgianDateTime().Date;
|
||||
var errorDate = new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
var operation = new OperationResult();
|
||||
if (dateTime == errorDate)
|
||||
{
|
||||
operation.Failed("لطفا تاریخ خود را به درستی وارد کنید");
|
||||
return new JsonResult(new
|
||||
{
|
||||
operation.IsSuccedded,
|
||||
operation.Message,
|
||||
isHoliday = false
|
||||
});
|
||||
}
|
||||
// if (string.IsNullOrWhiteSpace(time))
|
||||
// {
|
||||
// time = "23:59";
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(date))
|
||||
// {
|
||||
// var endTime = Convert.ToDateTime(time);
|
||||
// var dateDeadline = date.ToGeorgianDateTime();
|
||||
// dateDeadline = dateDeadline.AddHours(endTime.Hour).AddMinutes(endTime.Minute);
|
||||
|
||||
var isHoliday = _holidayItemApplication.GetHoliday(dateTime);
|
||||
// var dateNow = DateTime.Now;
|
||||
|
||||
operation.Succcedded();
|
||||
return new JsonResult(new
|
||||
{
|
||||
operation.IsSuccedded,
|
||||
isHoliday
|
||||
});
|
||||
}
|
||||
// if (dateDeadline > dateNow)
|
||||
// {
|
||||
// var daysSpan = ((dateDeadline.Date - dateNow.Date).TotalDays);
|
||||
|
||||
|
||||
// برای محاسبه تاریخ و ساعت
|
||||
|
||||
#region ComputeDay
|
||||
|
||||
//public IActionResult OnGetComputeDay(string date, string time)
|
||||
//{
|
||||
|
||||
// if (string.IsNullOrWhiteSpace(time))
|
||||
// {
|
||||
// time = "23:59";
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(date))
|
||||
// {
|
||||
// var endTime = Convert.ToDateTime(time);
|
||||
// var dateDeadline = date.ToGeorgianDateTime();
|
||||
// dateDeadline = dateDeadline.AddHours(endTime.Hour).AddMinutes(endTime.Minute);
|
||||
|
||||
// var dateNow = DateTime.Now;
|
||||
|
||||
// if (dateDeadline > dateNow)
|
||||
// {
|
||||
// var daysSpan = ((dateDeadline.Date - dateNow.Date).TotalDays);
|
||||
// if (!string.IsNullOrWhiteSpace(time))
|
||||
// {
|
||||
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(time))
|
||||
// {
|
||||
// var hourlyDate = dateDeadline.ToLocalTime() - DateTime.Now.ToLocalTime();
|
||||
// var hours = dateDeadline.Hour - DateTime.Now.Hour;
|
||||
|
||||
|
||||
// var hourlyDate = dateDeadline.ToLocalTime() - DateTime.Now.ToLocalTime();
|
||||
// var hours = dateDeadline.Hour - DateTime.Now.Hour;
|
||||
// if (hours > 0&& (int)daysSpan > 0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز " + hours + " " + "ساعت ",
|
||||
// });
|
||||
// }
|
||||
// else if (hours == 0&&(int)daysSpan>0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز "
|
||||
// });
|
||||
// }
|
||||
// else if (hours>0&& (int)daysSpan == 0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{hours} ساعت",
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
// if (hours > 0&& (int)daysSpan > 0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز " + hours + " " + "ساعت ",
|
||||
// });
|
||||
// }
|
||||
// else if (hours == 0&&(int)daysSpan>0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز "
|
||||
// });
|
||||
// }
|
||||
// else if (hours>0&& (int)daysSpan == 0)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{hours} ساعت",
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز",
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// status = false,
|
||||
// res = "مهلت انجام پروژه نمی تواند کوچکتر از گذشته باشد.",
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = "",
|
||||
// });
|
||||
//}
|
||||
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = $"{(int)daysSpan} روز",
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// status = false,
|
||||
// res = "مهلت انجام پروژه نمی تواند کوچکتر از گذشته باشد.",
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// res = "",
|
||||
// });
|
||||
//}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
// برای باز کردن مودال عنوان دلبخواه
|
||||
public IActionResult OnGetTaskSubject()
|
||||
{
|
||||
|
||||
return Partial("CreateCRUDTaskSubjectModal");
|
||||
}
|
||||
|
||||
// برای گرفتن عنوان دلبخواه
|
||||
public IActionResult OnGetListTaskSubject()
|
||||
{
|
||||
var result = _taskSubjectApplication.GetAll("").OrderByDescending(x => x.Id);
|
||||
return new JsonResult(new
|
||||
{
|
||||
result
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// برای ذخیره عنوان دلبخواه
|
||||
public IActionResult OnPostCreateTaskSubject(string subject)
|
||||
{
|
||||
var result = _taskSubjectApplication.Create(subject);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
// برای ویرایش عنوان دلبخواه
|
||||
public IActionResult OnPostEditTaskSubject(long id, string subject)
|
||||
{
|
||||
var model = new TaskSubjectViewModel()
|
||||
{
|
||||
Id = id,
|
||||
Subject = subject
|
||||
};
|
||||
var result = _taskSubjectApplication.Edit(model);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
// برای حذف عنوان دلبخواه
|
||||
public IActionResult OnPostRemoveTaskSubject(long id)
|
||||
{
|
||||
var result = _taskSubjectApplication.Delete(id);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetSearchTaskSubject(string searchSubject)
|
||||
{
|
||||
var list = _taskSubjectApplication.GetAll(searchSubject);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
list = list,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCheckHoliday(string time)
|
||||
{
|
||||
|
||||
var dateTime = time.ToGeorgianDateTime().Date;
|
||||
var errorDate = new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
var operation = new OperationResult();
|
||||
if (dateTime == errorDate)
|
||||
{
|
||||
operation.Failed("لطفا تاریخ خود را به درستی وارد کنید");
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
Message = operation.Message,
|
||||
isHoliday = false
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
var isFriday = (dateTime.DayOfWeek == DayOfWeek.Friday);
|
||||
var isHoliday = _holidayItemApplication.GetHoliday(dateTime);
|
||||
if (isFriday)
|
||||
{
|
||||
operation.Succcedded();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
isHoliday=true
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
isHoliday
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostUploadFile(IFormFile media)
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var operation = _taskApplication.UploadMedia(media, accountId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
message = operation.Message,
|
||||
id = operation.SendId,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostDeleteFile(long mediaId)
|
||||
{
|
||||
var operation = _taskApplication.RemoveMedia(mediaId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
message = operation.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveAllTempFiles()
|
||||
{
|
||||
var accId = _authHelper.CurrentAccountId();
|
||||
var operation = new OperationResult();
|
||||
_taskApplication.RemoveTempUploadedFiles(accId);
|
||||
operation.Succcedded();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = operation.IsSuccedded,
|
||||
message = operation.Message,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<!-- sweet alerts -->
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
|
||||
|
||||
<!-- sweet alerts -->
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
@@ -10,56 +14,57 @@
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">لیست عنوان دلبخواه</h5>
|
||||
</div>
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">لیست عنوان دلبخواه</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-12">
|
||||
<div permission="90314" class="d-flex align-items-center justify-content-between mb-3">
|
||||
<div class="from-group w-100">
|
||||
<input type="text" id="NewSubject" class="form-control" placeholder="عنوان جدید">
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-12">
|
||||
<div permission="90314" class="d-flex align-items-center justify-content-between mb-3">
|
||||
<div class="from-group w-100">
|
||||
<input type="text" id="NewSubject" class="form-control" placeholder="عنوان جدید">
|
||||
</div>
|
||||
|
||||
<div class="from-group">
|
||||
<button class="btn-add" id="btn-add">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L12 18" stroke="#ffffff" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M18 12L6 12" stroke="#ffffff" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" id="SearchSubject" class="form-control" placeholder="جستجو" onkeyup="searchSubjectTask()">
|
||||
<div class="position-absolute" style="top: 3px; left:3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="7" stroke="#33363F" stroke-width="2"/>
|
||||
<path d="M20 20L17 17" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="from-group">
|
||||
<button class="btn-add" id="btn-add">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L12 18" stroke="#ffffff" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M18 12L6 12" stroke="#ffffff" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" id="SearchSubject" class="form-control" placeholder="جستجو" onkeyup="searchSubjectTask()">
|
||||
<div class="position-absolute" style="top: 3px; left:3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="7" stroke="#33363F" stroke-width="2" />
|
||||
<path d="M20 20L17 17" stroke="#33363F" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="loadSubjectList" style="height: 260px; overflow: auto;">
|
||||
</div>
|
||||
<div class="col-12" id="loadSubjectList" style="height: 260px; overflow: auto;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var CreateTaskSubjectAjax = '@Url.Page("./Create", "CreateTaskSubject")';
|
||||
var listTaskSubjectAjax = '@Url.Page("./Create", "ListTaskSubject")';
|
||||
var editTaskSubjectAjax = '@Url.Page("./Create", "EditTaskSubject")';
|
||||
var RemoveTaskSubjectAjax = '@Url.Page("./Create", "RemoveTaskSubject")';
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var CreateTaskSubjectAjax = '@Url.Page("./Create", "CreateTaskSubject")';
|
||||
var listTaskSubjectAjax = '@Url.Page("./Create", "ListTaskSubject")';
|
||||
var editTaskSubjectAjax = '@Url.Page("./Create", "EditTaskSubject")';
|
||||
var RemoveTaskSubjectAjax = '@Url.Page("./Create", "RemoveTaskSubject")';
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/createcrudtasksubjectmodal.js"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/createcrudtasksubjectmodal.js"></script>
|
||||
|
||||
|
||||
@@ -1,194 +1,213 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model AccountManagement.Application.Contracts.Task.EditTask
|
||||
|
||||
@model AccountManagement.Application.Contracts.Task.EditTask
|
||||
@using AccountManagement.Application.Contracts.Media
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
<link href="~/assetsclient/css/task-manager-create.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/detailmodal.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
MediaViewModel voice = new();
|
||||
|
||||
}
|
||||
@{
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/detailmodal.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<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>
|
||||
@{
|
||||
if (Model.IsDone)
|
||||
{
|
||||
<h5 class="modal-title" id="assignToLabel">جزئیات وظیفه</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="modal-title" id="assignToLabel">جزئیات</h5>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
@{
|
||||
if (Model.IsDone)
|
||||
{
|
||||
<h5 class="modal-title" id="assignToLabel">جزئیات وظیفه</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="modal-title" id="assignToLabel">جزئیات</h5>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="modal-body detailTask">
|
||||
<div class="container-fluid">
|
||||
<div class="modal-body detailTask">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">طرف حساب: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded">
|
||||
<div class="detailTitleText">@Model.ContractingPartyName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">طرف حساب: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded">
|
||||
<div class="detailTitleText">@Model.ContractingPartyName</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">عنوان وظیفه: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded">
|
||||
<div class="detailTitleText">@Model.Title</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">عنوان وظیفه: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded">
|
||||
<div class="detailTitleText">@Model.Title</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 text-end">
|
||||
<div class="detailTitle">تاریخ انجام: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 border rounded">
|
||||
<div class="detailTitleText text-center">@Model.EndTaskDate</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 text-end">
|
||||
<div class="detailTitle">ساعت انجام: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 border rounded">
|
||||
<div class="detailTitleText text-center"> @Model.EndTaskTime</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 text-end">
|
||||
<div class="detailTitle">تاریخ انجام: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 border rounded">
|
||||
<div class="detailTitleText text-center">@Model.EndTaskDate</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 text-end">
|
||||
<div class="detailTitle">ساعت انجام: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 border rounded">
|
||||
<div class="detailTitleText text-center"> @Model.EndTaskTime</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">توضیحات: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded p-2 overflow-auto">
|
||||
<p class="">@Html.Raw(Model.Description)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">توضیحات: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded p-2 overflow-auto">
|
||||
<p class="">@Html.Raw(Model.Description)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Model.CompleteDescription))
|
||||
{
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">توضیحات تکمیلی: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded p-2 overflow-auto">
|
||||
<p class="">@Html.Raw(Model.CompleteDescription)</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.CompleteDescription))
|
||||
{
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">توضیحات تکمیلی: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 border rounded p-2 overflow-auto">
|
||||
<p class="">@Html.Raw(Model.CompleteDescription)</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">فایل: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9" id="upload-container">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
@foreach (var item in Model.medias)
|
||||
{
|
||||
if (item.Category == "فایل")
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mx-1">
|
||||
<div class="upload-box empty">
|
||||
@if (item.Path.EndsWith(".jpg") || item.Path.EndsWith(".jpeg") || item.Path.EndsWith(".png") || item.Path.EndsWith(".gif") || item.Path.EndsWith(".webp"))
|
||||
{
|
||||
<section class="gallery">
|
||||
<section class="container">
|
||||
<div class="row p-0">
|
||||
<div class="lightbox_img_wrap">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" data-imgsrc="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" id="@Model.Id"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="lightbox-container">
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">فایل: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9" id="upload-container">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
@foreach (var item in Model.medias)
|
||||
{
|
||||
if (item.Category == "فایل")
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mx-1">
|
||||
<div class="upload-box empty">
|
||||
@if (item.Path.EndsWith(".jpg") || item.Path.EndsWith(".jpeg") || item.Path.EndsWith(".png") || item.Path.EndsWith(".gif") || item.Path.EndsWith(".webp"))
|
||||
{
|
||||
<section class="gallery">
|
||||
<section class="container">
|
||||
<div class="row p-0">
|
||||
<div class="lightbox_img_wrap">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" data-imgsrc="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" id="@Model.Id" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="lightbox-container">
|
||||
|
||||
<span class="material-symbols-outlined material-icons lightbox-btn left" id="left">
|
||||
<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 19.5 8.25 12l7.5-7.5"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="material-symbols-outlined material-icons lightbox-btn right" id="right">
|
||||
<svg 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="m8.25 4.5 7.5 7.5-7.5 7.5"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span id="close" class="close material-icons material-symbols-outlined">
|
||||
<svg 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="M6 18 18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</span>
|
||||
<div class="lightbox-image-wrapper">
|
||||
<img alt="lightboximage" class="lightbox-image">
|
||||
<span class="material-symbols-outlined material-icons lightbox-btn left" id="left">
|
||||
<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 19.5 8.25 12l7.5-7.5" />
|
||||
</svg>
|
||||
</span>
|
||||
<span class="material-symbols-outlined material-icons lightbox-btn right" id="right">
|
||||
<svg 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="m8.25 4.5 7.5 7.5-7.5 7.5" />
|
||||
</svg>
|
||||
</span>
|
||||
<span id="close" class="close material-icons material-symbols-outlined">
|
||||
<svg 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="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="lightbox-image-wrapper">
|
||||
<img alt="lightboximage" class="lightbox-image">
|
||||
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = Model.Id })">دانلود</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path ,id=Model.Id})">دانلود</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">پیام صوتی: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 overflow-hidden" id="upload-container-voice">
|
||||
@foreach (var item in Model.medias)
|
||||
{
|
||||
if (item.Category == "صوت")
|
||||
{
|
||||
<audio controls style="width: 100%; height: 30px">
|
||||
<source src='@Url.Page("./Index", "ShowVoice", new { filePath = item.Path })' type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1">
|
||||
<div class="col-12 col-sm-3 text-end">
|
||||
<div class="detailTitle">پیام صوتی: </div>
|
||||
</div>
|
||||
<div class="col-12 col-sm-9 overflow-hidden" id="upload-container-voice">
|
||||
@foreach (var item in Model.medias)
|
||||
{
|
||||
if (item.Category == "صوت")
|
||||
{
|
||||
voice = item;
|
||||
<div class="audio-player border rounded">
|
||||
<div id="waveform" class="waveform"></div>
|
||||
<button id="play-pause" class="player-btn play"></button>
|
||||
</div>
|
||||
@* <div class="controls">
|
||||
<span id="current-time">0:00</span>
|
||||
<span id="duration">0:00</span>
|
||||
</div> *@
|
||||
@* <audio controls style="width: 100%; height: 30px">
|
||||
<source src='@Url.Page("./Index", "ShowVoice", new { filePath = item.Path })' type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio> *@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-12 text-end">
|
||||
<button type="button" class="btn-cancel2" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
@* <div class="col-6 text-start">
|
||||
<button id="save" type="button" class="btn-register text-white">ثبت</button>
|
||||
<button style="display: none;" type="submit" id="saveFinaly"></button>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-12 text-end">
|
||||
<button type="button" class="btn-cancel2" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
@* <div class="col-6 text-start">
|
||||
<button id="save" type="button" class="btn-register text-white">ثبت</button>
|
||||
<button style="display: none;" type="submit" id="saveFinaly"></button>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
<script src="~/assetsclient/js/site.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
|
||||
<script src="~/AssetsAdminNew/libs/wavesurfer/wavesurfer.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var createSaveTaskAjax = '@Url.Page("/Company/Task/Create", "CreateSaveTask")';
|
||||
var antiForgeryToken = $('@Html.AntiForgeryToken()').val()
|
||||
var createSaveTaskAjax = '@Url.Page("/Company/Task/Create", "CreateSaveTask")';
|
||||
var voiceSrc = '@Url.Page("./Index", "ShowVoice", new { filePath = voice.Path })';
|
||||
|
||||
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/detailmodal.js?ver=@Version.AdminVersion"></script>
|
||||
|
||||
@@ -1,272 +1,284 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model AccountManagement.Application.Contracts.Task.EditTaskPartialViewModel
|
||||
@using System.Web
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model AccountManagement.Application.Contracts.Task.EditTaskPartialViewModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
var fileIndex = 0;
|
||||
var i = 1;
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
<link href="~/assetsclient/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/edit.css?ver=@Version.AdminVersion" rel="stylesheet"/>
|
||||
int fileIndex = 0;
|
||||
int i = 1;
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/edit.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">ویرایش وظیفه</h5>
|
||||
</div>
|
||||
<div class="modal-header d-block text-center position-relative">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">ویرایش وظیفه</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row p-0">
|
||||
<div class="card tm-create p-2">
|
||||
<div class="col-12">
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row p-0">
|
||||
<div class="card tm-create p-2">
|
||||
<div class="col-12">
|
||||
|
||||
<form role="form" method="post" id="edit-form" enctype="multipart/form-data" autocomplete="off">
|
||||
<form role="form" method="post" id="edit-form" enctype="multipart/form-data" autocomplete="off">
|
||||
|
||||
<input type="hidden" asp-for="EditTask.SenderId"/>
|
||||
<input type="hidden" asp-for="EditTask.Id"/>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="form-check form-checked">
|
||||
@* <input class="form-check-input" type="radio" name="selectMemberOrGroup" id="memberSelect" checked> *@
|
||||
<label class="form-check-label" for="memberSelect">
|
||||
انتخاب اعضاء
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="from-group" id="select2MemberList">
|
||||
<select class="form-select select2Member" multiple="multiple" asp-for="EditTask.ReceiverId">
|
||||
@if (Model.EditTask.ReceiverId.Any(x => x == Model.Id))
|
||||
{
|
||||
<option value="@Model.Id" selected>خودم</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Model.Id">خودم</option>
|
||||
}
|
||||
@foreach (var item in Model.AccountList)
|
||||
{
|
||||
@if (Model.EditTask.ReceiverId.Any(x => x == item.Id))
|
||||
{
|
||||
<option value="@item.Id" selected>@item.Fullname</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.Id">@item.Fullname</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" asp-for="EditTask.SenderId" />
|
||||
<input type="hidden" asp-for="EditTask.Id" />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="form-check form-checked">
|
||||
@* <input class="form-check-input" type="radio" name="selectMemberOrGroup" id="memberSelect" checked> *@
|
||||
<label class="form-check-label" for="memberSelect">
|
||||
انتخاب اعضاء
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="from-group" id="select2MemberList">
|
||||
<select class="form-select select2Member" multiple="multiple" asp-for="EditTask.ReceiverId">
|
||||
@if (Model.EditTask.ReceiverId.Any(x => x == Model.Id))
|
||||
{
|
||||
<option value="@Model.Id" selected>خودم</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Model.Id">خودم</option>
|
||||
}
|
||||
@foreach (var item in Model.AccountList)
|
||||
{
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" asp-for="EditTask.ContractingPartyName" id="partyNameSearch" class="form-control" autocomplete="off" placeholder="طرف حساب">
|
||||
<div id="partyName" class="selectDiv">
|
||||
<ul class="searchResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="from-group my-1">
|
||||
<input type="text" asp-for="EditTask.Title" class="form-control m-0" placeholder="عنوان وظیفه">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="from-group">
|
||||
<input asp-for="EditTask.EndTaskDate" type="text" id="EndTaskDate" class="form-control text-center date" placeholder="تاریخ">
|
||||
</div>
|
||||
@if (Model.EditTask.ReceiverId.Any(x => x == item.Id))
|
||||
{
|
||||
<option value="@item.Id" selected>@item.Fullname</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.Id">@item.Fullname</option>
|
||||
}
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-4 pe-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="today" style="border-radius: 2px; margin: 0 2px">امروز</label>
|
||||
</div>
|
||||
<div class="col-4 p-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="tommorow" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="tommorow" style="border-radius: 2px; margin: 0 2px">فردا</label>
|
||||
</div>
|
||||
<div class="col-4 ps-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="two-day-later" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="two-day-later" style="border-radius: 2px; margin: 0 2px">پس فردا</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="from-group">
|
||||
<input asp-for="EditTask.EndTaskTime" id="EndTaskTime" type="text" class="form-control text-center" placeholder="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 col-xl-4">
|
||||
<div class="from-group position-relative">
|
||||
<input type="text" asp-for="EditTask.ContractingPartyName" id="partyNameSearch" class="form-control" autocomplete="off" placeholder="طرف حساب">
|
||||
<div id="partyName" class="selectDiv">
|
||||
<ul class="searchResult">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="from-group my-1">
|
||||
<input type="text" asp-for="EditTask.Title" class="form-control m-0" placeholder="عنوان وظیفه">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-6 col-xl-4">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="from-group">
|
||||
<input asp-for="EditTask.EndTaskDate" type="text" id="EndTaskDate" class="form-control text-center date" placeholder="تاریخ">
|
||||
</div>
|
||||
|
||||
@* <div class="col-5 col-md-4">
|
||||
<div class="row my-2">
|
||||
<div class="col-4 pe-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="today" style="border-radius: 2px; margin: 0 2px">امروز</label>
|
||||
</div>
|
||||
<div class="col-4 p-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="tommorow" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="tommorow" style="border-radius: 2px; margin: 0 2px">فردا</label>
|
||||
</div>
|
||||
<div class="col-4 ps-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="two-day-later" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="two-day-later" style="border-radius: 2px; margin: 0 2px">پس فردا</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="from-group">
|
||||
<input asp-for="EditTask.EndTaskTime" id="EndTaskTime" type="text" class="form-control text-center" placeholder="00:00">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* <div class="col-5 col-md-4">
|
||||
<span class="sumDays">مهلت زمانی: </span>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="EditTask.Description" id="Command_Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ..."></textarea>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="EditTask.Description" id="Command_Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ..."></textarea>
|
||||
|
||||
@* @{
|
||||
@* @{
|
||||
// var Description = HttpUtility.HtmlDecode(Model.EditTask.Description);
|
||||
var Description = @Html.Raw(Model.EditTask.Description);
|
||||
} *@
|
||||
|
||||
@* @Html.TextAreaFor(x => Model.EditTask.Description, new { @class = "tm-textarea p-2", @id = "Command_Description" }) *@
|
||||
@* @Html.TextAreaFor(x => Model.EditTask.Description, new { @class = "tm-textarea p-2", @id = "Command_Description" }) *@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file" id="upload-doc" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 5C5 3.89543 5.89543 3 7 3H11.75C11.8881 3 12 3.11193 12 3.25V8C12 9.10457 12.8954 10 14 10H18.75C18.8881 10 19 10.1119 19 10.25V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V5Z" fill="white"/>
|
||||
<path d="M13 8V3.60355C13 3.38083 13.2693 3.26929 13.4268 3.42678L18.5732 8.57322C18.7307 8.73071 18.6192 9 18.3964 9H14C13.4477 9 13 8.55228 13 8Z" fill="#29B4B4"/>
|
||||
<path d="M12 11.5V17.5" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
<path d="M9 14.5H15" stroke="#29B4B4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>بارگذاری تصاویر و مدارک</span>
|
||||
</button>
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
<button class="upload-file" id="upload-doc" type="submit">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 5C5 3.89543 5.89543 3 7 3H11.75C11.8881 3 12 3.11193 12 3.25V8C12 9.10457 12.8954 10 14 10H18.75C18.8881 10 19 10.1119 19 10.25V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V5Z" fill="white" />
|
||||
<path d="M13 8V3.60355C13 3.38083 13.2693 3.26929 13.4268 3.42678L18.5732 8.57322C18.7307 8.73071 18.6192 9 18.3964 9H14C13.4477 9 13 8.55228 13 8Z" fill="#29B4B4" />
|
||||
<path d="M12 11.5V17.5" stroke="#29B4B4" stroke-linecap="round" />
|
||||
<path d="M9 14.5H15" stroke="#29B4B4" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span>بارگذاری تصاویر و مدارک</span>
|
||||
</button>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mx-1">
|
||||
@foreach (var item in Model.EditTask.medias)
|
||||
{
|
||||
if (item.Category == "فایل")
|
||||
{
|
||||
var inBox = "inBox" + i;
|
||||
<div class="upload-box empty @inBox">
|
||||
<input type="text" class="d-none" id="EditTask_Document@(i)" name="EditTask_Document@(i)">
|
||||
@if (item.Path.EndsWith(".jpg") || item.Path.EndsWith(".jpeg") || item.Path.EndsWith(".png") || item.Path.EndsWith(".gif") || item.Path.EndsWith(".webp"))
|
||||
{
|
||||
<img class="lightbox-enabled" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" id="@Model.Id"/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = Model.Id })">دانلود</a>
|
||||
}
|
||||
<div class="b1" style="cursor: pointer;" onclick="remove(@(i), @item.Id)">
|
||||
<svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
i++;
|
||||
fileIndex++;
|
||||
}
|
||||
}
|
||||
<div class="d-flex justify-content-between align-items-center mx-1">
|
||||
@foreach (var item in Model.EditTask.medias)
|
||||
{
|
||||
if (item.Category == "فایل")
|
||||
{
|
||||
var inBox = "inBox" + i;
|
||||
<div class="upload-box empty @inBox">
|
||||
<input type="text" class="d-none" id="EditTask_Document@(i)" name="EditTask_Document@(i)">
|
||||
@if (item.Path.EndsWith(".jpg") || item.Path.EndsWith(".jpeg") || item.Path.EndsWith(".png") || item.Path.EndsWith(".gif") || item.Path.EndsWith(".webp"))
|
||||
{
|
||||
<img class="lightbox-enabled" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" id="@Model.Id" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = Model.Id })">دانلود</a>
|
||||
}
|
||||
<div class="b@(item.Id)" style="cursor: pointer;" onclick="remove(@i, @item.Id)">
|
||||
<svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="10" height="10" rx="5" fill="#FF4A4A" />
|
||||
<path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
i++;
|
||||
fileIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
@for (var inn = fileIndex; inn < 6; inn++)
|
||||
{
|
||||
<div class="upload-box empty inBox@(inn + 1)">
|
||||
<input type="file" class="d-none" id="EditTask_Document@(inn + 1)" name="EditTask.Document@(inn + 1)" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
</div>
|
||||
}
|
||||
@for (int inn = fileIndex; inn < 6; inn++)
|
||||
{
|
||||
<div class="upload-box empty inBox@(inn + 1)">
|
||||
<input type="file" class="d-none" id="EditTask_Document@(inn + 1)" name="EditTask.Document@(inn + 1)" accept=".pdf,.doc,.docx,.txt, image/*">
|
||||
<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 id="deletedItems" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-11 col-xl-9">
|
||||
<div class="d-block d-md-flex align-items-center">
|
||||
|
||||
@if (Model.EditTask.medias.Any(x => x.Category == "صوت"))
|
||||
{
|
||||
var voice = Model.EditTask.medias.First(x => x.Category == "صوت");
|
||||
<div id="OldVoice" class="d-block d-md-flex align-items-center w-100">
|
||||
<button class="upload-file v1" type="button" onclick="removeVoice(@voice.Id)">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span style="font-size: 12px">حذف</span>
|
||||
</button>
|
||||
@if (Model.EditTask.medias.Any(x => x.Category == "صوت"))
|
||||
{
|
||||
var voice = Model.EditTask.medias.First(x => x.Category == "صوت");
|
||||
<div id="OldVoice" class="d-block d-md-flex align-items-center w-100">
|
||||
<button class="upload-file v1" type="button" onclick="removeVoice(@voice.Id)">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<span style="font-size: 12px">حذف</span>
|
||||
</button>
|
||||
|
||||
<div class="upload-box empty v1" id="upload-container-voice" style="width: 370px;">
|
||||
<audio controls style="width: 100%; height: 30px">
|
||||
<source src='@Url.Page("./Index", "ShowVoice", new { filePath = voice.Path })' type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-box empty v1" id="upload-container-voice" style="width: 370px;">
|
||||
<audio controls style="width: 100%; height: 30px">
|
||||
<source src='@Url.Page("./Index", "ShowVoice", new { filePath = voice.Path })' type="audio/ogg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="NewVoice" class="d-none align-items-center w-100">
|
||||
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
<div id="NewVoice" class="d-none align-items-center w-100">
|
||||
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
|
||||
<input type="file" class="d-none v2" asp-for="EditTask.Voice" id="EditTask_Voice">
|
||||
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty" id="msg_box"></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round"/>
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty" id="msg_box"></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="upload-file record_btn v2" id="upload-voice" type="button">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="9" y="3" width="6" height="11" rx="3" fill="#29B4B4" stroke="white" stroke-width="1.2" stroke-linejoin="round" />
|
||||
<path d="M5.4 11C5.4 12.7504 6.09536 14.4292 7.3331 15.6669C8.57084 16.9046 10.2496 17.6 12 17.6C13.7504 17.6 15.4292 16.9046 16.6669 15.6669C17.9046 14.4292 18.6 12.7504 18.6 11" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 21V19" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<span style="font-size: 12px">پیام صوتی</span>
|
||||
</button>
|
||||
|
||||
<input type="file" class="d-none v2" asp-for="EditTask.Voice">
|
||||
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty" id="msg_box"></div>
|
||||
</div>
|
||||
}
|
||||
<div class="d-flex justify-content-between align-items-center mx-1 v2" id="upload-container-voice">
|
||||
<div class="upload-box-voice empty" id="msg_box"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-center">
|
||||
<a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button">
|
||||
<span>انصراف</span>
|
||||
</a>
|
||||
<button type="button" id="save" class="btn-tm-save m-1">
|
||||
<span>ویرایش</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="fileItems" style="display: none"></div>
|
||||
<div id="deletedItems" style="display: none"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="voiceItem" style="display: none"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-center">
|
||||
<a asp-page="/Company/Task/Index" id="cancel" class="btn-tm-cancel m-1 text-white" type="button">
|
||||
<span>انصراف</span>
|
||||
</a>
|
||||
<button type="button" id="save" class="btn-tm-save m-1">
|
||||
<span>ویرایش</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
||||
@@ -276,5 +288,9 @@
|
||||
var AntiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
||||
var EditSaveTask = '@Url.Page("/Company/Task/Index", "EditSaveTask")';
|
||||
var SearchContractingParties = '@Url.Page("./Create", "SearchContractingParties")';
|
||||
|
||||
var uploadFileAjax = '@Url.Page("/Company/Task/Create", "UploadFile")';
|
||||
var deleteFileAjax = '@Url.Page("./Create", "DeleteFile")';
|
||||
var deleteAllFilesAjax = '@Url.Page("./Create", "RemoveAllTempFiles")';
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/edit.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/edit.js?ver=@Version.AdminVersion"></script>
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
@page
|
||||
@using _0_Framework.Application
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model GroupModel
|
||||
@inject IAuthHelper AuthHelper;
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Task.GroupModel
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@{
|
||||
ViewData["Title"] = " - " + "کارگاه";
|
||||
var index = 1;
|
||||
var i = 0;
|
||||
int index = 1;
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/task-manager-list.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/taskgroup.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-list.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/taskgroup.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
|
||||
<!-- sweet alerts -->
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
|
||||
@@ -49,22 +48,23 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="row p-0 mb-3">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">عملیات گروهبندی وظیفه</h4>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/Task/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">عملیات گروهبندی وظیفه</h4>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/Task/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row p-0">
|
||||
|
||||
|
||||
<div class="col-12 p-0 mb-2">
|
||||
<button permission="90210" class="btnCreateNew" type="button" onclick="CreateGroupModal()">
|
||||
ساخت گروه
|
||||
@@ -72,61 +72,61 @@
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-5 p-0 pe-1">
|
||||
@foreach (var item in Model.PositionViewModels)
|
||||
{
|
||||
<div class="bg-white p-3 mb-2 rounded-3 d-flex align-items-center justify-content-between w-100 btnPosition">
|
||||
<input value=@item.Id class="positionId" type="hidden"/>
|
||||
@foreach (var item in Model.PositionViewModels)
|
||||
{
|
||||
<div class="bg-white p-3 mb-2 rounded-3 d-flex align-items-center justify-content-between w-100 btnPosition">
|
||||
<input value=@item.Id class="positionId" type="hidden" />
|
||||
|
||||
<div class="row-index">
|
||||
<span>@(index++)</span>
|
||||
</div>
|
||||
<div class="row-index">
|
||||
<span>@(index++)</span>
|
||||
</div>
|
||||
<div class="title-group">
|
||||
<p class="m-0">نام گروه:</p>
|
||||
<h4 class="m-0">@item.Name</h4>
|
||||
</div>
|
||||
<div class="title-group">
|
||||
<p class="m-0">نام گروه:</p>
|
||||
<h4 class="m-0">@item.Name</h4>
|
||||
</div>
|
||||
<div class="title-group">
|
||||
<p class="m-0">سطح گروه: @item.Value</p>
|
||||
<p class="m-0">تعداد اعضاء: @item.CountUsers</p>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<p class="m-0">سطح گروه: @item.Value</p>
|
||||
<p class="m-0">تعداد اعضاء: @item.CountUsers</p>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<button permission="90211" type="button" class="btn-delete" onclick="removeConfirm(@item.Id)">
|
||||
<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="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M12.2865 12.4805L12.2865 10.036" stroke="#BF3737" 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="#BF3737" 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="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button permission="90212" type="button" class="btn-add" onclick="AddToGroupModal(@item.Id)">
|
||||
افزودن پرسنل
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<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="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M12.2865 12.4805L12.2865 10.036" stroke="#BF3737" 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="#BF3737" 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="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button permission="90212" type="button" class="btn-add" onclick="AddToGroupModal(@item.Id)">
|
||||
افزودن پرسنل
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-12 col-md-7 p-0 ps-1">
|
||||
<div class="wrapper list-box bg-white w-100 card-group1">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex">
|
||||
<div class="Rtable-cell column-heading">ردیف</div>
|
||||
<div class="Rtable-cell column-heading">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading">سطح</div>
|
||||
<div class="Rtable-cell column-heading text-end">عملیات</div>
|
||||
</div>
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex">
|
||||
<div class="Rtable-cell column-heading">ردیف</div>
|
||||
<div class="Rtable-cell column-heading">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading">سطح</div>
|
||||
<div class="Rtable-cell column-heading text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 overflow-auto" id="loadAccountItems">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- مودال -->
|
||||
<!-- مودال -->
|
||||
<div id="MainModal" class="modal fade createNewGroup" aria-labelledby="myModalLabel" data-bs-backdrop="static" aria-hidden="true" tabindex="-1" style="display: none;">
|
||||
<div class="modal-dialog modal-xl-taskTime modal-dialog-centered">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
@@ -138,50 +138,50 @@
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
|
||||
<script>
|
||||
var hasDeletePermission = '@AuthHelper.GetPermissions().Any(x => x == 90213)';
|
||||
<script>
|
||||
var hasDeletePermission = '@AuthHelper.GetPermissions().Any(x => x == 90213)';
|
||||
|
||||
window.onload = function() {
|
||||
//OpenBootstrapPopup();
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
//OpenBootstrapPopup();
|
||||
};
|
||||
$('.btnPosition').click(function() {
|
||||
var positionId = $(this).find('.positionId').val();
|
||||
loadAjax(positionId);
|
||||
|
||||
$('.btnPosition').click(function() {
|
||||
const positionId = $(this).find('.positionId').val();
|
||||
loadAjax(positionId);
|
||||
$(this).addClass('active');
|
||||
$('.btnPosition').not(this).removeClass('active');
|
||||
|
||||
$(this).addClass('active');
|
||||
$('.btnPosition').not(this).removeClass('active');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function loadAjax(positionId) {
|
||||
function loadAjax(positionId) {
|
||||
|
||||
const accountId = $('#btnPosition').val();
|
||||
var index = 0;
|
||||
var html = '';
|
||||
$('#loadAccountItems').html('');
|
||||
let accountId = $('#btnPosition').val();
|
||||
var index = 0;
|
||||
var html = '';
|
||||
$('#loadAccountItems').html('');
|
||||
|
||||
// var searchModel = {};
|
||||
// searchModel.ContractingPatyId = Number($('#contractingPatyId').val());
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '@Url.Page("./Group", "GroupAccountsAjax")',
|
||||
data: {
|
||||
Id: positionId,
|
||||
},
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
// var searchModel = {};
|
||||
// searchModel.ContractingPatyId = Number($('#contractingPatyId').val());
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '@Url.Page("./Group", "GroupAccountsAjax")',
|
||||
data: {
|
||||
Id: positionId,
|
||||
},
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
|
||||
success: function(response) {
|
||||
response.accounts.forEach(function(account) {
|
||||
html += `
|
||||
success: function(response) {
|
||||
response.accounts.forEach(function(account) {
|
||||
html += `
|
||||
<div></div>
|
||||
|
||||
<div class="Rtable-row align-items-center position-relative">
|
||||
@@ -215,8 +215,7 @@
|
||||
<!-- <div class="Rtable-cell--heading">
|
||||
</div> -->
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
${hasDeletePermission === 'True'
|
||||
? `<button href="" class="btn-delete" onclick="removeMemberConfirm(${account.id},${account.positionId})">
|
||||
${hasDeletePermission === 'True' ? `<button href="" class="btn-delete" onclick="removeMemberConfirm(${account.id},${account.positionId})">
|
||||
<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"/>
|
||||
@@ -224,154 +223,153 @@
|
||||
<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-none">حذف</span>
|
||||
</button>`
|
||||
: ``}
|
||||
</button>`:``}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
});
|
||||
|
||||
$('#loadAccountItems').append(html);
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#loadAccountItems').append(html);
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
const positionId = 1;
|
||||
loadAjax(positionId);
|
||||
$(document).ready(function() {
|
||||
var positionId = 1;
|
||||
loadAjax(positionId);
|
||||
|
||||
$('.btnPosition:first-child').addClass('active');
|
||||
});
|
||||
$('.btnPosition:first-child').addClass('active');
|
||||
});
|
||||
|
||||
|
||||
function CreateGroupModal() {
|
||||
const goTo = `#showmodal=@Url.Page("/Company/Task/Group", "ShowCreateModal")`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
function CreateGroupModal() {
|
||||
var goTo = `#showmodal=@Url.Page("/Company/Task/Group", "ShowCreateModal")`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
//Add To Group Modal
|
||||
function AddToGroupModal(id) {
|
||||
const ID = Number(id);
|
||||
const goTo = `#showmodal=/AdminNew/Company/Task/Group?positionId=${ID}&handler=AccountPosition`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
function AddToGroupModal(id) {
|
||||
var ID = Number(id);
|
||||
var goTo = `#showmodal=/AdminNew/Company/Task/Group?positionId=${ID}&handler=AccountPosition`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
|
||||
function removeConfirm(id) {
|
||||
swal({
|
||||
title: "آیا از حذف این گروه اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
deleteGroup(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeConfirm(id) {
|
||||
swal({
|
||||
title: "آیا از حذف این گروه اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
deleteGroup(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteGroup(id) {
|
||||
const ID = Number(id);
|
||||
function deleteGroup(id) {
|
||||
var ID = Number(id);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Group", "RemovePosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: { positionId: 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('');
|
||||
window.location.reload();
|
||||
},
|
||||
1000);
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Group", "RemovePosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: { positionId: 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('');
|
||||
window.location.reload();
|
||||
},
|
||||
1000);
|
||||
} 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 removeMemberConfirm(memberId, id) {
|
||||
swal({
|
||||
title: "آیا از حذف اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
deleteMember(memberId, id);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeMemberConfirm(memberId, id) {
|
||||
swal({
|
||||
title: "آیا از حذف اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function(isConfirm) {
|
||||
if (isConfirm) {
|
||||
deleteMember(memberId, id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteMember(memberId, id) {
|
||||
const ID = Number(id);
|
||||
const MemberId = Number(memberId);
|
||||
function deleteMember(memberId, id) {
|
||||
var ID = Number(id);
|
||||
var MemberId = Number(memberId);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Group", "DeleteAccountFromPosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: { accountIds: MemberId, positionId: 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('');
|
||||
window.location.reload();
|
||||
},
|
||||
1000);
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Group", "DeleteAccountFromPosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: { accountIds: MemberId, positionId: 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('');
|
||||
window.location.reload();
|
||||
},
|
||||
1000);
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
}
|
||||
@@ -4,118 +4,134 @@ using AccountManagement.Application.Contracts.Position;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.Task;
|
||||
|
||||
[Authorize]
|
||||
public class GroupModel : PageModel
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
|
||||
{
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IPositionApplication _positionApplication;
|
||||
[Authorize]
|
||||
public class GroupModel : PageModel
|
||||
{
|
||||
private readonly IPositionApplication _positionApplication;
|
||||
private readonly IAccountApplication _accountApplication ;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
public GroupModel(IPositionApplication positionApplication, IAccountApplication accountApplication,
|
||||
IAuthHelper authHelper)
|
||||
{
|
||||
_positionApplication = positionApplication;
|
||||
_accountApplication = accountApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
public GroupModel(IPositionApplication positionApplication, IAccountApplication accountApplication, IAuthHelper authHelper)
|
||||
{
|
||||
_positionApplication = positionApplication;
|
||||
_accountApplication = accountApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public List<PositionViewModel> PositionViewModels { get; set; }
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x => x == 902))
|
||||
{
|
||||
PositionViewModels = _positionApplication.GetPositions();
|
||||
return Page();
|
||||
}
|
||||
|
||||
return Forbid();
|
||||
}
|
||||
public List<PositionViewModel> PositionViewModels { get; set; }
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x=>x==902))
|
||||
{
|
||||
PositionViewModels = _positionApplication.GetPositions();
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return Forbid();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IActionResult OnGetGroupAccountsAjax(long id)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
accounts = _accountApplication.GetAccountsByPositionId(id)
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetGroupAccountsAjax(long id)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
accounts = _accountApplication.GetAccountsByPositionId(id)
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetShowCreateModal()
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x => x == 90210))
|
||||
{
|
||||
var lastPositionValue = _positionApplication.GetLastPositionValue();
|
||||
var unusedPositions = _positionApplication.GetUnUsedPositionValues();
|
||||
var model = new CreatePositionModalViewModel
|
||||
public IActionResult OnGetShowCreateModal()
|
||||
{
|
||||
if (_authHelper.GetPermissions().Any(x=>x==90210))
|
||||
{
|
||||
var lastPositionValue = _positionApplication.GetLastPositionValue();
|
||||
var unusedPositions = _positionApplication.GetUnUsedPositionValues();
|
||||
var model = new CreatePositionModalViewModel()
|
||||
{
|
||||
LastPositionValue = lastPositionValue,
|
||||
UnUsedPositionValue = unusedPositions
|
||||
};
|
||||
return Partial("GroupCreateModal", model);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Forbid();
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreatePosition(CreatePosition command)
|
||||
{
|
||||
var res = _positionApplication.Create(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded=res.IsSuccedded,
|
||||
message=res.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostDeleteAccountFromPosition(List<long> accountIds,long positionId)
|
||||
{
|
||||
var res= _positionApplication.RemoveAccountListFromPosition(accountIds, positionId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemovePosition(long positionId)
|
||||
{
|
||||
var res = _positionApplication.Remove(positionId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetAccountPosition(long positionId)
|
||||
{
|
||||
var accounts = _positionApplication.GetNoPositionAccounts();
|
||||
var model = new AddAccountToPositionPartialViewModel()
|
||||
{
|
||||
Accounts = accounts,
|
||||
PositionId = positionId
|
||||
};
|
||||
return Partial("GroupAddMemberToGroup", model);
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostAddAccountToPosition(List<long> accounts, long positionId)
|
||||
{
|
||||
var res = _positionApplication.SaveAccountPosition(accounts, positionId);
|
||||
var selfPositionValue = _authHelper.CurrentAccountInfo().PositionValue != null
|
||||
? _authHelper.CurrentAccountInfo().PositionValue
|
||||
: 0;
|
||||
|
||||
if (res.IsSuccedded&& selfPositionValue < 1)
|
||||
{
|
||||
LastPositionValue = lastPositionValue,
|
||||
UnUsedPositionValue = unusedPositions
|
||||
};
|
||||
return Partial("GroupCreateModal", model);
|
||||
}
|
||||
_accountApplication.ReLogin();
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Forbid();
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreatePosition(CreatePosition command)
|
||||
{
|
||||
var res = _positionApplication.Create(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostDeleteAccountFromPosition(List<long> accountIds, long positionId)
|
||||
{
|
||||
var res = _positionApplication.RemoveAccountListFromPosition(accountIds, positionId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemovePosition(long positionId)
|
||||
{
|
||||
var res = _positionApplication.Remove(positionId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetAccountPosition(long positionId)
|
||||
{
|
||||
var accounts = _positionApplication.GetNoPositionAccounts();
|
||||
var model = new AddAccountToPositionPartialViewModel
|
||||
{
|
||||
Accounts = accounts,
|
||||
PositionId = positionId
|
||||
};
|
||||
return Partial("GroupAddMemberToGroup", model);
|
||||
}
|
||||
|
||||
public IActionResult OnPostAddAccountToPosition(List<long> accounts, long positionId)
|
||||
{
|
||||
var res = _positionApplication.SaveAccountPosition(accounts, positionId);
|
||||
var selfPositionValue = _authHelper.CurrentAccountInfo().PositionValue != null
|
||||
? _authHelper.CurrentAccountInfo().PositionValue
|
||||
: 0;
|
||||
|
||||
if (res.IsSuccedded && selfPositionValue < 1) _accountApplication.ReLogin();
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = res.IsSuccedded,
|
||||
message = res.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model AccountManagement.Application.Contracts.Position.AddAccountToPositionPartialViewModel
|
||||
@model AccountManagement.Application.Contracts.Position.AddAccountToPositionPartialViewModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
|
||||
<link href="~/assetsclient/css/task-manager-create.css" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
|
||||
@@ -59,8 +60,8 @@
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row g-2">
|
||||
|
||||
<input type="hidden" asp-for="PositionId"/>
|
||||
|
||||
<input type="hidden" asp-for="PositionId" />
|
||||
@* <div class="col-12">
|
||||
<div class="from-group" id="select2PositionList">
|
||||
<select class="form-select select2Position" multiple="multiple" asp-for="Accounts">
|
||||
@@ -72,35 +73,35 @@
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<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">
|
||||
@foreach (var item in Model.Accounts)
|
||||
{
|
||||
<div class="items">
|
||||
<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 foo" type="checkbox" name="Accounts" id="select-@item.Id" value="@item.Id">
|
||||
<label class="form-check-label searchItem" for="select-@item.Id">
|
||||
@item.Fullname
|
||||
<input class="form-check-input selectAll" type="checkbox" name="selectAll" id="selectAll">
|
||||
<label class="form-check-label" for="selectAll">
|
||||
انتخاب همه
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</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">
|
||||
@foreach (var item in Model.Accounts)
|
||||
{
|
||||
<div class="items">
|
||||
<div class="from-group">
|
||||
<input class="form-check-input foo" type="checkbox" name="Accounts" id="select-@item.Id" value="@item.Id">
|
||||
<label class="form-check-label searchItem" for="select-@item.Id">
|
||||
@item.Fullname
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,33 +125,34 @@
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
//******************** انتخاب چک باکس ********************
|
||||
$('.items').click(function(e) {
|
||||
if ($(e.target).is('input[type="checkbox"]')) {
|
||||
return;
|
||||
}
|
||||
$('.items').click(function (e) {
|
||||
if ($(e.target).is('input[type="checkbox"]')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const checkbox = $(this).find('input[type="checkbox"]');
|
||||
const isChecked = checkbox.is(":checked");
|
||||
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) {
|
||||
checkbox.prop('checked', !isChecked);
|
||||
$(this).toggleClass('checked-item', !isChecked);
|
||||
});
|
||||
|
||||
$('.items input[type="checkbox"]').click(function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
const isChecked = $(this).is(":checked");
|
||||
var isChecked = $(this).is(":checked");
|
||||
$(this).closest('.items').toggleClass('checked-item', isChecked);
|
||||
});
|
||||
|
||||
$('.items label').click(function(e) {
|
||||
$('.items label').click(function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
const isChecked = $(this).is(":checked");
|
||||
var isChecked = $(this).is(":checked");
|
||||
$(this).closest('.items').toggleClass('checked-item', isChecked);
|
||||
});
|
||||
|
||||
@@ -168,6 +170,7 @@
|
||||
//******************** انتخاب همه ی چک باکس ها ********************
|
||||
|
||||
|
||||
|
||||
$('.select2Position').select2({
|
||||
placeholder: {
|
||||
text: "انتخاب اعضاء ..."
|
||||
@@ -175,72 +178,69 @@
|
||||
});
|
||||
|
||||
|
||||
$('#btn-add').on('click',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var idlist = "";
|
||||
$('#btn-add').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var idlist = "";
|
||||
|
||||
|
||||
// if ($('.select2Position').select2('data').length > 0) {
|
||||
if (($('input:checkbox').is(":checked"))) {
|
||||
// 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);
|
||||
|
||||
|
||||
$('.foo').each(function() {
|
||||
if ($(this).is(":checked")) {
|
||||
const a = $(this).val();
|
||||
const b = a + "+";
|
||||
idlist += b;
|
||||
$.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);
|
||||
}
|
||||
});
|
||||
|
||||
$('#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);
|
||||
}
|
||||
});
|
||||
},
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -261,4 +261,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model AccountManagement.Application.Contracts.Position.CreatePositionModalViewModel
|
||||
@model AccountManagement.Application.Contracts.Position.CreatePositionModalViewModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
|
||||
<link href="~/assetsclient/css/task-manager-create.css" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
|
||||
@@ -99,7 +100,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
$('.select2Position').select2({
|
||||
@@ -109,10 +111,10 @@
|
||||
});
|
||||
|
||||
$('#btn-add').on('click',
|
||||
function(e) {
|
||||
function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const groupName = $("#groupName").val().trim();
|
||||
var groupName = $("#groupName").val().trim();
|
||||
|
||||
if (groupName != '') {
|
||||
$.ajax({
|
||||
@@ -122,28 +124,26 @@
|
||||
url: '@Url.Page("./Group", "CreatePosition")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: $('#create-form').serialize(),
|
||||
success: function(response) {
|
||||
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);
|
||||
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);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
@@ -151,28 +151,27 @@
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا عنوان را وارد نمائید.');
|
||||
$("#groupName").addClass('errored');
|
||||
setTimeout(function() {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$("#groupName").removeClass('errored');
|
||||
},
|
||||
3500);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$("#groupName").removeClass('errored');
|
||||
}, 3500);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#groupName').on('keyup keypress',
|
||||
function(e) {
|
||||
if ($('#groupName').val() != '') {
|
||||
//کلید دمکه اینتر 13
|
||||
const keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
$('#btn-add').click();
|
||||
}
|
||||
$('#groupName').on('keyup keypress', function (e) {
|
||||
if ($('#groupName').val() != '') {
|
||||
//کلید دمکه اینتر 13
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
$('#btn-add').click();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
@page
|
||||
@using _0_Framework.Application
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model IndexModel
|
||||
@inject IAuthHelper AuthHelper;
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Task.IndexModel
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@{
|
||||
var index = 1;
|
||||
}
|
||||
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsclient/css/task-manager-list.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-list.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
<!-- sweet alerts -->
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
<link href="~/assetsadminnew/tasks/css/index.css" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/index.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
<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/rollcall-history.png" alt="" class="img-fluid me-2" style="width: 45px;"/>
|
||||
<img src="~/AssetsClient/images/rollcall-history.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>
|
||||
@@ -47,76 +47,80 @@
|
||||
<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"/>
|
||||
<input type="hidden" asp-for="SearchModel.PageIndex" id="pageIndex" value="@Model.SearchModel.PageIndex" />
|
||||
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-12 mb-2" permission="903">
|
||||
<a asp-page="/Company/Task/Create" class="btn-register-index text-white" type="button">
|
||||
<span>وظیفه جدید</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mb-2">
|
||||
<div class="d-flex w-100">
|
||||
|
||||
@if (Model.UserPositionValue == 1)
|
||||
{
|
||||
<button type="button" class="btnTaskListSelfTask me-1 active" id="btnTaskListSelfTask" onclick="loadMore('selfTask');">وظایف شخصی</button>
|
||||
<button type="button" class="btnTaskListAllTask mx-1" id="btnTaskListAllTask" onclick="loadMore('AllTask');">کل وظایف</button>
|
||||
<button type="button" class="btnTaskListSent mx-1" id="btnTaskListSent" onclick="loadMore('sent');">وظایف ارسالی</button>
|
||||
<button type="button" class="btnTaskRequest mx-1 d-flex align-items-center" id="btnTaskRequest" permission="9012">
|
||||
لیست درخواست ها
|
||||
|
||||
<span class="badge bg-danger rounded-pill mx-1 @(Model.RequestCount == 0 ? "d-none" : "")" id="badgeRequestCount">@Model.RequestCount</span>
|
||||
|
||||
</button>
|
||||
}
|
||||
|
||||
else if (Model.UserPositionValue > 1 && Model.UserPositionValue < Model.LastPositionValue)
|
||||
{
|
||||
<button type="button" class="btnTaskListSent me-1 active" id="btnTaskListSent" onclick="loadMore('sent');">وظایف ارسالی</button>
|
||||
<button type="button" class="btnTaskListReceived mx-1" id="btnTaskListReceived" onclick="loadMore('received');">وظایف دریافتی</button>
|
||||
<button type="button" class="btnTaskRequest mx-1 d-flex align-items-center" id="btnTaskRequest" permission="9012">
|
||||
لیست درخواست ها
|
||||
<span class="badge bg-danger rounded-pill mx-1 @(Model.RequestCount == 0 ? "d-none" : "")" id="badgeRequestCount">@Model.RequestCount</span>
|
||||
</button>
|
||||
}
|
||||
else if (Model.UserPositionValue == Model.LastPositionValue)
|
||||
{
|
||||
<button type="button" class="btnTaskList active me-1 " id="btnTaskList" onclick="loadMore('list');" permission="9011">لیست وظایف</button>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="col-12 mb-2" permission="903">
|
||||
<a asp-page="/Company/Task/Create" class="btn-register-index text-white d-block" type="button">
|
||||
<span>وظیفه جدید</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mb-2">
|
||||
<div class="d-flex w-100">
|
||||
|
||||
@if (Model.UserPositionValue == 1)
|
||||
{
|
||||
<button type="button" class="btnTaskListSelfTask me-1 active" id="btnTaskListSelfTask" onclick="loadMore('selfTask');">وظایف شخصی</button>
|
||||
<button type="button" class="btnTaskListSent me-1" id="btnTaskListSent" onclick="loadMore('sent');">وظایف ارسالی</button>
|
||||
<button type="button" class="btnTaskRequest me-1 d-flex align-items-center" id="btnTaskRequest" permission="9012">
|
||||
لیست درخواست ها
|
||||
|
||||
<span class="badge bg-danger rounded-pill me-1 @(Model.RequestCount==0 ? "d-none" : "")" id="badgeRequestCount">@Model.RequestCount</span>
|
||||
|
||||
</button>
|
||||
|
||||
<button type="button" class="btnTaskListAllTask me-1" id="btnTaskListAllTask" onclick="loadMore('AllTask');">کل وظایف</button>
|
||||
<button type="button" class="btnTaskRequestAll me-1 d-flex align-items-center" id="btnAllTaskRequest" >
|
||||
لیست تمامی درخواست ها
|
||||
</button>
|
||||
}
|
||||
|
||||
else if (Model.UserPositionValue > 1 && Model.UserPositionValue < Model.LastPositionValue)
|
||||
{
|
||||
<button type="button" class="btnTaskListReceived me-1" id="btnTaskListReceived" onclick="loadMore('received');">وظایف دریافتی</button>
|
||||
<button type="button" class="btnTaskListSent me-1 active" id="btnTaskListSent" onclick="loadMore('sent');">وظایف ارسالی</button>
|
||||
<button type="button" class="btnTaskRequest me-1 d-flex align-items-center" id="btnTaskRequest" permission="9012">
|
||||
لیست درخواست ها
|
||||
<span class="badge bg-danger rounded-pill me-1 @(Model.RequestCount==0 ? "d-none" : "")" id="badgeRequestCount">@Model.RequestCount</span>
|
||||
</button>
|
||||
}
|
||||
else if (Model.UserPositionValue == Model.LastPositionValue)
|
||||
{
|
||||
<button type="button" class="btnTaskList active me-1 " id="btnTaskList" permission="9011">لیست وظایف</button>
|
||||
}
|
||||
|
||||
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-grid search-section gap-2">
|
||||
|
||||
<div class="d-grid grid-cols-2 gap-2 col-span-2">
|
||||
<div class="">
|
||||
<input type="text" class="form-control date start-date" asp-for="SearchModel.StartDate" id="StartDate" placeholder="تاریخ شروع">
|
||||
</div>
|
||||
<div class="">
|
||||
<input type="text" class="form-control date end-date" asp-for="SearchModel.EndDate" id="EndDate" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 md-col-span-3">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.AccountId" id="AccountId">
|
||||
<option value="0">پرسنل را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="d-grid grid-cols-1 gap-2 col-span-2">
|
||||
@* <div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-grid search-section gap-2">
|
||||
|
||||
<div class="d-grid grid-cols-2 gap-2 col-span-2">
|
||||
<div class=""><input type="text" class="form-control date start-date" asp-for="SearchModel.StartDate" id="StartDate" placeholder="تاریخ شروع"></div>
|
||||
<div class=""><input type="text" class="form-control date end-date" asp-for="SearchModel.EndDate" id="EndDate" placeholder="تاریخ پایان"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 md-col-span-3">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.AccountId" id="AccountId">
|
||||
<option value="0">پرسنل را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 md-col-span-3">
|
||||
<input type="text" class="form-control" asp-for="SearchModel.GeneralSearch" id="GeneralSearch" placeholder="جستجو ...">
|
||||
</div>
|
||||
|
||||
<div class="d-grid grid-cols-1 gap-2 col-span-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>
|
||||
@@ -127,9 +131,9 @@
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
</div> *@
|
||||
<input type="hidden" id="IsTimeRequest" asp-for="SearchModel.IsTimeRequest"/>
|
||||
<input type="hidden" id="IsTimeRequest" asp-for="SearchModel.IsTimeRequest" />
|
||||
|
||||
@* <div class="wrapper-dropdown-normal btn-dropdown">
|
||||
@* <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>
|
||||
@@ -140,9 +144,9 @@
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
</div> *@
|
||||
<input type="hidden" id="IsCancelRequest" asp-for="SearchModel.IsCancelRequest"/>
|
||||
<input type="hidden" id="IsCancelRequest" asp-for="SearchModel.IsCancelRequest" />
|
||||
|
||||
@* <div class="wrapper-dropdown-normal btn-dropdown">
|
||||
@* <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>
|
||||
@@ -153,9 +157,9 @@
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
</div> *@
|
||||
<input type="hidden" id="IsCanceled" asp-for="SearchModel.IsCanceled"/>
|
||||
<input type="hidden" id="IsCanceled" asp-for="SearchModel.IsCanceled" />
|
||||
|
||||
@* <div class="wrapper-dropdown-normal btn-dropdown">
|
||||
@* <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>
|
||||
@@ -166,9 +170,9 @@
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
</div> *@
|
||||
<input type="hidden" id="TimeRequestAccepted" asp-for="SearchModel.TimeRequestAccepted"/>
|
||||
<input type="hidden" id="TimeRequestAccepted" asp-for="SearchModel.TimeRequestAccepted" />
|
||||
|
||||
@* <div class="wrapper-dropdown-normal btn-dropdown">
|
||||
@* <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>
|
||||
@@ -179,45 +183,63 @@
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
</div> *@
|
||||
<input type="hidden" id="IsDoneRequest" asp-for="SearchModel.IsDoneRequest"/>
|
||||
<input type="hidden" id="IsDoneRequest" asp-for="SearchModel.IsDoneRequest" />
|
||||
|
||||
<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-IsDone boxes">
|
||||
<li class="item" value-data-normal="">دارای انجام شده</li>
|
||||
<li class="item" value-data-normal="true">بلی</li>
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
<input type="hidden" id="IsDone" asp-for="SearchModel.IsDone"/>
|
||||
<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-IsDone boxes">
|
||||
<li class="item" value-data-normal="">دارای انجام شده</li>
|
||||
<li class="item" value-data-normal="true">بلی</li>
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
<input type="hidden" id="IsDone" asp-for="SearchModel.IsDone" />
|
||||
</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>
|
||||
<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/Task/Index" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove">
|
||||
<span>حذف جستجو</span>
|
||||
</a>
|
||||
</div>
|
||||
</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>
|
||||
<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/Employees/Leave" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove">
|
||||
<span>حذف جستجو</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper table-task-manager card p-2" id="divTaskList">
|
||||
|
||||
<div class="Rtable Rtable--collapse pt-0" id="tasksAjax" style="">
|
||||
|
||||
@* <div class="Rtable-row Rtable-row--head align-items-center d-none">
|
||||
<div class="wrapper table-task-manager card p-2" id="divTaskList">
|
||||
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="row d-flex align-items-center justify-content-between d-block d-md-none">
|
||||
<div class="search-box bg-white">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
|
||||
<div class="Rtable Rtable--collapse pt-0" id="tasksAjax" style="">
|
||||
|
||||
@* <div class="Rtable-row Rtable-row--head align-items-center d-none">
|
||||
<div class="Rtable-cell column-heading d-md-block d-none">ردیف</div>
|
||||
<div class="Rtable-cell column-heading">عملیات</div>
|
||||
</div>
|
||||
@@ -225,7 +247,7 @@
|
||||
<div class="w-100" >
|
||||
</div> *@
|
||||
|
||||
@* @foreach (var task in Model.TaskViewModels)
|
||||
@* @foreach (var task in Model.TaskViewModels)
|
||||
{
|
||||
<div class="Rtable-row align-items-center position-relative tm-@task.Color">
|
||||
<div class="Rtable-cell d-md-block d-flex width1">
|
||||
@@ -372,14 +394,14 @@
|
||||
</div>
|
||||
} *@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="wrapper table-task-manager card p-2" id="divTaskRequest" style="display:none">
|
||||
<div class="Rtable Rtable--collapse " id="taskRequestsAjax">
|
||||
<div class="wrapper table-task-manager card p-2" id="divTaskRequest" style="display:none">
|
||||
<div class="Rtable Rtable--collapse " id="taskRequestsAjax">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- End List Items -->
|
||||
@@ -392,8 +414,108 @@
|
||||
</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 mb-4">
|
||||
<div class="mb-2">
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." asp-for="SearchModel.AccountId" id="AccountIdMobile">
|
||||
<option value="0">پرسنل را انتخاب کنید ...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<input type="text" class="form-control" asp-for="SearchModel.GeneralSearch" id="GeneralSearchMobile" placeholder="جستجو ...">
|
||||
</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" asp-for="SearchModel.StartDate" placeholder="تاریخ شروع">
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<span class="form-control text-center persianDateInputEndDate" id="end-date">تاریخ پایان</span>
|
||||
<input type="hidden" class="form-control date end-date" asp-for="SearchModel.EndDate" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
|
||||
<div class="wrapper-dropdown-normal btn-dropdown mb-2">
|
||||
<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-IsDone boxes">
|
||||
<li class="item" value-data-normal="">دارای انجام شده</li>
|
||||
<li class="item" value-data-normal="true">بلی</li>
|
||||
<li class="item" value-data-normal="false">خیر</li>
|
||||
</ul>
|
||||
<input type="hidden" id="IsDone" asp-for="SearchModel.IsDone" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-start">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="/AdminNew/Company/Task/Index" 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="submit" class="btn-search btn-search-click w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- مودال -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.StyleVersion"></script>
|
||||
@@ -411,10 +533,20 @@
|
||||
var EditPermission = "@AuthHelper.GetPermissions().Any(x => x == 90114)";
|
||||
var DeletePermission = "@AuthHelper.GetPermissions().Any(x => x == 90115)";
|
||||
var CheckRequestPermission = "@AuthHelper.GetPermissions().Any(x => x == 90120)";
|
||||
|
||||
|
||||
var userPositionValue = @Model.UserPositionValue;
|
||||
var LastPositionValue = @Model.LastPositionValue;
|
||||
|
||||
let yearlyList = [];
|
||||
yearlyList.push({ year: 1368 });
|
||||
yearlyList.push({ year: 1369 });
|
||||
@foreach (var items in Model.YearlyList.OrderBy(x => x))
|
||||
{
|
||||
@:yearlyList.push({ year: Number(@items) });
|
||||
}
|
||||
var yearIndex = yearlyList.length;
|
||||
|
||||
|
||||
</script>
|
||||
<script src="~/assetsadminnew/tasks/js/index.js"></script>
|
||||
<script src="~/assetsadminnew/tasks/js/index.js?ver=@Version.AdminVersion"></script>
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model AccountManagement.Application.Contracts.Task.OperationModalViewModel
|
||||
|
||||
@model AccountManagement.Application.Contracts.Task.OperationModalViewModel
|
||||
@using Version = _0_Framework.Application.Version
|
||||
|
||||
@{
|
||||
<link href="~/assetsclient/css/task-manager-create.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/assetsadminnew/tasks/css/task-manager-create.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<style>
|
||||
@@ -36,7 +36,7 @@
|
||||
data-action="Refresh">
|
||||
|
||||
<div class="modal-content tm-create">
|
||||
<input asp-for="TaskId" hidden/>
|
||||
<input asp-for="TaskId" hidden />
|
||||
|
||||
<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>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</form>
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case "request_time":
|
||||
<form asp-page="./Index" asp-page-handler="CreateTimeRequest" id="employee" autocomplete="off"
|
||||
method="post"
|
||||
@@ -96,13 +96,13 @@
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<input asp-for="TaskId" hidden/>
|
||||
|
||||
<input asp-for="TaskId" hidden />
|
||||
|
||||
<div class="from-group">
|
||||
<input asp-for="CreateTaskTimeRequest.RequestTime" type="text" id="EndTaskDate" class="form-control text-center date" placeholder="تاریخ">
|
||||
<input asp-for="CreateTaskTimeRequest.RequestTime" type="text" id="EndTaskDate" class="form-control text-center date" placeholder="تاریخ">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-4 pe-0">
|
||||
<input type="radio" class="tm-rad" name="btnradio" id="today" autocomplete="off">
|
||||
@@ -118,8 +118,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="CreateTaskTimeRequest.Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ..."></textarea>
|
||||
@@ -145,7 +145,7 @@
|
||||
</form>
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case "canceled":
|
||||
<form asp-page="./Index" asp-page-handler="CreateCancelRequest" id="employee" autocomplete="off"
|
||||
method="post"
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<div class="row">
|
||||
<input asp-for="TaskId" hidden/>
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="CreateTaskCancel.Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ..."></textarea>
|
||||
@@ -191,7 +191,7 @@
|
||||
</form>
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case "completed":
|
||||
<form asp-page="./Index" asp-page-handler="Complete" id="employee" autocomplete="off"
|
||||
method="post"
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
<div class="row">
|
||||
<input asp-for="TaskId" hidden/>
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="from-group">
|
||||
<textarea asp-for="CompleteTaskViewModel.Description" class="tm-textarea p-2" rows="10" placeholder="توضیحات ..."></textarea>
|
||||
@@ -236,6 +236,10 @@
|
||||
</div>
|
||||
</form>
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,236 +68,266 @@
|
||||
@* <script src="~/assetsclient/js/smooth-scrollbar.js"></script> *@
|
||||
|
||||
<script>
|
||||
$('#MainModal').on('hidden.bs.modal', function () {
|
||||
$("#ModalContent").html("");
|
||||
$("#printSection").html("");
|
||||
});
|
||||
$('#MainModal').on('hidden.bs.modal', function () {
|
||||
$("#ModalContent").html("");
|
||||
$("#printSection").html("");
|
||||
});
|
||||
|
||||
var url = window.location.href.split('?')[0];
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
var url = window.location.href.split('?')[0];
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
|
||||
$('.selectLi').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).parent().addClass('active');
|
||||
};
|
||||
});
|
||||
$('.selectLi').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).parent().addClass('active');
|
||||
};
|
||||
});
|
||||
|
||||
function tutorialIntro() {
|
||||
localStorage.removeItem("hasCompletedDashboardTour");
|
||||
localStorage.removeItem("hasCompletedWorkShopTour");
|
||||
localStorage.removeItem("cardContractIntro");
|
||||
localStorage.removeItem("hasCompletedEmployeesTour");
|
||||
localStorage.removeItem("hasCompletedEmployeesLeaveTour");
|
||||
localStorage.removeItem("hasCompletedEmployeesLeaveListTour");
|
||||
}
|
||||
function tutorialIntro() {
|
||||
localStorage.removeItem("hasCompletedDashboardTour");
|
||||
localStorage.removeItem("hasCompletedWorkShopTour");
|
||||
localStorage.removeItem("cardContractIntro");
|
||||
localStorage.removeItem("hasCompletedEmployeesTour");
|
||||
localStorage.removeItem("hasCompletedEmployeesLeaveTour");
|
||||
localStorage.removeItem("hasCompletedEmployeesLeaveListTour");
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
if ($(window).width() < 992) {
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".main-wrapper").toggleClass("small");
|
||||
$(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
$(document).ready(function () {
|
||||
if ($(window).width() < 992) {
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".main-wrapper").toggleClass("small");
|
||||
$(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
|
||||
|
||||
$(".content-container").toggleClass("small");
|
||||
// $(".content-container").toggleClass("");
|
||||
$(".content-container").toggleClass("small");
|
||||
// $(".content-container").toggleClass("");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($(window).width() > 992) {
|
||||
$('#overlay').toggleClass("overlay");
|
||||
}
|
||||
});
|
||||
if ($(window).width() > 992) {
|
||||
$('#overlay').toggleClass("overlay");
|
||||
}
|
||||
});
|
||||
|
||||
$(".toggle").click(function () {
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".main-wrapper").toggleClass("small");
|
||||
$(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
$("#sidebar").toggleClass("enlarged");
|
||||
$(".toggle").click(function () {
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".main-wrapper").toggleClass("small");
|
||||
$(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
$("#sidebar").toggleClass("enlarged");
|
||||
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
|
||||
|
||||
|
||||
$(".content-container").toggleClass("small");
|
||||
// $(".content-container").toggleClass("");
|
||||
$(".content-container").toggleClass("small");
|
||||
// $(".content-container").toggleClass("");
|
||||
|
||||
$('#overlay').toggleClass("overlay");
|
||||
});
|
||||
$('#overlay').toggleClass("overlay");
|
||||
});
|
||||
|
||||
$('.sideMenuAdmin').click(function() {
|
||||
$("#sidebar").addClass('active-sidebar-navigation');
|
||||
$("#sideMenuAdmin").css('display', 'block');
|
||||
$('#overlay').toggleClass("overlay");
|
||||
});
|
||||
$('.sideMenuAdmin').click(function() {
|
||||
$("#sidebar").addClass('active-sidebar-navigation');
|
||||
$("#sideMenuAdmin").css('display', 'block');
|
||||
$('#overlay').toggleClass("overlay");
|
||||
});
|
||||
|
||||
// $("#close-sidemenu-mobile").click(function () {
|
||||
// $(".sidebar-navigation").toggleClass("small");
|
||||
// $(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
// $("#close-sidemenu-mobile").click(function () {
|
||||
// $(".sidebar-navigation").toggleClass("small");
|
||||
// $(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
|
||||
// $(".header-container").toggleClass("main-wrapper ");
|
||||
// $(".header-container").toggleClass("small");
|
||||
// $(".header-container").toggleClass("main-wrapper ");
|
||||
// $(".header-container").toggleClass("small");
|
||||
|
||||
|
||||
// $(".content-container").toggleClass("small");
|
||||
// $(".content-container").toggleClass("small");
|
||||
|
||||
// $('#overlay').toggleClass("overlay");
|
||||
// });
|
||||
// $('#overlay').toggleClass("overlay");
|
||||
// });
|
||||
|
||||
$("#overlay").click(function () {
|
||||
console.log(111);
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
$("#overlay").click(function () {
|
||||
console.log(111);
|
||||
$(".sidebar-navigation").toggleClass("small");
|
||||
// $(".sidebar").toggleClass("active-sidebar-navigation");
|
||||
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
$(".header-container").toggleClass("main-wrapper ");
|
||||
$(".header-container").toggleClass("small");
|
||||
|
||||
|
||||
$(".content-container").toggleClass("small");
|
||||
$(".content-container").toggleClass("small");
|
||||
|
||||
$('#overlay').toggleClass("overlay");
|
||||
$("#sidebar").removeClass('active-sidebar-navigation');
|
||||
$("#sideMenuAdmin").css('display', 'none');
|
||||
});
|
||||
$('#overlay').toggleClass("overlay");
|
||||
$("#sidebar").removeClass('active-sidebar-navigation');
|
||||
$("#sideMenuAdmin").css('display', 'none');
|
||||
});
|
||||
|
||||
//******************** بستن مودال خطا ********************
|
||||
$(document).on('click', '#closeAlert', function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
clearTimeout();
|
||||
});
|
||||
//******************** بستن مودال خطا ********************
|
||||
//******************** بستن مودال خطا ********************
|
||||
$(document).on('click', '#closeAlert', function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
clearTimeout();
|
||||
});
|
||||
//******************** بستن مودال خطا ********************
|
||||
|
||||
$(document).on("click", function (event) {
|
||||
var target = $(event.target);
|
||||
if (!target.closest(".dropdown-menu").length
|
||||
&& !target.is(".dropdown-menu")
|
||||
&& !target.is(".user-details .user-info .title")
|
||||
) {
|
||||
$(".dropdown").removeClass("open");
|
||||
}
|
||||
});
|
||||
$(document).on("click", function (event) {
|
||||
var target = $(event.target);
|
||||
if (!target.closest(".dropdown-menu").length
|
||||
&& !target.is(".dropdown-menu")
|
||||
&& !target.is(".user-details .user-info .title")
|
||||
) {
|
||||
$(".dropdown").removeClass("open");
|
||||
}
|
||||
});
|
||||
|
||||
function openSideBar() {
|
||||
var screenWidth = $(window).width();
|
||||
var navActive = $('.navigation-right').hasClass('active');
|
||||
var myWrapperEnlarged = $('#myWrapper').hasClass('enlarged');
|
||||
function openSideBar() {
|
||||
var screenWidth = $(window).width();
|
||||
var navActive = $('.navigation-right').hasClass('active');
|
||||
var myWrapperEnlarged = $('#myWrapper').hasClass('enlarged');
|
||||
|
||||
if (screenWidth < 600) {
|
||||
$(".navigation-right").removeClass('active');
|
||||
$("#myWrapper").removeClass('enlarged');
|
||||
} else if (navActive && myWrapperEnlarged) {
|
||||
$(".navigation-right").removeClass('active');
|
||||
$("#myWrapper").removeClass('enlarged');
|
||||
} else {
|
||||
$(".navigation-right").addClass('active');
|
||||
$("#myWrapper").addClass('enlarged');
|
||||
}
|
||||
}
|
||||
function openSettings() {
|
||||
let dropdown = $(".user-details .user-info .dropdown");
|
||||
dropdown.toggleClass("open");
|
||||
}
|
||||
function checkUrl() {
|
||||
var url = window.location.href.split('?')[0];
|
||||
$('.aMenu').filter(function () {
|
||||
var id = $(this).attr("id");
|
||||
if (this.href == url || (id == "regiteremployer" && url.indexOf("/Employers/") > -1)) {
|
||||
$(".activeTab").removeClass('activeTab');
|
||||
$(this).parent("li").addClass('activeTab');
|
||||
};
|
||||
});
|
||||
}
|
||||
if (screenWidth < 600) {
|
||||
$(".navigation-right").removeClass('active');
|
||||
$("#myWrapper").removeClass('enlarged');
|
||||
} else if (navActive && myWrapperEnlarged) {
|
||||
$(".navigation-right").removeClass('active');
|
||||
$("#myWrapper").removeClass('enlarged');
|
||||
} else {
|
||||
$(".navigation-right").addClass('active');
|
||||
$("#myWrapper").addClass('enlarged');
|
||||
}
|
||||
}
|
||||
function openSettings() {
|
||||
let dropdown = $(".user-details .user-info .dropdown");
|
||||
dropdown.toggleClass("open");
|
||||
}
|
||||
function checkUrl() {
|
||||
var url = window.location.href.split('?')[0];
|
||||
$('.aMenu').filter(function () {
|
||||
var id = $(this).attr("id");
|
||||
if (this.href == url || (id == "regiteremployer" && url.indexOf("/Employers/") > -1)) {
|
||||
$(".activeTab").removeClass('activeTab');
|
||||
$(this).parent("li").addClass('activeTab');
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// $(document).ready(function () {
|
||||
// var Scrollbar1 = window.Scrollbar;
|
||||
// Scrollbar1.init(document.querySelector('#ModelDivScrollbar'), {
|
||||
// alwaysShowTracks: true,
|
||||
// });
|
||||
// });
|
||||
// $(document).ready(function () {
|
||||
// var Scrollbar1 = window.Scrollbar;
|
||||
// Scrollbar1.init(document.querySelector('#ModelDivScrollbar'), {
|
||||
// alwaysShowTracks: true,
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
if ($('.sidebar-navigation').not('small')) {
|
||||
$(".open-submenu").click(function () {
|
||||
$(this).find('.ul-open-submenu').slideToggle();
|
||||
})
|
||||
} else {
|
||||
if ($('.sidebar-navigation').not('small')) {
|
||||
$(".open-submenu").click(function () {
|
||||
$(this).find('.ul-open-submenu').slideToggle();
|
||||
})
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input[type="text"], input[type="number"], textarea').each(function() {
|
||||
$(this).on('input', function() {
|
||||
var enteredValue = $(this).val();
|
||||
var englishNumbers = convertPersianNumbersToEnglish(enteredValue);
|
||||
$(this).val(englishNumbers);
|
||||
});
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('input[type="text"], input[type="number"], textarea').each(function() {
|
||||
$(this).on('input', function() {
|
||||
var enteredValue = $(this).val();
|
||||
var englishNumbers = convertPersianNumbersToEnglish(enteredValue);
|
||||
$(this).val(englishNumbers);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function convertPersianNumbersToEnglish(input) {
|
||||
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
|
||||
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
|
||||
function convertPersianNumbersToEnglish(input) {
|
||||
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
|
||||
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
|
||||
|
||||
var str = input;
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
var str = input;
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
// sidebar submenu
|
||||
$(document).ready(function() {
|
||||
$(".MainMenuItem").click(function() {
|
||||
var submenu = $(this).next(".list-unstyled");
|
||||
// sidebar submenu
|
||||
$(document).ready(function() {
|
||||
$(".MainMenuItem").click(function() {
|
||||
var submenu = $(this).next(".list-unstyled");
|
||||
|
||||
if (submenu.is(":visible")) {
|
||||
submenu.slideUp("fast");
|
||||
$(this).find(".md-remove").removeClass("md-remove").addClass("md-add");
|
||||
} else {
|
||||
$(".list-unstyled").slideUp("fast");
|
||||
$(".MainMenuItem").find(".md-remove").removeClass("md-remove").addClass("md-add");
|
||||
if (submenu.is(":visible")) {
|
||||
submenu.slideUp("fast");
|
||||
$(this).find(".md-remove").removeClass("md-remove").addClass("md-add");
|
||||
} else {
|
||||
$(".list-unstyled").slideUp("fast");
|
||||
$(".MainMenuItem").find(".md-remove").removeClass("md-remove").addClass("md-add");
|
||||
|
||||
submenu.slideToggle("fast");
|
||||
$(this).find(".md-add").removeClass("md-add").addClass("md-remove");
|
||||
}
|
||||
});
|
||||
submenu.slideToggle("fast");
|
||||
$(this).find(".md-add").removeClass("md-add").addClass("md-remove");
|
||||
}
|
||||
});
|
||||
|
||||
function activateLink(selector, subMenuClass) {
|
||||
$(selector).filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".list-unstyled").slideUp(350);
|
||||
$(subMenuClass).slideDown(350);
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
function activateLink(selector, subMenuClass) {
|
||||
$(selector).filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".list-unstyled").slideUp(350);
|
||||
$(subMenuClass).slideDown(350);
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var url = window.location.href;
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
var url = window.location.href;
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
|
||||
$('.btnDashboard').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).addClass('active');
|
||||
};
|
||||
});
|
||||
$('.btnDashboard').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).addClass('active');
|
||||
};
|
||||
});
|
||||
|
||||
activateLink('.clik', '.sdf1');
|
||||
activateLink('.clik2', '.sdf2');
|
||||
activateLink('.clik3', '.sdf3');
|
||||
activateLink('.clik4', '.sdf4');
|
||||
activateLink('.clik5', '.sdf5');
|
||||
activateLink('.clik6', '.sdf6');
|
||||
activateLink('.clik7', '.sdf7');
|
||||
activateLink('.clik8', '.sdf8');
|
||||
});
|
||||
</script>
|
||||
activateLink('.clik', '.sdf1');
|
||||
activateLink('.clik2', '.sdf2');
|
||||
activateLink('.clik3', '.sdf3');
|
||||
activateLink('.clik4', '.sdf4');
|
||||
activateLink('.clik5', '.sdf5');
|
||||
activateLink('.clik6', '.sdf6');
|
||||
activateLink('.clik7', '.sdf7');
|
||||
activateLink('.clik8', '.sdf8');
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var activeSubs = $('.has_sub.active');
|
||||
|
||||
activeSubs.find(".md-add").each(function() {
|
||||
$(this).removeClass("md-add").addClass("md-remove");
|
||||
});
|
||||
|
||||
activeSubs.find('.MainMenuItem').each(function() {
|
||||
$(this).addClass('active');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#btn-fullscreen').on('click', function() {
|
||||
if (!document.fullscreenElement) {
|
||||
document.documentElement.requestFullscreen().then(() => {
|
||||
$('body').addClass('fullscreen');
|
||||
}).catch((err) => {
|
||||
alert(`Error attempting to enable full-screen mode: ${err.message}`);
|
||||
});
|
||||
} else {
|
||||
document.exitFullscreen().then(() => {
|
||||
$('body').removeClass('fullscreen');
|
||||
}).catch((err) => {
|
||||
alert(`Error attempting to disable full-screen mode: ${err.message}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@RenderSection("Script", false)
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
<None Include="wwwroot\AdminTheme\assets\datatables-new\js\jquery.dataTables.min.js" />
|
||||
<None Include="wwwroot\AdminTheme\assets\images\small\back1.jpg" />
|
||||
<None Include="wwwroot\AssetsAdminNew\ContractingParties\js\Index.js" />
|
||||
<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\Tasks\js\create.js" />
|
||||
@@ -2559,6 +2560,38 @@
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\create.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\DetailModal.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\Edit.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\Index.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\OperationRequestModal.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\task-manager-create.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\task-manager-list.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\AssetsAdminNew\Tasks\css\taskgroup.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<!--<Content Update="wwwroot\AdminTheme\static\css\lib\persian-datepicker.min.css">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
@@ -2573,4 +2606,8 @@
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Pages\Accounts\Account\AccountLeftWork.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="wwwroot\AssetsAdminNew\Tasks\css\.config\dotnet-tools.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
BIN
ServiceHost/Storage/temp/2/pic3_638573708929965000.png
Normal file
BIN
ServiceHost/Storage/temp/2/pic3_638573708929965000.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "8.0.5",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,4 +248,48 @@
|
||||
.left {
|
||||
left: 5px;
|
||||
}
|
||||
}
|
||||
.audio-player {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.player-btn {
|
||||
background: #23a9a9;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.player-btn.play:after {
|
||||
content: '▶' !important;
|
||||
}
|
||||
|
||||
.player-btn.pause:after {
|
||||
content: '❚❚' !important;
|
||||
}
|
||||
|
||||
.waveform {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
@@ -103,6 +103,11 @@
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
transition: all .3s ease
|
||||
}
|
||||
|
||||
.btn-register-index:hover {
|
||||
background-color: #65a30d;
|
||||
}
|
||||
|
||||
.btnTaskListSelfTask {
|
||||
@@ -111,80 +116,143 @@
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskListSelfTask:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskListAllTask {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskListAllTask:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskListSent {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskListSent:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskListReceived {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskListReceived:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskList {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskList:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskRequest {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
justify-content: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskRequest:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskRequestAll {
|
||||
padding: 10px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
background-color: #c0f9f9;
|
||||
border: 1px solid #c0f9f9;
|
||||
color: #c1bbbb;
|
||||
width: 210px;
|
||||
justify-content: center;
|
||||
transition: all ease -in -out .3s
|
||||
}
|
||||
|
||||
.btnTaskRequestAll:hover {
|
||||
border: 1px solid #979797;
|
||||
background-color: #a8f5f5;
|
||||
color: #494949;
|
||||
}
|
||||
|
||||
.btnTaskListSelfTask.active,
|
||||
.btnTaskListAllTask.active,
|
||||
.btnTaskListSent.active,
|
||||
.btnTaskListReceived.active,
|
||||
.btnTaskList.active,
|
||||
.btnTaskRequest.active {
|
||||
.btnTaskRequest.active,
|
||||
.btnTaskRequestAll.active {
|
||||
color: #494949;
|
||||
background-color: #42e5e5;
|
||||
border: 1px solid #42e5e5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,682 @@
|
||||
.tm-create-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.col-span-2 {
|
||||
grid-column: span 2 / span 2;
|
||||
}
|
||||
|
||||
.col-span-4 {
|
||||
grid-column: span 4 / span 4;
|
||||
}
|
||||
|
||||
.col-span-5 {
|
||||
grid-column: span 5 / span 5;
|
||||
}
|
||||
|
||||
.col-span-7 {
|
||||
grid-column: span 7 / span 7;
|
||||
}
|
||||
|
||||
.col-span-8 {
|
||||
grid-column: span 8 / span 8;
|
||||
}
|
||||
|
||||
.col-span-12 {
|
||||
grid-column: span 12 / span 12;
|
||||
}
|
||||
|
||||
.tm-create .form-control,
|
||||
.tm-create .form-select {
|
||||
color: #797979;
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 7px;
|
||||
background-color: #F6F6F6;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tm-create .tm-textarea {
|
||||
color: #797979;
|
||||
width: 100%;
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 7px;
|
||||
background-color: #F6F6F6;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tm-rad {
|
||||
position: absolute;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.tm-rad + .btn, :not(.tm-rad) + .btn:active, .btn:first-child:active, .btn.active, .btn.show {
|
||||
border-radius: 8px;
|
||||
color: #0F8080;
|
||||
border: 0;
|
||||
outline: 1px dashed #0F8080;
|
||||
background-color: #DDF4F4;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tm-rad:checked + .btn, :not(.tm-rad) + .btn:active, .btn:first-child:active, .btn.active, .btn.show {
|
||||
border-radius: 8px;
|
||||
color: #ffffff;
|
||||
outline: 1px dashed transparent;
|
||||
background: linear-gradient(94deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%);
|
||||
}
|
||||
|
||||
.dropzone {
|
||||
width: 100%;
|
||||
margin: 1%;
|
||||
border: 2px dashed #BFBFBF !important;
|
||||
border-radius: 10px;
|
||||
min-height: auto !important;
|
||||
padding: 18px 10px !important;
|
||||
}
|
||||
|
||||
|
||||
.dz-message {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.text-dropzone {
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
align-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.text-dropzone p {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.text-dropzone p:first-child {
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.text-dropzone p:last-child {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.btn-file-dropzone {
|
||||
background-color: transparent;
|
||||
border-radius: 7px;
|
||||
border:2px solid #57B2E0;
|
||||
color: #57B2E0;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
|
||||
.upload-voice {
|
||||
width: 100%;
|
||||
margin: 1%;
|
||||
border: 2px dashed #BFBFBF !important;
|
||||
border-radius: 10px;
|
||||
min-height: auto !important;
|
||||
padding: 18px 10px !important;
|
||||
}
|
||||
|
||||
.btn-voice {
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.btn-tm-save {
|
||||
background-color: #84CC16;
|
||||
color: #ffffff;
|
||||
padding: 7px 15px;
|
||||
border-radius: 5px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.btn-tm-save:hover {
|
||||
background-color: #629b0c;
|
||||
}
|
||||
|
||||
.btn-tm-cancel {
|
||||
background-color: #1F2937;
|
||||
color: #ffffff;
|
||||
padding: 7px 15px;
|
||||
border-radius: 5px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.btn-tm-cancel:hover {
|
||||
background-color: #121820;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
outline: none;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.form-check-input[type="radio"],
|
||||
.form-check-input[type="checkbox"] {
|
||||
border-radius: 5px;
|
||||
padding: 9px;
|
||||
outline: none;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
color: #696969;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.form-check-input:checked[type=radio] {
|
||||
--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 10 3 3 6-6'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.btnPosition {
|
||||
outline: 1px solid #138989;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.active {
|
||||
outline: 1px solid transparent;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
background-color: #84CC16;
|
||||
color: #ffffff;
|
||||
padding: 3px 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: 5px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
|
||||
.btn-add:hover {
|
||||
background-color: #629b0c;
|
||||
}
|
||||
|
||||
.btn-add2 {
|
||||
background-color: #84CC16;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: 5px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.btn-add2: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;
|
||||
padding: 0.260rem .75rem;
|
||||
}
|
||||
|
||||
.searchItem {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #535353;
|
||||
}
|
||||
|
||||
|
||||
/* Start Uploading Box */
|
||||
.spinner-loading {
|
||||
background-color: #0000006e;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.upload-file {
|
||||
width: 230px;
|
||||
border-radius: 8px;
|
||||
/*background: linear-gradient(94deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%);*/
|
||||
background: linear-gradient(94deg, #3dcbcb 1.59%, #24c3c3 47.86%, #0aa3a3 101.16%);
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 7px 10px;
|
||||
}
|
||||
|
||||
.upload-file.empty-file {
|
||||
background: white;
|
||||
outline: 1px solid #C4C4C4;
|
||||
color: #7A7474;
|
||||
}
|
||||
|
||||
.upload-box svg {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
}
|
||||
|
||||
.upload-box {
|
||||
position: relative;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
border: 2px dashed #29B4B4;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.upload-box-voice {
|
||||
position: relative;
|
||||
/*width: 100%;*/
|
||||
width: 264px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
border: 2px dashed #29B4B4;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
font-size: 12px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-box-voice-exist {
|
||||
position: relative;
|
||||
/*width: 100%;*/
|
||||
width: 264px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
border: 2px dashed #29B4B4;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
font-size: 12px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-box img, .upload-box-voice audio {
|
||||
max-width: 100%;
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
object-fit: cover;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.upload-box .delete-btn,
|
||||
.upload-box-voice-exist .delete-btn {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
background: #ff0000;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.upload-box.empty, .upload-box-voice.empty {
|
||||
border: 2px dashed #29B4B4;
|
||||
padding: 0;
|
||||
}
|
||||
/* End Uploading Box */
|
||||
|
||||
|
||||
|
||||
|
||||
.btn-rejectTo {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #ef4444;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btn-rejectTo:hover {
|
||||
background-color: #c13131;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Start Voice */
|
||||
.record_btn {
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: 0.15s linear;
|
||||
}
|
||||
|
||||
.record_btn:hover {
|
||||
transition: 0.15s linear;
|
||||
/*transform: scale( 1.05 );*/
|
||||
}
|
||||
|
||||
.record_btn:active {
|
||||
/*background: #f5f5f5;*/
|
||||
}
|
||||
|
||||
/* .record_btn:after {
|
||||
content: '\E029';
|
||||
} */
|
||||
|
||||
.record_btn[disabled] {
|
||||
border: 2px solid #ccc;
|
||||
}
|
||||
|
||||
.record_btn[disabled]:after {
|
||||
content: '\E02B';
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.record_btn[disabled]:hover {
|
||||
transition: 0.15s linear;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.record_btn[disabled]:active {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.recording {
|
||||
animation: recording 2s infinite ease-in-out;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.recording:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
margin: 0px;
|
||||
border-radius: 50%;
|
||||
background: rgba( 0, 0, 0, 0.05 );
|
||||
animation: recording_before 2s infinite ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes recording {
|
||||
from {
|
||||
transform: scale( 1.1 );
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale( 1.1 );
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes recording_before {
|
||||
80% {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin: -100px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.record_canvas {
|
||||
width: 60px;
|
||||
height: 100px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.txt_btn {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
transition: 0.15s linear;
|
||||
animation: text_btn 0.3s ease-in-out;
|
||||
}
|
||||
/* End Voice */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Start Searching Result Box */
|
||||
.selectDiv {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
border-radius: 10px;
|
||||
min-height: 20px;
|
||||
max-height: 190px;
|
||||
overflow: hidden scroll;
|
||||
width: 100%;
|
||||
background-color: rgb(244 244 244);
|
||||
display: block;
|
||||
border: 1px solid #DADADA;
|
||||
}
|
||||
|
||||
.selectDiv ul {
|
||||
list-style-type: none;
|
||||
padding: 0 5px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.selectDiv ul li {
|
||||
display: block;
|
||||
text-align: right;
|
||||
color: #797979;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 3px;
|
||||
transition: all ease-in-out .3s;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.selectDiv ul li:hover {
|
||||
background-color: #41e3e3;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.noResult:hover {
|
||||
background-color: transparent !important;
|
||||
color: #797979 !important;
|
||||
}
|
||||
/* End Searching Result Box */
|
||||
|
||||
|
||||
/* Start Searching Result Box 2 */
|
||||
.selectTitleDiv {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
border-radius: 10px;
|
||||
min-height: 20px;
|
||||
max-height: 190px;
|
||||
overflow: hidden scroll;
|
||||
width: 100%;
|
||||
background-color: rgb(244 244 244);
|
||||
display: block;
|
||||
border: 1px solid #DADADA;
|
||||
}
|
||||
|
||||
.selectTitleDiv ul {
|
||||
list-style-type: none;
|
||||
padding: 0 5px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.selectTitleDiv ul li {
|
||||
display: block;
|
||||
text-align: right;
|
||||
color: #797979;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
padding: 4px 3px;
|
||||
transition: all ease-in-out .3s;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.selectTitleDiv ul li:hover {
|
||||
background-color: #41e3e3;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.noResultTitle:hover {
|
||||
background-color: transparent !important;
|
||||
color: #797979 !important;
|
||||
}
|
||||
/* End Searching Result Box 2 */
|
||||
|
||||
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
.tm-rad + .btn, :not(.tm-rad) + .btn:active, .btn:first-child:active, .btn.active, .btn.show {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.dz-message {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.text-dropzone p {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.btn-file-dropzone {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.lg-col-span-6 {
|
||||
grid-column: span 6 / span 6;
|
||||
}
|
||||
|
||||
.upload-file {
|
||||
width: 260px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.upload-file {
|
||||
width: 100%;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.upload-box-voice {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#upload-container-voice {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,823 @@
|
||||
|
||||
.Rtable .Rtable-row {
|
||||
margin: 1px auto;
|
||||
}
|
||||
|
||||
/*
|
||||
.Rtable--collapse .Rtable-row {
|
||||
padding: 0.2em 0.4em;
|
||||
}
|
||||
.Rtable .Rtable-row:nth-child(even), .table-workshop .Rtable .Rtable-row:nth-child(4n+2), .table-personals .Rtable .Rtable-row:nth-child(4n+2) {
|
||||
border: 0px solid #eee !important;
|
||||
}*/
|
||||
|
||||
.table-task-manager .Rtable--collapse .Rtable-row .Rtable-cell {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.operations-btns {
|
||||
border: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tm-red {
|
||||
background-color: #F07979 !important;
|
||||
outline: 1px solid #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.tm-red .tooltipfull-container {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tm-red .span-number {
|
||||
background-color: #EE5959 !important;
|
||||
}
|
||||
|
||||
.tm-red .Rtable-cell--heading,
|
||||
.tm-red .Rtable-cell--content {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
|
||||
.tm-brown {
|
||||
background-color: #3b3b3b63 !important;
|
||||
outline: 1px solid #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.tm-brown .tooltipfull-container {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tm-brown .span-number {
|
||||
background-color: rgb(24 43 43 / 25%) !important;
|
||||
}
|
||||
|
||||
.tm-brown .Rtable-cell--heading,
|
||||
.tm-brown .Rtable-cell--content {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.tm-dark {
|
||||
background-color: #707070 !important;
|
||||
outline: 1px solid #E3E3E3!important;
|
||||
}
|
||||
|
||||
.tm-dark .tooltipfull-container {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tm-dark .span-number {
|
||||
background-color: #262626 !important;
|
||||
}
|
||||
|
||||
.tm-dark .Rtable-cell--heading,
|
||||
.tm-dark .Rtable-cell--content {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.tm-yellow {
|
||||
background-color: #F3E38B !important;
|
||||
outline: 1px solid #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.tm-yellow .tooltipfull-container {
|
||||
color: #373737;
|
||||
}
|
||||
|
||||
|
||||
.tm-yellow .span-number {
|
||||
background-color: #EAB308 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.tm-yellow .Rtable-cell--heading,
|
||||
.tm-yellow .Rtable-cell--content {
|
||||
color: #373737 !important;
|
||||
}
|
||||
|
||||
.tm-gray {
|
||||
background-color: #F1F5F9 !important;
|
||||
outline: 1px solid #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.tm-gray .tooltipfull-container {
|
||||
color: #373737;
|
||||
}
|
||||
|
||||
.tm-gray .span-number {
|
||||
background-color: #CBD5E1 !important;
|
||||
color: #373737 !important;
|
||||
}
|
||||
|
||||
.tm-gray .Rtable-cell--heading,
|
||||
.tm-gray .Rtable-cell--content {
|
||||
color: #373737 !important;
|
||||
}
|
||||
|
||||
.tm-gray .Rtable-cell.width2 .Rtable-cell--content {
|
||||
color: #373737 !important;
|
||||
}
|
||||
|
||||
.tm-green {
|
||||
background-color: #D5F69A !important;
|
||||
outline: 1px solid #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.tm-green .tooltipfull-container {
|
||||
color: #373737;
|
||||
}
|
||||
|
||||
.tm-green .span-number {
|
||||
background-color: #84CC16 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.tm-green .Rtable-cell--heading,
|
||||
.tm-green .Rtable-cell--content {
|
||||
color: #373737 !important;
|
||||
}
|
||||
|
||||
.operation-div .operations-btns {
|
||||
background-color: #FFE5E5;
|
||||
padding: 6px 15px;
|
||||
color: #0B5959;
|
||||
}
|
||||
|
||||
.tm-red-operation.operations-btns {
|
||||
background: #EE5959 !important;
|
||||
}
|
||||
|
||||
.tm-yellow-operation .operations-btns {
|
||||
background: #f9f4d7 !important;
|
||||
}
|
||||
|
||||
.tm-gray-operation .operations-btns {
|
||||
background: #f0f2f3 !important;
|
||||
}
|
||||
|
||||
.tm-green-operation .operations-btns {
|
||||
background: #F3E38B !important;
|
||||
}
|
||||
|
||||
.tm-dark-operation .operations-btns {
|
||||
background: #d1cdcd !important;
|
||||
}
|
||||
|
||||
/* Start Buttons For Task Manager */
|
||||
.tm-red .btn-taskmanager-more {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
width: 73px;
|
||||
}
|
||||
.tm-red .btn-taskmanager-edit {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
.tm-red .btn-taskmanager-delete {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.tm-red .btn-taskmanager-more:hover,
|
||||
.tm-red .btn-taskmanager-edit:hover,
|
||||
.tm-red .btn-taskmanager-delete:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.tm-dark .btn-taskmanager-more {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
width: 73px;
|
||||
}
|
||||
.tm-dark .btn-taskmanager-edit {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
.tm-dark .btn-taskmanager-delete {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.btn-taskmanager-detail {
|
||||
background: rgb(201 178 0);
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.btn-taskmanager-detail:hover {
|
||||
background: rgba(27, 147, 147, 0.3);
|
||||
}
|
||||
|
||||
.tm-dark .btn-taskmanager-more:hover,
|
||||
.tm-dark .btn-taskmanager-edit:hover,
|
||||
.tm-dark .btn-taskmanager-delete:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.tm-yellow .btn-taskmanager-more {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
width: 73px;
|
||||
}
|
||||
|
||||
.tm-green .btn-taskmanager-more,
|
||||
.tm-brown .btn-taskmanager-more {
|
||||
background: rgb(53 59 3 / 50%);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
width: 73px;
|
||||
}
|
||||
|
||||
.tm-yellow .btn-taskmanager-edit,
|
||||
.tm-green .btn-taskmanager-edit {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
.tm-yellow .btn-taskmanager-delete,
|
||||
.tm-green .btn-taskmanager-delete {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.tm-gray .btn-taskmanager-more {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
width: 73px;
|
||||
}
|
||||
.tm-gray .btn-taskmanager-edit {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
.tm-gray .btn-taskmanager-delete {
|
||||
background: rgba(83, 83, 83, 0.5);
|
||||
border: 0.5px solid #535353;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
/* End Buttons For Task Manager */
|
||||
|
||||
.tm-yellow .btn-taskmanager-more:hover,
|
||||
.tm-yellow .btn-taskmanager-edit:hover,
|
||||
.tm-yellow .btn-taskmanager-delete:hover,
|
||||
.tm-gray .btn-taskmanager-more:hover,
|
||||
.tm-gray .btn-taskmanager-edit:hover,
|
||||
.tm-gray .btn-taskmanager-delete:hover {
|
||||
background: rgba(83, 83, 83, 0.7);
|
||||
}
|
||||
|
||||
.tm-green .btn-taskmanager-more:hover,
|
||||
.tm-green .btn-taskmanager-edit:hover,
|
||||
.tm-green .btn-taskmanager-delete:hover {
|
||||
background: rgb(53 59 3 / 70%);
|
||||
}
|
||||
|
||||
.sub-buttons {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.operation-div .btn1,
|
||||
.operation-div .btn2,
|
||||
.operation-div .btn3 {
|
||||
margin: 0 2px 0 2px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #b2b2b2;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.operations-btns .btn1 {
|
||||
color: #0B5959;
|
||||
background-color: #FFFFFF;
|
||||
padding: 13px 18px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
width: 180px;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
|
||||
.operations-btns .btn2 {
|
||||
color: #0B5959;
|
||||
background-color: #FFFFFF;
|
||||
padding: 13px 18px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
width: 180px;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
|
||||
.operations-btns .btn3 {
|
||||
color: #0B5959;
|
||||
background-color: #FFFFFF;
|
||||
padding: 13px 18px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
width: 180px;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
|
||||
.operations-btns .btn1:hover,
|
||||
.operations-btns .btn2:hover,
|
||||
.operations-btns .btn3:hover {
|
||||
border: 1px solid #097575;
|
||||
}
|
||||
|
||||
.operation-div .btn-taskmanager-edit {
|
||||
background-color: #D7E7FF;
|
||||
border: 1px solid #5995EE;
|
||||
padding: 3px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.operation-div .btn-taskmanager-edit svg,
|
||||
.operation-div .btn-taskmanager-edit span {
|
||||
color: #5995EE;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.operation-div .btn-taskmanager-delete {
|
||||
background-color: #FFCECE;
|
||||
border: 1px solid #EE5959;
|
||||
padding: 3px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.operation-div .btn-taskmanager-delete svg,
|
||||
.operation-div .btn-taskmanager-delete span {
|
||||
color: #EE5959;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.taskTime .form-control {
|
||||
background-color: #F6F6F6;
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 7px;
|
||||
font-size: 13px;
|
||||
color: #797979;
|
||||
}
|
||||
|
||||
.taskTime .span-text {
|
||||
font-size: 13px;
|
||||
color: #797979;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tm-descr {
|
||||
background-color: #F6F6F6;
|
||||
border: 1px solid #DADADA;
|
||||
padding: 4px 7px;
|
||||
color: #5F5F5F;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
text-align: justify;
|
||||
border-radius: 7px;
|
||||
width: 100%;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width1 {
|
||||
width: 5%;
|
||||
}
|
||||
.table-task-manager .Rtable .Rtable-row .width2 {
|
||||
/* width: 60% / 5 */
|
||||
width: 40%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width2.Rtable-cell .Rtable-cell--content{
|
||||
padding: 0 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width2 .color-width2:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
background-color: #35353540;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width3 {
|
||||
width: 10%;
|
||||
text-align: center !important;
|
||||
}
|
||||
.table-task-manager .Rtable .Rtable-row .width3 .Rtable-cell--content {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width4 {
|
||||
width: 14%;
|
||||
}
|
||||
.table-task-manager .Rtable .Rtable-row .width5 {
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width6 {
|
||||
width: 5%;
|
||||
text-align: left;
|
||||
}
|
||||
.table-task-manager .Rtable .Rtable-row .width6 .Rtable-cell--content {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width7 {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.detailTask .detailTitle {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #2d2d2d;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.detailTask .detailTitleText {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
.detailTask p {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #4d4d4d;
|
||||
margin: 0;
|
||||
height: 110px
|
||||
}
|
||||
|
||||
|
||||
.btn-change-date {
|
||||
border: 1px solid transparent;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #ffffff;
|
||||
margin: auto 4px auto 1px;
|
||||
background-color: #84CC16;
|
||||
box-shadow: 0;
|
||||
font-size: 13px;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-change-date:hover {
|
||||
background-color: #629b0c;
|
||||
}
|
||||
|
||||
.btn-accept {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: $ffffff;
|
||||
margin: auto 4px auto 1px;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-accept:hover {
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-reject {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: $ffffff;
|
||||
margin: auto 4px auto 1px;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-reject:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
.label-time-request {
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
@media(max-width: 1366px) {
|
||||
.btn-register, .btn-cancel2 {
|
||||
font-size: 12px;
|
||||
padding: 10px 50px;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row * {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width1 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width2 {
|
||||
/* width: 60% / 5 */
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width3 {
|
||||
width: 10%;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width4 {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width5 {
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width6 {
|
||||
width: 5%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width6 .Rtable-cell--content {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width7 {
|
||||
width: 18%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width:770px) {
|
||||
.table-task-manager .Rtable .Rtable-row .Rtable-cell {
|
||||
width: auto;
|
||||
/* flex-grow: 0; */
|
||||
}
|
||||
.table-task-manager .Rtable--collapse .Rtable-row {
|
||||
margin: 7px 0px 0;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
/*.table-task-manager .Rtable .Rtable-row .width1 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width2 {*/
|
||||
/* width: 60% / 5 */
|
||||
/*width: 10%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width3 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width4 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width5 {
|
||||
width: 24%;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width6 {
|
||||
width: 20%;
|
||||
}*/
|
||||
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell.width8 .Rtable-cell--content {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.sub-buttons {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell.width8 .Rtable-cell--content {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width1 {
|
||||
width: 10% !important;
|
||||
}
|
||||
.table-task-manager .Rtable .Rtable-row .width5 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.operation-div .operations-btns .btn1,
|
||||
.operation-div .operations-btns .btn2,
|
||||
.operation-div .operations-btns .btn3 {
|
||||
padding: 11px 6px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
padding: auto;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width:580px) {
|
||||
.detailTask .detailTitle {
|
||||
text-align: start;
|
||||
}
|
||||
}
|
||||
220
ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/taskgroup.css
Normal file
220
ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/taskgroup.css
Normal file
@@ -0,0 +1,220 @@
|
||||
.group-task-section {
|
||||
/* display: grid;
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
gap: 10px;*/
|
||||
}
|
||||
|
||||
.group-task-section .card-group {
|
||||
/*grid-column: span 4 / span 5;*/
|
||||
|
||||
/* grid-column: span 4 / span 4;
|
||||
row-gap: 10px;*/
|
||||
}
|
||||
|
||||
.group-task-section .card-group1 {
|
||||
/*grid-column: span 8 / span 8;
|
||||
row-gap: 10px;*/
|
||||
}
|
||||
|
||||
#loadAccountItems {
|
||||
height: 710px;
|
||||
}
|
||||
|
||||
.row-index {
|
||||
background: #A7EAEA;
|
||||
color: #716969;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.title-group {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: #353232;
|
||||
}
|
||||
|
||||
|
||||
.group-task-section .card-group .title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.group-task-section .card-group .title h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.group-task-section .card-group .btn-delete {
|
||||
background-color: #F8E0E0;
|
||||
}
|
||||
|
||||
.group-task-section .card-group p {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.group-task-section .list-personnel {
|
||||
grid-column: span 8 / span 7;
|
||||
}
|
||||
|
||||
.btnPosition {
|
||||
outline: 1px solid #93e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.active {
|
||||
outline: 1px solid #138989;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
@media(max-width: 1366px) {
|
||||
#loadAccountItems {
|
||||
height: 410px;
|
||||
}
|
||||
|
||||
.row-index {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
font-size: 12px;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
padding: 6px 12px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.title-group {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.title-group h4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.Rtable .Rtable-row {
|
||||
margin: 10px 0px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading {
|
||||
margin: 0;
|
||||
}
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
width: auto;
|
||||
}
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
padding: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-register, .btn-cancel2 {
|
||||
font-size: 12px;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
#loadAccountItems {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
padding: 6px 7px;
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,12 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
|
||||
$(".date").mask("0000/00/00");
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$('.date').on('input',
|
||||
function () {
|
||||
let startDate = this.value;
|
||||
@@ -497,7 +502,7 @@ function remove(id) {
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '#upload-doc', function (e) {
|
||||
e.preventDefault()
|
||||
e.preventDefault();
|
||||
let file1 = document.getElementById("Command_Document1");
|
||||
let file2 = document.getElementById("Command_Document2");
|
||||
let file3 = document.getElementById("Command_Document3");
|
||||
@@ -718,4 +723,57 @@ if ($('.gallery').length) {
|
||||
})();
|
||||
}
|
||||
|
||||
//-----------------Voice----------------------
|
||||
|
||||
$(document).ready(function () {
|
||||
// Ensure identifiers are only declared once
|
||||
var playPauseButton = $('#play-pause');
|
||||
var currentTimeEl = $('#current-time');
|
||||
var durationEl = $('#duration');
|
||||
var voiceSource = decodeURIComponent(voiceSrc.replace(/&/g, '&'));;
|
||||
// Initialize Wavesurfer
|
||||
var wavesurfer = WaveSurfer.create({
|
||||
container: '#waveform',
|
||||
waveColor: '#e0e0e0',
|
||||
progressColor: '#23a9a9',
|
||||
cursorWidth: 2,
|
||||
cursorColor: '#23a9a9',
|
||||
height: 40,
|
||||
barWidth: 2,
|
||||
responsive: true
|
||||
});
|
||||
|
||||
// Load the audio file
|
||||
console.log(voiceSource);
|
||||
wavesurfer.load(`${voiceSource}`);
|
||||
|
||||
// Play/pause functionality
|
||||
playPauseButton.on('click', function () {
|
||||
if (wavesurfer.isPlaying()) {
|
||||
wavesurfer.pause();
|
||||
playPauseButton.removeClass('pause').addClass('play');
|
||||
} else {
|
||||
wavesurfer.play();
|
||||
playPauseButton.removeClass('play').addClass('pause');
|
||||
}
|
||||
});
|
||||
|
||||
// Update time and progress
|
||||
wavesurfer.on('audioprocess', function () {
|
||||
currentTimeEl.text(formatTime(wavesurfer.getCurrentTime()));
|
||||
});
|
||||
|
||||
// Set duration once ready
|
||||
wavesurfer.on('ready', function () {
|
||||
durationEl.text(formatTime(wavesurfer.getDuration()));
|
||||
});
|
||||
|
||||
// Format time function
|
||||
function formatTime(seconds) {
|
||||
var minutes = Math.floor(seconds / 60);
|
||||
seconds = Math.floor(seconds % 60);
|
||||
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
document.getElementById("MainModal").style.visibility = "visible";
|
||||
|
||||
|
||||
|
||||
$(document).on('keydown', '#EndTaskDate', function () {
|
||||
$("input:radio").prop('checked', false);
|
||||
});
|
||||
@@ -101,7 +103,7 @@ $(document).ready(function () {
|
||||
|
||||
var textArea = $('#Command_Description');
|
||||
var content = textArea.val();
|
||||
content = content.replace(/\n/g, '<br>');
|
||||
/* content = content.replace(/\n/g, '<br>');*/
|
||||
textArea.val(content);
|
||||
|
||||
|
||||
@@ -167,7 +169,12 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
|
||||
$(".date").mask("0000/00/00");
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$('.date').on('input', function () {
|
||||
let startDate = this.value;
|
||||
if (startDate.length == 10) {
|
||||
@@ -439,22 +446,115 @@ function checkEnValid(fixDate1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '#upload-doc', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
for (let i = 1; i <= 6; i++) {
|
||||
let fileInput = document.getElementById(`EditTask_Document${i}`);
|
||||
if (fileInput && fileInput.type === 'file' && fileInput.files.length === 0) {
|
||||
attachFileChangeHandler(fileInput, i);
|
||||
fileInput.click(); // Trigger file selection
|
||||
return; // Exit loop after triggering the first empty input
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function attachFileChangeHandler(fileInput, index) {
|
||||
$(fileInput).off('change').on('change', function () {
|
||||
let file = fileInput.files[0];
|
||||
if (file) {
|
||||
uploadFile(file, index, `.inBox${index}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var indexCount = 0;
|
||||
function remove(index, id) {
|
||||
console.log('#EditTask_Document' + index);
|
||||
$('#EditTask_Document' + index).val('');
|
||||
$('.inBox' + index).html('');
|
||||
$('.inBox' + index).addClass('empty');
|
||||
var indexDeleteCount = 0;
|
||||
function uploadFile(file, id, boxClass) {
|
||||
var formData = new FormData();
|
||||
formData.append('media', file);
|
||||
|
||||
var input = `<input type="file" class="d-none" name="EditTask.Document${index}" id="EditTask_Document${index}" accept=".pdf,.doc,.docx,.txt, image/*">`;
|
||||
var inputDelete = `<input type="hidden" value="${id}" name="EditTask.DeletedFileIds[${indexCount}]"/>"`;
|
||||
console.log(file);
|
||||
var loading = $(boxClass).find('.spinner-loading');
|
||||
loading.show();
|
||||
|
||||
$('.inBox' + index).html(input);
|
||||
$('#deletedItems').append(inputDelete);
|
||||
indexCount++;
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: uploadFileAjax,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: formData,
|
||||
success: function (response) {
|
||||
loading.hide();
|
||||
if (response.isSuccedded) {
|
||||
if (file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
let img = $(`<img class="b${id}">`).attr('src', e.target.result);
|
||||
let box = $(boxClass);
|
||||
if (box.length) {
|
||||
box.removeClass('empty');
|
||||
let deleteBtn = $(`<div class="b${id}" style="cursor: pointer;" onclick="remove(${id}, ${response.id})">
|
||||
<svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="10" height="10" rx="5" fill="#FF4A4A"/>
|
||||
<path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>`);
|
||||
box.find(`.b${id}`).remove(); // Remove any existing delete buttons
|
||||
box.append(img);
|
||||
box.append(deleteBtn);
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
var inputItems = `<input type="hidden" value="${response.id}" name="EditTask.UploadedMedia[${indexCount}]"/>`;
|
||||
$('#fileItems').append(inputItems);
|
||||
indexCount++;
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
$('#EditTask_Document' + id).val('');
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function remove(id, resId) {
|
||||
$('#EditTask_Document' + id).val('');
|
||||
$('.inBox' + id).find('img, div.b' + id).remove();
|
||||
$('.inBox' + id).addClass('empty');
|
||||
|
||||
var input = `<input type="file" class="d-none" name="EditTask.Document${id}" id="EditTask_Document${id}" accept=".pdf,.doc,.docx,.txt, image/*">`;
|
||||
var inputDelete = `<input type="hidden" value="${resId}" name="EditTask.DeletedFileIds[${indexDeleteCount}]"/>`;
|
||||
|
||||
$('.inBox' + id).html(input);
|
||||
$('#deletedItems').append(inputDelete);
|
||||
indexDeleteCount++;
|
||||
|
||||
var loading = $('.inBox' + id + ' .spinner-loading');
|
||||
loading.show();
|
||||
}
|
||||
|
||||
function showAlertMessage(selector, message, timeout) {
|
||||
$(selector).show();
|
||||
$(selector + ' p').text(message);
|
||||
setTimeout(function () {
|
||||
$(selector).hide();
|
||||
$(selector + ' p').text('');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
|
||||
function removeVoice(id) {
|
||||
console.log('#EditTask_Voice');
|
||||
$('#EditTask_Voice').val('');
|
||||
@@ -470,156 +570,6 @@ function removeVoice(id) {
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '#upload-doc', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
let file1 = document.getElementById("EditTask_Document1");
|
||||
let file2 = document.getElementById("EditTask_Document2");
|
||||
let file3 = document.getElementById("EditTask_Document3");
|
||||
let file4 = document.getElementById("EditTask_Document4");
|
||||
let file5 = document.getElementById("EditTask_Document5");
|
||||
let file6 = document.getElementById("EditTask_Document6");
|
||||
|
||||
if (file1.type == "file" && file1.files.length == 0) {
|
||||
console.log('#EditTask_Document1 = ' + file1.files.length);
|
||||
$('#EditTask_Document1').on('change', function () {
|
||||
var fileInput1 = file1.files[0];
|
||||
if (fileInput1) {
|
||||
console.log('repeat');
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img1 = $('<img class="b1">').attr('src', e.target.result);
|
||||
var box1 = $('.inBox1');
|
||||
if (box1.length) {
|
||||
box1.removeClass('empty');
|
||||
//addDeleteButton(box1, 1);
|
||||
var deleteBtn1 = $('<div class="b1" style="cursor: pointer;" onclick="remove(1)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b1').remove();
|
||||
box1.append(img1);
|
||||
box1.append(deleteBtn1);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput1);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file2.type == "file" && file2.files.length == 0) {
|
||||
console.log('#EditTask_Document2 = ' + file2.files.length);
|
||||
$('#EditTask_Document2').on('change', function () {
|
||||
var fileInput2 = file2.files[0];
|
||||
if (fileInput2) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img2 = $('<img class="b2">').attr('src', e.target.result);
|
||||
var box2 = $('.inBox2');
|
||||
if (box2.length) {
|
||||
box2.removeClass('empty');
|
||||
//addDeleteButton(box2,2);
|
||||
var deleteBtn2 = $('<div class="b2" style="cursor: pointer;" onclick="remove(2)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b2').remove();
|
||||
box2.append(img2);
|
||||
box2.append(deleteBtn2);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput2);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file3.type == "file" && file3.files.length == 0) {
|
||||
console.log('#EditTask_Document3 = ' + file3.files.length);
|
||||
$('#EditTask_Document3').on('change', function () {
|
||||
var fileInput3 = file3.files[0];
|
||||
if (fileInput3) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img3 = $('<img class="b3">').attr('src', e.target.result);
|
||||
var box3 = $('.inBox3');
|
||||
if (box3.length) {
|
||||
box3.removeClass('empty');
|
||||
//addDeleteButton(box3, 3);
|
||||
var deleteBtn3 = $('<div class="b3" style="cursor: pointer;" onclick="remove(3)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b3').remove();
|
||||
box3.append(img3);
|
||||
box3.append(deleteBtn3);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput3);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file4.type == "file" && file4.files.length == 0) {
|
||||
console.log('#EditTask_Document4 = ' + file4.files.length);
|
||||
$('#EditTask_Document4').on('change', function () {
|
||||
var fileInput4 = file4.files[0];
|
||||
if (fileInput4) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img4 = $('<img class="b4">').attr('src', e.target.result);
|
||||
var box4 = $('.inBox4');
|
||||
if (box4.length) {
|
||||
box4.removeClass('empty');
|
||||
//addDeleteButton(box4, 4);
|
||||
var deleteBtn4 = $('<div class="b4" style="cursor: pointer;" onclick="remove(4)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b4').remove();
|
||||
box4.append(img4);
|
||||
box4.append(deleteBtn4);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput4);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file5.type == "file" && file5.files.length == 0) {
|
||||
console.log('#EditTask_Document5 = ' + file5.files.length);
|
||||
$('#EditTask_Document5').on('change', function () {
|
||||
var fileInput5 = file5.files[0];
|
||||
if (fileInput5) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img5 = $('<img class="b5">').attr('src', e.target.result);
|
||||
var box5 = $('.inBox5');
|
||||
if (box5.length) {
|
||||
box5.removeClass('empty');
|
||||
//addDeleteButton(box5, 5);
|
||||
var deleteBtn5 = $('<div class="b5" style="cursor: pointer;" onclick="remove(5)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b5').remove();
|
||||
box5.append(img5);
|
||||
box5.append(deleteBtn5);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput5);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file6.type == "file" && file6.files.length == 0) {
|
||||
console.log('#EditTask_Document6 = ' + file6.files.length);
|
||||
$('#EditTask_Document6').on('change', function () {
|
||||
var fileInput6 = file6.files[0];
|
||||
if (fileInput6) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img6 = $('<img class="b6">').attr('src', e.target.result);
|
||||
var box6 = $('.inBox6');
|
||||
if (box6.length) {
|
||||
box6.removeClass('empty');
|
||||
//addDeleteButton(box6, 6);
|
||||
var deleteBtn6 = $('<div class="b6" style="cursor: pointer;" onclick="remove(6)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b6').remove();
|
||||
box6.append(img6);
|
||||
box6.append(deleteBtn6);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput6);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// نمایش اسامی کارگاه
|
||||
var container = $('#partyName');
|
||||
@@ -862,10 +812,38 @@ if (navigator.mediaDevices.getUserMedia) {
|
||||
lastModified: new Date(),
|
||||
});
|
||||
|
||||
let fileVoice = document.getElementById("EditTask_Voice");
|
||||
const dataTransfer = new DataTransfer();
|
||||
dataTransfer.items.add(myFile);
|
||||
fileVoice.files = dataTransfer.files;
|
||||
var formData = new FormData();
|
||||
formData.append('media', myFile);
|
||||
|
||||
console.log(myFile);
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: uploadFileAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: formData,
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
|
||||
var inputVoice = `<input type="hidden" value="${response.id}" name="EditTask.UploadedVoiceMedia" />"`;
|
||||
$('#voiceItem').append(inputVoice);
|
||||
|
||||
//showAlertMessage('.alert-success-msg', response.message, 1500);
|
||||
console.log('voice uploaded');
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
$('#Command_Voice').val('');
|
||||
}
|
||||
loading.hide();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
||||
@@ -77,7 +77,10 @@ $('#searchBtn').on('click', function () {
|
||||
loadMore('list');
|
||||
} else if ($('#btnTaskRequest').hasClass('active')) {
|
||||
|
||||
loadMoreRequest();
|
||||
loadMoreRequest('');
|
||||
} else if ($('#btnAllTaskRequest').hasClass('active')) {
|
||||
|
||||
loadMoreRequest('');
|
||||
}
|
||||
|
||||
});
|
||||
@@ -85,6 +88,7 @@ $('#searchBtn').on('click', function () {
|
||||
|
||||
|
||||
$(document).on('click', "#btnTaskListSelfTask", function () {
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('#tasksAjax').html('');
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
@@ -104,6 +108,7 @@ $('#searchBtn').on('click', function () {
|
||||
});
|
||||
|
||||
$(document).on('click', "#btnTaskListAllTask", function () {
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('#tasksAjax').html('');
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
@@ -122,6 +127,7 @@ $('#searchBtn').on('click', function () {
|
||||
loadMore('AllTask');
|
||||
});
|
||||
$(document).on('click', "#btnTaskListSent", function () {
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('#tasksAjax').html('');
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
@@ -141,6 +147,7 @@ $('#searchBtn').on('click', function () {
|
||||
});
|
||||
|
||||
$(document).on('click', "#btnTaskListReceived", function () {
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('#tasksAjax').html('');
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
@@ -159,6 +166,7 @@ $('#searchBtn').on('click', function () {
|
||||
});
|
||||
|
||||
$(document).on('click', "#btnTaskList", function () {
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('#tasksAjax').html('');
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
@@ -178,38 +186,74 @@ $('#searchBtn').on('click', function () {
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', ".btnTaskRequest", function () {
|
||||
$('#btnTaskListSelfTask').removeClass('active');
|
||||
$('#btnTaskListAllTask').removeClass('active');
|
||||
$('#btnTaskListSent').removeClass('active');
|
||||
$('#btnTaskListReceived').removeClass('active');
|
||||
$('#btnTaskList').removeClass('active');
|
||||
$(document).on('click', ".btnTaskRequest", function () {
|
||||
$('#btnTaskListSelfTask').removeClass('active');
|
||||
$('#btnTaskListAllTask').removeClass('active');
|
||||
$('#btnTaskListSent').removeClass('active');
|
||||
$('#btnTaskListReceived').removeClass('active');
|
||||
$('#btnTaskList').removeClass('active');
|
||||
|
||||
$('.btnTaskRequest').addClass('active');
|
||||
$('#divTaskList').hide();
|
||||
$('#divTaskRequest').show();
|
||||
$('#btnAllTaskRequest').removeClass('active');
|
||||
$('.btnTaskRequest').addClass('active');
|
||||
$('#divTaskList').hide();
|
||||
$('#divTaskRequest').show();
|
||||
|
||||
$('#taskRequestsAjax').html('');
|
||||
$('#GeneralSearch').val('');
|
||||
$('#taskRequestsAjax').html('');
|
||||
$('#GeneralSearch').val('');
|
||||
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
$('#AccountId').trigger('change');
|
||||
$('#StartDate').val('');
|
||||
$('#EndDate').val('');
|
||||
$('#IsDone').val('');
|
||||
$('.dropdown-IsDone .item').removeClass("active");
|
||||
$('.dropdown-IsDone .item:first').addClass("active");
|
||||
$('.selected-display').text($('.dropdown-IsDone .item:first').text());
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
$('#AccountId').trigger('change');
|
||||
$('#StartDate').val('');
|
||||
$('#EndDate').val('');
|
||||
$('#IsDone').val('');
|
||||
$('.dropdown-IsDone .item').removeClass("active");
|
||||
$('.dropdown-IsDone .item:first').addClass("active");
|
||||
$('.selected-display').text($('.dropdown-IsDone .item:first').text());
|
||||
|
||||
|
||||
// $('#IsCanceled').val('');
|
||||
// $('#IsCancelRequest').val('');
|
||||
// $('#IsTimeRequest').val('');
|
||||
// $('#TimeRequestAccepted').val('');
|
||||
// $('#IsCanceled').val('');
|
||||
// $('#IsCancelRequest').val('');
|
||||
// $('#IsTimeRequest').val('');
|
||||
// $('#TimeRequestAccepted').val('');
|
||||
|
||||
loadMoreRequest();
|
||||
});
|
||||
loadMoreRequest('request');
|
||||
});
|
||||
|
||||
$(document).on('click', ".btnTaskRequestAll", function () {
|
||||
$('#btnTaskListSelfTask').removeClass('active');
|
||||
$('#btnTaskListAllTask').removeClass('active');
|
||||
$('#btnTaskListSent').removeClass('active');
|
||||
$('#btnTaskListReceived').removeClass('active');
|
||||
$('#btnTaskList').removeClass('active');
|
||||
$('#btnTaskRequest').removeClass('active');
|
||||
$('#btnAllTaskRequest').addClass('active');
|
||||
$('#divTaskList').hide();
|
||||
$('#divTaskRequest').show();
|
||||
|
||||
|
||||
|
||||
$('#taskRequestsAjax').html('');
|
||||
$('#GeneralSearch').val('');
|
||||
|
||||
Number($('#pageIndex').val(0));
|
||||
Number($('#AccountId').val(0));
|
||||
$('#AccountId').trigger('change');
|
||||
$('#StartDate').val('');
|
||||
$('#EndDate').val('');
|
||||
$('#IsDone').val('');
|
||||
$('.dropdown-IsDone .item').removeClass("active");
|
||||
$('.dropdown-IsDone .item:first').addClass("active");
|
||||
$('.selected-display').text($('.dropdown-IsDone .item:first').text());
|
||||
|
||||
|
||||
// $('#IsCanceled').val('');
|
||||
// $('#IsCancelRequest').val('');
|
||||
// $('#IsTimeRequest').val('');
|
||||
// $('#TimeRequestAccepted').val('');
|
||||
|
||||
loadMoreRequest('allRequested');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -317,7 +361,7 @@ function loadMore(type) {
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width3">تاریخ</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width3">تاریخ سررسید</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width4">طرف حساب</div>
|
||||
<div class="Rtable-cell column-heading width5">عنوان وظیفه</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width6">جزئیات</div>
|
||||
@@ -590,7 +634,7 @@ function loadRequestCount() {
|
||||
|
||||
|
||||
|
||||
function loadMoreRequest() {
|
||||
function loadMoreRequest(type) {
|
||||
loadRequestCount();
|
||||
|
||||
let pageIndex = Number($('#pageIndex').val());
|
||||
@@ -630,7 +674,7 @@ function loadMoreRequest() {
|
||||
startDate: StartDate,
|
||||
timeRequestAccepted: TimeRequestAccepted,
|
||||
generalSearch: generalSearch,
|
||||
type: 'request'
|
||||
type: type
|
||||
},
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
|
||||
@@ -646,7 +690,7 @@ function loadMoreRequest() {
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading d-md-flex d-none width2">
|
||||
<div class="w-100">ارجاع دهنده</div>
|
||||
<div class="w-100">وظیفه</div>`;
|
||||
<div class="w-100">خودم</div>`;
|
||||
|
||||
if (response.positions.length > 0) {
|
||||
response.positions.forEach(function (pos) {
|
||||
@@ -655,7 +699,7 @@ function loadMoreRequest() {
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width3">تاریخ</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width3">تاریخ سررسید</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width4">طرف حساب</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width5">عنوان وظیفه</div>
|
||||
<div class="Rtable-cell column-heading width7 text-end">عملیات</div>
|
||||
@@ -1120,7 +1164,12 @@ function Detail(id) {
|
||||
|
||||
|
||||
//************************************ برای مشاهده زمان و ساعت **********************************/
|
||||
$(".date").mask("0000/00/00");
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$(".date").keyup(function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
|
||||
@@ -49,7 +49,12 @@
|
||||
});
|
||||
|
||||
|
||||
$(".date").mask("0000/00/00");
|
||||
// $(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$('.date').on('input',
|
||||
function () {
|
||||
let startDate = this.value;
|
||||
|
||||
@@ -107,7 +107,12 @@ $(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
$(".date").mask("0000/00/00");
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$(".date").keyup(function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
|
||||
@@ -166,7 +166,7 @@ $(document).ready(function () {
|
||||
|
||||
var textArea = $('#Command_Description');
|
||||
var content = textArea.val();
|
||||
content = content.replace(/\n/g, '<br>');
|
||||
//content = content.replace(/\n/g, '<br>');
|
||||
textArea.val(content);
|
||||
|
||||
// var fileUpload = $("#Command_Picture1").get(0).files;
|
||||
@@ -256,7 +256,12 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
|
||||
$(".date").mask("0000/00/00");
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$(".date").keyup(function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
@@ -517,214 +522,163 @@ $(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
function remove(id) {
|
||||
console.log('#Command_Document' + id);
|
||||
$('#Command_Document' + id).val('');
|
||||
$('.inBox' + id).html('');
|
||||
$('.inBox' + id).addClass('empty');
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '#upload-doc', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let files = [
|
||||
document.getElementById("Command_Document1"),
|
||||
document.getElementById("Command_Document2"),
|
||||
document.getElementById("Command_Document3"),
|
||||
document.getElementById("Command_Document4"),
|
||||
document.getElementById("Command_Document5"),
|
||||
document.getElementById("Command_Document6")
|
||||
];
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
if (files[i].files.length == 0) {
|
||||
attachFileChangeHandler(files[i], i + 1, '.inBox' + (i + 1));
|
||||
$('#' + files[i].id).click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function attachFileChangeHandler(fileInput, id, boxClass) {
|
||||
$('#' + fileInput.id).off('change').on('change', function (e) {
|
||||
e.preventDefault();
|
||||
var fileInputFile = fileInput.files[0];
|
||||
if (fileInputFile) {
|
||||
uploadFile(fileInputFile, id, boxClass);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var indexCount = 0;
|
||||
function uploadFile(file, id, boxClass) {
|
||||
var formData = new FormData();
|
||||
formData.append('media', file);
|
||||
|
||||
// function addDeleteButton(box, id) {
|
||||
// var deleteBtn = $('<div style="cursor: pointer;" onclick="remove('+id+')"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
// deleteBtn.click(function () {
|
||||
// box.empty();
|
||||
// box.addClass('empty');
|
||||
// });
|
||||
// box.append(deleteBtn);
|
||||
// }
|
||||
var loading = $(boxClass).find('.spinner-loading');
|
||||
loading.show();
|
||||
|
||||
$(document).on('click', '#upload-doc', function (e) {
|
||||
e.preventDefault()
|
||||
let file1 = document.getElementById("Command_Document1");
|
||||
let file2 = document.getElementById("Command_Document2");
|
||||
let file3 = document.getElementById("Command_Document3");
|
||||
let file4 = document.getElementById("Command_Document4");
|
||||
let file5 = document.getElementById("Command_Document5");
|
||||
let file6 = document.getElementById("Command_Document6");
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: uploadFileAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: formData,
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
if (file) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img = $('<img class="b' + id + '">').attr('src', e.target.result);
|
||||
var box = $(boxClass);
|
||||
if (box.length) {
|
||||
box.removeClass('empty');
|
||||
var deleteBtn = $('<div class="b' + id + '" style="cursor: pointer;" onclick="remove(' + id + ',' + response.id + ')"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b' + id).remove();
|
||||
box.append(img);
|
||||
box.append(deleteBtn);
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
if (file1.files.length == 0) {
|
||||
console.log('#Command_Document1 = ' + file1.files.length);
|
||||
$('#Command_Document1').on('change', function () {
|
||||
var fileInput1 = file1.files[0];
|
||||
if (fileInput1) {
|
||||
console.log('repeat');
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img1 = $('<img class="b1">').attr('src', e.target.result);
|
||||
var box1 = $('.inBox1');
|
||||
if (box1.length) {
|
||||
box1.removeClass('empty');
|
||||
//addDeleteButton(box1, 1);
|
||||
var deleteBtn1 = $('<div class="b1" style="cursor: pointer;" onclick="remove(1)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b1').remove();
|
||||
box1.append(img1);
|
||||
box1.append(deleteBtn1);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput1);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file2.files.length == 0) {
|
||||
console.log('#Command_Document2 = ' + file2.files.length);
|
||||
$('#Command_Document2').on('change', function () {
|
||||
var fileInput2 = file2.files[0];
|
||||
if (fileInput2) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img2 = $('<img class="b2">').attr('src', e.target.result);
|
||||
var box2 = $('.inBox2');
|
||||
if (box2.length) {
|
||||
box2.removeClass('empty');
|
||||
//addDeleteButton(box2,2);
|
||||
var deleteBtn2 = $('<div class="b2" style="cursor: pointer;" onclick="remove(2)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b2').remove();
|
||||
box2.append(img2);
|
||||
box2.append(deleteBtn2);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput2);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file3.files.length == 0) {
|
||||
console.log('#Command_Document3 = ' + file3.files.length);
|
||||
$('#Command_Document3').on('change', function () {
|
||||
var fileInput3 = file3.files[0];
|
||||
if (fileInput3) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img3 = $('<img class="b3">').attr('src', e.target.result);
|
||||
var box3 = $('.inBox3');
|
||||
if (box3.length) {
|
||||
box3.removeClass('empty');
|
||||
//addDeleteButton(box3, 3);
|
||||
var deleteBtn3 = $('<div class="b3" style="cursor: pointer;" onclick="remove(3)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b3').remove();
|
||||
box3.append(img3);
|
||||
box3.append(deleteBtn3);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput3);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file4.files.length == 0) {
|
||||
console.log('#Command_Document4 = ' + file4.files.length);
|
||||
$('#Command_Document4').on('change', function () {
|
||||
var fileInput4 = file4.files[0];
|
||||
if (fileInput4) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img4 = $('<img class="b4">').attr('src', e.target.result);
|
||||
var box4 = $('.inBox4');
|
||||
if (box4.length) {
|
||||
box4.removeClass('empty');
|
||||
//addDeleteButton(box4, 4);
|
||||
var deleteBtn4 = $('<div class="b4" style="cursor: pointer;" onclick="remove(4)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b4').remove();
|
||||
box4.append(img4);
|
||||
box4.append(deleteBtn4);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput4);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file5.files.length == 0) {
|
||||
console.log('#Command_Document5 = ' + file5.files.length);
|
||||
$('#Command_Document5').on('change', function () {
|
||||
var fileInput5 = file5.files[0];
|
||||
if (fileInput5) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img5 = $('<img class="b5">').attr('src', e.target.result);
|
||||
var box5 = $('.inBox5');
|
||||
if (box5.length) {
|
||||
box5.removeClass('empty');
|
||||
//addDeleteButton(box5, 5);
|
||||
var deleteBtn5 = $('<div class="b5" style="cursor: pointer;" onclick="remove(5)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b5').remove();
|
||||
box5.append(img5);
|
||||
box5.append(deleteBtn5);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput5);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
} else if (file6.files.length == 0) {
|
||||
console.log('#Command_Document6 = ' + file6.files.length);
|
||||
$('#Command_Document6').on('change', function () {
|
||||
var fileInput6 = file6.files[0];
|
||||
if (fileInput6) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var img6 = $('<img class="b6">').attr('src', e.target.result);
|
||||
var box6 = $('.inBox6');
|
||||
if (box6.length) {
|
||||
box6.removeClass('empty');
|
||||
//addDeleteButton(box6, 6);
|
||||
var deleteBtn6 = $('<div class="b6" style="cursor: pointer;" onclick="remove(6)"><svg width="16" height="16" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" rx="5" fill="#FF4A4A"/><path d="M7 7L3 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 7L7 3" stroke="#FFFEFE" stroke-linecap="round" stroke-linejoin="round"/></svg></div>');
|
||||
$('.b6').remove();
|
||||
box6.append(img6);
|
||||
box6.append(deleteBtn6);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(fileInput6);
|
||||
}
|
||||
}).click();
|
||||
return false;
|
||||
var inputItems = `<input type="hidden" value="${response.id}" name="Command.UploadedMedia[${indexCount}]"/>"`;
|
||||
$('#fileItems').append(inputItems);
|
||||
indexCount++;
|
||||
|
||||
// showAlertMessage('.alert-success-msg', response.message, 1500);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
$('#Command_Document' + id).val('');
|
||||
}
|
||||
loading.hide();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// $('#upload-img').click(function () {
|
||||
// $('#Command_Picture1').on('change', function () {
|
||||
// var file = this.files[0];
|
||||
// if (file) {
|
||||
// var reader = new FileReader();
|
||||
// reader.onload = function (e) {
|
||||
// // var input = $('<input type="file" class="d-none" name="CreateTask.Pictures1">').attr('value', e.target.result);
|
||||
// var img = $('<img>').attr('src', e.target.result);
|
||||
// var box = $('#upload-container-img .upload-box.empty:first');
|
||||
// if (box.length) {
|
||||
// box.removeClass('empty');
|
||||
// box.html(img);
|
||||
// addDeleteButton(box);
|
||||
// // box.append(input);
|
||||
// }
|
||||
// }
|
||||
// reader.readAsDataURL(file);
|
||||
// }
|
||||
// }).click();
|
||||
// });
|
||||
function remove(id, resId) {
|
||||
$('#Command_Document' + id).val('');
|
||||
$('.inBox' + id).find('img, div.b' + id).remove();
|
||||
$('.inBox' + id).addClass('empty');
|
||||
|
||||
// $('#upload-voice').click(function () {
|
||||
// $('<input type="file" accept="audio/*">').on('change', function () {
|
||||
// var file = this.files[0];
|
||||
// if (file) {
|
||||
// var reader = new FileReader();
|
||||
// reader.onload = function (e) {
|
||||
// var audio = $('<audio controls></audio>').attr('src', e.target.result);
|
||||
// var box = $('#upload-container-voice .upload-box-voice.empty:first');
|
||||
// if (box.length) {
|
||||
// box.removeClass('empty');
|
||||
// box.html(audio);
|
||||
// addDeleteButton(box);
|
||||
// }
|
||||
// }
|
||||
// reader.readAsDataURL(file);
|
||||
// }
|
||||
// }).click();
|
||||
// });
|
||||
var loading = $('.inBox' + id + ' .spinner-loading');
|
||||
loading.show();
|
||||
|
||||
// Remove from hidden inputs
|
||||
$(`#fileItems input[value='${resId}']`).remove();
|
||||
indexCount--;
|
||||
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('mediaId', resId);
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: deleteFileAjax,
|
||||
data: formData,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
// showAlertMessage('.alert-success-msg', response.message, 1500);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
loading.hide();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#cancel').on('click', function () {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: deleteAllFilesAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
// showAlertMessage('.alert-success-msg', response.message, 1500);
|
||||
window.location.replace('/AdminNew/Company/Task');
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
});
|
||||
//$('#MainModal').modal('toggle');
|
||||
});
|
||||
|
||||
|
||||
function showAlertMessage(selector, message, timeout) {
|
||||
$(selector).show();
|
||||
$(selector + ' p').text(message);
|
||||
setTimeout(function () {
|
||||
$(selector).hide();
|
||||
$(selector + ' p').text('');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
|
||||
// صدا
|
||||
@@ -892,6 +846,40 @@ if (navigator.mediaDevices.getUserMedia) {
|
||||
const dataTransfer = new DataTransfer();
|
||||
dataTransfer.items.add(myFile);
|
||||
fileVoice.files = dataTransfer.files;
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('media', myFile);
|
||||
|
||||
var loading = $('.upload-box-voice').find('.spinner-loading');
|
||||
loading.show();
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
url: uploadFileAjax,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: formData,
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
|
||||
var inputVoice = `<input type="hidden" value="${response.id}" name="Command.UploadedVoiceMedia" />"`;
|
||||
$('#voiceItem').append(inputVoice);
|
||||
|
||||
//showAlertMessage('.alert-success-msg', response.message, 1500);
|
||||
console.log('voice uploaded');
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
$('#Command_Voice').val('');
|
||||
}
|
||||
loading.hide();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
loading.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
||||
1
ServiceHost/wwwroot/AssetsAdminNew/libs/wavesurfer/wavesurfer.min.js
vendored
Normal file
1
ServiceHost/wwwroot/AssetsAdminNew/libs/wavesurfer/wavesurfer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user