merge from daylibug

This commit is contained in:
SamSys
2025-05-25 22:01:09 +03:30
11 changed files with 136 additions and 226 deletions

View File

@@ -597,7 +597,7 @@ public class TaskApplication : ITaskApplication
}
assign.AcceptTimeRequest();
message = string.IsNullOrWhiteSpace(message) ? "درخواست شما مورد تایید قرار گرفت" : message;
var messageEntity = new TaskMessage(message, "تایید درخواست مهلت", assign.id);
@@ -622,6 +622,7 @@ public class TaskApplication : ITaskApplication
{
return operation.Failed("چنین وظیفه ای درخواستی برای مهلت ندارد");
}
assign.RejectTimeRequest();
if (assign.EndTaskDate.Date <= DateTime.Now.Date)
{

View File

@@ -71,14 +71,16 @@ public class Assign : EntityBase
public void AcceptTimeRequest()
{
TimeRequest = false;
ClearRequests();
TimeRequest = false;
AcceptedTimeRequest++;
EndTaskDate = RequestDate < DateTime.Today ? DateTime.Today : RequestDate.Value;
}
public void RejectTimeRequest()
{
TimeRequest = false;
ClearRequests();
TimeRequest = false;
TimeRequestDescription = null;
RequestDate = null;
}
@@ -92,31 +94,36 @@ public class Assign : EntityBase
}
public void AcceptCancelRequest()
{
IsCanceledRequest = false;
ClearRequests();
IsCanceledRequest = false;
IsCancel = true;
}
public void RejectCancel()
{
CancelDescription = null;
ClearRequests();
CancelDescription = null;
IsCanceledRequest = false;
}
public void CompleteRequest(string? doneDescription)
{
DoneDescription = doneDescription;
ClearRequests();
DoneDescription = doneDescription;
IsDoneRequest = true;
}
public void RejectCompleteRequest()
{
IsDoneRequest = false;
ClearRequests();
IsDoneRequest = false;
DoneDescription = null;
}
public void Completed()
{
IsDoneRequest = false;
ClearRequests();
IsDoneRequest = false;
IsDone = true;
}
@@ -128,6 +135,13 @@ public class Assign : EntityBase
TimeRequest = false;
}
public void ClearRequests()
{
IsDoneRequest = false;
IsCanceledRequest = false;
TimeRequest = false;
}
public void InsertNewData(DateTime endTaskDate,bool timeRequest,int acceptedTimeRequest,DateTime? requestDate, string timeRequestDescription, bool isCanceledRequest,
bool isCancel,string cancelDescription,bool isDone,bool isDoneRequest,string? doneDescription)
{

View File

@@ -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, false),
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel,false),
MediaCount = x.MediaCount,
HasAttachment = x.MediaCount > 0,
SelfName = x.SelfName,
@@ -1866,7 +1866,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
.Include(x => x.Task).ThenInclude(x => x.TaskSchedule)
.Where(x =>
x.Task.IsActiveString == "true" && x.Task.SenderId == accountId
&& x.Task.TaskScheduleId != null && x.Task.TaskScheduleId > 0 && (!x.IsCanceledRequest && !x.TimeRequest && !x.IsDoneRequest) && x.Task.TaskSchedule.IsActive == IsActive.True);
&& x.Task.TaskScheduleId != null && x.Task.TaskScheduleId > 0 && (!x.IsCanceledRequest && !x.TimeRequest && !x.IsDoneRequest) && x.Task.TaskSchedule.IsActive== IsActive.True);
if (!string.IsNullOrWhiteSpace(searchModel.GeneralSearch))
{
raw = raw.Where(x =>
@@ -2153,7 +2153,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
return final;
}
public string SetTasksColors(DateTime date, bool isCancel, bool hasRequest)
public string SetTasksColors(DateTime date, bool isCancel,bool hasRequest)
{
if (hasRequest)
return "red";
@@ -2735,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.Task.TicketId == null);
x.Task.IsActiveString == "true" && x.AssignedId == accountId && x.Task.TicketId == null &&!x.IsDoneRequest && !x.IsCanceledRequest);
if (!string.IsNullOrWhiteSpace(searchModel.GeneralSearch))
{
raw = raw.Where(x =>
@@ -2768,7 +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))
{
@@ -2878,8 +2878,8 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
var orderResult = result.OrderBy(x => x.IsDone || x.IsCancel)
.ThenByDescending(x => x.EndTaskDateGE <= today.AddDays(1) && !x.HasRequest)
.ThenByDescending(x => x.HasRequest)
.ThenByDescending(x => x.EndTaskDateGE <= today.AddDays(1) && !x.RequestTime)
.ThenByDescending(x => x.RequestTime)
.ThenBy(x => x.EndTaskDateGE); // مرتب‌سازی داخلی بر اساس تاریخ
@@ -2915,7 +2915,6 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
SelfName = x.SelfName,
Description = x.Description,
IsDoneRequest = x.IsDoneRequest,
HasRequest = x.IsDoneRequest || x.RequestTime || x.IsCancelRequest
}).ToList();
@@ -2943,7 +2942,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, x.HasRequest),
Color = x.IsDone ? "green" : SetTasksColors(x.EndTaskDateGE, x.IsCancel,x.RequestTime),
MediaCount = x.MediaCount,
HasAttachment = x.MediaCount > 0,
SelfName = x.SelfName,
@@ -3003,6 +3002,7 @@ public class TaskRepository : RepositoryBase<long, Tasks>, ITaskRepository
AssignedPositionValue = 0
},
HasRequest = x.IsCancelRequest || x.RequestTime || x.IsDoneRequest
}).ToList();
return final;
}

View File

@@ -6,6 +6,8 @@ public class SalaryAidGroupedByDateViewModel
{
public string MonthFa { get; set; }
public string YearFa { get; set; }
public int Month { get; set; }
public int Year { get; set; }
public List<SalaryAidGroupedByDateViewModelItems> SalaryAidViewModels { get; set; }
public string TotalAmount { get; set; }

View File

@@ -15,7 +15,8 @@ public class SalaryAidViewModel
public string CalculationDateTimeFa { get; set; }
public DateTime CalculationDateTimeGe { get; set; }
public int Month { get; set; }
public int Year { get; set; }
public string EmployeeFullName { get; set; }
public string PersonnelCode { get; set; }

View File

@@ -117,21 +117,29 @@ public class SalaryAidRepository : RepositoryBase<long, SalaryAid>, ISalaryAidRe
}
query = query.Where(x => x.EmployeeId == searchModel.EmployeeId);
var list = query.ToList().Select(x => new SalaryAidViewModel
var list = query.ToList().Select(x =>
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName,
EmployeeId = x.EmployeeId,
CreationDate = x.CreationDate.ToFarsi(),
Id = x.id,
MonthFa = pc.GetMonth(x.CalculationDate).ToFarsiMonthByIntNumber(),
YearFa = pc.GetYear(x.CalculationDate).ToString(),
PersonnelCode = personnelCodes.FirstOrDefault(p => p.EmployeeId == x.EmployeeId).PersonnelCode.ToString(),
SalaryAidDateTimeFa = x.SalaryAidDateTime.ToFarsi(),
SalaryAidDateTimeGe = x.SalaryAidDateTime,
WorkshopId = x.WorkshopId
var monthInt = pc.GetMonth(x.CalculationDate);
var yearInt = pc.GetYear(x.CalculationDate);
return new SalaryAidViewModel
{
Amount = x.Amount.ToMoney(),
AmountDouble = x.Amount,
EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName,
EmployeeId = x.EmployeeId,
CreationDate = x.CreationDate.ToFarsi(),
Id = x.id,
MonthFa = monthInt.ToFarsiMonthByIntNumber(),
YearFa = yearInt.ToString(),
Month = monthInt,
Year = yearInt,
PersonnelCode = personnelCodes.FirstOrDefault(p => p.EmployeeId == x.EmployeeId).PersonnelCode
.ToString(),
SalaryAidDateTimeFa = x.SalaryAidDateTime.ToFarsi(),
SalaryAidDateTimeGe = x.SalaryAidDateTime,
WorkshopId = x.WorkshopId,
CalculationDateTimeGe = x.CalculationDate
};
}).ToList();
result.GroupedByDate = list.GroupBy(x => new { x.YearFa, x.MonthFa }).Select(x =>
new SalaryAidGroupedByDateViewModel()
@@ -144,10 +152,12 @@ public class SalaryAidRepository : RepositoryBase<long, SalaryAid>, ISalaryAidRe
EmployeeName = s.EmployeeFullName,
Id = s.Id,
PersonnelCode = s.PersonnelCode,
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa
SalaryAidDateTimeFa = s.SalaryAidDateTimeFa,
}).ToList(),
Year = x.First().Year,
Month = x.First().Month,
TotalAmount = x.Sum(s => s.AmountDouble).ToMoney()
}).ToList();
}).OrderByDescending(x => x.Year).ThenByDescending(x=>x.Month).ToList();
return result;
}
else if (!string.IsNullOrWhiteSpace(searchModel.StartDate) &&
@@ -187,7 +197,7 @@ public class SalaryAidRepository : RepositoryBase<long, SalaryAid>, ISalaryAidRe
query = query.Where(x => x.SalaryAidDateTime >= startDate && x.SalaryAidDateTime <= endDate);
}
result.SalaryAidListViewModels = query.OrderByDescending(x => x.CreationDate).Skip(searchModel.PageIndex).Take(30).ToList().Select(
result.SalaryAidListViewModels = query.OrderByDescending(x => x.SalaryAidDateTime).Skip(searchModel.PageIndex).Take(30).ToList().Select(
x => new SalaryAidViewModel()
{
Amount = x.Amount.ToMoney(),

View File

@@ -786,7 +786,37 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.Task
}
}
public IActionResult OnGetChatMessageDetailsTask(long assignId, long taskId)
public IActionResult OnGetCreateSimpleModal()
{
var positionValue = _authHelper.CurrentAccountInfo().PositionValue == null
? 0
: _authHelper.CurrentAccountInfo().PositionValue;
if (positionValue > 0)
{
if (_authHelper.GetPermissions().Any(x => x == 903))
{
var model = new CreateTaskModal()
{
AccountsList = _accountApplication.GetAccountEqualToLowerPositionValue(),
PositionViewModels = _positionApplication.GetLowerPosition(),
DateFa = DateTime.Now.ToFarsi(),
Id = _authHelper.CurrentAccountId()
};
return Partial("CreateModal", model);
}
else
{
return Forbid();
}
}
else
{
return Forbid();
}
}
public IActionResult OnGetChatMessageDetailsTask(long assignId, long taskId)
{
var result = _taskApplication.GetTaskMessages(assignId);

View File

@@ -24,7 +24,8 @@
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet"/>
<!-- sweet alerts -->
<link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
@* <link href="~/assetsadminnew/libs/sweetalert2/sweetalert2.min.css" rel="stylesheet" /> *@
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
<style>
@@ -86,7 +87,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 align-items-center justify-content-between m-0 p-0">
<div class="col d-flex">
<img src="~/AssetsClient/images/icons/headphone.png" alt="" class="img-fluid me-2" style="width: 45px;object-fit: cover;" />
<div>
@@ -101,7 +102,7 @@
</div>
</div>
</div>
<button type="button" class="btn btn-rounded mb-5 goToTop"> <i class="fa fa-chevron-up" style="font-size: 20px"></i> برو بالا</button>
<button type="button" class="btn btn-rounded goToTop mb-5"> <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" /> *@
@@ -110,27 +111,27 @@
<div class="row">
<div class="col-12">
<div class="ticketButtons d-flex justify-content-between gap-2 overflow-auto">
<div class="cardTicket ticketActive d-flex align-items-center justify-content-between rounded ticketActive active" data-type-ticket="" onclick="ticketType('ticketAll', this)">
<div class="cardTicket ticketActive d-flex align-items-center justify-content-between ticketActive active rounded" data-type-ticket="" onclick="ticketType('ticketAll', this)">
<span class="ticketButtonsTxt">همه</span>
<div style="background-color: #33D0D0" class="ticketCount gray" id="All">@Model.TypesCountOfTicketViewModel.All</div>
</div>
<div class="cardTicket d-flex align-items-center rounded justify-content-between" data-type-ticket="پاسخ داده شده" onclick="ticketType('ticketAnswered', this)">
<div class="cardTicket d-flex align-items-center justify-content-between rounded" data-type-ticket="پاسخ داده شده" onclick="ticketType('ticketAnswered', this)">
<span class="ticketButtonsTxt">پاسخ داده شده</span>
<div style="background-color: #60A5FA" class="ticketCount blue" id="Answered">@Model.TypesCountOfTicketViewModel.Answered</div>
</div>
<div class="cardTicket d-flex align-items-center rounded justify-content-between" data-type-ticket="درحال بررسی" onclick="ticketType('ticketInProgress', this)">
<div class="cardTicket d-flex align-items-center justify-content-between rounded" data-type-ticket="درحال بررسی" onclick="ticketType('ticketInProgress', this)">
<div class="ticketButtonsTxt">در حال بررسی</div>
<div style="background-color: #EAB308" class="ticketCount yellow" id="Pending">@Model.TypesCountOfTicketViewModel.Pending</div>
</div>
<div class="cardTicket d-flex align-items-center rounded justify-content-between" data-type-ticket="باز" onclick="ticketType('ticketOpen', this)">
<div class="cardTicket d-flex align-items-center justify-content-between rounded" data-type-ticket="باز" onclick="ticketType('ticketOpen', this)">
<span class="ticketButtonsTxt">باز</span>
<div style="background-color: #E2E8F0" class="ticketCount bg-info" id="Open">@Model.TypesCountOfTicketViewModel.Open</div>
</div>
<div class="cardTicket d-flex align-items-center rounded justify-content-between" data-type-ticket="بسته شده" onclick="ticketType('ticketClosed', this)">
<div class="cardTicket d-flex align-items-center justify-content-between rounded" data-type-ticket="بسته شده" onclick="ticketType('ticketClosed', this)">
<span class="ticketButtonsTxt">بسته شد</span>
<div style="background-color: #84CC16" class="ticketCount green" id="Closed">@Model.TypesCountOfTicketViewModel.Closed</div>
</div>
<div class="cardTicket d-flex align-items-center rounded justify-content-between" data-type-ticket="زباله" onclick="ticketType('trash', this)">
<div class="cardTicket d-flex align-items-center justify-content-between rounded" data-type-ticket="زباله" onclick="ticketType('trash', this)">
<span class="ticketButtonsTxt">زباله دان</span>
<div style="background-color: lightcoral" class="ticketCount green" id="CountOfTrashTicket">@Model.CountOfTrashTicket</div>
</div>
@@ -140,13 +141,13 @@
<div class="container-fluid">
<div class="row p-lg-2 p-auto">
<div class="wrapper list-box table-ticket bg-white ">
<div class="wrapper list-box table-ticket bg-white">
<div class="Rtable Rtable--collapse">
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky">
<div class="Rtable-cell column-heading width1">
<span class="d-flex justify-content-start text-white align-items-center">
<span class="d-flex justify-content-start align-items-center text-white">
@* <input type="checkbox" class="form-check-input checkAll me-1" name="" id="checkAll2"> *@
<label for="checkAll2">ردیف</label>
</span>
@@ -168,7 +169,7 @@
<div class="Rtable-cell d-md-block d-flex width1">
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-between">
<input type="checkbox" class="form-check-input " name="" id="">
<input type="checkbox" class="form-check-input" name="" id="">
1
</span>
</div>
@@ -202,14 +203,14 @@
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
<span class="d-md-none d-flex mx-1">جزئیات</span>
</button>
<button class="btn-ticket-edit position-relative d-md-block d-none mx-1">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M12.0433 6.49955L12.0214 6.52145L5.53808 13.0047C5.52706 13.0158 5.51612 13.0267 5.50525 13.0375C5.34278 13.1996 5.19895 13.3432 5.09758 13.5222L5.5266 13.7651L5.09758 13.5222C4.99622 13.7012 4.94714 13.8984 4.89171 14.1211C4.88801 14.136 4.88427 14.151 4.88049 14.1662L4.30029 16.4869L4.78351 16.6077L4.30029 16.4869C4.29808 16.4958 4.29585 16.5047 4.29361 16.5136C4.25437 16.6703 4.21246 16.8377 4.19871 16.9782C4.18357 17.1329 4.1871 17.394 4.39651 17.6034C4.60592 17.8128 4.86698 17.8163 5.02171 17.8012C5.16225 17.7875 5.32958 17.7456 5.48627 17.7063C5.49521 17.7041 5.50411 17.7018 5.51297 17.6996L7.83376 17.1194C7.84888 17.1156 7.86388 17.1119 7.87878 17.1082C8.10151 17.0528 8.29868 17.0037 8.47772 16.9023C8.65675 16.801 8.80027 16.6571 8.9624 16.4947C8.97324 16.4838 8.98416 16.4729 8.99519 16.4618L15.4785 9.97855L15.5004 9.95666C15.796 9.6611 16.0507 9.40638 16.2296 9.17534C16.4208 8.9284 16.5695 8.65435 16.5843 8.31531C16.5862 8.27179 16.5862 8.22821 16.5843 8.18469C16.5695 7.84565 16.4208 7.5716 16.2296 7.32466C16.0507 7.09362 15.796 6.8389 15.5004 6.54334L15.4785 6.52145L15.4566 6.49954C15.161 6.20396 14.9063 5.94922 14.6753 5.77034C14.4283 5.57917 14.1543 5.43041 13.8152 5.41564C13.7717 5.41374 13.7281 5.41374 13.6846 5.41564C13.3456 5.43041 13.0715 5.57917 12.8246 5.77034C12.5935 5.94922 12.3388 6.20396 12.0433 6.49955Z" />
<path d="M11.4583 6.87484L14.2083 5.0415L16.9583 7.7915L15.1249 10.5415L11.4583 6.87484Z" />
</svg>
<span class="mx-1 d-md-none d-flex">ویرایش</span>
<span class="d-md-none d-flex mx-1">ویرایش</span>
</button>
<button href="" class="btn-ticket-delete d-md-block d-none">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
@@ -218,15 +219,15 @@
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">حذف</span>
<span class="d-md-none d-flex mx-1">حذف</span>
</button>
<button class="btn-ticket-more d-md-none d-block position-relative">
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span class="mx-1 align-items-center d-flex justify-content-center">
<p class="my-0 mx-1">عملیات</p>
<span class="align-items-center d-flex justify-content-center mx-1">
<p class="mx-1 my-0">عملیات</p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)" />
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)" />
@@ -262,7 +263,7 @@
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
<span class="d-md-none d-flex mx-1">جزئیات</span>
</button>
</div>
</div>
@@ -274,7 +275,7 @@
<div class="Rtable-cell d-md-block d-flex width1">
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-between">
<input type="checkbox" class="form-check-input " name="" id="">
<input type="checkbox" class="form-check-input" name="" id="">
1
</span>
</div>
@@ -308,14 +309,14 @@
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
<span class="d-md-none d-flex mx-1">جزئیات</span>
</button>
<button class="btn-ticket-edit position-relative d-md-block d-none mx-1">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M12.0433 6.49955L12.0214 6.52145L5.53808 13.0047C5.52706 13.0158 5.51612 13.0267 5.50525 13.0375C5.34278 13.1996 5.19895 13.3432 5.09758 13.5222L5.5266 13.7651L5.09758 13.5222C4.99622 13.7012 4.94714 13.8984 4.89171 14.1211C4.88801 14.136 4.88427 14.151 4.88049 14.1662L4.30029 16.4869L4.78351 16.6077L4.30029 16.4869C4.29808 16.4958 4.29585 16.5047 4.29361 16.5136C4.25437 16.6703 4.21246 16.8377 4.19871 16.9782C4.18357 17.1329 4.1871 17.394 4.39651 17.6034C4.60592 17.8128 4.86698 17.8163 5.02171 17.8012C5.16225 17.7875 5.32958 17.7456 5.48627 17.7063C5.49521 17.7041 5.50411 17.7018 5.51297 17.6996L7.83376 17.1194C7.84888 17.1156 7.86388 17.1119 7.87878 17.1082C8.10151 17.0528 8.29868 17.0037 8.47772 16.9023C8.65675 16.801 8.80027 16.6571 8.9624 16.4947C8.97324 16.4838 8.98416 16.4729 8.99519 16.4618L15.4785 9.97855L15.5004 9.95666C15.796 9.6611 16.0507 9.40638 16.2296 9.17534C16.4208 8.9284 16.5695 8.65435 16.5843 8.31531C16.5862 8.27179 16.5862 8.22821 16.5843 8.18469C16.5695 7.84565 16.4208 7.5716 16.2296 7.32466C16.0507 7.09362 15.796 6.8389 15.5004 6.54334L15.4785 6.52145L15.4566 6.49954C15.161 6.20396 14.9063 5.94922 14.6753 5.77034C14.4283 5.57917 14.1543 5.43041 13.8152 5.41564C13.7717 5.41374 13.7281 5.41374 13.6846 5.41564C13.3456 5.43041 13.0715 5.57917 12.8246 5.77034C12.5935 5.94922 12.3388 6.20396 12.0433 6.49955Z" />
<path d="M11.4583 6.87484L14.2083 5.0415L16.9583 7.7915L15.1249 10.5415L11.4583 6.87484Z" />
</svg>
<span class="mx-1 d-md-none d-flex">ویرایش</span>
<span class="d-md-none d-flex mx-1">ویرایش</span>
</button>
<button href="" class="btn-ticket-delete d-md-block d-none">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
@@ -324,15 +325,15 @@
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">حذف</span>
<span class="d-md-none d-flex mx-1">حذف</span>
</button>
<button class="btn-ticket-more d-md-none d-block position-relative">
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span class="mx-1 align-items-center d-flex justify-content-center">
<p class="my-0 mx-1">عملیات</p>
<span class="align-items-center d-flex justify-content-center mx-1">
<p class="mx-1 my-0">عملیات</p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)" />
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)" />
@@ -368,7 +369,7 @@
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
<span class="d-md-none d-flex mx-1">جزئیات</span>
</button>
</div>
</div>
@@ -394,7 +395,8 @@
@section Script {
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
@* <script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script> *@
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();

View File

@@ -112,8 +112,8 @@ $(document).ready(function () {
//for refreshing the select
$(document).on('change', '.selectRadioBox', function () {
$('.select2Member').val(null).trigger('change');
$('#partyNameSearch,#count,#taskTitle').val('');
$("#limit,#infinity").prop("checked",false);
//$('#partyNameSearch,#count,#taskTitle').val('');
//$("#limit,#infinity").prop("checked",false);
});
//for refreshing the select

View File

@@ -44,9 +44,8 @@ $(document).ready(function () {
});
});
function DetailTicket(TicketID) {
var ticketID = Number(TicketID);
var url = `/AdminNew/Company/Ticket/Index?ticketID=${ticketID}&handler=ShowDetailTicketByAdmin`;
function DetailTicket(ticketId) {
var url = `/AdminNew/Company/Ticket/Index?ticketID=${Number(ticketId)}&handler=ShowDetailTicketByAdmin`;
AjaxUrlContentModal(url);
}
@@ -56,7 +55,8 @@ function CreateTaskTicket(id) {
contractingPartyNameTask = $(`#contractingParting_${id}`).text();
commandTitleTask = $(`#title_${id}`).text();
var url = `/AdminNew/Company/Task/Index?handler=CreateTaskModal`;
//var url = `/AdminNew/Company/Task/Index?handler=CreateTaskModal`;
var url = `/AdminNew/Company/Task/Index?handler=CreateSimpleModal`;
AjaxUrlContentModal(url);
//commandTitleTask = 'پشتیبانی شماره ' + $(`#ticketNumber_${id}`).text() + ' - ' + $(`#title_${id}`).text();
@@ -167,7 +167,7 @@ function ticketType(parameters, element) {
var pagIndexMain = 0;
function loadTicketsMore(status) {
let pageIndex =pagIndexMain;
let pageIndex = pagIndexMain;
var b = pageIndex % 30;
if (b === 0) {
@@ -347,10 +347,10 @@ function loadTicketsMore(status) {
<div class="badget ${statusClass} w-100 my-2">${item.status}</div>
</div>
<div class="col-md-6 col-6">
<button type="button" class="btn-ticket-task position-relative d-md-none d-flex align-items-center justify-content-center w-100 ${
item.hasTask || item.status === "بسته شده" ? "disable" : ""}" onclick=${!item.hasTask
? `"CreateTaskTicket(${item.id})"`
: ""} style="color: #283868; border: 1px solid #5e6d9b;">
<button type="button" class="btn-ticket-task position-relative d-md-none d-flex align-items-center justify-content-center w-100 ${item.hasTask || item.status === "بسته شده" ? "disable" : ""}"
onclick=${!item.hasTask
? `"CreateTaskTicket(${item.id})"`
: ""} style="color: #283868; border: 1px solid #5e6d9b;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 8H17.8C18.9201 8 19.4802 8 19.908 8.21799C20.2843 8.40973 20.5903 8.71569 20.782 9.09202C21 9.51984 21 10.0799 21 11.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8V8Z" fill="#7DD3FC"/>
<path d="M3 8C3 7.06812 3 6.60218 3.15224 6.23463C3.35523 5.74458 3.74458 5.35523 4.23463 5.15224C4.60218 5 5.06812 5 6 5H8.34315C9.16065 5 9.5694 5 9.93694 5.15224C10.3045 5.30448 10.5935 5.59351 11.1716 6.17157L13 8H3Z" fill="#38BDF8"/>
@@ -360,8 +360,7 @@ function loadTicketsMore(status) {
</button>
</div>
<div class="col-md-6 col-6">
<button type="button" class="btn-ticket-detail position-relative d-md-none d-flex align-items-center justify-content-center w-100" onclick="DetailTicket(${
item.id})">
<button type="button" class="btn-ticket-detail position-relative d-md-none d-flex align-items-center justify-content-center w-100" onclick="DetailTicket(${item.id})">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"/>
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"/>

View File

@@ -122,155 +122,6 @@ $('#saveAdminResponseTicket').on('click', function (e) {
});
});
function loadTicketsMore(status) {
let pageIndex = Number($('#pageIndex').val());
var b = pageIndex % 30;
if (b === 0) {
$.ajax({
async: false,
contentType: 'charset=utf-8',
dataType: 'json',
type: 'GET',
url: urlAjaxLoadData,
data: {
pageIndex: pageIndex,
status: status
},
headers: { "RequestVerificationToken": antiForgeryToken },
success: function (response) {
if (response.pageIndex > 0) {
var n = pageIndex + 1;
$.each(response.data, function (i, item) {
var statusClass = '';
switch (item.status) {
case "باز":
statusClass = "badget-open";
break;
case "درحال بررسی":
statusClass = "badget-inprogress";
break;
case "پاسخ داده شده":
statusClass = "badget-answer";
break;
case "بسته شده":
statusClass = "badget-close";
break;
default:
statusClass = "";
break;
};
const html = `
<div></div>
<div class="ticket-list Rtable-row align-items-center position-relative openAction">
<div class="Rtable-cell d-md-block d-flex width1">
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-center">
${n}
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--content">${item.ticketNumber}</div>
</div>
<div class="Rtable-cell width3 d-md-block d-none">
<div class="Rtable-cell--content">${item.contractingPartyName}</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content">${item.title}</div>
</div>
<div class="Rtable-cell d-md-block d-none width4">
<div class="Rtable-cell--content">${item.creationDateTime}</div>
</div>
<div class="Rtable-cell d-md-block d-none width5">
<div class="Rtable-cell--content">
<div class="badget ${statusClass}">
${item.status}
</div>
</div>
</div>
<div class="Rtable-cell width6 text-end">
<div class="Rtable-cell--content align-items-center d-flex justify-content-end">
<button class="btn-ticket-detail position-relative d-flex align-items-center d-md-block d-none" onclick="DetailTicket(${item.id})">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
</button>
<button class="btn-ticket-more position-relative d-flex align-items-center d-md-none d-block">
<span class="mx-1 d-md-none d-flex">عملیات</span>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"/>
</svg>
</button>
</div>
</div>
</div>
<div class="operation-div w-100">
<div class="operations-btns">
<div class="row p-0">
<div class="d-flex align-items-center justify-content-between">
<span class="span1">شماره پشتیبانی:</span>
<span class="span1">${item.ticketNumber}</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span1">تاریخ ایجاد:</span>
<span class="span1">${item.creationDateTime}</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span1">نام کاربر:</span>
<span class="span1">${item.contractingPartyName}</span>
</div>
<div class="col-md-12 col-12 p-1">
<div class="badget ${statusClass} w-100 my-2">${item.status}</div>
</div>
<div class="col-md-12 col-12">
<button class="btn-ticket-detail position-relative d-md-none d-flex align-items-center justify-content-center w-100" onclick="DetailTicket(${item.id})">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
</button>
</div>
</div>
</div>
</div>
`;
$('.loadTicketsAjax').append(html);
n += 1;
});
var newPageIndex = pageIndex + response.pageIndex;
$('#pageIndex').val(newPageIndex);
}
},
failure: function (response) {
console.log(5, response);
}
});
}
}
var submition = false;
function submitionAjax() {
$.ajax({
@@ -296,7 +147,7 @@ function loadMessages() {
headers: { "RequestVerificationToken": antiForgeryToken },
data: { 'ticketID': TicketId },
success: function (response) {
console.log(response);
var responseTickets = response.ticketDetail;
html += `<div class="ticket-message-reciever row" style="${responseTickets.ticketType === 'inPage' ? 'display: flex;' : ''}">`;
@@ -1262,7 +1113,7 @@ if (navigator.mediaDevices.getUserMedia) {
$('#voiceItem').append(inputVoice);
//showAlertMessage('.alert-success-msg', response.message, 1500);
console.log('voice uploaded');
//console.log('voice uploaded');
} else {
showAlertMessage('.alert-msg', response.message, 3500);
$('#Command_Voice').val('');