add list pending
This commit is contained in:
@@ -21,4 +21,5 @@ public class EditTask:CreateTask
|
||||
public List<AccountViewModel> AssignsLists { get; set; }
|
||||
public bool HasTicket { get; set; }
|
||||
public long TaskScheduleId { get; set; }
|
||||
public bool HasRequest { get; set; }
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public class TaskViewModel
|
||||
public bool CanDelete { get; set; }
|
||||
public bool CanAssign { get; set; }
|
||||
public bool CanCheckRequests { get; set; }
|
||||
public bool HasRequest { get; set; }
|
||||
public AssignViewModel AssignedReceiverViewModel { get; set; }
|
||||
|
||||
public TaskScheduleType ScheduleType { get; set; }
|
||||
|
||||
@@ -15,6 +15,8 @@ public class TaskScheduleDetailsViewModel
|
||||
public string ContractingPartyName { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Count { get; set; }
|
||||
public string FirstEndTaskDate { get; set; }
|
||||
public List<MediaViewModel> Medias { get; set; }
|
||||
|
||||
}
|
||||
@@ -106,14 +106,16 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
{
|
||||
res.EndTaskDate = _accountContext.Assigns.First(a => a.TaskId == res.Id && a.AssignedId == userId)
|
||||
.EndTaskDate.ToFarsi();
|
||||
|
||||
var userAssign = res.AssignViewModels.First(x => x.AssignedId == userId);
|
||||
|
||||
res.AssignViewModels = res.AssignViewModels.Where(x => x.AssignedId == userId).ToList();
|
||||
res.IsDone = res.AssignViewModels.First(x => x.AssignedId == userId).IsDone;
|
||||
res.IsCancel = res.AssignViewModels.First(x => x.AssignedId == userId).IsCancel;
|
||||
res.IsDone = userAssign.IsDone;
|
||||
res.IsCancel = userAssign.IsCancel;
|
||||
res.HasRequest = userAssign.IsCanceledRequest || userAssign.TimeRequest ||
|
||||
userAssign.IsDoneRequest;
|
||||
}
|
||||
|
||||
if (res.TaskScheduleId>0)
|
||||
if (res.TaskScheduleId > 0)
|
||||
{
|
||||
var taskSchedule = _accountContext.TaskSchedules.FirstOrDefault(x => x.id == res.TaskScheduleId);
|
||||
|
||||
@@ -121,7 +123,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
res.ScheduleType = taskSchedule.Type;
|
||||
res.ScheduleCount = taskSchedule.Count;
|
||||
res.ScheduleUnitNumber = taskSchedule.UnitNumber;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//_accountContext.Tasks.Where(x => x.id == TaskId).Select(x => new EditTask()
|
||||
@@ -160,8 +162,6 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
Remove(task);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<TaskViewModel> GetRequestedTasks(TaskSearchModel searchModel)
|
||||
{
|
||||
var accountId = long.Parse(_contextAccessor.HttpContext.User.FindFirst("AccountId").Value);
|
||||
@@ -900,7 +900,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, false),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -1229,7 +1229,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, false),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -1788,7 +1788,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, false),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -2056,7 +2056,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
TaskScheduleId = x.TaskScheduleId
|
||||
|
||||
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
|
||||
|
||||
final = final.Select(x => new TaskViewModel()
|
||||
@@ -2082,7 +2082,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, false),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -2095,7 +2095,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
ScheduleUnitType = x.ScheduleUnitType,
|
||||
TaskScheduleId = x.TaskScheduleId
|
||||
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
|
||||
final = final.Select(x => new TaskViewModel()
|
||||
{
|
||||
@@ -2149,12 +2149,15 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
ScheduleUnitType = x.ScheduleUnitType,
|
||||
TaskScheduleId = x.TaskScheduleId
|
||||
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
return final;
|
||||
}
|
||||
|
||||
public string SetTasksColors(DateTime date, bool isCancel)
|
||||
public string SetTasksColors(DateTime date, bool isCancel, bool hasRequest)
|
||||
{
|
||||
if (hasRequest)
|
||||
return "red";
|
||||
|
||||
if (isCancel)
|
||||
{
|
||||
//return "brown";
|
||||
@@ -2390,7 +2393,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
|
||||
public List<Tasks> GetTasksByTaskScheduleId(long taskScheduleId)
|
||||
{
|
||||
return _accountContext.Tasks.Include(x=>x.Assigns).Where(x => x.TaskScheduleId != null && x.TaskScheduleId == taskScheduleId).ToList();
|
||||
return _accountContext.Tasks.Include(x => x.Assigns).Where(x => x.TaskScheduleId != null && x.TaskScheduleId == taskScheduleId).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -2658,7 +2661,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, false),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -2722,6 +2725,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
{
|
||||
var accountId = long.Parse(_contextAccessor.HttpContext.User.FindFirst("AccountId").Value);
|
||||
var positionValue = int.Parse(_contextAccessor.HttpContext.User.FindFirst("PositionValue").Value);
|
||||
var today = DateTime.Today;
|
||||
var emptyAcc = new AccountViewModel()
|
||||
{
|
||||
Fullname = "-",
|
||||
@@ -2731,7 +2735,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
var raw = _accountContext.Assigns.Include(x => x.Task).ThenInclude(x => x.TaskMedias)
|
||||
.ThenInclude(x => x.Media)
|
||||
.Where(x =>
|
||||
x.Task.IsActiveString == "true" && x.AssignedId == accountId && (!x.IsCanceledRequest && !x.TimeRequest && !x.IsDoneRequest) && x.Task.TicketId == null);
|
||||
x.Task.IsActiveString == "true" && x.AssignedId == accountId && x.Task.TicketId == null);
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.GeneralSearch))
|
||||
{
|
||||
raw = raw.Where(x =>
|
||||
@@ -2764,6 +2768,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
MediaCount = _accountContext.TaskMedias.Count(m => m.TaskId == x.Task.id),
|
||||
Description = x.Task.Description,
|
||||
IsDoneRequest = x.IsDoneRequest,
|
||||
|
||||
});
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.GeneralSearch))
|
||||
{
|
||||
@@ -2802,7 +2807,8 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
MediaCount = x.MediaCount,
|
||||
Description = x.Description,
|
||||
IsDoneRequest = x.IsDoneRequest
|
||||
IsDoneRequest = x.IsDoneRequest,
|
||||
HasRequest = x.IsCancelRequest || x.RequestTime || x.IsDoneRequest
|
||||
});
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.StartDate) && !string.IsNullOrWhiteSpace(searchModel.EndDate))
|
||||
{
|
||||
@@ -2871,8 +2877,10 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
}
|
||||
|
||||
|
||||
var orderResult = result.OrderByDescending(x => x.IsCancel ? 0 : 1).ThenBy(x => x.IsDone ? 1 : 0)
|
||||
.ThenBy(x => x.EndTaskDateGE);
|
||||
var orderResult = result.OrderBy(x => x.IsDone || x.IsCancel)
|
||||
.ThenByDescending(x => x.EndTaskDateGE <= today.AddDays(1) && !x.HasRequest)
|
||||
.ThenByDescending(x => x.HasRequest)
|
||||
.ThenBy(x => x.EndTaskDateGE); // مرتبسازی داخلی بر اساس تاریخ
|
||||
|
||||
|
||||
var final = orderResult.Skip(searchModel.PageIndex).Take(30).ToList();
|
||||
@@ -2906,7 +2914,8 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
MediaCount = x.MediaCount,
|
||||
SelfName = x.SelfName,
|
||||
Description = x.Description,
|
||||
IsDoneRequest = x.IsDoneRequest
|
||||
IsDoneRequest = x.IsDoneRequest,
|
||||
HasRequest = x.IsDoneRequest || x.RequestTime || x.IsCancelRequest
|
||||
|
||||
}).ToList();
|
||||
|
||||
@@ -2934,7 +2943,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AcceptedTimeRequest = x.AcceptedTimeRequest,
|
||||
IsCancelRequest = x.IsCancelRequest,
|
||||
ContractingPartyName = x.ContractingPartyName,
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel),
|
||||
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel, x.HasRequest),
|
||||
MediaCount = x.MediaCount,
|
||||
HasAttachment = x.MediaCount > 0,
|
||||
SelfName = x.SelfName,
|
||||
@@ -2993,6 +3002,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
|
||||
AssignedName = "-",
|
||||
AssignedPositionValue = 0
|
||||
},
|
||||
HasRequest = x.IsCancelRequest || x.RequestTime || x.IsDoneRequest
|
||||
}).ToList();
|
||||
return final;
|
||||
}
|
||||
|
||||
@@ -3,25 +3,26 @@ using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountManagement.Application.Contracts.Media;
|
||||
using AccountManagement.Application.Contracts.Task;
|
||||
using AccountManagement.Application.Contracts.TaskSchedule;
|
||||
using AccountManagement.Domain.TaskScheduleAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Repository;
|
||||
|
||||
public class TaskScheduleRepository: RepositoryBase<long, TaskSchedule>, ITaskScheduleRepository
|
||||
public class TaskScheduleRepository : RepositoryBase<long, TaskSchedule>, ITaskScheduleRepository
|
||||
{
|
||||
private readonly AccountContext _accountContext;
|
||||
|
||||
public TaskScheduleRepository(AccountContext accountContext):base(accountContext)
|
||||
public TaskScheduleRepository(AccountContext accountContext) : base(accountContext)
|
||||
{
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
|
||||
public async Task<TaskScheduleDetailsViewModel> GetDetails(long id)
|
||||
{
|
||||
var taskSchedule=await _accountContext.TaskSchedules.Include(x=>x.TasksList).ThenInclude(x=>x.Assigns)
|
||||
.Include(x=>x.TasksList).ThenInclude(x=>x.TaskMedias).ThenInclude(x=>x.Media).FirstOrDefaultAsync(x => x.id == id);
|
||||
var taskSchedule = await _accountContext.TaskSchedules.Include(x => x.TasksList).ThenInclude(x => x.Assigns)
|
||||
.Include(x => x.TasksList).ThenInclude(x => x.TaskMedias).ThenInclude(x => x.Media).FirstOrDefaultAsync(x => x.id == id);
|
||||
if (taskSchedule == null)
|
||||
{
|
||||
return null;
|
||||
@@ -29,7 +30,7 @@ public class TaskScheduleRepository: RepositoryBase<long, TaskSchedule>, ITaskSc
|
||||
|
||||
var firstTaskDetails = taskSchedule.TasksList.First();
|
||||
|
||||
var firstTimeAssigns = firstTaskDetails.Assigns.Where(x=>x.FirstTimeCreation).ToList();
|
||||
var firstTimeAssigns = firstTaskDetails.Assigns.Where(x => x.FirstTimeCreation).ToList();
|
||||
|
||||
var assignedIds = firstTimeAssigns.Select(x => x.AssignedId).ToList();
|
||||
|
||||
@@ -46,13 +47,15 @@ public class TaskScheduleRepository: RepositoryBase<long, TaskSchedule>, ITaskSc
|
||||
Title = firstTaskDetails.Title,
|
||||
Description = firstTaskDetails.Description,
|
||||
ContractingPartyName = firstTaskDetails.ContractingPartyName,
|
||||
AssignedName = assignedAccounts.Select(x=>x.Fullname).ToList(),
|
||||
AssignedName = assignedAccounts.Select(x => x.Fullname).ToList(),
|
||||
CreationDateFa = firstTaskDetails.CreationDate.ToFarsi(),
|
||||
SenderName = sender.Fullname,
|
||||
TaskScheduleType = taskSchedule.Type,
|
||||
TaskScheduleUnitType = taskSchedule.UnitType,
|
||||
UnitNumber = taskSchedule.UnitNumber,
|
||||
Medias = firstTaskDetails.TaskMedias.Select(x=> new MediaViewModel()
|
||||
Count = taskSchedule.Type == TaskScheduleType.Limited ? taskSchedule.Count : "نامحدود",
|
||||
FirstEndTaskDate = firstTaskDetails.Assigns.FirstOrDefault()?.EndTaskDate.ToFarsi() ?? "",
|
||||
Medias = firstTaskDetails.TaskMedias.Select(x => new MediaViewModel()
|
||||
{
|
||||
Category = x.Media.Category,
|
||||
Id = x.MediaId,
|
||||
|
||||
@@ -273,8 +273,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (userId == Model.SenderId)
|
||||
|
||||
@if (!Model.HasRequest)
|
||||
{
|
||||
@if (userId == Model.SenderId)
|
||||
{
|
||||
<button class="actionBtn" id="AssignBtn">ارجاع</button>
|
||||
<button class="actionBtn" id="deadlineBtn">تغییر مهلت</button>
|
||||
@@ -288,6 +290,7 @@
|
||||
<button class="actionBtn" id="notPossibleBtn">قابل انجام نیست</button>
|
||||
<button class="actionBtn" id="doneBtn">انجام شد</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.modal .modal-content {
|
||||
height: 660px;
|
||||
}
|
||||
|
||||
.modal-xl-taskTime {
|
||||
max-width: 720px;
|
||||
}
|
||||
@@ -33,6 +37,29 @@
|
||||
font-size: 14px;
|
||||
color: #838383;
|
||||
}
|
||||
|
||||
.detailSheduleSection {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 6px;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@@media(max-width:992px) {
|
||||
.title-sub {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
@@media(max-width:768px) {
|
||||
.title-sub {
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
@@ -48,78 +75,93 @@
|
||||
|
||||
<div class="modal-body p-0">
|
||||
<div class="container-fluid">
|
||||
<div class="row text-start">
|
||||
<div class="col-12 col-md-6 mt-3">
|
||||
<div class="title-sub" style="color: #838383">
|
||||
ارجاع دهنده:
|
||||
<span class="text-black">@Model.SenderName</span>
|
||||
<div class="row px-3">
|
||||
<div class="detailSheduleSection mt-3">
|
||||
<div class="text-start">
|
||||
<div class="title-sub" style="color: #838383">
|
||||
ارجاع دهنده:
|
||||
<span class="text-black">@Model.SenderName</span>
|
||||
</div>
|
||||
|
||||
<div class="title-sub">
|
||||
ارجاع گیرنده:
|
||||
<span class="text-black">@Model.AssignedName?.First()</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<div class="title-sub">
|
||||
تاریخ ایجاد:
|
||||
<span class="text-black">@Model.CreationDateFa</span>
|
||||
</div>
|
||||
|
||||
<div class="title-sub">
|
||||
تاریخ سررسید:
|
||||
<span class="text-black">@Model.FirstEndTaskDate</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 text-md-end mt-3">
|
||||
<div class="title-sub">
|
||||
ارجاع گیرنده:
|
||||
<span class="text-black">@Model.AssignedName?.First()</span>
|
||||
|
||||
<div class="detailSheduleSection mt-2">
|
||||
<div class="text-start">
|
||||
<div class="title-sub">
|
||||
طرف حساب:
|
||||
<span class="text-black">@Model.ContractingPartyName</span>
|
||||
</div>
|
||||
<div class="title-sub">
|
||||
عنوان وظیفه:
|
||||
<span class="text-black">@Model.Title</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 mt-3">
|
||||
<div class="title-sub">
|
||||
محدودیت:
|
||||
<span class="text-black">
|
||||
@(Model.TaskScheduleType == TaskScheduleType.Limited ? "محدود" : "نامحدود")
|
||||
</span>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center gap-2 p-0">
|
||||
<div class="detailSheduleSection mt-2 justify-content-center w-100">
|
||||
<div class="title-sub">
|
||||
تعداد یادآوری:
|
||||
<span class="text-black">
|
||||
@(Model.TaskScheduleType == TaskScheduleType.Limited ? "محدود" : "نامحدود")
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-md-center mt-3">
|
||||
<div class="title-sub">
|
||||
دوره بازه:
|
||||
<span class="text-black">
|
||||
@{
|
||||
var unitTypeText = Model.TaskScheduleUnitType switch
|
||||
|
||||
<div class="detailSheduleSection mt-2 justify-content-center w-100">
|
||||
<div class="title-sub">
|
||||
دوره بازه:
|
||||
<span class="text-black">
|
||||
@{
|
||||
var unitTypeText = Model.TaskScheduleUnitType switch
|
||||
{
|
||||
TaskScheduleUnitType.Day => "روزه",
|
||||
TaskScheduleUnitType.Week => "هفته",
|
||||
TaskScheduleUnitType.Month => "ماهه",
|
||||
TaskScheduleUnitType.Year => "سال",
|
||||
_ => "نامشخص"
|
||||
};
|
||||
}
|
||||
@if (Model.UnitNumber == "first")
|
||||
{
|
||||
TaskScheduleUnitType.Day => "روزه",
|
||||
TaskScheduleUnitType.Week => "هفته",
|
||||
TaskScheduleUnitType.Month => "ماهه",
|
||||
TaskScheduleUnitType.Year => "سال",
|
||||
_ => "نامشخص"
|
||||
};
|
||||
}
|
||||
@if (Model.UnitNumber == "first")
|
||||
{
|
||||
@("اول هفته")
|
||||
}
|
||||
else if (Model.UnitNumber == "last")
|
||||
{
|
||||
@("آخر هفته")
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.UnitNumber @unitTypeText
|
||||
}
|
||||
</span>
|
||||
@("اول هفته")
|
||||
}
|
||||
else if (Model.UnitNumber == "last")
|
||||
{
|
||||
@("آخر هفته")
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.UnitNumber
|
||||
@unitTypeText
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-md-end mt-3">
|
||||
<div class="title-sub">
|
||||
تاریخ ایجاد:
|
||||
<span class="text-black">@Model.CreationDateFa</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<div class="title-sub">
|
||||
طرف حساب:
|
||||
<span class="text-black">@Model.ContractingPartyName</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<div class="title-sub">
|
||||
عنوان وظیفه:
|
||||
<span class="text-black">@Model.Title</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<hr class="mt-4"/>
|
||||
|
||||
<div class="col-12 mt-2">
|
||||
@@ -179,7 +221,7 @@
|
||||
<section class="container">
|
||||
<div class="row p-0">
|
||||
<div class="lightbox_img_wrap">
|
||||
<img class="lightbox-enabled min-img" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" data-imgsrc="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" />
|
||||
<img class="lightbox-enabled min-img" src="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })" data-imgsrc="@Url.Page("./Index", "ShowPicture", new { filePath = item.Path })"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -188,17 +230,17 @@
|
||||
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</span>
|
||||
<div class="lightbox-image-wrapper">
|
||||
@@ -213,11 +255,11 @@
|
||||
if (fileExtensions.Contains(extension))
|
||||
{
|
||||
svgName = extension.TrimStart('.').ToLower();
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = 1 })"><img class="uploaded-file" src="/common/filesvg/@(svgName).svg" /></a>
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = 1 })"><img class="uploaded-file" src="/common/filesvg/@(svgName).svg"/></a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = 1 })"><img class="uploaded-file" src="/common/filesvg/unknow.svg" /></a>
|
||||
<a href="@Url.Page("./Index", "GetFile", new { filePath = item.Path, id = 1 })"><img class="uploaded-file" src="/common/filesvg/unknow.svg"/></a>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<button type="button" class="btnTaskFilter btnTicketRequestList me-1" id="btnTicketRequestList">لیست درخواست های تیکت
|
||||
<span class="badge bg-danger rounded-pill me-1 " id="badgeTicketRequesttCount1"></span>
|
||||
</button>
|
||||
<button permission="90116" type="button" class="btnTaskFilter btnScheduleTask me-1" id="btnScheduleTask">
|
||||
<button type="button" class="btnTaskFilter btnScheduleTask me-1" id="btnScheduleTask">
|
||||
وظایف دوره ای
|
||||
<span class="badge bg-danger rounded-pill me-1 " id="badgeScheduleTaskCount1"></span>
|
||||
</button>
|
||||
|
||||
@@ -609,8 +609,8 @@ function loadMore(type) {
|
||||
if (response.pageIndex > 0) {
|
||||
var n = pageIndex + 1;
|
||||
var taskList = response.taskList;
|
||||
|
||||
if (n == 1) {
|
||||
|
||||
if (type === "schedule") {
|
||||
html += `<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
@@ -676,13 +676,16 @@ function loadMore(type) {
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
var isRequestTask = item.hasRequest;
|
||||
|
||||
html += ` <div class="Rtable-cell d-md-block d-none width4">
|
||||
<div class="Rtable-cell--content text-center">${item.createDate}</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-xxl-block d-none width4">
|
||||
<div class="Rtable-cell--content ">${item.endTaskTime} ${item.endTaskDateFA}</div>
|
||||
<div class="Rtable-cell--content ">
|
||||
${isRequestTask ? `در حال بررسی` : `${item.endTaskTime} ${item.endTaskDateFA}` }
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width4">
|
||||
@@ -906,7 +909,9 @@ function loadMore(type) {
|
||||
</div>
|
||||
<div class="d-md-none d-block">
|
||||
<div class="Rtable-cell--content">
|
||||
<span style="color:#404040">${item.endTaskTime} ${item.endTaskDateFA}</span>
|
||||
<span style="color:#404040">
|
||||
${isRequestTask ? `در حال بررسی` : `${item.endTaskTime} ${item.endTaskDateFA}` }
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1011,13 +1016,16 @@ function loadMore(type) {
|
||||
|
||||
html += `</div>`;
|
||||
|
||||
var isRequestTask = item.hasRequest;
|
||||
|
||||
html += `<div class="Rtable-cell d-md-block d-none width6">
|
||||
<div class="Rtable-cell--content ">${item.createDate}</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
<div class="Rtable-cell--content ">${item.endTaskTime} ${item.endTaskDateFA}</div>
|
||||
<div class="Rtable-cell--content ">
|
||||
${isRequestTask ? `در حال بررسی` : `${item.endTaskTime} ${item.endTaskDateFA}` }
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1228,7 +1236,7 @@ function loadMore(type) {
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
|
||||
|
||||
html += `</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-md-none d-block">
|
||||
@@ -1258,7 +1266,9 @@ function loadMore(type) {
|
||||
</div>
|
||||
<div class="d-md-none d-block">
|
||||
<div class="Rtable-cell--content">
|
||||
<span style="color:#404040">${item.endTaskTime} ${item.endTaskDateFA}</span>
|
||||
<span style="color:#404040">
|
||||
${isRequestTask ? `در حال بررسی` : `${item.endTaskTime} ${item.endTaskDateFA}` }
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1471,10 +1481,12 @@ function loadMoreRequest(type) {
|
||||
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
||||
|
||||
|
||||
|
||||
success: function (response) {
|
||||
if (response.pageIndex > 0) {
|
||||
var n = pageIndex + 1;
|
||||
var taskList = response.taskList;
|
||||
console.log(taskList);
|
||||
if (n == 1) {
|
||||
|
||||
html += `<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
@@ -1560,14 +1572,15 @@ function loadMoreRequest(type) {
|
||||
html += `</div>`;
|
||||
|
||||
|
||||
|
||||
html += `
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width6">
|
||||
<div class="Rtable-cell--content ">${item.createDate}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
<div class="Rtable-cell--content ">${item.endTaskTime} ${item.endTaskDateFA}</div>
|
||||
<div class="Rtable-cell--content ">
|
||||
${item.endTaskTime} ${item.endTaskDateFA}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user